Skip to content

Instantly share code, notes, and snippets.

@hiracchi
Last active August 30, 2017 05:14
Show Gist options
  • Save hiracchi/67449b497a975d8eaac7855c973b7cde to your computer and use it in GitHub Desktop.
Save hiracchi/67449b497a975d8eaac7855c973b7cde to your computer and use it in GitHub Desktop.
direnv setting for building ProteinDF
#!/bin/bash
# PDF_HOME
export PDF_HOME="${HOME}/local/ProteinDF.201704.GNU"
if [ x${PATH} != x ]; then
PATH=${PATH}:${PDF_HOME}/bin
else
PATH=${PDF_HOME}/bin
fi
export PATH
# PYTHONPATH
PYVER=`python -V 2>&1 | cut -d" " -f2 | cut -d"." -f1,2`
if [ x${PATH} != x ]; then
PATH=${PATH}:${PDF_HOME}/bin
else
PATH=${PDF_HOME}/bin
fi
export PATH
export PYTHONPATH=${PDF_HOME}/lib/python${PYVER}/site-packages
env_gnu()
{
export CC=gcc
export CXX=g++
export FC=gfortran
export MPI_CXX_COMPILER=/usr/bin/mpiCC
export BLAS_LIBRARIES="-lblas -lgfortran"
export LAPACK_LIBRARIES="-llapack"
export SCALAPACK_LIBRARIES="-lscalapack-openmpi -lblacs-openmpi -lblacsCinit-openmpi -lblacsF77init-openmpi -lblacs-openmpi"
}
env_intel()
{
source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64
export CC=icc
export CXX=icpc
export FC=ifort
export MPI_C_COMPILER=mpiicc
export MPI_CXX_COMPILER=mpiicpc
export BLAS_LIBRARIES="-L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl"
export LAPACK_LIBRARIES="-L${MKLROOT}/lib/intel64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl"
export SCALAPACK_LIBRARIES="-L${MKLROOT}/lib/intel64 -lmkl_scalapack_ilp64 -lmkl_blacs_intelmpi_ilp64"
}
env_pgi()
{
export PGI=/opt/pgi
export PATH=${PGI}/linux86-64/2017/bin:${PGI}/linux86-64/2017/mpi/openmpi/bin:${PATH}
export LD_LIBRARY_PATH=${PGI}/linux86-64/2017/lib:${PGI}/linux86-64/2017/mpi/openmpi/lib:${LD_LIBRARY_PATH}
export CC=pgcc
export CXX=pgc++
export FC=pgfortran
export BLAS_LIBRARIES="-lblas -pgf90libs -mp"
export LAPACK_LIBRARIES="-llapack -pgf90libs -mp"
export SCALAPACK_LIBRARIES="${PGI}/linux86-64/2017/scalapack/scalapack-2.0.2/openmpi-1.10.2/lib/libscalapack.a"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment