Skip to content

Commit

Permalink
working towards building
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMineter committed May 12, 2022
1 parent 0f31506 commit 411611b
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 9 deletions.
2 changes: 1 addition & 1 deletion code_ecse/STREAMICE_OPTIONS.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
7 changes: 4 additions & 3 deletions scripts_ecse/case_setup
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions scripts_ecse/dev_linux_amd64_gfortran_archer2_oad
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
43 changes: 38 additions & 5 deletions scripts_ecse/make_archer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 411611b

Please sign in to comment.