[CIG-SEISMO] Specfem2D wave field dump bug

Michael Gineste michael.gineste at ntnu.no
Wed Apr 12 12:51:06 PDT 2017


Hi Specfem2D team,

First I would like to thank you for making and maintaining such an
excellent piece of software.

I encountered a bug when wanting to dump the entire wave field at some
rate but with no need of the postscript plot output (switching this off
as postscript export is rather slow). Running the code with
output_postscript_snapshot = .false. and output_wavefield_dumps = .true.
would result in a segmentation fault. The reason being that the variable
this_is_the_first_we_dump was not initialised correctly leading to other
variables not being allocated.
I have attached my simpel workaround as a diff file, which might not be
the optimal solution but it worked for my purpose. As a sidenote, the
wavefield dump input NSTEP_BETWEEN_OUTPUT_WAVE_DUMPS is not used
directly, so one must set NSTEP_BETWEEN_OUTPUT_IMAGES to the value one
wants.

In continuation of this I have question that I hoped you could help me
with.
I have used the function utils/recombine_all_slices_from_binary_dump.f90
as offset for making a slightly more flexible recombining routine. But I
have found that the search for duplicates is a really slow process when
the mesh is large (as is said in the printout message) and this becomes
quite the bottleneck for my use.

So I was wandering if this information of which coordinates interfacing
partitions shares, were not already calculated in the preparation of a
simulation? So that I could export this information at same time of
dumping grid and load this later, saving me the (brute force) search for
duplicates.

I have spent some time looking through the Specfem2D code, but I have
not managed to conclude whether this information on coordinate
duplicates between partitions is available or not. Could you help me
with confirming/refute that this information is being generated
somewhere in the code, and if this information really is there, point me
towards the area/variable names that I should look at? 

My code version is (git) commit
dd9cc6b798da8b4ff7137eb8d96fd2a6bc4685eb, I cloned the stable repo
fairly recently.

Thank you.

Best regards,

Michael Gineste

PhD Candidate
Department of Mathematical Sciences
Norwegian University of Science and Technology (NTNU)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: prepare_timerun.diff
Type: text/x-patch
Size: 821 bytes
Desc: not available
URL: <http://lists.geodynamics.org/pipermail/cig-seismo/attachments/20170412/77380b88/attachment.bin>


More information about the CIG-SEISMO mailing list