-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CASTEP 16.11: add on Iceberg and partly tidy docs
- Loading branch information
1 parent
30e4b0f
commit a68557b
Showing
5 changed files
with
208 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
iceberg/software/install_scripts/apps/intel/15/castep/16.11/install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/bash | ||
# Install CASTEP 16.11 on the Iceberg cluster | ||
|
||
############################################################################## | ||
# Error handling | ||
############################################################################## | ||
|
||
handle_error () { | ||
errcode=$? # save the exit code as the first thing done in the trap function | ||
echo "Error code: $errorcode" | ||
echo "Errored command: " echo "$BASH_COMMAND" | ||
echo "Error line: ${BASH_LINENO[0]}" | ||
exit $errcode | ||
} | ||
trap handle_error ERR | ||
|
||
############################################################################## | ||
# Variables | ||
############################################################################## | ||
|
||
vers="16.11" | ||
compiler="intel" | ||
compiler_short_vers="15" | ||
compiler_vers="15.0.3" | ||
tarball_path="/usr/local/media/protected/CASTEP/${vers}/CASTEP-${vers}.tar.gz" | ||
base_prefix="/usr/local/packages6/apps/" | ||
prefix="${base_prefix}/${compiler}/${compiler_short_vers}/castep/${vers}" | ||
serial_build_dir="/data/$USER/iceberg/castep/${vers}/${compiler}-${compiler_short_vers}/serial" | ||
parallel_build_dir="/data/$USER/iceberg/castep/${vers}/${compiler}-${compiler_short_vers}/parallel" | ||
#export OMP_NUM_THREADS=4 | ||
#workers=$OMP_NUM_THREADS | ||
workers=1 | ||
|
||
############################################################################## | ||
# Create dirs | ||
############################################################################## | ||
|
||
mkdir -m 0700 -p $serial_build_dir $parallel_build_dir | ||
mkdir -m 2750 -p $prefix | ||
|
||
############################################################################## | ||
# Build and install serial version | ||
############################################################################## | ||
|
||
module purge | ||
module load compilers/${compiler}/${compiler_vers} | ||
module load libs/binlibs/intel-mkl/11.2.3 | ||
|
||
tar -xzf ${tarball_path} -C ${serial_build_dir} | ||
pushd ${serial_build_dir}/CASTEP-${vers} | ||
|
||
make clean | ||
make -j $workers INSTALL_DIR=$prefix FFT=mkl MATHLIBS=mkl10 | ||
make -j $workers INSTALL_DIR=$prefix FFT=mkl MATHLIBS=mkl10 install install-tools | ||
|
||
############################################################################## | ||
# Build and install parallel version | ||
############################################################################## | ||
|
||
module load mpi/intel/openmpi/1.10.0 | ||
|
||
tar -xzf ${tarball_path} -C ${parallel_build_dir} | ||
pushd ${parallel_build_dir}/CASTEP-${vers} | ||
|
||
if [[ $compiler == "intel" ]] && [[ $compiler_vers =~ ^15\. ]]; then | ||
# Workaround for bug described at http://www.cmth.ph.ic.ac.uk/computing/software/castep.html | ||
sed 's/-static-intel/-shared-intel/' obj/platforms/linux_x86_64_ifort15.mk -i | ||
fi | ||
|
||
make clean | ||
make -j $workers COMMS_ARCH=mpi FFT=mkl MATHLIBS=mkl10 | ||
mv ./obj/linux_x86_64_*/castep.mpi $prefix | ||
|
||
############################################################################## | ||
# Set permissions | ||
############################################################################## | ||
|
||
chmod -R g-w $prefix | ||
chmod -R o-rwx $prefix | ||
chgrp -R castep $prefix |
22 changes: 22 additions & 0 deletions
22
iceberg/software/modulefiles/apps/intel/15/castep/16.11-parallel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#%Module1.0##################################################################### | ||
## | ||
## CASTEP 16.11 (MPI) module file | ||
## | ||
|
||
## Module file logging | ||
source /usr/local/etc/module_logging.tcl | ||
## | ||
|
||
set vers 16.11 | ||
|
||
proc ModulesHelp { } { | ||
global vers | ||
puts stderr " Adds `CASTEP-$vers' to your PATH" | ||
} | ||
module-whatis "Adds `CASTEP-$vers' to your PATH" | ||
|
||
module load mpi/intel/openmpi/1.10.0 | ||
|
||
set casteppath /usr/local/packages6/apps/intel/15/castep | ||
prepend-path PATH $casteppath/$vers | ||
setenv TMPDIR /scratch/ |
22 changes: 22 additions & 0 deletions
22
iceberg/software/modulefiles/apps/intel/15/castep/16.11-serial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#%Module1.0##################################################################### | ||
## | ||
## CASTEP 16.11 (serial) module file | ||
## | ||
|
||
## Module file logging | ||
source /usr/local/etc/module_logging.tcl | ||
## | ||
|
||
set vers 16.11 | ||
|
||
proc ModulesHelp { } { | ||
global vers | ||
puts stderr " Adds `CASTEP-$vers' to your PATH" | ||
} | ||
module-whatis "Adds `CASTEP-$vers' to your PATH" | ||
|
||
module load compilers/intel/15.0.3 | ||
|
||
set casteppath /usr/local/packages6/apps/intel/15/castep | ||
prepend-path PATH $casteppath/$vers | ||
setenv TMPDIR /scratch/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters