From 411611bd671f1ae447d418c15eeb7811cd5d5b6a Mon Sep 17 00:00:00 2001 From: not populated Date: Thu, 12 May 2022 21:32:58 +0100 Subject: [PATCH] working towards building --- code_ecse/STREAMICE_OPTIONS.h | 2 +- scripts_ecse/case_setup | 7 +-- .../dev_linux_amd64_gfortran_archer2_oad | 1 + scripts_ecse/make_archer.sh | 43 ++++++++++++++++--- 4 files changed, 44 insertions(+), 9 deletions(-) diff --git a/code_ecse/STREAMICE_OPTIONS.h b/code_ecse/STREAMICE_OPTIONS.h index 9d848d4..f16f278 100755 --- a/code_ecse/STREAMICE_OPTIONS.h +++ b/code_ecse/STREAMICE_OPTIONS.h @@ -25,7 +25,7 @@ C Place CPP define/undef flag here #define STREAMICE_GEOM_FILE_SETUP #define STREAMICE_HYBRID_STRESS #define STREAMICE_COULOMB_SLIDING -#define STREAMICE_PETSC_ARCHER2 +#define STREAMICE_PETSC_3_8 #endif /* ALLOW_MYPACKAGE */ #endif /* MYPACKAGE_OPTIONS_H */ diff --git a/scripts_ecse/case_setup b/scripts_ecse/case_setup index cb1ab5b..188376a 100755 --- a/scripts_ecse/case_setup +++ b/scripts_ecse/case_setup @@ -27,8 +27,9 @@ export HECACC=ecseab06-guest # correct the paths below export AMUND_ECSE=/work/n02/shared/mjmn02/AmundIce/eCSE-archer2-AmundIce -export AMUND_OAD=/work/n02/shared/mjmn02/AmundIce/Singularity +# latest export AMUND_OAD=/work/n02/shared/mjmn02/AmundIce/Singularity/openad_latest.sif +export AMUND_OAD=/work/n02/shared/mjmn02/AmundIce/Singularity/openad.sif export MITGCM_ROOTDIR=/work/n02/shared/mjmn02/AmundIce/MITgcm/MITgcm -#export AMUND_OPT=/work/n02/shared/mjmn02/AmundIce/eCSE-archer2-AmundIce/scripts_ecse/dev_linux_amd64_cray_archer2_oad -export PATH=$MITGCM_ROOTDIR/tools:$PATH +# try without this - it causes "as" to be overridden - use explicit path in calling genmake in make-archer.sh +# export PATH=$MITGCM_ROOTDIR/tools:$PATH diff --git a/scripts_ecse/dev_linux_amd64_gfortran_archer2_oad b/scripts_ecse/dev_linux_amd64_gfortran_archer2_oad index 872ff30..b2e53b3 100755 --- a/scripts_ecse/dev_linux_amd64_gfortran_archer2_oad +++ b/scripts_ecse/dev_linux_amd64_gfortran_archer2_oad @@ -20,6 +20,7 @@ INCLUDES='-I${NETCDF_DIR}/include -I${CRAY_MPICH_DIR}/include' INCLUDES="$INCLUDES -I${PETSC_DIR}/include/petsc" +# /finclude" INCLUDES="$INCLUDES -I${PETSC_DIR}/include -I${MUMPS_DIR}/include -I${METIS_DIR}/include -I${SCOTCH_DIR}/include -I${SUPERLU_DIR}/include" INCLUDES="$INCLUDES -I${SUPERLU_DIST_DIR}/include -I${PARMETIS_DIR}/include -I${PARMETIS_DIR}/include" LIBS='-L${NETCDF_DIR}/lib -L${CRAY_MPICH_DIR}/include/lib' diff --git a/scripts_ecse/make_archer.sh b/scripts_ecse/make_archer.sh index 334d568..b04e33e 100755 --- a/scripts_ecse/make_archer.sh +++ b/scripts_ecse/make_archer.sh @@ -21,13 +21,46 @@ git checkout streamic_petsc_3_8_update cd $OLDPWD +echo back in $PWD after the git checkout + # why was this here - new directory.... make CLEAN -###### WILL NEED TO CHANGE ############ -sing_str="-B $PWD:$HOME $AMUND_OAD" +# noting the AMUND_OAD is set in case_setup. +#... as is the ROOTDIR + +sing_str="-B $PWD:$HOME,$MITGCM_ROOTDIR /work/n02/shared/mjmn02/AmundIce/Singularity/openad.sif" +#sing_str="-B $PWD:$HOME /work/n02/n02/dngoldbe/oad_sing/openad.sif" + + + # to check singularity and this binding of directories, the following should create a file T in your present working directory + # Adjust the PATH to be to your sif. +echo write test file from singularity + +rm -f TEST_SINGULARITY_BINDING +# fails. singularity exec '$sing_str' touch TEST_SINGULARITY_BINDING +# fails singularity exec "$sing_str" touch TEST_SINGULARITY_BINDING + singularity exec $sing_str touch TEST_SINGULARITY_BINDING + +if [ -f TEST_SINGULARITY_BINDING ] +then + echo singularity test passed +else + echo singularity test failed - stopping + exit +fi + +# singularity exec --bind $PWD:$HOME /work/n02/shared/mjmn02/AmundIce/Singularity/openad_latest.sif touch T + # You should see file T in the pwd + # for details https://sylabs.io/guides/3.0/user-guide/bind_paths_and_mounts.html. + + + +$MITGCM_ROOTDIR/tools/genmake2 -mods='../code' -of=../scripts/dev_linux_amd64_gfortran_archer2_oad -oad -mpi --oadsingularity="$sing_str" +ln -s $PETSC_DIR/include/*.mod . + +echo ----------------------LD_LIBRARY_PATH -------------------- +echo $LD_LIBRARY_PATH -$MITGCM_ROOTDIR/tools/genmake2 -mods='../code' -of=../scripts/dev_linux_amd64_gfortran_archer2_oad -oad -mpi --oadsingularity $sing_str -#ln -s $PETSCDIR/include/*.mod . -#echo $LD_LIBRARY_PATH +echo calling make adAll make adAll