On 3/27/13 6:57 AM, Qinghua Liao wrote:
Dear gmx users,

I tried to compile gromacs 4.5.4 with double precision, but it failed. The
reason was a little wired.

Firstly, I used the following commands to compile gromacs 4.5.4 together
with fftw 3.3 for serial and parallel version with single precision, and I
made it successfully.


  1014  ./configure --prefix=/usr/users/iff_th2/liao/fftw-3.3 --enable-sse
--enable-threads --enable-float --enable-shared CC=gcc
  1015  make
  1016  make install
  1017  make distclean
  1018  export CPPFLAGS=-I/usr/users/iff_th2/liao/fftw-3.3/include
  1019  export LDFLAGS=-L/usr/users/iff_th2/liao/fftw-3.3/lib

  1022  mv gromacs-4.5.4 gromacs454
  1023  cd gromacs454/

  1026  ./configure --prefix=/usr/users/iff_th2/liao/gromacs454/
--enable-float --enable-threads CC=gcc --disable-gcc41-check
  1027  make
  1028  make install

  1031  make distclean
  1032  cd ../fftw-3.3
  1034  ./configure --prefix=/usr/users/iff_th2/liao/fftw-3.3 --enable-sse
--enable-threads --enable-float --enable-shared --enable-mpi CC=gcc
  1035  make
  1036  make install
  1037  make distclean
  1038  cd ../gromacs454/
  1039  ls
  1040  make distclean
  1041  ./configure --prefix=/usr/users/iff_th2/liao/gromacs454/
--enable-float --enable-threads CC=gcc --disable-gcc41-check --enable-mpi
--program-suffix=_mpi
  1042  make
  1043  make install
  1044  make distclean

But when I used these similar commands to compile for the double precision,
it failed.


  1049  ./configure --prefix=/usr/users/iff_th2/liao/fftw-3.3
--enable-long-double --enable-threads --enable-shared --enable-mpi CC=gcc
  1050  make
  1051  make install
  1052  make distclean
  1053  cd ../gromacs454/
  1054  make distclean
  1055  ./configure --prefix=/usr/users/iff_th2/liao/gromacs454/
--enable-double --enable-threads CC=gcc --disable-gcc41-check --enable-mpi
--program-suffix=_d
  1056  make

The error showed to me was:

/usr/bin/ld: /usr/local/lib/libfftw3.a(plan-dft-c2r-2d.o): relocation
R_X86_64_32 against `a local symbol' can not be used when making a shared
object; recompile with -fPIC /usr/local/lib/libfftw3.a: could not read
symbols: Bad value

I added the option of --with-fPIC, but it was not recognized, and then I
changed it to --with-pic, but the error was still the same.

I don't know why gromacs can recognize the fftw library when doing the
single float compilation, but not for the double float compilation, I
already used the shared option. Could someone give me some suggestions to
help me this out? Any reply will be appreciated.


In your last step, you're not using --enable-shared like you did in every preceding step. Adding that flag should fix it.

http://www.gromacs.org/Documentation/Installation_Instructions_4.5#Details_for_building_the_FFTW_prerequisite

Gromacs 4.5.4 is pretty old; is there any reason you're not using a new version? You'll get much better performance from 4.6.1.

-Justin

--
========================================

Justin A. Lemkul, Ph.D.
Research Scientist
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

========================================
--
gmx-users mailing list    [email protected]
http://lists.gromacs.org/mailman/listinfo/gmx-users
* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
* Please don't post (un)subscribe requests to the list. Use the www interface or send it to [email protected].
* Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to