[gmx-users] FYI: How to install Gromacs 4.6.5 on Windows 7

Christian Wagner wagner at mail.sysu.edu.cn
Mon Feb 24 07:26:23 CET 2014


Hello All,

Below I summarize a cygwin installation of Gromacs 4.6.5 using FFTW 3.3.3 on a Windows 7, 64 bit SP1 system. The installation passed all the regression tests.

Note:
I give first the recipe and below explanations per point. This installation on a laptop computer (Intel Core i3 2330M (2 core, 4 threads)) may be more suitable for teaching purposes than for a serious modeler, who is looking for a high performance setup.




Prerequisites:

A) administrator privileges on the Windows computer
B) 7-zip (or similar)
C) cygwin 64 bit (installed are all current packages except 'audio' and 'mail')
D) cmake 2.8.12.1
E) MinGW (complete installation)




all installations are done using the 64 bit version of cygwin




Recipe:

1) download FFTW 3.3.3 and unpack
2) ./configure --prefix c:/fftw_3.3.3 --enable-float --enable-sse2
3) make
4) make install
5) link lib location to PATH

6) download Gromacs 4.6.5 and unpack
7) cmake .. -DCMAKE_INSTALL_PREFIX="/cygdrive/c/Gromacs465" -DGMX_X11=OFF -DGMX_GPU=OFF -DGMX_MPI=OFF -DGMX_PREFER_STATIC_LIBS=ON -DGMX_CPU_ACCELERATION=SSE2 -DBUILD_SHARED_LIBS=NO 
8) make
9) make install

10) delete build
11) cmake .. -DCMAKE_INSTALL_PREFIX="/cygdrive/c/Gromacs465" -DGMX_GPU=OFF -DGMX_MPI=ON -DGMX_PREFER_STATIC_LIBS=ON -DGMX_CPU_ACCELERATION=SSE2
12) make
13) make install-mdrun

14) find mdrun_mpi.exe
15) replace mdrun.exe with mdrun_mpi.exe
16) rename mdrun_mpi.exe to mdrun.exe



Verify installation:
17) download regression tests and unpack
18) source /cygdrive/c/Gromacs465/bin/GMXRC
19) ./gmxtest.pl all




Explanations:

A) Windows permissions frequently interfere with the installation: you need to ensure that there is actually read and write access at the locations the installations take place (despite being administrator: if you need to confirm administrator rights etc, the installation will stop). You may also need to reapply the security settings during the installation and propagate the permission along the tree (this issue come up especially at point 9)). Make sure to install into root directories, to prevent difficulties handling long file names. If you want to run the programs not only from the cygwin terminal but also from a systems command prompt, you will also need to add the different paths of the executables' locations to the system environment variable.
B) 7-zip is free ware and can handle not only .zip but also .tar and .gz formats: http://www.7-zip.org/
C) When installing cygwin make sure that there are no spaces or special characters in the directory as this will cause compatibility issues: best to install into the root as indicated during the cygwin installation setup. After installation link the OpenMPI /bin to PATH and the OpenMPI /lib to LD_LIBRARY_PATH This entire cygwin installation will take many hours to download and to install (overnight), it may be best to do it in smaller steps http://cygwin.com/
D) After installation link cmake to PATH The graphical interface did not work for me, so I used the command line:  http://www.cmake.org/
E) The interface requires quite some clicking to get all the packages selected. After installation link MinGW to PATH http://www.mingw.org/wiki/Getting_Started 

1) The precompiled dll's did not work for me, so I installed FFTW using cygwin http://www.fftw.org/ unpack it into the root, e.g. C:/fftw-3.3.3 and cd to this location.
2) Here C:/fftw_3.3.3 is the installation directory --enable-float gives single digit precision, which is necessary for Gromacs 4.6.5 --enable-sse2 makes sure Gromacs 4.6.5 compatible acceleration is used.
5) Ensure the library will be found

6) Unpack it into the root e.g. C:/Gromacs then add a build directory e.g. C:/Gromacs/Gromabld then cd into this build directory. If you choose  another location beware of the troubles indicated in A) http://www.gromacs.org/Downloads
7) -DCMAKE_INSTALL_PREFIX="/cygdrive/c/Gromacs465" is the installation directory -DGMX_MPI=OFF With the second installation 10) to 13) you will replace the non-mpi mdrun.exe with one that can run on multiple cores. If you omit this step, the generated mdrun.exe will not work as it is not compatible with the current cygwin setup. -DGMX_PREFER_STATIC_LIBS=ON makes sure your library is found: pointing to it via -DFFTW_LIBRARY and -DFFTW_INCLUDE causes errors. -DGMX_CPU_ACCELERATION=SSE2 makes sure to select the Gromacs compatible acceleration.
8) You may need to reapply the security permissions c.f. A) then continue with make. You may need to add #define HAVE_SYS_TIME_H at the very top of the file impl.h
9) When Gromacs is installed the resulting folder hierarchy causes security permission troubles, c.f. A) reapply the permissions until the folder tree is established. This also means that 'make install' needs to be typed in again (on my system: more than ten times).

10) Now the mpi compatible mdrun_mpi.exe is being built: delete all content of the build directory, e.g. the contents of C:/Gromacs465/Gromabld
11) Similar to 7) Note that MPI is ON. Note that OpenMPI needs to be linked to PATH and LD_LIBRARY_PATH as indicated above in C)
12) You may need to adjust permissions c.f. A)
13) Only reinstall mdrun

14) On my system the mdrun_mpi_exe was in C:/cygwin64/usr/local/gromacs/bin
15) and 16) If you do not copy and rename mdrun_mpi.exe to the Gromacs installation C:/Gromacs465/bin then you will need to point to this mdrun_mpi.exe each time you want to use it (the mdrun.exe which is in C:/Gromacs465/bin from steps 7) to 9) is not compatible with the current cygwin installation). 


17) Put the unpacked http://gerrit.gromacs.org/download/regressiontests-4.6.5.tar.gz into a root folder e.g. C:/GromacsTest/
18) cd into the regressiontests-4.6.5 directory e.g. C:/GromacsTest/regressiontests-4.6.5 then get access to Gromacs by sourcing it
19) more infos on testing http://www.gromacs.org/Documentation/Installation_Instructions?highlight=install#4.12._Testing_GROMACS_for_correctness


Special thanks to Mark (Gromacs) and Matteo (FFTW) for their tips. Please, amend any errors.
Happy biocomputing,
Chris Wagner




 


More information about the gromacs.org_gmx-users mailing list