[gmx-users] Gromacs-4.6 installation on cygwin problem

Mirco Wahab mirco.wahab at chemie.tu-freiberg.de
Wed Mar 13 21:01:28 CET 2013


On 13.03.2013 20:11, Mark Abraham wrote:
> I think that post is saying you want
>
> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lib -DGMX_GPU=OFF
> -DGMX_BUILD_OWN_FFTW=OFF ../gromacs-4.6
>
> and to make sure your PATH contains /usr/local/lib. I haven't tried it. I
> don't know whether source-ing GMXRC in the usual way takes care of the
> latter for you.

I refreshed the related information and instructions today and attach 
them to this posting (avoiding line breaks in commands) =>

-------------- next part --------------
sourcing GMXRC  doesn't include /usr/local/lib into the PATH.

Under cygwin, you'll have to craft your own path, partly because
you have to make sure to avoid any installed windows stuff with 
the same name to be found during compilation and installation.
I ended up with the following path, set up in ~/.bashrc

[.bashrc]
 ...
 export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/
 # set some other useful vars
 export LD_LIBRARY_PATH=/usr/local/lib
 export LIBRARY_PATH=/usr/local/lib
 export CPATH=/usr/local/include
 # prepare for Gromacs
 if [ -e /opt/gromacs461/bin/GMXRC.bash ] ; then
   source /opt/gromacs461/bin/GMXRC.bash
 fi
 ...
 
 Log in/out to activate changes.
 
 Then, in order to get working gromacs, you'll have to
 jump over two another hurdles: one significant, one simple.
 The built-in gcc compiler in cygwin is 4.5.3, which will 
 compile Gromacs but only without AVX instructions. The
 fftw3 in cygwin is double precision, you'll need a single 
 precision and SSE2-optimized static library (anything 
 using the dll crashed).
 
 Install gcc 4.7.2 - follow those instructions in
 http://matpack.de/cygwin/index.html
 very closely. This will give you a working gcc 4.7.2 on cygwin. 
  ** for installation of GMP, MPFR , and MPC 
  follow those instructions in http://matpack.de/cygwin/index.html
  ** BUT use /different/ options for the gcc-configuration and compilation, 
  do the following:
    cd ~
    tar -xf gcc-4.7.2.tar.bz2
    rm -rf gcc-build/; mkdir gcc-build/; cd gcc-build/
    ../gcc-4.7.2/configure --enable-languages=c,c++,fortran --enable-static --enable-shared --enable-shared-libgcc --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --enable-libgomp --enable-threads=posix
    make -j 4
    make install
  
 Before installing the fftw3f, you'll have to change
 the make-version from 3.82 to 3.81 (do this in the
 cygwin setup interface, both versions are available)
 Then, do the following:
  cd ~
  mkdir -p fftw3; cd fftw3
  tar xzf fftw-3.3.3.tar.gz
  rm -rf fftw-3-build/; mkdir fftw-3-build/; cd fftw-3-build/
  ../fftw-3.3.3/configure --enable-float --enable-shared --enable-openmp --enable-sse2 --with-our-malloc
  make -j 4
  make install

If all went fine, you may try to install gromacs with static linkage (otherwise,
it will crash on dll call eg. of fftw3f)
  cd ~
  tar xzf gromacs-4.6.1.tar.gz
  rm -rf gromacs-build/; mkdir gromacs-build/; cd gromacs-build/
  cmake -DGMX_OPENMP=ON -DGMX_PREFER_STATIC_LIBS=ON -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/opt/gromacs461 -DGMX_GPU=OFF ../gromacs-4.6.1
  make -j 4
  make install

  Then, after re-login, the command "which mdrun" should show
  /opt/gromacs461/bin/mdrun

By chance, I installed 4.6.1 today and, so far, it just works. If
anybody is interested, I could post performance figures in comparison
to a Win64/VC10/SDK7.1 build.

Regards

M.


More information about the gromacs.org_gmx-users mailing list