xraypy / feff85exafs

Feff8L: Open Source theoretical EXAFS fitting standards
Other
15 stars 7 forks source link

use scons to build feff85exafs #1

Closed bruceravel closed 10 years ago

bruceravel commented 10 years ago

The "build system" bequeathed to us by the Feff Project is entirely inadequate. It is poorly documented, quite fragile, inflexible -- basically a mess. This pull request is a proposed solution -- or, at least, the beginning of one.

I chose to use scons as the build system because (1) it is way easier to grok than GNU Autotools and (2) the Makefile replacement is basically a python script. I thought that a python based build system would play well with Larch and Larch users.

What I have done with this PR is to make a simple system that compiles the broken-apart Feff85 into static libraries and executable "modules". Basically, I have tried to reproduce a normal, non-MPI build of feff85 using its "module" structure. I have dropped a SConstruct file into each subdir and a master SConstruct file into the src dir. I have renamed all the Makefiles (to dissuade one from attempting to run make) and cleaned up a few extraneous files. I also inserted a file (FMS/ffmod3.f) that was missing from what was given to us by the FP. I cleaned up a few things in EXCH/mpse.f so that it will compile, however lines 37 and 57 are certainly broken.

I have not made any tests other than verifying that the executables run. I have not tested the build system except on my Ubuntu machine. Assuming this PR is accepted and this becomes the build system, I will test other systems and begin writing unit tests.

Ultimately, we want to do real work on feff85exafs (for example, making a genfmt library that can be called as needed by larch and others). But a sane build system seems like the first step.

newville commented 10 years ago

Agreed. Eventually, I think we want to fully get rid of the current concept of "modules", and produce a library/API with a few simple calls, conceptually similar to many of the current computational modules, but eliminating the need for a single master input file and ideally without any input files read in Fortran.

bruceravel commented 10 years ago

We'll just go in circles with the agreement.

Since you're OK with scons, I'll carry on in the coming weeks. I'll test on some different systems and I'll start working on some unit tests so we can begin hacking away safely at the source code.