Skip to content
job_vega-cpu_small_benchmark_run_to_test_more_complex_Earth.slurm 2.22 KiB
Newer Older
#!/bin/bash
#SBATCH -J specfem_cpu_small_benchmark_run_to_test_more_complex_Earth
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=24
#SBATCH --cpus-per-task=4
#SBATCH --time=11:59:59
#SBATCH --output specfem_cpu_small_benchmark_run_to_test_more_complex_Earth-%j.out
#SBATCH --exclusive
#SBATCH -p cpu
#set -e
source ../env/env_vega-cpu
grep "^[^#;]" ../env/env_vega-cpu
cat job_vega-cpu_small_benchmark_run_to_test_more_complex_Earth.slurm
rm $install_dir/specfem3d_globe/Makefile $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/bin/*
cd $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth

#export OMPI_MCA_pml=ucx
#export OMPI_MCA_btl="^uct,tcp,openib,vader" 
export OMP_NUM_THREADS=$SLURM_CPUS_PER_TASK
#sed -i s/"mpirun -np"/"srun -n"/g $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/run_mesher_solver.bash
taskset -a -p $PPID

time ./run_this_example.sh

echo "=========="
echo "config.log"
echo "=========="
cat $install_dir/TestCaseA/specfem3d_globe/config.log
echo "========"
echo "make.log"
echo "========"
cat $install_dir/TestCaseA/specfem3d_globe/make.log

echo
echo "running seismogram comparisons:"
echo

cd $install_dir/specfem3d_globe/
# uncompress seismograms
if [ -e EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/OUTPUT_FILES_reference_OK/II.AAK.MXE.sem.ascii.bz2 ]; then
  echo
  echo "unzipping references..."
  echo
  mkdir OUTPUT_FILES_reference_OK/
  bunzip2 EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/OUTPUT_FILES_reference_OK/*.bz2
  echo
  echo
fi

#wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-Linux-x86_64.sh
#sh /ceph/hpc/home/eucedricj/Miniconda3-py37_4.10.3-Linux-x86_64.sh
#source miniconda3/bin/activate
#conda create --name python2 python=2.7
module purge
conda activate python2
# compares seismograms by plotting correlations
./utils/compare_seismogram_correlations.py EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/OUTPUT_FILES/ EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/OUTPUT_FILES_reference_OK/

echo
echo "done"

cp $install_dir//specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth/OUTPUT_FILES/output_solver.txt output_solver_$SLURM_JOBID.txt