Commit 92170478 authored by Cedric Jourdain's avatar Cedric Jourdain
Browse files

Add Vega compilation script & env

parent c8d50b17
......@@ -13,6 +13,8 @@ echo " - dibona "
echo " - frioul "
echo " - deepsdv "
echo " - hazelhen "
echo " - vega-gpu"
echo " - vega-cpu"
read machine
source ./env/env_${machine}
......@@ -77,6 +79,8 @@ Install(){
cp test_cases/SPECFEM3D_TestCaseB/* $install_dir/specfem3d_globe/DATA/.
fi
cd $install_dir/specfem3d_globe
#Clean Configuration
rm Makefile bin/*
if [ $machine = "daint-gpu" ] || [ $machine = "davide" ]; then
echo "Configure for CPU+GPU system"
### replace `use mpi` if needed ###
......@@ -90,9 +94,14 @@ Install(){
export CUDA_INC="$CUDATOOLKIT_HOME/include"
fi
./configure --build=ppc64 --with-cuda=cuda5
elif [ $machine = "vega-gpu" ]; then
echo "Configure for Vega GPU partion"
sed -i s/"GPU_MODE = .false."/"GPU_MODE = .true."/g $install_dir/specfem3d_globe/DATA/Par_file
sed -i s/"GPU_DEVICE = Tesla"/"GPU_DEVICE = *"/g $install_dir/specfem3d_globe/DATA/Par_file
./configure --build=ppc64 --with-cuda=cuda8
else
echo "Configure for CPU only system"
./configure --enable-openmp
./configure --enable-openmp
fi
echo $machine
#if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ];then
......@@ -121,6 +130,8 @@ Clean(){
rm -rf $install_dir/TestCaseA
elif [ $answer = "3" ]; then
rm -rf $install_dir/TestCaseB
elif [ $answer = "1" ]; then
rm -rf $install_dir/specfem3d_globe
else
echo "Nothing has been deleted"
fi
......@@ -132,15 +143,16 @@ Clean(){
Deploy(){
echo "install_dir ="$install_dir
if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ] || [ $machine = "daint-cpu-only" ] || [ $machine = "daint-gpu" ] || [ $machine = "davide" ] || [ $machine = "juwels" ] || [ $machine = "irene-skl" ] || [ $machine = "irene-knl" ] || [ $machine = "dibona" ] || [ $machine = "frioul" ] || [ $machine = "deepsdv" ] || [ $machine = "hazelhen" ];then
if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ] || [ $machine = "daint-cpu-only" ] || [ $machine = "daint-gpu" ] || [ $machine = "davide" ] || [ $machine = "juwels" ] || [ $machine = "irene-skl" ] || [ $machine = "irene-knl" ] || [ $machine = "dibona" ] || [ $machine = "frioul" ] || [ $machine = "deepsdv" ] || [ $machine = "hazelhen" ] || [ $machine = "vega-cpu" ] || [ $machine = "vega-gpu" ];then
echo "==> Install on $machine :"
mkdir -p $install_dir
# Clean
Clean
export ueabs_dir=`pwd`
Untar
Install
else
echo "Wrong machine !"
echo "machine : $machine "
echo "Wrong machine !"
exit
fi
}
......
#!/bin/bash
module purge
module load GCC/9.3.0 openmpi/gnu/4.0.5.2
export machine=vega-cpu
export software=specfem3d_globe
export version=31octobre
MYSCRATCH=/exa5/scratch/user/eucedricj
export install_dir=$MYSCRATCH//benchmarks/$machine/$software/$version/cpu-znver2/
echo "install_dir = " $install_dir
export CC=mpicc #mpicc #mpiicc
export FC=mpif90 #mpif90 #mpiifort
export MPIFC=$FC
# gnu
#Test done with those flags 01/10/21
export FCFLAGS=" -O3 -fopenmp -march=znver2 -mtune=znver2 -flto -funroll-all-loops -ffast-math -mfma -mavx2 -m3dnow -fomit-frame-pointer -DUSE_FP32 -DOPT_STREAMS -mcmodel=large"
export CFLAGS=" -O3 -fopenmp -march=znver2 -mtune=znver2 -flto -funroll-all-loops -ffast-math -mfma -mavx2 -m3dnow -fomit-frame-pointer"
# Test Ok but not better than upper flags
#export FCFLAGS=" -O3 -fopenmp -march=znver2 -flto -ffast-math -mfma -mavx2 -fomit-frame-pointer -DUSE_FP32 -DOPT_STREAMS -mcmodel=large"
#export CFLAGS=" -O3 -fopenmp -march=znver2 -flto -ffast-math -mfma -mavx2 -fomit-frame-pointer"
#INTEL
#export FCFLAGS=" -O3 -qopenmp -march=core-avx2 -mtune=core-avx2 -ipo -no-prec-div -no-prec-sqrt -fma -qopt-prefetch -use-intel-optimized-headers -DUSE_FP32 -DOPT_STREAMS -fp-model fast=2 -mcmodel=large"
#export CFLAGS=" -O3 -qopenmp -march=core-avx2 -mtune=core-avx2 -ipo -no-prec-div -no-prec-sqrt -fma -qopt-prefetch -use-intel-optimized-headers"
# aocc
#export FCFLAGS="-O3 -march=znver2 -mtune=znver2 -fopenmp -flto -DUSE_FP32 -DOPT_STREAMS -mcmodel=large"
#export CFLAGS=" -O3 -march=znver2 -mtune=znver2 -fopenmp -flto"
#!/bin/bash
module purge
#module load GCC/10.2.0 OpenMPI/4.0.5-gcccuda-2020b #compilaton error...
#module load GCC/8.3.0 OpenMPI/3.1.4-gcccuda-2019b
#module load oneapi/compiler/2021.2.0 openmpi/intel/4.0.5.2 CUDA/10.1.105 #oneapi/intel_ipp_intel64/2021.2.0 #oneapi/intel_ipp_ia32/2021.2.0
#module load GCC/10.2.0 openmpi/gnu/4.0.5.2 CUDA/11.1.1-GCC-10.2.0 #Compilation Error: Rank mismatch between actual argument at (1) and actual argument at (2)..
module load GCC/9.3.0 openmpi/gnu/4.0.5.2 CUDA/11.0.2-GCC-9.3.0
export machine=vega-gpu
export software=specfem3d_globe
export version=31octobre
MYSCRATCH=/exa5/scratch/user/eucedricj
export install_dir=$MYSCRATCH//benchmarks/$machine/$software/$version/test-gcc-znver2
echo "install_dir = " $install_dir
export CC=mpicc #mpiicc
export FC=mpif90 #mpiifort
export MPIFC=$FC
# gnu
export FCFLAGS=" -O3 -flto -march=znver2 -mtune=znver2 -ffast-math -mfma -mavx2 -m3dnow -fomit-frame-pointer -DUSE_FP32 -DOPT_STREAMS -mcmodel=large" #-fopenmp -march=znver1 -funroll-all-loops
export CFLAGS=" -O3 -flto -march=znver2 -mtune=znver2 -ffast-math -mfma -mavx2 -m3dnow -fomit-frame-pointer"
export CUDA_LIB=$CUDA_HOME/lib64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/
export LDFLAGS="$LDFLAGS -lpthread"
#INTEL
#export FCFLAGS=" -O3 -qopenmp -march=core-avx2 -mtune=core-avx2 -ipo -no-prec-div -no-prec-sqrt -fma -qopt-prefetch -use-intel-optimized-headers -DUSE_FP32 -DOPT_STREAMS -fp-model fast=2 -mcmodel=large"
#export CFLAGS=" -O3 -qopenmp -march=core-avx2 -mtune=core-avx2 -ipo -no-prec-div -no-prec-sqrt -fma -qopt-prefetch -use-intel-optimized-headers"
# aocc
#export FCFLAGS="-O3 -march=znver2 -mtune=znver2 -fopenmp -flto -DUSE_FP32 -DOPT_STREAMS -mcmodel=large"
#export CFLAGS=" -O3 -march=znver2 -mtune=znver2 -fopenmp -flto"
Supports Markdown
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