|
Friday, 09 September 2005 |
|
Before you can compile and install GROMACS, there are a couple of other software packages that must be present on your system.
- ANSI C compiler, and possibly Fortran. GROMACS can be compiled entirely in C, which means you should be able to get it running on essentially any UNIX-style computer in the world. However, we also provide the innermost loops in Fortran to improve performance, so we strongly recommend you to use a Fortran compiler if you can - it makes a huge difference! For modern Intel and AMD processors we provide even faster assembly loops though, so for those you can skip Fortran.
- If you want to run in parallel, you need MPI. If you are running on a supercomputer you probably already have an optimized MPI version installed - consult your documentation or ask your system administrator.
If you are using workstations we recommend the free LAM MPI package (www.lam-mpi.org). If it is not already on your system you can use these RPMs - note that you usually also have to install the libaio dependencies. All these packages were made for CentOS 4, but might work elsewhere too:
Centos 4 / i386
Centos 4 / x86_64
Centos 4 / ia64
Source packages / tarball
You need to be root to install those, so you might have to ask your system administrator. Install the LAM package with a command like:
|
rpm -Uvh lam-7.0.6-5.i386.rpm |
|
There are also packages at the LAM site, and you can pick up the latest source version there in case you prefer to compile from scratch.
- You need an FFT library to perform Fourier transforms. Gromacs-3.3 and later versions support FFTW-2.1.x, FFTW-3.x (different interface from version 2), Intel Math Kernel library version 6.0 and later, and we also have a slower built-in version of FFTPACK in case you really don't want to install a good (free) library.
We currently recommend that you use FFTW since it is the most tested one, and in addition it is also free and faster than the alternatives. Pretty good deal, right? You can find more information about FFTW at www.fftw.org. FFTW version 3 has a completely new calling interface from version 2, but Gromacs supports both.
Starting with Gromacs-3.3 we no longer rely on the FFTW version of parallel transforms, so you don't need to worry about MPI versions of the libraries. Below are binary rpm packages of FFTW3 for some common architectures. When applicable, these have SSE/Altivec instructions enabled for better performance, in contrast to the default version available e.g. in Fedora-Extras. You only need the -devel package to compile things, but it's usually a good idea to install while you're at it anyway.
In case you want to compile FFTW-3.x yourself, it is again a good idea to make both single and double precision versions while you are at it. Start with single precision, using these configure options:
|
./configure --enable-float --enable-threads |
|
Add "--enable-sse" if you computers are i686 or x86-64. This will install FFTW header files in /usr/local/include and the library files in /usr/local/lib. If you do not like that (You must have root permissions to write there), you can place them e.g. in your own home directory by using the option --prefix. If you for instance use --prefix=/home/joe/fftw, the headers will go in /home/joe/fftw/include and the library files in /home/joe/fftw/lib.
Once the configuration is ready you can compile FFTW by just typing
and when the build is ready you install it with the command
Let's do the double precision FFTW version too directly. Clean up the tree after your install with the command:
And then repeat the entire installation process, but now with the configure options:
|
./configure --enable-threads |
|
and in addition "--enable-sse2" on Xeon, Pentium4, and x86-64. The current Gromacs versions doesn't depend on any thread support in FFTW, so you can safely remove that flag in case it causes problems.
- SSE support in Linux. For workstations running Linux on modern Intel and AMD processors we provide extremely fast assembly language loops. To use this code you need a version of the GNU assembler (binutils) that fully supports Intel syntax, and kernel version 2.4 that introduced support for SSE instructions. This should be included in any modern Linux distributions. Since Gromacs 3.3 includes some code to prepare for multithreading parallelization, we need a slightly newer binutils than before. The configuration script will check this for you, and complain load if your version is too old. GNU Binutils 2.12 and later are know to work, but some earlier ones might also be OK - it is checked by the configuration script, which will complain loud if there is a problem. If your version is too old you can download and install from this source:
binutils-2.16.tar.gz
Unfortunately we can't provide you with an RPM package here since it is only useful for really old systems, and there are simply too many different operation systems and versions out there! If you have a really old installation it might be easier to just upgrade your Linux distribution.
OK, you've finished the most difficult part - now it's time to configure GROMACS!
Take me to step 2!
|