Thursday, May 06, 2010

AmberTools 1.4 and Amber 11 on Snow Leopard with the Intel compilers

In this post, I describe how to compile and install Amber 11 on Snow Leopard with the Intel compilers. Some suggest that the Intel compilers should be passed over in favour of the GNU compilers for the time being; in my experience, on the whole, the two give comparable output. This post is written as though you have installed the most recent versions of the Intel Mac compilers, which at the time of writing are 11.1.088. For earlier (or later) versions, you will need to modify your paths accordingly. I also assume you have downloaded and installed the Intel compilers. The installation process for these is straightforward, and should in any case be documented by Intel.

  1. Set up the Intel compiler environment. Note: These commands are intended for the Bourne shell and its variants (e.g., bash). If you are using the C shell or a variant (e.g., tcsh), you will need to use the scripts with a .csh extension instead of those ending in .sh. Also, if you are using an ia32 processor instead of a 64-bit processor, the argument to the script should be modified accordingly.
  2. . /opt/intel/Compiler/11.1/088/bin/iccvars.sh intel64
    . /opt/intel/Compiler/11.1/088/bin/ifortvars.sh intel64
  3. If you wish to compile a parallel (MPI) version of Amber and/or AmberTools, download MPICH2 from here. WARNING: While other MPI implementations such as Open MPI exist, some are untested, and Open MPI fails.
  4. Untar the mpich2 installation file:
    tar xzvf mpich2-1.2.1p1.tar.gz
  5. Configure MPICH2 for installation and build it:
    cd mpich2-1.2.1p1 ./configure --prefix=your_chosen_mpich2_directory \ --enable-f77 --enable-f90 --enable-cxx \ CC=icc CXX=icpc F77=ifort F90=ifort
  6. Follow the rest of the MPICH2 installation and testing instructions in the README file.
  7. Make sure that your_chosen_mpich2_directory/bin and your_chosen_mpich2_directory/lib are in your PATH and DYLD_LIBRARY_PATH respectively, and that they are ahead of other possible MPI installations such as the default system MPI.
  8. Follow steps 1 to 5 here. Step 6 should not be necessary.
  9. Configure Amber:
    ./configure intel
  10. Follow steps 8 to 10 here.
  11. If you have also installed Amber 11, go to $AMBERHOME/src and run make there.
  12. Before continuing, we recommend testing the serial executables, as outlined in the AmberTools and Amber documentation.
  13. To build parallel, return to the AmberTools source directory and re-configure:
    ./configure -mpi intel
  14. Clean up the previous object files by running make clean in both the AmberTools and Amber directories.
  15. Make parallel executables by running make parallel in both the AmberTools and Amber directories.
  16. Finally, test the parallel executables, as outlined in the AmberTools and Amber documentation.
If you have any questions, please feel free to direct them to the AMBER mailing list.