From 411486bc0c13038c17c134f7894232f3f283c548 Mon Sep 17 00:00:00 2001 From: Jourdain Date: Wed, 25 Nov 2020 14:14:46 +0100 Subject: [PATCH] Specfem3d: add compilation validation with scritps --- specfem3d/compile.sh | 27 ++++++++---- ...hmark_run_to_test_more_complex_Earth.slurm | 41 +++++++++++++++++++ 2 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 specfem3d/job_script/job_occigen_small_benchmark_run_to_test_more_complex_Earth.slurm diff --git a/specfem3d/compile.sh b/specfem3d/compile.sh index cc78401..7f95671 100755 --- a/specfem3d/compile.sh +++ b/specfem3d/compile.sh @@ -26,6 +26,8 @@ Untar(){ cd specfem3d_globe/ # Checkout of 31 ocotbre 2017 version git checkout b1d6ba966496f269611eff8c2cf1f22bcdac2bd9 + # Checkout v7.0.2, last version : unstable : tested on differents architectures and all simulations failed + #git checkout v7.0.2 #Copy sources #source_dir=$HOME/git/specfem3d_globe @@ -40,11 +42,12 @@ Install(){ echo "1. Test Case A is designed to run on Tier-1 sized systems (up to around 1,000 x86 cores, or equivalent)" echo "2. Test Case B is designed to run on Tier-0 sized systems (up to around 10,000 x86 cores, or equivalent)" echo "3. Test Case C is designed to run on 1 or 2 node(s)" + echo "4. small_benchmark_run_to_test_more_complex_Earth : specfem3D_globe native benchmark to validate the behaviour of the code designed to run on 1 or 2 node(s)" while true do - echo "===> Choose Test Case : (1, 2 or 3)" + echo "===> Choose Test Case : (1, 2, 3 or 4)" read answer - if [[ $answer -eq 1 || $answer -eq 2 || $answer -eq 3 ]]; then break;fi + if [[ $answer -eq 1 || $answer -eq 2 || $answer -eq 3 || $answer -eq 4 ]]; then break;fi done if [ $answer = "1" ]; then echo "===> Copy test case A" @@ -62,13 +65,18 @@ Install(){ tar zxvf $HOME/tarballs/SPECFEM3D_TestCaseB.tar.gz cp SPECFEM3D_TestCaseB/* $install_dir/specfem3d_globe/DATA/. rm -rf SPECFEM3D_TestCaseB - else + elif [ $answer = "3" ]; then echo "===> Copy test case C" export install_dir=$install_dir/TestCaseC mkdir -p $install_dir mv $install_dir/../specfem3d_globe $install_dir/. cp $ueabs_dir/test_cases/SPECFEM3D_TestCaseC/* $install_dir/specfem3d_globe/DATA/. - + elif [ $answer = "4" ]; then + echo "===> small_benchmark_run_to_test_more_complex_Earth" + cd $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth + sed -i "38a ./configure --enable-openmp" run_this_example.sh + echo "compilation proccess will be done directly in the job" + exit fi cd $install_dir/specfem3d_globe if [ $machine = "daint-gpu" ] || [ $machine = "davide" ]; then @@ -104,19 +112,22 @@ Clean(){ answer=0 while true do - echo "===> Choose Test Case to delete : (1, 2, 3)" + echo "===> Choose Test Case to delete : (1, 2, 3 or 4)" echo "1 : $install_dir/TestCaseA" echo "2 : $install_dir/TestCaseB" echo "3 : $install_dir/TestCaseC" + echo "4 : Not necessary to delete this folder" read answer - if [[ $answer -eq 1 || $answer -eq 2 || $answer -eq 3 ]]; then break;fi + if [[ $answer -eq 1 || $answer -eq 2 || $answer -eq 3 || $answer -eq 4 ]]; then break;fi done if [ $answer = "1" ]; then rm -rf $install_dir/TestCaseA elif [ $answer = "2" ]; then rm -rf $install_dir/TestCaseB - else + elif [ $answer = "3" ]; then rm -rf $install_dir/TestCaseC + else + echo "Nothing has been deleted" fi else echo "Error with install_dir variable" @@ -129,7 +140,7 @@ Deploy(){ 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 echo "==> Install on $machine :" mkdir -p $install_dir - Clean +# Clean export ueabs_dir=`pwd` Untar Install diff --git a/specfem3d/job_script/job_occigen_small_benchmark_run_to_test_more_complex_Earth.slurm b/specfem3d/job_script/job_occigen_small_benchmark_run_to_test_more_complex_Earth.slurm new file mode 100644 index 0000000..02f92be --- /dev/null +++ b/specfem3d/job_script/job_occigen_small_benchmark_run_to_test_more_complex_Earth.slurm @@ -0,0 +1,41 @@ +#!/bin/bash +#SBATCH -J job_occigen_small_benchmark_run_to_test_more_complex_Earth.slurm +#SBATCH --nodes=1 +#SBATCH --ntasks-per-node=24 +#SBATCH --time=23:59:59 +#SBATCH --output specfem_more_small_benchmark_run_to_test_more_complex_Earth-%j.out +#SBATCH -C HSW24 + +#set -e +source ../env/env_occigen + +cd $install_dir/specfem3d_globe/EXAMPLES/small_benchmark_run_to_test_more_complex_Earth + +./run_this_example.sh + +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 + +module purge +module load intel/17.0 python/2.7.13 +# 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" +echo + + -- GitLab