Commit d119a533 authored by GIORGIO AMATI's avatar GIORGIO AMATI

Delete 02-build

parent ad7693b1
#!/bin/bash
set -eu
current_setup=$(realpath $(dirname $BASH_SOURCE))
pushd $current_setup
. 00-settings
sed -i "/NEX_XI\s*=/{s;.*;NEX_XI = $nex_xi;}" DATA/Par_file
sed -i "/NEX_ETA\s*=/{s;.*;NEX_ETA = $nex_eta;}" DATA/Par_file
sed -i "/NPROC_XI\s*=/{s;.*;NPROC_XI = $nproc_xi;}" DATA/Par_file
sed -i "/NPROC_ETA\s*=/{s;.*;NPROC_ETA = $nproc_eta;}" DATA/Par_file
if [ $specfem_version == git ]; then
sed -i '/NT_DUMP_ATTENUATION\s*=/{s;\(.*\);\1\nMEMORY_INSTALLED_PER_CORE_IN_GB = 80.0d0\nPERCENT_OF_MEM_TO_USE_PER_CORE = 90.0d0;}' DATA/Par_file
sed -i '/NTSTEP_BETWEEN_READ_ADJSRC\s*=/{s;\(.*\);\1\nUSE_FORCE_POINT_SOURCE = .false.;}' DATA/Par_file
sed -i '/OUTPUT_SEISMOS_SAC_BINARY\s*=/{s;\(.*\);\1\nOUTPUT_SEISMOS_ASDF = .false.;}' DATA/Par_file
sed -i '/PRINT_SOURCE_TIME_FUNCTION\s*=/{s;\(.*\);\1\nREAD_ADJSRC_ASDF = .false.;}' DATA/Par_file
sed -i '/SAVE_REGULAR_KL\s*=/{s;\(.*\);\1\nNUMBER_OF_SIMULTANEOUS_RUNS = 1\nBROADCAST_SAME_MESH_AND_MODEL = .false.;}' DATA/Par_file
sed -i '/ADIOS_FOR_AVS_DX\s*=/{s;\(.*\);\1\nADIOS_FOR_KERNELS = .true.\nADIOS_FOR_MODELS = .true.\nADIOS_FOR_UNDO_ATTENUATION = .true.;}' DATA/Par_file
sed -i '/ADIOS_FOR_AVS_DX\s*=/{s;\(.*\);\1\nSAVE_SEISMOGRAMS_STRAIN = .false.\nADIOS_FOR_MODELS = .true.\nSAVE_SEISMOGRAMS_IN_ADJOINT_RUN = .false.;}' DATA/Par_file
fi
if [ $use_cuda == true ]; then
sed -i '/GPU_MODE\s*=/{s;.*;GPU_MODE = .true.;}' DATA/Par_file
else
sed -i '/GPU_MODE\s*=/{s;.*;GPU_MODE = .false.;}' DATA/Par_file
fi
pushd $specfem_top/$specfem_version
rsync -azP $current_setup/DATA/Par_file DATA/
make clean
make xcreate_header_file |& tee $current_setup/logs/make.xcreate_header_file.log
make xmeshfem3D |& tee $current_setup/logs/make.xmeshfem3D.log
make xspecfem3D |& tee $current_setup/logs/make.xspecfem3D.log
mkdir -p $current_setup/OUTPUT_FILES
rsync -azP setup/* $current_setup/OUTPUT_FILES/
rsync -azP OUTPUT_FILES/values_from_mesher.h $current_setup/OUTPUT_FILES/
rsync -azP bin $current_setup/
for dir in crust2.0 s362ani QRFSI12 topo_bathy; do
rsync -azP DATA/$dir $specfem_bench/DATA/$specfem_version/
[ -L $current_setup/DATA/$dir ] && rm $current_setup/DATA/$dir
ln -sfrn $specfem_bench/DATA/$specfem_version/$dir $current_setup/DATA/$dir
done
popd
mkdir -p DATABASES_MPI
popd
Markdown is supported
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