7 changed files with 102 additions and 100 deletions
@ -1,34 +1,22 @@
|
||||
#!/bin/bash |
||||
# LOAD REQUIRED MODULES |
||||
module load intel/19.1.0 |
||||
module load openmpi/intel.19/3.1.6 |
||||
module load netcdf/intel.19/4.7.4 |
||||
target=$1 |
||||
debug=${2:-"release"} |
||||
fast=${3:-"fast"} |
||||
|
||||
# GET IOW ESM ROOT PATH |
||||
export IOW_ESM_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/../.." |
||||
source ../../local_scripts/identify_target.sh $target $debug $fast |
||||
|
||||
# SET SYSTEM-SPECIFIC COMPILER OPTIONS AND PATHS |
||||
# compile mode: "PRODUCTION" or "DEBUG" |
||||
export IOW_ESM_COMPILE_MODE="PRODUCTION" |
||||
# include paths |
||||
export IOW_ESM_NETCDF_INCLUDE="${NETCDF_INCLUDE_PATH}" |
||||
export IOW_ESM_NETCDF_LIBRARY="${NETCDF_LIBRARY_PATH}" |
||||
# executables |
||||
export IOW_ESM_MAKE="/usr/bin/make" |
||||
export IOW_ESM_FC="mpifort" |
||||
export IOW_ESM_CC="mpicc" |
||||
export IOW_ESM_LD="mpifort" |
||||
# compiler flags |
||||
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM" |
||||
export IOW_ESM_FFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_CFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_LDFLAGS="-L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}" |
||||
# component to build |
||||
component="MOM5" |
||||
|
||||
# MAKE CLEAN |
||||
rm -r ${IOW_ESM_ROOT}/components/MOM5/exec/IOW_ESM_${IOW_ESM_COMPILE_MODE} |
||||
# deploy the code from local source |
||||
echo rsync -r -i -u src ${dest}/components/${component}/. |
||||
echo rsync -i -u start_build_${target}.sh ${dest}/components/${component}/ |
||||
echo rsync -i -u build_${target}.sh ${dest}/components/${component}/ |
||||
rsync -r -i -u src ${dest}/components/${component}/. |
||||
rsync -i -u start_build_${target}.sh ${dest}/components/${component}/ |
||||
rsync -i -u build_${target}.sh ${dest}/components/${component}/ |
||||
|
||||
# RUN BUILD COMMAND |
||||
cd ${IOW_ESM_ROOT}/components/MOM5/exp |
||||
./MOM_compile.csh |
||||
cd ${IOW_ESM_ROOT}/components/MOM5 |
||||
# start the build process |
||||
echo ssh -t "${user_at_dest}" "cd ${dest_folder}/components/${component}/; bash -c \"source ~/.bash_profile; source start_build_${target}.sh $debug $fast\"" |
||||
ssh -t "${user_at_dest}" "cd ${dest_folder}/components/${component}/; bash -c \"source ~/.bash_profile; source start_build_${target}.sh $debug $fast\"" |
||||
|
||||
echo "$component $target $debug $fast" > ../LAST_BUILD |
||||
|
@ -1,34 +0,0 @@
|
||||
#!/bin/bash |
||||
# LOAD REQUIRED MODULES |
||||
module load intel/19.1.0 |
||||
module load openmpi/intel.19/3.1.6 |
||||
module load netcdf/intel.19/4.7.4 |
||||
|
||||
# GET IOW ESM ROOT PATH |
||||
export IOW_ESM_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/../.." |
||||
|
||||
# SET SYSTEM-SPECIFIC COMPILER OPTIONS AND PATHS |
||||
# compile mode: "PRODUCTION" or "DEBUG" |
||||
export IOW_ESM_COMPILE_MODE="DEBUG" |
||||
# include paths |
||||
export IOW_ESM_NETCDF_INCLUDE="${NETCDF_INCLUDE_PATH}" |
||||
export IOW_ESM_NETCDF_LIBRARY="${NETCDF_LIBRARY_PATH}" |
||||
# executables |
||||
export IOW_ESM_MAKE="/usr/bin/make" |
||||
export IOW_ESM_FC="mpifort" |
||||
export IOW_ESM_CC="mpicc" |
||||
export IOW_ESM_LD="mpifort" |
||||
# compiler flags |
||||
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM" |
||||
export IOW_ESM_FFLAGS="-O0 -r8 -g -traceback -check all -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_CFLAGS="-O0 -r8 -g -traceback -check all -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_LDFLAGS="-g -traceback -L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}" |
||||
|
||||
# MAKE CLEAN |
||||
rm -r ${IOW_ESM_ROOT}/components/MOM5/exec/IOW_ESM_${IOW_ESM_COMPILE_MODE} |
||||
|
||||
# RUN BUILD COMMAND |
||||
cd ${IOW_ESM_ROOT}/components/MOM5/exp |
||||
./MOM_compile.csh |
||||
cd ${IOW_ESM_ROOT}/components/MOM5 |
||||
|
@ -1,34 +0,0 @@
|
||||
#!/bin/bash |
||||
# LOAD REQUIRED MODULES |
||||
module load intel/18.0.6 |
||||
module load impi/2018.5 |
||||
module load netcdf/intel/4.7.3 |
||||
|
||||
# GET IOW ESM ROOT PATH |
||||
export IOW_ESM_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/../.." |
||||
|
||||
# SET SYSTEM-SPECIFIC COMPILER OPTIONS AND PATHS |
||||
# compile mode: "PRODUCTION" or "DEBUG" |
||||
export IOW_ESM_COMPILE_MODE="PRODUCTION" |
||||
# include paths |
||||
export IOW_ESM_NETCDF_INCLUDE="/sw/dataformats/netcdf/intel.18/4.7.3/skl/include" |
||||
export IOW_ESM_NETCDF_LIBRARY="/sw/dataformats/netcdf/intel.18/4.7.3/skl/lib" |
||||
# executables |
||||
export IOW_ESM_MAKE="/usr/bin/make" |
||||
export IOW_ESM_FC="mpiifort" |
||||
export IOW_ESM_CC="mpiicc" |
||||
export IOW_ESM_LD="mpiifort" |
||||
# compiler flags |
||||
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM" |
||||
export IOW_ESM_FFLAGS="-O3 -xCORE-AVX512 -r8 -fp-model precise -align array64byte -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_CFLAGS="-O3 -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_LDFLAGS="-g -traceback -L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}" |
||||
|
||||
# MAKE CLEAN |
||||
#rm -r ${IOW_ESM_ROOT}/components/MOM5/exec/IOW_ESM_${IOW_ESM_COMPILE_MODE} |
||||
|
||||
# RUN BUILD COMMAND |
||||
cd ${IOW_ESM_ROOT}/components/MOM5/exp |
||||
./MOM_compile.csh |
||||
cd ${IOW_ESM_ROOT}/components/MOM5 |
||||
|
@ -0,0 +1,54 @@
|
||||
#!/bin/bash |
||||
|
||||
debug=${1:-"release"} |
||||
rebuild=${2:-"fast"} |
||||
|
||||
# LOAD REQUIRED MODULES |
||||
module load intel/2017.1.132 |
||||
module load openmpi-intel/2.0.1-ifort-2017.1.132 |
||||
module load netcdf/4.7.4-intel_2017 |
||||
|
||||
# GET IOW ESM ROOT PATH |
||||
export IOW_ESM_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )/../.." |
||||
|
||||
# SET SYSTEM-SPECIFIC COMPILER OPTIONS AND PATHS |
||||
# compile mode: "PRODUCTION" or "DEBUG" |
||||
if [ $debug == "debug" ]; then |
||||
export IOW_ESM_COMPILE_MODE="DEBUG" |
||||
elif [ $debug == "release" ]; then |
||||
export IOW_ESM_COMPILE_MODE="PRODUCTION" |
||||
else |
||||
echo "Compile mode is not specified correctly. Use debug or release" |
||||
exit; |
||||
fi |
||||
|
||||
# include paths |
||||
export IOW_ESM_NETCDF_INCLUDE="${NETCDF_INC}" |
||||
export IOW_ESM_NETCDF_LIBRARY="${NETCDF_LIB}" |
||||
# executables |
||||
export IOW_ESM_MAKE="/usr/bin/make" |
||||
export IOW_ESM_FC="mpifort" |
||||
export IOW_ESM_CC="mpicc" |
||||
export IOW_ESM_LD="mpifort" |
||||
# compiler flags |
||||
export IOW_ESM_CPPDEFS="-DCOUP_OAS -DOASIS_IOW_ESM" |
||||
if [ $debug == "debug" ]; then |
||||
export IOW_ESM_FFLAGS="-O0 -r8 -g -traceback -check all -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_CFLAGS="-O0 -r8 -g -traceback -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_LDFLAGS="-g -traceback -L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}" |
||||
else |
||||
export IOW_ESM_FFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_CFLAGS="-O3 -r8 -no-prec-div -fp-model fast=2 -xHost -I${IOW_ESM_NETCDF_INCLUDE}/" |
||||
export IOW_ESM_LDFLAGS="-L${IOW_ESM_NETCDF_LIBRARY} -lnetcdf -lnetcdff -Wl,-rpath,${IOW_ESM_NETCDF_LIBRARY}" |
||||
fi |
||||
|
||||
# MAKE CLEAN |
||||
if [ $rebuild == "rebuild" ]; then |
||||
rm -r ${IOW_ESM_ROOT}/components/MOM5/exec/IOW_ESM_${IOW_ESM_COMPILE_MODE} |
||||
fi |
||||
|
||||
# RUN BUILD COMMAND |
||||
cd ${IOW_ESM_ROOT}/components/MOM5/exp |
||||
./MOM_compile.csh |
||||
cd ${IOW_ESM_ROOT}/components/MOM5 |
||||
|
@ -0,0 +1,4 @@
|
||||
debug=${1:-"debug"} # debug/release |
||||
fast=${2:-"fast"} # fast/rebuild |
||||
|
||||
srun -t 01:00:00 -p compute -N1 --tasks-per-node 1 --pty bash -c "source ~/.bash_profile; source build_haumea.sh ${debug} ${fast}" |
Loading…
Reference in new issue