|
Friday, 09 September 2005 |
Developers and people using CVS
Please read the developer instructions too, your configuration might involve some extra issues due to the dynamic dependency tracking!
Normal users
First you need to unpack the source:
|
gzip -dc gromacs-3.3.tar.gz | tar -xvf - |
|
The next step is then to configure Gromacs. This is usually straightforward; just cd to the Gromacs directory and type
This will check you system and automatically configure GROMACS with the default options and best optimizations for your type of computer. The script will let you know about any problems. If you don't want GROMACS installed in /usr/local/gromacs (you have to be root to write there), select the path you want with the --prefix option.
You can get a listing of all options recognized by configure by using the --help option.
- If you want to compile a parallel version of GROMACS, use the --enable-mpi option.
- The default alternative is to compile GROMACS in single precision, double precision is selected by the --disable-float option.
- GROMACS tries to find FFTW and all optional libraries (like Lesstif and FFTW) automatically, but this requires that they are present in the default places where the system searches for include files and libraries. If this is not the case (for instance, your system might not look in /usr/local/include and /usr/local/lib where FFTW is placed) you can tell configure to include these catalogues by using the variables CPPFLAGS and LDFLAGS for includes and libraries, respectively.
For instance, assume we have installed FFTW with --prefix=/home/joe/fftw. If your shell is tcsh, you set
|
setenv CPPFLAGS -I/home/joe/fftw/include setenv LDFLAGS -L/home/joe/fftw/lib |
|
or, if you are using a bash shell:
|
export CPPFLAGS=-I/home/joe/fftw/include export LDFLAGS=-L/home/joe/fftw/lib |
|
and then run the configuration script. If you prefer to use e.g. your older FFTW2 installation instead of the default FFTW3, specify it with
|
./configure --with-fft=fftw2 |
|
The currently available FFT choices are fftw3, fftw2, mkl (Intel MKL), and FFTPACK (built-in and slow).
- Similarly, if you don't like the compilers configure detects, just set them with the variables CC and/or F77 (MPICC for the MPI C compiler). You can add extra libraries (-llibrary) in the LIBS variable.
- The configure script automatically detects not only your architecture, but also the specific CPU version of your computer to optimize as much as possible. Different CPU types will be installed in subdirectories below the architecture directory. If you don't want this, you can select an explicit location for binaries and libraries with --exec-prefix. If you have many similar machines, but with slightly different CPUs, it might be a good idea to compile one full version of GROMACS without CPU-specific optimizations or MPI parallelization (this version will be located in the main architecture directory), and then only compile mdrun for each CPU type. (Linux is a notable exception; we compile both non-assembly, SSE and 3DNow loops and select which one to use at runtime.)
- GROMACS can use shared libraries on almost any platform, but since there are a few special cases where it doesn't work (MPI builds on aix, and OS X) it is not enabled by default. Static libraries also result in binaries that are more portable (you won't have to install the libraries if you want to make a test run on a computer without GROMACS). On the other hand, shared libraries will decrease the installation size from 100Mb to 10Mb, so you might want to try using it with --enable-shared.
- If you want to start over or change your configuration a later time (once you have started to compile things) you should restore the distribution state by typing
Once the configuration seems to work it's time to compile!
Take me to step 3!
|