Gromacs

Compilation

    Table of contents
    No headers

    Currently GROMACS depends on few external libraries, indeed, for most libraries we have drop-in replacements (e.g. FFTpack, LApack and BLAS). In the long run this is hard to maintain, and there are many available libraries for the code we need. A default compilation now would use:

    • FFTW3 (or MKL, FFT2, ACML, FFTpack)
    • BLAS & LAPACK from any vendor (or the built-in version)
    • XDR routines (or the built-in version)
    • GSL (optional, used in some tools)
    • C compiler, with optional Fortran (but hardly necessary anywhere)

    Coding changes that will be effectuated directly following release of 4.1:

    • Code will be linked with a C++ compiler, allowing the development of C++ libraries (where necessary with C wrappers) - since most compilers, including gcc are really C++ compilers this is not a problem
    • 64 bit integers will be obligatory - we are not aware of any platform where this could be a problem
    • libxml2 will be obligatory - this is simple to compile, as it is written in C and does not depend on external libraries, hence it can be installed anywhere where it is not already available.
    • Possibly we will start using HDF5 for storage of mdrun output files (depending on availability on different platforms, since this is not easy to install).

    Some other important things:

    • Don't use the C preprocessor to generate code. Errors in macros aren't caught by the compiler, and some primitive preprocessors don't support everything gcc does.
    • If you think the above point doesn't apply to you because you know how to write macros, make sure you are 100% aware of the standard. You know that #define square(x) ((x)*(x)) is formally not allowed, right? (you are only allowed to expand an argument once according to ISO C) Or... use functions!
    • Take compiler warnings seriously, and fix them. The point isn't that your warning could be a bug, but 100 random warnings will hide the one that really is a bug!
    • Only use functions that are ISO C (and C++ in the future). If you want to use a UNIX-only function, put it in an #ifdef-block.


    Please remember that the future won't start before you roll up your sleeves and start working on it.

    Page last modified 08:37, 8 Jul 2011 by carsten