Compiling your own code

From FEFF

Appendix B: Compiling your own code

Compiling your own feff binaries is always a good idea, as the resulting executables will generally be faster. The feff source code is in `jfeff/feff90/src' - so that's where you need to go.

If you're on Linux/Unix, you're lucky. Open the `Makefile' file and edit the statement specifying the fortran90 compiler and its compilation options. Close the file, and type 'make' on the command line. If you're interested in using parallel MPI calculations for increased speed on parallel computer infrastructure, give the make MPI command. The resulting executables now ought to be in `jfeff/feff90/bin/Seq' or `jfeff/feff90/bin/MPI'. These folders will contain a set of 12 executables that together comprise the feff code.

Since the main two dimensioning parameters, nclusx and lx, are now dynamically set by the code during each run, there is less need for recompilation than in older versions of feff. Other dimensioning parameters, including the maximum number of potentials nphx and the maximum number of spin states nspx, are still static and can only be changed through recompilation. You may want to edit `feff90/src/COMMON/m dimsmod.f90' to set these to the desired value before you compile.

We have endeavored to make feff portable to all architectures without any modification. If your machine does not reproduce the test output files `xmu.dat' and/or `chi.dat' to high accuracy, please let us know. Also, please report any compiler problems or warning messages to the authors, as this will help us achieve full portability.

Compilation requirements have changed from previous versions of feff. We are now a fortran90 code, and hence a fortran90 compiler is now required.

We provide precompiled binaries for different architectures, including Macintosh and MS Windows, since it is difficult for some users to obtain a good compiler or compile code. These binaries were compiled using Compaq Visual Fortran v. 6.6 on Windows, and Absoft on Mac. Precompiled linux/unix binaries were compiled using intel's ifort compiler. We generally recommend starting out with a conservative compilation - all optimization disabled, maximum safety compiler flags especially for maintaining floating point precision. Then recompile a faster version checking against the original results. Use a testcase containing either the SCF or FMS card to make sure the FMS routines are safely compiled.

The FEFF source code is fully self-contained, i.e. it doesn't need to be linked against any external libraries.

Additionally, we've noticed that on some machines it is necessary to increase stack size or available virtual memory in order to run the code succesfully. Your sys admin or your system's documentation can help you do this.



Previous Section: (B) Installation

Back to FEFF Document Contents

developer's resources