Commit 15e63eab authored by Brandon's avatar Brandon

GNU+MKL on Cori

parent 5247aa2e
#!/bin/bash
set -e
target=haswell
prgenv=gnu
version=6.1
prefix_root=${prefix_root:=/global/common/cori/software}
#
filename=cp2k-$version.tar.bz2
# download
if ! [ -e $SCRATCH/.cache/$filename ]; then
mkdir -p $SCRATCH/.cache
url=https://sourceforge.net/projects/cp2k/files/$filename
wget $url -O $SCRATCH/.cache/$filename
fi
pkgdir=$(pwd)
module swap PrgEnv-${PE_ENV,,} PrgEnv-$prgenv
module swap craype-${CRAY_CPU_TARGET} craype-$target
module load cray-fftw
module list
# setup build dir
build_dir=$(mktemp -d --tmpdir=$SCRATCH cp2k-6.1.XXXXXXX)
cd $build_dir
tar xjvf $SCRATCH/.cache/$filename
cd cp2k-$version
cp $pkgdir/cori-gnu-$target.popt arch/
cd makefiles
time nice make -j -l 32 ARCH=cori-gnu-$target VERSION=popt
cd ..
#!/bin/bash
set -e
target=haswell
target=${target:=haswell}
prgenv=gnu
version=6.1
name=cp2k
......@@ -16,18 +16,24 @@ fi
pkgdir=$(pwd)
module swap PrgEnv-${PE_ENV,,} PrgEnv-$prgenv
module swap craype-${CRAY_CPU_TARGET} craype-$target
module load cray-fftw
module unload cray-fftw
module unload cray-libsci
module load intel
module unload $(module -l list 2>&1 | grep craype-hugepages | awk '{print $1}')
module load craype-hugepages2M
#module load darshan
module list
# setup build dir
build_dir=$(mktemp -d --tmpdir=$SCRATCH cp2k-6.1.XXXXXXX)
cd $build_dir
tar xjvf $SCRATCH/.cache/$filename
tar xjf $SCRATCH/.cache/$filename
cd cp2k-$version
arch=cori-gnu-$target-opt
cp $pkgdir/$arch.popt arch/
arch=cori-gnu
cp $pkgdir/$arch.* arch/
cd makefiles
time nice make -j -l 32 ARCH=$arch VERSION=popt
make -j ARCH=$arch VERSION=popt
cd ..
cp $pkgdir/test.sh .
sbatch test.sh $arch
cp $pkgdir/test-$target.sh .
sbatch test-$target.sh $arch
prefix=$prefix_root/$name/$version/$target
mkdir -p $prefix
cp exe/$arch/* $prefix/
LIBXC = /global/u1/c/cookbg/opt/libxc/4.2.3/gnu/haswell
LIBINT = /global/u1/c/cookbg/opt/libint/1.1.4/gnu/haswell
PLUMED2 = /global/u1/c/cookbg/opt/plumed2/2.4.2/gnu/haswell
DATA_DIR = /usr/common/software/cp2k/6.1/data
CC = cc
CPP =
FC = ftn
LD = ftn
AR = ar -r
DFLAGS = -D__FFTW3 -D__parallel -D__SCALAPACK -D__GFORTRAN \
-D__HAS_NO_SHARED_GLIBC \
-D__LIBXC \
-D__LIBINT -D__MAX_CONTR=4 \
-D__PLUMED2
CPPFLAGS =
CFLAGS = $(DFLAGS)
FCFLAGS = $(DFLAGS) -ffree-form -ffree-line-length-none \
-O3 -ftree-vectorize -funroll-loops -ffast-math \
-I$(LIBXC)/include \
-I$(LIBINT)/include
LDFLAGS = $(FCFLAGS)
LIBS = -lz -ldl -lstdc++ \
$(LIBXC)/lib/libxcf03.a \
$(LIBXC)/lib/libxc.a \
$(LIBINT)/lib/libderiv.a \
$(LIBINT)/lib/libint.a
include $(PLUMED2)/lib/plumed/src/lib/Plumed.inc
EXTERNAL_OBJECTS=$(PLUMED_STATIC_DEPENDENCIES)
\ No newline at end of file
DATA_DIR = /usr/common/software/cp2k/6.1/data
CC = cc
CPP =
FC = ftn
LD = ftn
AR = ar -r
DFLAGS = -D__FFTW3 -D__parallel -D__SCALAPACK -D__GFORTRAN \
-D__HAS_NO_SHARED_GLIBC
CPPFLAGS =
CFLAGS = $(DFLAGS)
FCFLAGS = $(DFLAGS) -ffree-form -ffree-line-length-none \
-O3 -ftree-vectorize -funroll-loops -ffast-math
LDFLAGS = $(FCFLAGS)
LIBS = -ldl
\ No newline at end of file
LIBXC = /global/common/cori/software/libxc/4.2.3/gnu/haswell
LIBINT = /global/common/cori/software/libint/1.1.4/gnu/haswell
PLUMED2 = /global/common/cori/software/plumed2/2.4.2/gnu/haswell
DATA_DIR = /global/common/cori/software/cp2k/6.1/data
CC = cc
CPP =
FC = ftn
LD = ftn
AR = ar -r
DFLAGS = -D__MKL -D__FFTW3 \
-D__parallel -D__SCALAPACK \
-D__HAS_NO_SHARED_GLIBC \
-D__LIBXC \
-D__LIBINT -D__MAX_CONTR=4 \
-D__PLUMED2 \
-D__NO_ABORT
CPPFLAGS =
CFLAGS = $(DFLAGS)
FCFLAGS = $(DFLAGS) -ffree-form -ffree-line-length-none \
-O3 -ftree-vectorize -funroll-loops -ffast-math \
-g -m64 \
-I${MKLROOT}/include -I${MKLROOT}/include/fftw \
-I$(LIBXC)/include \
-I$(LIBINT)/include
LDFLAGS = $(FCFLAGS)
LIBS = -lz -ldl -lstdc++ \
$(LIBXC)/lib/libxcf03.a \
$(LIBXC)/lib/libxc.a \
$(LIBINT)/lib/libderiv.a \
$(LIBINT)/lib/libint.a \
${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a \
-Wl,--start-group \
${MKLROOT}/lib/intel64/libmkl_gf_lp64.a \
${MKLROOT}/lib/intel64/libmkl_sequential.a \
${MKLROOT}/lib/intel64/libmkl_core.a \
${MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a \
-Wl,--end-group -lpthread -lm -ldl
include $(PLUMED2)/lib/plumed/src/lib/Plumed.inc
EXTERNAL_OBJECTS=$(PLUMED_STATIC_DEPENDENCIES)
\ No newline at end of file
#!/bin/bash
#SBATCH -C haswell
#SBATCH -t 300
#SBATCH -t 60
#SBATCH --qos=regular
#SBATCH -J cp2k-test-suite
base=$(pwd)
cp2k_rel=$(realpath --relative-to="." $base)
cp2k_run_prefix="srun -n 32 -c 2 " $base/tools/regtesting/do_regtest \
cp2k_run_prefix="srun -n 32 -c 2 --cpu-bind=cores " $base/tools/regtesting/do_regtest \
-nobuild -nosvn -farming -arch $1 -version popt \
-cp2kdir $cp2k_rel -maxtasks 32 -jobmaxtime 6000
#!/bin/bash
#SBATCH -C knl
#SBATCH -t 60
#SBATCH --qos=regular
#SBATCH -J cp2k-test-suite
base=$(pwd)
cp2k_rel=$(realpath --relative-to="." $base)
cp2k_run_prefix="srun -n 66 -c 4 --cpu-bind=cores " $base/tools/regtesting/do_regtest \
-nobuild -nosvn -farming -arch $1 -version popt \
-cp2kdir $cp2k_rel -maxtasks 66 -jobmaxtime 6000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment