SPECFEM / specfem2d

SPECFEM2D simulates forward and adjoint seismic wave propagation in two-dimensional acoustic, (an)elastic, poroelastic or coupled acoustic-(an)elastic-poroelastic media, with Convolution PML absorbing conditions.
GNU General Public License v3.0
191 stars 147 forks source link

create a better (i.e. non recursive) Makefile for the 2D version #152

Closed komatits closed 9 years ago

komatits commented 9 years ago

From https://github.com/geodynamics/specfem2d/pull/137

From @QuLogic The 2D code is still using recursive makefiles. That means to build bin/xspecfem2d, make changes directories to src/specfem2d and spawns another make process, but it does that for every executable. Each of those spawned make processes is independent of the others. One of these could build one of the shared files for one executable target at the same time that another wants it.

With specfem3d(_globe), the build is non-recursive, so there's only one make process and it knows all dependencies from the beginning. Files never get compiled extra times, and the entire build is in correct order. So I think we need to do the same for this code. A temporary workaround might be to disable parallel building.

From @QuLogic Changing the build would take careful review and time I know I don't have right now (until after AGU, at least). So disabling parallel make might be the simplest option for now, unless someone else is willing to do something about it now.

From @komatits Thanks! It would be better to put it back and fix the Makefile though (i.e. make it non recursive), when someone has time. I guess it is mostly a matter of copying the Makefile and the rules.mk files from SPECFEM3D (_Cartesian) and using them in SPECFEM2D after updating / replacing the different file names. Thanks, Dimitri.

komatits commented 9 years ago

Done by @QuLogic