#A rough example of environmental variables for compiling with Intel compilers

#unset and set defaults
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
unset LD_LIBRARY_PATH
module purge
. ~/.bashrc

#OP2 specifics
export OP2_COMPILER=intel
export OP2_INSTALL_PATH=/rr-home/gihan/OP2-Common/op2/
#unset OP_AUTO_SOA
export OP_AUTO_SOA=1
echo "Warning, OP_AUTO_SOA=1"

#modules



#External libraries
#export PARMETIS_INSTALL_PATH=/rr-home/gihan/ParMetis-Intel-17/
#export PARMETIS_INSTALL_PATH=/rr-home/gihan/Hydra/apps_impi/oplus/Ver17.2-125-g4508d71/
export PARMETIS_INSTALL_PATH=/rr-home/gihan/ParMetis-Intel-18-debug/
export PTSCOTCH_INSTALL_PATH=/rr-home/gihan/PTScotch-Intel-17/
export HDF5_INSTALL_PATH=/opt/hdf5/1.8.18/intel/15.0u6/impi/5.0u3/
export LD_LIBRARY_PATH=/rr-home/gihan/ParMetis-Intel-17/lib:/rr-home/gihan/PTScotch-Intel-17/:/opt/hdf5/1.8.18/intel/15.0u6/impi/5.0u3/lib:$LD_LIBRARY_PATH

#NVIDIA CUDA
#module load cuda/toolkit-10.2.89
module load cuda/toolkit-10.0.130
#export CUDA_INSTALL_PATH=/opt/cuda/10.2.89/toolkit/
#export CUDA_HOME=/opt/cuda/10.2.89/toolkit/
export CUDA_INSTALL_PATH=/opt/cuda/10.0.130/toolkit/
export CUDA_HOME=/opt/cuda/10.0.130/toolkit/

if [ "$(hostname)" == 'telos' ]; then
  export NV_ARCH=Volta
  export CUDA_VISIBLE_DEVICES=0
  echo $NV_ARCH
else
  export NV_ARCH=Pascal
  export CUDA_VISIBLE_DEVICES=0,1
  echo $NV_ARCH
fi

#Intel MPI and Compilers
source /opt/intel/parallelstudio/2018/update2/parallel_studio_xe_2018.2.046/psxevars.sh
export MPI_INSTALL_PATH=/opt/intel/parallelstudio/2018/update2/impi/2018.2.199/intel64/

export MPICH_CXX=/opt/intel/parallelstudio/2018/update2/parallel_studio_xe_2018.2.046/compilers_and_libraries_2018/linux/bin/intel64/icpc
export MPICH_CC=/opt/intel/parallelstudio/2018/update2/parallel_studio_xe_2018.2.046/compilers_and_libraries_2018/linux/bin/intel64/icc
export MPICH_F90=/opt/intel/parallelstudio/2018/update2/parallel_studio_xe_2018.2.046/compilers_and_libraries_2018/linux/bin/intel64/ifort
