Amber12-bf7 for PRIMERGY RX300
ウェブページ
http://ambermd.org/バージョン
Amber 12 bugfix 7 + AmberTools 12 bugfix 5ビルド環境
- Intel Compiler 11.1.080
- Intel MPI 4.0.2.003
ビルドに必要なファイル
- Amber12.tar.bz2
- AmberTools12.tar.bz2
- http://ambermd.org/bugfixes12.htmlにあるパッチ
- http://ambermd.org/bugfixesat.htmlにあるパッチ
コンパイラーラッパーコマンドの準備
/home/users/$USER/compiler/intel-11.1に配置する。mpicc
#!/usr/bin/perl#
use strict;
use warnings;
my @extra;
my $compiler = "/opt/intel/Compiler/11.1/080/bin/intel64/icc";
my $cflag = 0;
my $oflag = 0;;
for (my $i = 0; $i < scalar(@ARGV); ++$i) {
if ($ARGV[$i] eq "-c") {
$cflag = 1;
} elsif ($ARGV[$i] eq "-o") {
$oflag = 1;
}
}
if ($cflag) {
@extra = ("-I/opt/intel/impi/4.0.2.003/intel64/include");
} elsif ($oflag) {
@extra = (
"-ldl",
"-I/opt/intel/impi/4.0.2.003/intel64/include",
"-L/opt/intel/impi/4.0.2.003/intel64/lib",
"-Xlinker", "-rpath",
"/opt/intel/impi/4.0.2.003/intel64/lib",
"-Xlinker", "-rpath",
"/opt/intel/mpi-rt/4.0.2",
"-Xlinker", "-rpath",
"/opt/intel/Compiler/11.1/080/lib/intel64",
"-Xlinker", "-rpath",
"/opt/intel/Compiler/11.1/080/mkl/lib/em64t",
"-lmpi", "-lmpigf", "-lmpigi", "-lpthread", "-lrt");
}
system($compiler, @extra, @ARGV);
mpif90
#!/usr/bin/perl#
use strict;
use warnings;
my @extra;
my $compiler = "/opt/intel/Compiler/11.1/080/bin/intel64/ifort";
my $cflag = 0;
my $oflag = 0;;
for (my $i = 0; $i < scalar(@ARGV); ++$i) {
if ($ARGV[$i] eq "-c") {
$cflag = 1;
} elsif ($ARGV[$i] eq "-o") {
$oflag = 1;
}
}
if ($cflag) {
@extra = ("-I/opt/intel/impi/4.0.2.003/intel64/include");
} elsif ($oflag) {
@extra = (
"-ldl",
"-I/opt/intel/impi/4.0.2.003/intel64/include",
"-L/opt/intel/impi/4.0.2.003/intel64/lib",
"-Xlinker", "-rpath",
"/opt/intel/impi/4.0.2.003/intel64/lib",
"-Xlinker", "-rpath",
"/opt/intel/mpi-rt/4.0.2",
"-Xlinker", "-rpath",
"/opt/intel/Compiler/11.1/080/lib/intel64",
"-Xlinker", "-rpath",
"/opt/intel/Compiler/11.1/080/mkl/lib/em64t",
"-lmpi", "-lmpigf", "-lmpigi", "-lpthread", "-lrt");
}
system($compiler, @extra, @ARGV);
icc
#!/usr/bin/perl#
use strict;
use warnings;
my @extra;
my $compiler = "/opt/intel/Compiler/11.1/080/bin/intel64/icc";
for (my $i = 0; $i < scalar(@ARGV); ++$i) {
if ($ARGV[$i] eq "-o") {
@extra = ("-Wl,-rpath,/opt/intel/Compiler/11.1/080/lib/intel64",
"-Wl,-rpath,/opt/intel/Compiler/11.1/080/mkl/lib/em64t");
}
}
system($compiler, @extra, @ARGV);
icpc
#!/usr/bin/perl#
use strict;
use warnings;
my @extra;
my $compiler = "/opt/intel/Compiler/11.1/080/bin/intel64/icpc";
for (my $i = 0; $i < scalar(@ARGV); ++$i) {
if ($ARGV[$i] eq "-o") {
@extra = ("-Wl,-rpath,/opt/intel/Compiler/11.1/080/lib/intel64",
"-Wl,-rpath,/opt/intel/Compiler/11.1/080/mkl/lib/em64t");
}
}
system($compiler, @extra, @ARGV);
ifort
#!/usr/bin/perl#
use strict;
use warnings;
my @extra;
my $compiler = "/opt/intel/Compiler/11.1/080/bin/intel64/ifort";
for (my $i = 0; $i < scalar(@ARGV); ++$i) {
if ($ARGV[$i] eq "-o") {
@extra = ("-Wl,-rpath,/opt/intel/Compiler/11.1/080/lib/intel64",
"-Wl,-rpath,/opt/intel/Compiler/11.1/080/mkl/lib/em64t");
}
}
system($compiler, @extra, @ARGV);
ビルド手順
#!/bin/csh -f
#PBS -l select=ncpus=16:mpiprocs=16:ompthreads=1:jobtype=gpu
#PBS -l walltime=72:00:00
#PBS -j oe
cd ${PBS_O_WORKDIR}
umask 022
# 作業場所の設定
set work="/work/users/${USER}"
setenv AMBERHOME "$work/amber12"
setenv CUDA_HOME /usr/local/cuda
# 以前の残骸を消去する
if (-d $AMBERHOME) then
mv $AMBERHOME $work/amber12-erase
rm -rf $work/amber12-erase &
endif
# 事前にmpdを動かすこと
setenv DO_PARALLEL "mpirun -np 2"
#
cd $work
bunzip2 -c /home/users/${USER}/build/amber12/AmberTools12.tar.bz2 | tar xf -
bunzip2 -c /home/users/${USER}/build/amber12/Amber12.tar.bz2 | tar xf -
cd $AMBERHOME
foreach i (/home/users/${USER}/build/amber12/patches/Amber*/*)
patch -p0 < $i
end
#
echo "[GPU (SPDP) serial edition]"
./configure --no-updates -cuda gnu
make -j 16 install
make test.cuda
make clean
echo "[GPU (SPDP) parallel edition]"
./configure --no-updates -mpi -cuda gnu
make -j 16 install
make clean
echo "[GPU (SPSP) serial edition]"
./configure --no-updates -cuda_SPSP gnu
make -j 16 install
cd $AMBERHOME/test/
./test_amber_cuda.sh SPSP
cd $AMBERHOME
make clean
echo "[GPU (SPSP) parallel edition]"
./configure --no-updates -mpi -cuda_SPSP gnu
make -j 16 install
make clean
echo "[GPU (DPDP) serial edition]"
./configure --no-updates -cuda_DPDP gnu
make -j 16 install
cd $AMBERHOME/test/
./test_amber_cuda.sh DPDP
cd $AMBERHOME
make clean
echo "[GPU (DPDP) parallel edition]"
./configure --no-updates -mpi -cuda_DPDP gnu
make -j 16 install
make clean
# 言語を英語にしないとコンパイラーのバージョン番号取得に失敗する
setenv LANG C
# 環境変数SSE_TYPESは-ax${SSE_TYPES}を設定することを意味するので設定しない
unsetenv SSE_TYPES
# インテルコンパイラー12では
# rism1dがハングアップする?
# mpiではテストが通らない
source /opt/intel/Compiler/11.1/080/bin/iccvars.csh intel64
source /opt/intel/Compiler/11.1/080/bin/ifortvars.csh intel64
# mpiccとmpif90がmpiiccとmpiifortとなるようにする
# icc, icpc, ifortのオプションに-Wl,-rpath,/opt/intel...を加える
set path=(/home/users/$USER/compiler/intel-11.1 $path)
#
echo "[CPU serial edition]"
./configure --no-updates intel
make -j 16 install
make test
make clean
echo "[CPU parallel edition]"
./configure --no-updates -mpi intel
make -j 16 install
make test
make clean