From e4e42189eb69b22132a3716305970179e0b741f9 Mon Sep 17 00:00:00 2001 From: jfgrimm Date: Wed, 21 Feb 2024 13:33:21 +0000 Subject: [PATCH] install (and patch) Delft3D ESMF script --- .../Delft3D-4.04.01-foss-2022a-FLOW.eb | 8 +++- .../Delft3D-4.04.01_use-external-esmf.patch | 42 +++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/d/Delft3D/Delft3D-4.04.01-foss-2022a-FLOW.eb b/easybuild/easyconfigs/d/Delft3D/Delft3D-4.04.01-foss-2022a-FLOW.eb index ff41620b477..14de28ce6ec 100644 --- a/easybuild/easyconfigs/d/Delft3D/Delft3D-4.04.01-foss-2022a-FLOW.eb +++ b/easybuild/easyconfigs/d/Delft3D/Delft3D-4.04.01-foss-2022a-FLOW.eb @@ -26,7 +26,7 @@ checksums = [ # Delft3D-4.04.01.tgz None, # Delft3D-4.04.01_use-external-esmf.patch' - '86f127cf3193c6fc9256491d917051db91e695718631d1b221b111499e0f432b', + '225d76fb3eea22e203f1a9f371b4fd07d75a8478de35a7428c1a1f85b344323c', ] builddependencies = [ @@ -59,6 +59,8 @@ preconfigopts += "sed -i 's/if (spec < 0)/if (spec == nullptr)/g' utils_lgpl/del preconfigopts += "sed -i 's/if (has_umean \/= 0)/if (has_umean .neqv. .false.)/g' " # noqa: W605 preconfigopts += "engines_gpl/flow2d3d/packages/flow2d3d_io/src/input/restart_trim_flow.f90 && " preconfigopts += "sed -i -e 's/-recursive/-frecursive/g' -e 's/-traceback/-fbacktrace/g' configure.ac && " +# copy ESMF_RegridWeightGen_in_Delft3D-WAVE.sh script +preconfigopts += "cp third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh . && " # remove esmf precompiled binaries preconfigopts += "rm -r third_party_open/esmf && libtoolize && " preconfigopts += './autogen.sh && ' @@ -72,8 +74,10 @@ prebuildopts = "sed -i.backup 's/-l -l//g' libtool config.lt config.status && " install_cmd = 'make ds-install' +postinstallcmds = ["cp %(start_dir)s/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh %(installdir)s/bin/"] + sanity_check_paths = { - 'files': ['bin/d_hydro'], + 'files': ['bin/d_hydro', 'bin/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh'], 'dirs': ['lib', 'share'] } diff --git a/easybuild/easyconfigs/d/Delft3D/Delft3D-4.04.01_use-external-esmf.patch b/easybuild/easyconfigs/d/Delft3D/Delft3D-4.04.01_use-external-esmf.patch index 3d5b00b2014..c446d24a169 100644 --- a/easybuild/easyconfigs/d/Delft3D/Delft3D-4.04.01_use-external-esmf.patch +++ b/easybuild/easyconfigs/d/Delft3D/Delft3D-4.04.01_use-external-esmf.patch @@ -15,6 +15,48 @@ diff -Nru trunk.orig/src/configure.ac trunk/src/configure.ac third_party_open/Makefile third_party_open/md5/Makefile third_party_open/md5/md5digest/Makefile +diff -Nru trunk.orig/src/third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh trunk/src/third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh +--- trunk.orig/src/third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh 2024-02-20 14:35:27.449776542 +0000 ++++ trunk/src/third_party_open/esmf/lnx64/scripts/ESMF_RegridWeightGen_in_Delft3D-WAVE.sh 2024-02-21 11:53:47.816278292 +0000 +@@ -52,24 +52,24 @@ + scriptdirname=`readlink \-f \$0` + scriptdir=`dirname $scriptdirname` + D3D_HOME=$scriptdir/.. +-regridexec=$D3D_HOME/bin/ESMF_RegridWeightGen ++regridexec=$(which ESMF_RegridWeightGen) + # ESMF_regrid is build with old compilers etc. + # share/esmf optionally contains some library-versions especially for running this version of ESMF_regrid, + # both for RedHat 6.* and 7.* + +-if [ -f "/etc/redhat-release" ]; then +- grepOS=`cat /etc/redhat-release | grep -i "release 6"` +- if [ "$grepOS" != "" ]; then +- echo "RH 6: Using RH 6 libraries" >>esmf_sh.log +- export LD_LIBRARY_PATH=$D3D_HOME/share/delft3d/esmf/lnx64/bin:$D3D_HOME/lib:$LD_LIBRARY_PATH +- else +- echo "using RH 7 libraries" >>esmf_sh.log +- export LD_LIBRARY_PATH=$D3D_HOME/share/delft3d/esmf/lnx64/bin_COS7:$D3D_HOME/lib:$LD_LIBRARY_PATH +- fi +-else +- echo "ERROR: ESMF_RegridWeightGen_in_Delft3D-WAVE.sh only implemented for CentOS 6 and 7." +- exit +-fi ++# if [ -f "/etc/redhat-release" ]; then ++# grepOS=`cat /etc/redhat-release | grep -i "release 6"` ++# if [ "$grepOS" != "" ]; then ++# echo "RH 6: Using RH 6 libraries" >>esmf_sh.log ++# export LD_LIBRARY_PATH=$D3D_HOME/share/delft3d/esmf/lnx64/bin:$D3D_HOME/lib:$LD_LIBRARY_PATH ++# else ++# echo "using RH 7 libraries" >>esmf_sh.log ++# export LD_LIBRARY_PATH=$D3D_HOME/share/delft3d/esmf/lnx64/bin_COS7:$D3D_HOME/lib:$LD_LIBRARY_PATH ++# fi ++# else ++# echo "ERROR: ESMF_RegridWeightGen_in_Delft3D-WAVE.sh only implemented for CentOS 6 and 7." ++# exit ++# fi + + + echo Executing batchscript "ESMF_RegridWeightGen_in_Delft3D-WAVE.sh" for Delft3D-WAVE >>esmf_sh.log diff -Nru trunk.orig/src/third_party_open/Makefile.am trunk/src/third_party_open/Makefile.am --- trunk.orig/src/third_party_open/Makefile.am 2024-02-20 14:35:27.045777956 +0000 +++ trunk/src/third_party_open/Makefile.am 2024-02-20 14:43:31.552143270 +0000