compile amber 11 cuda on centos linux

Here are the steps that allowed me to actually compile amber, amber mpi, amber cuda, and some other cuda variations on Centos 5.6.

After each make clean I had to rerun the python patch script, that was something wasn’t so clear and made my compiling not fun when figuring it out.

  1. amber 11 with bugfix13 and ambertools bugfix 4
  2. Installing it at /pkg/amber/11-1.5.0
  3. Get Amber11.tar.gz and get bugfix all for amber 11 at
  4. get ambertools 1.5 at
  5. Get bugfix for ambertools at
  6. cd /pkg/amber
  7. tar -xvpf Amber11.tar.gz which puts it in amber11 folder
  8. tar -xvpf AmberTools.1.5.tar.bz2 which puts it in amber11 folder
  9. mv amber11 11-1.5.0
  10. export AMBERHOME=/pkg/amber/11-1.5.0
  11. cd /pkg/amber/11-1.5.0
  12. patch -p0 -N < bugfix.all
  13. mv bugfix.all so we know how many bugfixes it does
  14. download bugfix.all for amber
  15. download apply_bugfix.x
  16. chmod 700 apply_bugfix.x
  17. ./apply_bugfix.x bugfix.all
  18. mv bugfix.all

# now that all the bugfixes done let’s compile ambertools

  1. cd /pkg/amber/11-1.5.0/AmberTools/src
  2. ./configure gnu
  3. NOTE: after installing AmberTools, if you want to compile       Amber11 using AmberTools 1.5, you must run the script first, e.g.:       cd /pkg/amber/11-1.5.0; ./; make serial       (See the Amber11 Users’ Manual for full instructions,       and be sure to have a backup, since the       script will modify your Amber11 files.)
  4. make install
  5. cd /pkg/amber/11-1.5.0
  6. ./
  7. cd src
  8. make serial
  9. cd ../test
  10. make test

359 file comparisons passed

21 file comparisons failed

0 tests experienced errors

== mpi time parallel ==

  1. yum install mpich2.x86_64 mpich2-devel.x86_64
  2. cd /pkg/amber/11-1.5.0/AmberTools/src
  3. make clean
  4. ./configure -mpi gnu
  5. cd ../../src
  6. make clean
  7. cd /pkg/amber/11-1.5.0./
  8. cd src
  9. make parallel
  10. cd ../testexport
  11. DO_PARALLEL=’mpirun -np 2′
  12. Create a ~/.mpdconf
  13. mpd &
  14. make test.parallel

Some tests require 4 threads to run, while some will notrun with more than 2.  Please run further parallel tests with theappropriate number of processors. See README for details.
make[1]: Leaving directory `/pkg/amber/11-1.5.0/test’

361 file comparisons passed

9 file comparisons failed

0 tests experienced errors

  1. export DO_PARALLEL=’mpirun -np 4′
  2. make test.parallel

make[1]: Leaving directory `/pkg/amber/11-1.5.0/test’

282 file comparisons passed

16 file comparisons failed

0 tests experienced errors

== let’s try cuda now ==

  1. install the cuda developer nvidia driver
  2. install cuda stuff into /usr/local/cuda-3.2
  3. run deviceQueryDrv as root once after compiling it from the sdk toolkit
  4. export CUDA_HOME=/usr/local/cuda-3.2/cuda
  5. export PATH=/usr/local/cuda-3.2/cuda/bin:$PATH
  6. unset DO_PARALLEL
  7. cd /pkg/amber/11-1.5.0/AmberTools/src
  8. make clean
  9. ./configure -cuda gnu
  10. cd ../../
  11. ./
  12. cd src
  13. make clean
  14. make cuda
  15. cd ../test
  16. export LD_LIBRARY_PATH=/usr/local/cuda-3.2/cuda/lib64:/usr/local/cuda-3.2/cuda/lib
  17. ./

56 file comparisons passed

0 file comparisons failed

0 tests experienced errors
== cuda mpi ==

  1. cd ../AmberTools/src
  2. make clean
  3. ./configure -cuda -mpi gnu
  4. cd ../..
  5. ./
  6. cd src
  7. make clean
  8. export C_INCLUDE_PATH=/usr/include/mpich2-x86_64:/usr/include/mpich2-i386
  9. export CPLUS_INCLUDE_PATH=/usr/include/mpich2-x86_64:/usr/include/mpich2-i386
  10. make cuda_parallel
  11. cd ../test
  12. export DO_PARALLEL=’mpirun -np 2′
  13. ./

29 file comparisons passed

0 file comparisons failed

0 tests experienced errors

== now cuda dpdp ==

(Still using above environmental settings)

  1. cd /pkg/amber/11-1.5.0/AmberTools/src
  2. make clean
  3. ./configure -cuda_DPDP gnu
  4. cd ../..
  5. ./
  6. cd src
  7. make clean
  8. make cuda
  9. cd ../test
  10. ./ -1 DPDP

55 file comparisons passed

1 file comparison failed

0 tests experienced errors

=== now cuda dpdp mpi ===

  1. cd /pkg/amber/11-1.5.0/AmberTools/src
  2. make clean
  3. ./configure -cuda_DPDP -mpi gnu
  4. cd ../…/
  5. cd src
  6. make clean
  7. make cuda_parallel
  8. cd ../test
  9. ./ -1 DPDP



This entry was posted in software and tagged , , , . Bookmark the permalink.

4 Responses to compile amber 11 cuda on centos linux

  1. Maria says:

    Hi Ryan,

    I have been pulling my hair out for past 4 days trying to get amber 11 and Ambertools 1.5 to work on centOS. I see that Amber tests are returning 21 failures for you as well (some of them apparently can be ignored as per the Amber11 python patch file), but then there are others like “smd, smd2 and pmd, ru etc which dont produce output as well as others like sander_pbsa_decpw which show minor errors in output (numerical e.g.) and I am not sure why on Earth is that happening.
    You seem to have ignored the 21 failures (diff failures) and moved on to a parallel build. I was wondering if there was a reason for ignoring these?

  2. Ryan says:

    I was compiling it for a client and they were okay with the failures at the time. I see that the bugfixes for both the ambertools 1.5 and amber are up to 7 and 15 respectively so perhaps those failures are fixed now? The main purpose of the article was to show how I managed to actually get it compiled and a future reference when I have to recompile it again.

  3. Maria says:

    I actually have the latest fixes in both Ambertools and Amber 11… so the problems seem to persist.
    Thanks. the article was helpful for me to double check what I was doing.
    Looks like some of the failures might be due to gcc 4.1.2 incompatibility with Amber on centos.

  4. Ryan says:

    Thanks for the reply and the link. I’ll probably update the post when I get around to recompiling with the new fixes.

Leave a Reply

Your email address will not be published. Required fields are marked *