diff --git a/easybuild/easyconfigs/t/TELEMAC-MASCARET/TELEMAC-MASCARET-8p3r1-foss-2021b.eb b/easybuild/easyconfigs/t/TELEMAC-MASCARET/TELEMAC-MASCARET-8p3r1-foss-2021b.eb new file mode 100644 index 00000000000..a28af36eaef --- /dev/null +++ b/easybuild/easyconfigs/t/TELEMAC-MASCARET/TELEMAC-MASCARET-8p3r1-foss-2021b.eb @@ -0,0 +1,87 @@ +easyblock = 'Binary' + +name = 'TELEMAC-MASCARET' +version = '8p3r1' + +homepage = 'http://www.opentelemac.org' +description = """TELEMAC-MASCARET is an integrated suite of solvers for use in the field of free-surface flow. Having +been used in the context of many studies throughout the world, it has become one of the major standards in its field.""" + +toolchain = {'name': 'foss', 'version': '2021b'} +toolchainopts = {'extra_fcflags': "-fallow-invalid-boz"} + +source_urls = ['https://gitlab.pam-retd.fr/otm/telemac-mascaret/-/archive/v%(version)s/'] +sources = ['telemac-mascaret-v%(version)s.tar.gz'] +checksums = ['e37ae6b7eefca0e544c6431308e43828d439be08701356814dd1e04ca762fb7d'] + +dependencies = [ + ('Python', '3.9.6'), + ('SciPy-bundle', '2021.10'), # provides numpy, scipy + ('matplotlib', '3.4.3'), + ('HDF5', '1.12.1'), + ('METIS', '5.1.0'), + ('SCOTCH', '6.1.2'), + ('MUMPS', '5.4.1', '-metis'), +] + +extract_sources = True +unpack_options = '--strip-components=1' + +buildininstalldir = True + +local_tweak_cfg_cmd = ' '.join([ + "sed -i -e 's/S9.gfortran/easybuild/g'", + # strip out use of AED, GOTM, MED (optional dependencies) + "-e 's/\(^[a-z]*_aed:\).*/\\1/g' -e 's/\(^[a-z]*_gotm:\).*/\\1/g' -e 's/\(^[a-z]*_med:\).*/\\1/g'", + # replace -O2 with desired compiler options + '-e "s/-O2/$F90FLAGS/g"', + # fix linker option for BLAS + '-e "s/ -lblas/ $LIBBLAS/g"', + # downgrade Fortran compiler error to warning + "-e 's/^fflags_gfo:/fflags_gfo: -fallow-invalid-boz/g'", + "$HOMETEL/configs/systel.easybuild.cfg", +]) + +install_cmd = ' && '.join([ + "export HOMETEL=$PWD", + # add Python scripts to $PATH and $PYTHONPATH + "export PATH=$HOMETEL/scripts/python3/:$PATH", + "export PYTHONPATH=$HOMETEL/scripts/python3:$PYTHONPATH", + # force python to flush its output + "export PYTHONUNBUFFERED=1", + "cp $HOMETEL/configs/systel.edf.cfg $HOMETEL/configs/systel.easybuild.cfg", + local_tweak_cfg_cmd, + "export SYSTELCFG=$HOMETEL/configs/systel.easybuild.cfg", + "export USETELCFG=easybuild", + "export SCALAPACKHOME=$EBROOTSCALAPACK", + "export METISHOME=$EBROOTMETIS", + "export SCOTCHHOME=$EBROOTSCOTCH", + "export MUMPSHOME=$EBROOTMUMPS", + "export HDF5HOME=$EBROOTHDF5", + "config.py", + "compile_telemac.py -j %(parallel)s", +]) + +sanity_check_paths = { + 'files': ['builds/easybuild/bin/telemac2d', 'builds/easybuild/bin/telemac3d', + 'builds/easybuild/lib/libtelemac2d.%s' % SHLIB_EXT, 'builds/easybuild/lib/libtelemac3d.%s' % SHLIB_EXT], + 'dirs': ['scripts/python3'], +} + +sanity_check_commands = [ + "tmpdir=$(mktemp -d) && cp -a %(installdir)s/examples/telemac2d/gouttedo $tmpdir/ && chmod -R u+w $tmpdir && " + "cd $tmpdir/gouttedo && telemac2d.py t2d_gouttedo.cas", +] + +modextrapaths = { + 'LD_LIBRARY_PATH': 'builds/easybuild/lib', + 'PATH': 'scripts/python3', + 'PYTHONPATH': 'scripts/python3', +} + +modextravars = { + 'SYSTELCFG': '%(installdir)s/configs/systel.easybuild.cfg', + 'USETELCFG': 'easybuild', +} + +moduleclass = 'geo'