SPECFEM / specfem3d

SPECFEM3D_Cartesian simulates acoustic (fluid), elastic (solid), coupled acoustic/elastic, poroelastic or seismic wave propagation in any type of conforming mesh of hexahedra (structured or not).
GNU General Public License v3.0
390 stars 224 forks source link

Find a better way to build internal scotch #2

Closed QuLogic closed 10 years ago

QuLogic commented 10 years ago

Building the internal copy of scotch involves modifying its Makefiles. This is a bit hackish, plus git always complains that I modified those files even though I didn't really do so, and have no intention of checking in the changes.

We should find a better way (recursive autoconf, maybe?)

jedbrown commented 10 years ago

Which Makefile is modified? The modifications can either go in a new "Makefile.config" file that is included by the versioned Makefile, or the versioned Makefile can be a template that is processed by configure to create the real on. Including a simple Makefile.config is preferred, in my opinion. Whatever the choice, a versioned file should not be modified as part of the build.

QuLogic commented 10 years ago

After running configure:

# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   src/decompose_mesh/scotch_5.1.12b/src/libscotch/Makefile
#   modified:   src/decompose_mesh/scotch_5.1.12b/src/scotch/Makefile
#

This has been the case with SVN as well; I just don't use SPECFEM3D enough to look into it. (And if I really had any say in it, I'd just nuke the entire scotch directory. ;)

QuLogic commented 10 years ago

The comments in configure.ac claim that it does the following:

 # the following modifies the default scotch Makefile such that the package
 # will only be compiled once (no recompilation) when calling make

However, it seems that these modifications don't actually depend on any actual configuration values. It might be best (aka simplest) to just modify the Makefiles in git itself whenever someone updates scotch.

QuLogic commented 10 years ago

A point in favour of figuring out how to run scotch's configure as well is that it sometimes won't build: http://geodynamics.org/pipermail/cig-seismo/2013-July/000574.html

QuLogic commented 10 years ago

the following modifies the default scotch Makefile such that the package

will only be compiled once (no recompilation) when calling make

To clarify this statement, it does two things:

  1. Removes the clean dependency from the scotch and libscotch targets.
  2. Changes the install targets so that they only copy changed libraries/headers.

I believe the best course of action is to make the changes to the Makefiles in git permanent, and remove the modification code from configure.ac. The above two changes have already been made in scotch upstream and in the next release, so no-one will have to remember to make this change again in the future.

komatits commented 10 years ago

Already fixed I think, in recent versions of "configure" and "make"

QuLogic commented 10 years ago

Already fixed I think, in recent versions of "configure" and "make"

You are correct, and I was the one who did it too. Silly me, not closing this ticket.