Commit a621df85 authored by Cedric Jourdain's avatar Cedric Jourdain 🐵
Browse files

clean envs, add scalability possibility in compile.sh

parent c0ed75d9
...@@ -18,7 +18,8 @@ echo " - vega-gpu" ...@@ -18,7 +18,8 @@ echo " - vega-gpu"
echo " - vega-cpu" echo " - vega-cpu"
read machine read machine
export NEX_XI=384 #384 #416 #352 #320 #288 #256 #224 #192 #160 #128 #96 #288
export NPROC_XI=4
source ./env/env_${machine} source ./env/env_${machine}
Untar(){ Untar(){
...@@ -69,8 +70,10 @@ Install(){ ...@@ -69,8 +70,10 @@ Install(){
mkdir -p $install_dir mkdir -p $install_dir
mv $install_dir/../specfem3d_globe $install_dir/. mv $install_dir/../specfem3d_globe $install_dir/.
cp test_cases/SPECFEM3D_TestCaseA/* $install_dir/specfem3d_globe/DATA/. cp test_cases/SPECFEM3D_TestCaseA/* $install_dir/specfem3d_globe/DATA/.
sed -i s/"NEX_XI = 384"/"NEX_XI = $NEX_XI"/g $install_dir/specfem3d_globe/DATA/Par_file sed -i s/"NEX_XI = 384"/"NEX_XI = $NEX_XI"/g $install_dir/specfem3d_globe/DATA/Par_file
sed -i s/"NEX_ETA = 384"/"NEX_ETA = $NEX_XI"/g $install_dir/specfem3d_globe/DATA/Par_file sed -i s/"NEX_ETA = 384"/"NEX_ETA = $NEX_XI"/g $install_dir/specfem3d_globe/DATA/Par_file
sed -i s/"NPROC_XI = 4"/"NPROC_XI = $NPROC_XI"/g $install_dir/specfem3d_globe/DATA/Par_file
sed -i s/"NPROC_ETA = 4"/"NPROC_ETA = $NPROC_XI"/g $install_dir/specfem3d_globe/DATA/Par_file
elif [ $answer = "3" ]; then elif [ $answer = "3" ]; then
echo "===> Copy test case B" echo "===> Copy test case B"
export install_dir=$install_dir/TestCaseB export install_dir=$install_dir/TestCaseB
......
...@@ -5,6 +5,8 @@ export machine=vega-cpu ...@@ -5,6 +5,8 @@ export machine=vega-cpu
export software=specfem3d_globe export software=specfem3d_globe
export version=31octobre export version=31octobre
export NEX_XI=384 #384 #416 #352 #320 #288 #256 #224 #192 #160 #128 #96 #288
export NPROC_XI=4
MYSCRATCH=/exa5/scratch/user/eucedricj MYSCRATCH=/exa5/scratch/user/eucedricj
export install_dir=$MYSCRATCH//benchmarks/$machine/$software/$version/cpu-znver2/ export install_dir=$MYSCRATCH//benchmarks/$machine/$software/$version/cpu-znver2/
echo "install_dir = " $install_dir echo "install_dir = " $install_dir
...@@ -14,17 +16,5 @@ export FC=mpif90 #mpif90 #mpiifort ...@@ -14,17 +16,5 @@ export FC=mpif90 #mpif90 #mpiifort
export MPIFC=$FC export MPIFC=$FC
# gnu # 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 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" 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 #!/bin/bash
module purge 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 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 machine=vega-gpu
export software=specfem3d_globe export software=specfem3d_globe
export version=31octobre export version=31octobre
MYSCRATCH=/exa5/scratch/user/eucedricj
export NEX_XI=384 #416 #352 #320 #288 #256 #224 #192 #160 #128 #96 #288 export NEX_XI=384 #384 #416 #352 #320 #288 #256 #224 #192 #160 #128 #96 #288
export install_dir=$MYSCRATCH//benchmarks/$machine/$software/$version/strong-scaling/$NEX_XI export NPROC_XI=4
MYSCRATCH=/exa5/scratch/user/eucedricj
export install_dir=$MYSCRATCH//benchmarks/$machine/$software/$version
echo "install_dir = " $install_dir echo "install_dir = " $install_dir
export CC=mpicc #mpiicc export CC=mpicc #mpiicc
...@@ -26,11 +22,3 @@ export CFLAGS=" -O3 -flto -march=znver2 -mtune=znver2 -ffast-math -mfma -mavx2 - ...@@ -26,11 +22,3 @@ export CFLAGS=" -O3 -flto -march=znver2 -mtune=znver2 -ffast-math -mfma -mavx2 -
export CUDA_LIB=$CUDA_HOME/lib64 export CUDA_LIB=$CUDA_HOME/lib64
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/
export LDFLAGS="$LDFLAGS -lpthread" 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