How to compile pimc++: Difference between revisions
(Created page with 'In this document, we describe how to compile pimc++ program on su-ahpcrc.stanford.edu (Linux parallel cluster) and other systems. The style of this wiki follows that of [[How t…') |
No edit summary |
||
| Line 9: | Line 9: | ||
# blitz++: http://www.oonumerics.org/blitz/download/ |
# blitz++: http://www.oonumerics.org/blitz/download/ |
||
# |
# gmp: ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.4.tar.gz |
||
# |
# sprng-2.0: http://sprng.fsu.edu/Version2.0/sprng2.0b.tar.gz |
||
# |
# gsl: http://ftp.gnu.org/gnu/gsl/gsl-1.9.tar.gz |
||
# hdf5: see [[Install HDF5]] |
|||
# gsl: http://directory.fsf.org/GNUsl.html |
|||
# fftw3: see [[Install FFTW3]] |
|||
these libraries will have to be installed in your user space directory. To achieve this I use to create a directory called ~/usr where libraries and header files will stay: |
these libraries will have to be installed in your user space directory. To achieve this I use to create a directory called ~/usr-intel where libraries and header files will stay: |
||
mkdir -p $HOME/usr |
mkdir -p $HOME/usr-intel |
||
I also use to download software packages to ~/soft. All these are consistent with the wiki page [[How to compile Qbox]]. |
I also use to download software packages to ~/soft. All these are consistent with the wiki page [[How to compile Qbox]]. |
||
| Line 23: | Line 24: | ||
This document does not cover the usage of pimc++ but just the compilation, a manual of pimc++ is provided in the [http://cms.mcc.uiuc.edu/pimcpp/index.php/Main_Page pimc++ main page]. |
This document does not cover the usage of pimc++ but just the compilation, a manual of pimc++ is provided in the [http://cms.mcc.uiuc.edu/pimcpp/index.php/Main_Page pimc++ main page]. |
||
First step is to choose a compiler and stick to it for compiling the different libraries and the final pimc++ executable. In this tutorial, we will use intel compilers. On su-ahpcrc, this is selected by, |
|||
mpi-selector --set openmpi14_intel-1.4.1 |
|||
Pimc++ is known to have issues with mpich2 [http://cms.mcc.uiuc.edu/pimcpp/index.php/Quad]. That's why we choose the openmpi version here. |
|||
== Install blitz++ == |
|||
Simply download it from the [http://sourceforge.net/projects/blitz/files/blitz/Blitz%2B%2B%200.9/blitz-0.9.tar.gz/download blitz++ download page] and decompress it: |
|||
cd ~/soft |
|||
wget http://sourceforge.net/projects/blitz/files/blitz/Blitz%2B%2B%200.9/blitz-0.9.tar.gz/download |
|||
tar -zxvf blitz-0.9.tar.gz |
|||
cd blitz-0.9 |
|||
Then do the usual configure and make install procedure, indicating that we want a private installation in our ~/usr-intel directory |
|||
./configure --prefix=$HOME/usr-intel CC=icc CXX=icpc F77=ifort |
|||
make clean |
|||
make lib |
|||
make check-testsuite |
|||
make check-examples |
|||
make check-benchmarks |
|||
rm -rf ~/usr-intel/lib/libblitz* ~/usr-intel/include/blitz/* |
|||
make install |
|||
This will install the blitz++ libraries in ~/usr-intel/include and ~/usr-intel/lib. |
|||
== Install gmp == |
|||
The gmp libraries are needed for sprng2. Download gmp from the [ftp://ftp.gnu.org/gnu/gmp gmp download page] and decompress it: |
|||
cd ~/soft |
|||
wget ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.4.tar.gz |
|||
tar -zxvf gmp-4.2.4.tar.gz |
|||
cd gmp-4.2.4 |
|||
Then do the usual configure and make install procedure, indicating that we want a private installation in our ~/usr-intel directory |
|||
./configure --prefix=$HOME/usr-intel CC=icc CXX=icpc F77=ifort |
|||
make clean |
|||
make |
|||
make check |
|||
rm ~/usr-intel/lib/libgmp.* ~/usr-intel/include/gmp.h |
|||
make install |
|||
This will install the gmp libraries in ~/usr-intel/include and ~/usr-intel/lib. |
|||
== Install sprng2 == |
|||
Download the sprng2 libraries from the [http://sprng.fsu.edu/Version2.0 sprng2 download page] and decompress it: |
|||
cd ~/soft |
|||
wget http://sprng.fsu.edu/Version2.0/sprng2.0b.tar.gz |
|||
tar -zxvf sprng2.0b.tar.gz |
|||
cd sprng2.0 |
|||
The sprng2 libraries do not have a configure utility. To compile, you need to modify the make.CHOICES file to specify your platform (PLAT = SU_AHPCRC), turn off MPI (#MPIDEF = -DSPRNG_MPI), and create your own SRC/make.SU_AHPCRC file. |
|||
wget http://micro.stanford.edu/sprng2.0.SRC.make.SU_AHPCRC |
|||
make realclean |
|||
make |
|||
./checksprng |
|||
rm ~/usr-intel/lib/libsprng* |
|||
cp lib/libsprng* ~/usr-intel/lib |
|||
rm -rf ~/usr-intel/include/sprng2 |
|||
mkdir -p ~/usr-intel/include/sprng2 |
|||
cp include/*.h ~/usr-intel/include/sprng2 |
|||
If after '''make''' you don't see the checksprng executable, it means something is wrong. This is usually because some library paths are not specified correctly in the makefile, e.g. SRC/make.SU_AHPCRC. Note that there is no make install utility, so that we need to manually copy the library and header files to ~/usr-intel/lib and ~/usr-intel/include. |
|||
== Install sprng2 == |
|||
Revision as of 17:24, 30 August 2011
In this document, we describe how to compile pimc++ program on su-ahpcrc.stanford.edu (Linux parallel cluster) and other systems.
The style of this wiki follows that of How to compile Qbox, so that you could in principle copy and paste the code part in your terminal. Custom files are linked from this wiki and can be downloaded from the command line with 'wget'.
General Remarks
Based on the pimc++ installation page we will give some additional details. Before installing pimc++, we need to first build and install the dependence libraries. In particular
- blitz++: http://www.oonumerics.org/blitz/download/
- gmp: ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.4.tar.gz
- sprng-2.0: http://sprng.fsu.edu/Version2.0/sprng2.0b.tar.gz
- gsl: http://ftp.gnu.org/gnu/gsl/gsl-1.9.tar.gz
- hdf5: see Install HDF5
- fftw3: see Install FFTW3
these libraries will have to be installed in your user space directory. To achieve this I use to create a directory called ~/usr-intel where libraries and header files will stay:
mkdir -p $HOME/usr-intel
I also use to download software packages to ~/soft. All these are consistent with the wiki page How to compile Qbox.
mkdir $HOME/soft
This document does not cover the usage of pimc++ but just the compilation, a manual of pimc++ is provided in the pimc++ main page.
First step is to choose a compiler and stick to it for compiling the different libraries and the final pimc++ executable. In this tutorial, we will use intel compilers. On su-ahpcrc, this is selected by,
mpi-selector --set openmpi14_intel-1.4.1
Pimc++ is known to have issues with mpich2 [1]. That's why we choose the openmpi version here.
Install blitz++
Simply download it from the blitz++ download page and decompress it:
cd ~/soft wget http://sourceforge.net/projects/blitz/files/blitz/Blitz%2B%2B%200.9/blitz-0.9.tar.gz/download tar -zxvf blitz-0.9.tar.gz cd blitz-0.9
Then do the usual configure and make install procedure, indicating that we want a private installation in our ~/usr-intel directory
./configure --prefix=$HOME/usr-intel CC=icc CXX=icpc F77=ifort make clean make lib make check-testsuite make check-examples make check-benchmarks rm -rf ~/usr-intel/lib/libblitz* ~/usr-intel/include/blitz/* make install
This will install the blitz++ libraries in ~/usr-intel/include and ~/usr-intel/lib.
Install gmp
The gmp libraries are needed for sprng2. Download gmp from the gmp download page and decompress it:
cd ~/soft wget ftp://ftp.gnu.org/gnu/gmp/gmp-4.2.4.tar.gz tar -zxvf gmp-4.2.4.tar.gz cd gmp-4.2.4
Then do the usual configure and make install procedure, indicating that we want a private installation in our ~/usr-intel directory
./configure --prefix=$HOME/usr-intel CC=icc CXX=icpc F77=ifort make clean make make check rm ~/usr-intel/lib/libgmp.* ~/usr-intel/include/gmp.h make install
This will install the gmp libraries in ~/usr-intel/include and ~/usr-intel/lib.
Install sprng2
Download the sprng2 libraries from the sprng2 download page and decompress it:
cd ~/soft wget http://sprng.fsu.edu/Version2.0/sprng2.0b.tar.gz tar -zxvf sprng2.0b.tar.gz cd sprng2.0
The sprng2 libraries do not have a configure utility. To compile, you need to modify the make.CHOICES file to specify your platform (PLAT = SU_AHPCRC), turn off MPI (#MPIDEF = -DSPRNG_MPI), and create your own SRC/make.SU_AHPCRC file.
wget http://micro.stanford.edu/sprng2.0.SRC.make.SU_AHPCRC make realclean make ./checksprng rm ~/usr-intel/lib/libsprng* cp lib/libsprng* ~/usr-intel/lib rm -rf ~/usr-intel/include/sprng2 mkdir -p ~/usr-intel/include/sprng2 cp include/*.h ~/usr-intel/include/sprng2
If after make you don't see the checksprng executable, it means something is wrong. This is usually because some library paths are not specified correctly in the makefile, e.g. SRC/make.SU_AHPCRC. Note that there is no make install utility, so that we need to manually copy the library and header files to ~/usr-intel/lib and ~/usr-intel/include.