├── .github ├── scripts │ ├── bootstrap-nvhpc.sh │ ├── install-hdf5.sh │ └── verify-targets.sh └── workflows │ └── build.yml ├── .gitignore ├── AUTHORS.md ├── CMakeLists.txt ├── LICENSE ├── README.md ├── VERSION ├── arch ├── cambridge │ └── dawn │ │ └── intel │ │ ├── 2024.0.0 │ │ ├── env.sh │ │ └── toolchain.cmake │ │ └── 2024.1.0 │ │ ├── env.sh │ │ └── toolchain.cmake ├── ecmwf │ ├── hpc2020 │ │ ├── gnu │ │ │ ├── 11.2.0 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ │ └── 9.3.0 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ ├── intel-sycl │ │ │ └── 2021.4.0 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ ├── intel │ │ │ └── 2021.4.0 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ └── nvhpc │ │ │ ├── 22.1 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ │ │ └── 22.11 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ └── leap42 │ │ ├── gnu │ │ ├── 7.3.0 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ │ └── 9.3.0 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ │ └── intel │ │ └── 18.0.1 │ │ ├── env.sh │ │ └── toolchain.cmake ├── eurohpc │ ├── leonardo │ │ └── nvhpc │ │ │ └── 23.1 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ ├── lumi │ │ ├── amd-gpu │ │ │ └── 8.3.3 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ ├── amd-host │ │ │ └── 8.3.3 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ ├── cray-gpu │ │ │ ├── 14.0.2 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ │ ├── 15.0.1 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ │ ├── 16.0.1 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ │ └── 17.0.1 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ └── cray-host │ │ │ └── 14.0.2 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ └── meluxina │ │ └── nvhpc │ │ ├── 21.11 │ │ ├── env.sh │ │ └── toolchain.cmake │ │ └── 22.3 │ │ ├── env.sh │ │ └── toolchain.cmake ├── github │ └── ubuntu │ │ ├── gnu │ │ └── 9.4.0 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ │ └── nvhpc │ │ ├── 21.9 │ │ ├── env.sh │ │ └── toolchain.cmake │ │ └── 23.5 │ │ ├── env.sh │ │ └── toolchain.cmake ├── isambard │ ├── a64fx │ │ ├── arm │ │ │ └── 21.0.0 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ ├── cray │ │ │ └── 10.0.1 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ ├── fujitsu │ │ │ └── 4.3.1 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ └── gnu │ │ │ └── 11.0.0 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ ├── macs │ │ ├── cray-host │ │ │ └── 11.0.4 │ │ │ │ ├── env.sh │ │ │ │ └── toolchain.cmake │ │ └── intel │ │ │ └── 2021.4.0 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ └── p3 │ │ ├── cray-host │ │ └── 13.0.0 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ │ └── intel │ │ └── 2021.4.0 │ │ ├── env.sh │ │ └── toolchain.cmake ├── jsc │ ├── deep │ │ └── gnu │ │ │ └── 10.3.0 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ ├── jwb │ │ └── nvhpc │ │ │ └── 21.5 │ │ │ ├── env.sh │ │ │ └── toolchain.cmake │ └── jwc │ │ └── gnu │ │ └── 10.3.0 │ │ ├── env.sh │ │ └── toolchain.cmake └── toolchains │ ├── ecmwf-hpc2020-intel-sycl.cmake │ ├── ecmwf-hpc2020-intel.cmake │ ├── ecmwf-hpc2020-nvhpc.cmake │ ├── ecmwf-leap42-gnu.cmake │ ├── ecmwf-leap42-intel.cmake │ ├── eurohpc-leonardo-nvhpc.cmake │ ├── eurohpc-meluxina-nvhpc.cmake │ ├── github-ubuntu-gnu.cmake │ ├── github-ubuntu-nvhpc.cmake │ ├── jsc-deep-gnu.cmake │ └── jsc-jwb-nvhpc.cmake ├── benchmark ├── JUBE.md ├── README.md ├── arch │ ├── hpc2020 │ │ ├── gnu │ │ │ └── 9.3.0 │ │ │ │ └── include_arch.yml │ │ ├── intel │ │ │ └── 2021.4.0 │ │ │ │ └── include_arch.yml │ │ └── nvhpc │ │ │ └── 22.1 │ │ │ └── include_arch.yml │ └── isambard │ │ ├── a64fx │ │ ├── arm │ │ │ └── 21.0.0 │ │ │ │ ├── include_arch.yml │ │ │ │ └── include_run.yml │ │ ├── cray │ │ │ └── 10.0.1 │ │ │ │ ├── include_arch.yml │ │ │ │ └── include_run.yml │ │ ├── fujitsu │ │ │ └── 4.3.1 │ │ │ │ ├── include_arch.yml │ │ │ │ └── include_run.yml │ │ └── gnu │ │ │ └── 11.0.0 │ │ │ ├── include_arch.yml │ │ │ └── include_run.yml │ │ ├── macs │ │ ├── cray-host │ │ │ └── 11.0.4 │ │ │ │ └── include_arch.yml │ │ └── intel │ │ │ └── 2021.4.0 │ │ │ └── include_arch.yml │ │ └── p3 │ │ ├── cray-host │ │ └── 13.0.0 │ │ │ ├── include_arch.yml │ │ │ └── include_run.yml │ │ └── intel │ │ └── 2021.4.0 │ │ ├── include_arch.yml │ │ └── include_run.yml ├── cloudsc.yml ├── include │ ├── include_analyser.yml │ ├── include_arch.yml │ ├── include_fileset_substituteset.yml │ ├── include_parameterset.yml │ ├── include_patternset.yml │ ├── include_result.yml │ ├── include_run.yml │ └── include_step.yml ├── requirements.txt └── templates │ ├── build-template.sh │ └── run-template.sh ├── bundle.yml ├── cloudsc-bundle ├── cmake ├── FindLatex.cmake ├── cloudsc_compile_options.cmake ├── compat.cmake ├── compat │ ├── 3.16 │ │ └── FindOpenACC.cmake │ └── README.md ├── features │ ├── OMP.cmake │ └── OMP │ │ ├── test_omp_target_loop_construct_bind_parallel.F90 │ │ ├── test_omp_target_loop_construct_bind_thread.F90 │ │ └── test_omp_target_teams_distribute.F90 ├── project_summary.cmake └── python_venv.cmake ├── config-files ├── cloudsc.bin ├── input.h5 └── reference.h5 ├── data ├── ArchiveMetaData-dummy.json ├── ArchiveMetaData-input.json ├── ArchiveMetaData-reference.json ├── MetaData-dummy.json ├── MetaData-input.json ├── MetaData-reference.json ├── input_KTYPE.dat ├── input_LDCUM.dat ├── input_PA.dat ├── input_PAP.dat ├── input_PAPH.dat ├── input_PCCN.dat ├── input_PCLV.dat ├── input_PDYNA.dat ├── input_PDYNI.dat ├── input_PDYNL.dat ├── input_PEXTRA.dat ├── input_PHRLW.dat ├── input_PHRSW.dat ├── input_PICRIT_AER.dat ├── input_PLCRIT_AER.dat ├── input_PLSM.dat ├── input_PLU.dat ├── input_PLUDE.dat ├── input_PMFD.dat ├── input_PMFU.dat ├── input_PNICE.dat ├── input_PQ.dat ├── input_PRE_ICE.dat ├── input_PSNDE.dat ├── input_PSUPSAT.dat ├── input_PT.dat ├── input_PVERVEL.dat ├── input_PVFA.dat ├── input_PVFI.dat ├── input_PVFL.dat ├── input_TENDENCY_CML_A.dat ├── input_TENDENCY_CML_CLD.dat ├── input_TENDENCY_CML_Q.dat ├── input_TENDENCY_CML_T.dat ├── input_TENDENCY_TMP_A.dat ├── input_TENDENCY_TMP_CLD.dat ├── input_TENDENCY_TMP_Q.dat ├── input_TENDENCY_TMP_T.dat ├── input_YRECLDP_RBETA.dat ├── input_YRECLDP_RBETAP1.dat ├── reference_PCOVPTOT.dat ├── reference_PFCQLNG.dat ├── reference_PFCQNNG.dat ├── reference_PFCQRNG.dat ├── reference_PFCQSNG.dat ├── reference_PFHPSL.dat ├── reference_PFHPSN.dat ├── reference_PFPLSL.dat ├── reference_PFPLSN.dat ├── reference_PFSQIF.dat ├── reference_PFSQITUR.dat ├── reference_PFSQLF.dat ├── reference_PFSQLTUR.dat ├── reference_PFSQRF.dat ├── reference_PFSQSF.dat ├── reference_PLUDE.dat ├── reference_PRAINFRAC_TOPRFZ.dat ├── reference_TENDENCY_LOC_A.dat ├── reference_TENDENCY_LOC_CLD.dat ├── reference_TENDENCY_LOC_Q.dat └── reference_TENDENCY_LOC_T.dat ├── doc ├── CMakeLists.txt ├── documentation.tex ├── refs.bib ├── styling.cfg └── version.tex.in ├── output-example ├── CCE.ivybridge.out ├── GNU.haswell.out ├── GNU.montague.out ├── INTEL.haswell.out ├── INTEL.montague.out └── PGI.haswell.out ├── serialbox2hdf5 ├── README.md └── serialbox2hdf5.py └── src ├── CMakeLists.txt ├── cloudsc_c ├── CMakeLists.txt ├── cloudsc │ ├── cloudsc_c.c │ ├── cloudsc_c.h │ ├── cloudsc_driver.c │ ├── cloudsc_driver.h │ ├── cloudsc_validate.c │ ├── cloudsc_validate.h │ ├── load_state.c │ ├── load_state.h │ ├── mycpu.c │ ├── mycpu.h │ ├── yoecldp_c.c │ ├── yoecldp_c.h │ ├── yoethf_c.c │ ├── yoethf_c.h │ ├── yomcst_c.c │ └── yomcst_c.h └── dwarf_cloudsc.c ├── cloudsc_cuda ├── CMakeLists.txt ├── cloudsc │ ├── cloudsc_c.cu │ ├── cloudsc_c.h │ ├── cloudsc_c_hoist.cu │ ├── cloudsc_c_hoist.h │ ├── cloudsc_c_k_caching.cu │ ├── cloudsc_c_k_caching.h │ ├── cloudsc_c_opt.cu │ ├── cloudsc_c_opt.h │ ├── cloudsc_driver.cu │ ├── cloudsc_driver.h │ ├── cloudsc_driver_hoist.cu │ ├── cloudsc_driver_hoist.h │ ├── cloudsc_driver_opt.cu │ ├── cloudsc_driver_opt.h │ ├── cloudsc_validate.cu │ ├── cloudsc_validate.h │ ├── dtype.h │ ├── load_state.cu │ ├── load_state.h │ ├── mycpu.cu │ ├── mycpu.h │ └── yoecldp_c.h └── dwarf_cloudsc.cpp ├── cloudsc_fortran ├── CMakeLists.txt ├── cloudsc.F90 ├── cloudsc_driver_field_mod.F90 ├── cloudsc_driver_mod.F90 └── dwarf_cloudsc.F90 ├── cloudsc_fortran_atlas ├── CMakeLists.txt ├── cloudsc.F90 ├── cloudsc_driver_mod.F90 ├── cloudsc_global_atlas_state_mod.F90 ├── dwarf_cloudsc_atlas.F90 ├── expand_atlas_mod.F90 └── validate_atlas_mod.F90 ├── cloudsc_gpu ├── CMakeLists.txt ├── cloudsc_driver_gpu_omp_scc_hoist_mod.F90 ├── cloudsc_driver_gpu_omp_scc_k_caching_mod.F90 ├── cloudsc_driver_gpu_omp_scc_mod.F90 ├── cloudsc_driver_gpu_omp_scc_stack_mod.F90 ├── cloudsc_driver_gpu_scc_cuf_k_caching_mod.F90 ├── cloudsc_driver_gpu_scc_cuf_mod.F90 ├── cloudsc_driver_gpu_scc_field_mod.F90 ├── cloudsc_driver_gpu_scc_hoist_mod.F90 ├── cloudsc_driver_gpu_scc_k_caching_mod.F90 ├── cloudsc_driver_gpu_scc_mod.F90 ├── cloudsc_driver_gpu_scc_stack_mod.F90 ├── cloudsc_gpu_omp_scc_hoist_mod.F90 ├── cloudsc_gpu_omp_scc_k_caching_mod.F90 ├── cloudsc_gpu_omp_scc_mod.F90 ├── cloudsc_gpu_omp_scc_stack_mod.F90 ├── cloudsc_gpu_scc_cuf_k_caching_mod.F90 ├── cloudsc_gpu_scc_cuf_mod.F90 ├── cloudsc_gpu_scc_hoist_mod.F90 ├── cloudsc_gpu_scc_k_caching_mod.F90 ├── cloudsc_gpu_scc_mod.F90 ├── cloudsc_gpu_scc_stack_mod.F90 ├── dwarf_cloudsc_gpu.F90 └── nlev_mod.F90 ├── cloudsc_hip ├── CMakeLists.txt ├── cloudsc │ ├── cloudsc_c.cpp │ ├── cloudsc_c.h │ ├── cloudsc_c_hoist.cpp │ ├── cloudsc_c_hoist.h │ ├── cloudsc_c_k_caching.cpp │ ├── cloudsc_c_k_caching.h │ ├── cloudsc_driver.cpp │ ├── cloudsc_driver.h │ ├── cloudsc_driver_hoist.cpp │ ├── cloudsc_driver_hoist.h │ ├── cloudsc_validate.cpp │ ├── cloudsc_validate.h │ ├── dtype.h │ ├── load_state.cpp │ ├── load_state.h │ ├── mycpu.cpp │ ├── mycpu.h │ └── yoecldp_c.h └── dwarf_cloudsc.cpp ├── cloudsc_loki ├── CMakeLists.txt ├── cloudsc.F90 ├── cloudsc_cuf_loki.config ├── cloudsc_driver_field_loki_mod.F90 ├── cloudsc_driver_loki_mod.F90 ├── cloudsc_loki.config ├── cloudsc_loki_field_offload.config ├── cuf_cloudsc.F90 ├── cuf_cloudsc_driver_loki_mod.F90 ├── dwarf_cloudsc.F90 └── xmod │ ├── cloudsc_mpi_mod.xmod │ ├── cloudsc_mpif.xmod │ ├── fccld_mod.xmod │ ├── fcttre_mod.xmod │ ├── file_io_mod.xmod │ ├── parkind1.xmod │ ├── timer_mod.xmod │ ├── yoecldp.xmod │ ├── yoethf.xmod │ ├── yomcst.xmod │ └── yomphyder.xmod ├── cloudsc_pyiface ├── CMakeLists.txt ├── LICENSE ├── README.md ├── drivers │ ├── __init__.py │ └── cloudsc_pyiface.py ├── fortransrc │ ├── cloudsc.F90 │ ├── cloudsc_driver_mod.F90 │ └── dwarf_cloudsc.F90 ├── kind_map ├── pyproject.toml └── src │ └── pyiface │ ├── __init__.py │ ├── cloudsc_data.py │ └── dynload.py ├── cloudsc_python ├── CMakeLists.txt ├── drivers │ ├── cloudsc_f2py.py │ ├── input.h5 │ └── reference.h5 ├── pyproject.toml └── src │ └── cloudscf2py │ ├── __init__.py │ ├── cloudsc.F90 │ ├── cloudsc_py.py │ ├── include │ ├── abor1.intfb.h │ ├── fccld.base.h │ ├── fccld.func.h │ ├── fccld.ydthf.h │ ├── fcttre.base.h │ ├── fcttre.func.h │ └── fcttre.ycst.h │ ├── inputs.py │ ├── yoecldp.F90 │ ├── yoethf.F90 │ └── yomcst.F90 ├── cloudsc_sycl ├── CMakeLists.txt ├── cloudsc │ ├── cloudsc_c.kernel │ ├── cloudsc_c_hoist.kernel │ ├── cloudsc_c_k_caching.kernel │ ├── cloudsc_driver.cpp │ ├── cloudsc_driver.h │ ├── cloudsc_driver_hoist.cpp │ ├── cloudsc_driver_hoist.h │ ├── cloudsc_driver_k_caching.cpp │ ├── cloudsc_validate.cpp │ ├── cloudsc_validate.h │ ├── dtype.h │ ├── load_state.cpp │ ├── load_state.h │ ├── mycpu.cpp │ ├── mycpu.h │ └── yoecldp_c.h └── dwarf_cloudsc.cpp ├── common ├── CMakeLists.txt ├── include │ ├── abor1.intfb.h │ ├── cloudsc.intfb.h │ ├── fccld.base.h │ ├── fccld.func.h │ ├── fccld.ydthf.h │ ├── fcttre.base.h │ ├── fcttre.func.h │ ├── fcttre.ycst.h │ └── mycpu.intfb.h └── module │ ├── abor1.F90 │ ├── cloudsc_aux_type_mod.F90 │ ├── cloudsc_field_state_mod.F90 │ ├── cloudsc_flux_type_mod.F90 │ ├── cloudsc_global_state_mod.F90 │ ├── cloudsc_mpi_mod.F90 │ ├── cloudsc_mpif.F90 │ ├── cloudsc_state_type_mod.F90 │ ├── ec_pmon_mod.F90 │ ├── expand_mod.F90 │ ├── fccld_mod.cuf.F90 │ ├── fcttre_mod.cuf.F90 │ ├── file_io_mod.F90 │ ├── hdf5_file_mod.F90 │ ├── mycpu.c │ ├── oml_mod.F90 │ ├── parkind1.F90 │ ├── routines.F90 │ ├── timer_mod.F90 │ ├── validate_mod.F90 │ ├── yoecldp.F90 │ ├── yoephli.F90 │ ├── yoethf.F90 │ ├── yoethf.cuf.F90 │ ├── yomcst.F90 │ ├── yomcst.cuf.F90 │ └── yomphyder.F90 └── prototype1 ├── CMakeLists.txt ├── auxiliary ├── fmtnam.pl ├── logical_cores ├── makefile ├── nsockets ├── physical_cores ├── run.gprof └── system_used ├── cloudsc ├── cloud_layer.F90 ├── cloudsc.F90 ├── cloudsc_driver.F90 ├── cloudsc_in.F90 ├── cloudsc_out.F90 └── cuadjtq.F90 ├── cloudsc_dwarf.F90 ├── include ├── abor1.intfb.h ├── cloud_layer.intfb.h ├── cloudsc.intfb.h ├── cloudsc_driver.intfb.h ├── cloudsc_in.intfb.h ├── cuadjtq.intfb.h ├── dotprod2.intfb.h ├── dotprod3.intfb.h ├── fccld.func.h ├── fcttre.func.h └── mycpu.intfb.h └── support ├── abor1.F90 ├── diag_mod.F90 ├── diff_mod.F90 ├── expand_mod.F90 ├── mycpu.c ├── parkind1.F90 ├── routines.F90 ├── serialize_mod.F90 ├── surface_fields_mix.F90 ├── timer_mod.F90 ├── yoecldp.F90 ├── yoephli.F90 ├── yoethf.F90 ├── yomcst.F90 ├── yomct0.F90 ├── yomct3.F90 ├── yomdim.F90 ├── yomdyn.F90 ├── yomjfh.F90 ├── yomlun.F90 ├── yomlun_ifsaux.F90 ├── yommp0.F90 ├── yomphy2.F90 └── yomphyder.F90 /.github/scripts/bootstrap-nvhpc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | set -x 4 | 5 | # Set nvhpc version to default value if unset 6 | : "${nvhpc_version:=21.9}" 7 | 8 | # Use Atlas' nvhpc installation script 9 | wget https://raw.githubusercontent.com/ecmwf/atlas/develop/tools/install-nvhpc.sh 10 | chmod +x install-nvhpc.sh 11 | 12 | # Install nvhpc 13 | ./install-nvhpc.sh --version $nvhpc_version --prefix "${GITHUB_WORKSPACE}/nvhpc-install" --tmpdir "${RUNNER_TEMP}" 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /.github/scripts/install-hdf5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -euo pipefail 3 | set -x 4 | 5 | hdf5_version=1.10.8 6 | 7 | # Choose hdf5 8 | version_parts=($(echo ${hdf5_version} | tr "." "\n")) 9 | major_version=${version_parts[0]}.${version_parts[1]} 10 | temporary_files="${RUNNER_TEMP}/hdf5" 11 | url=https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${major_version}/hdf5-${hdf5_version}/src/hdf5-${hdf5_version}.tar.gz 12 | 13 | # Download hdf5 14 | mkdir -p "${temporary_files}" 15 | curl --location "$url" | tar zx -C "${temporary_files}" 16 | 17 | # Build hdf5 18 | cd "${temporary_files}/hdf5-${hdf5_version}" 19 | prefix="${GITHUB_WORKSPACE}/hdf5-install" 20 | mkdir -p "${prefix}" 21 | ./configure --prefix="${prefix}" --enable-shared --enable-fortran --enable-hl 22 | make -j 23 | make install 24 | 25 | exit 0 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .vscode 3 | ecbundle 4 | ecbundle/* 5 | build/* 6 | source/* 7 | serialbox2hdf5/venv 8 | serialbox2hdf5/serialbox 9 | benchmark/venv 10 | benchmark/rundir_* 11 | benchmark/jube-debug.log 12 | venv/ 13 | __pycache__/ 14 | .DS_Store 15 | .dace.conf 16 | .gt_cache/ 17 | .idea/ 18 | .python-version 19 | *.egg-info/ 20 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Authors and Contributors 2 | 3 | - M. Ahlgrimm (ECMWF) 4 | - P. Bechtold (ECMWF) 5 | - S. Brdar (ECMWF) 6 | - W. Deconinck (ECMWF) 7 | - J. Ericsson (ECMWF) 8 | - R. Forbes (ECMWF) 9 | - C. Jakob (ECMWF) 10 | - J. Hague (ECMWF) 11 | - M. Hamrud (ECMWF) 12 | - M. Koehler (ECMWF) 13 | - M. Lange (ECMWF) 14 | - L. Lucido (Atos) 15 | - O. Marsden (ECMWF) 16 | - G. Mengaldo (ECMWF) 17 | - A. Morvan (Atos) 18 | - G. Mozdzynski (ECMWF) 19 | - A. Nawab (ECMWF) 20 | - Z. Piotrowski (ECMWF) 21 | - B. Reuter (ECMWF) 22 | - D. Salmond (ECMWF) 23 | - M. Staneker (ECMWF) 24 | - M. Tiedtke (ECMWF) 25 | - A. Tompkins (ECMWF) 26 | - S. Ubbiali (ETH Zuerich) 27 | - F. Vana (ECMWF) 28 | 29 | If you have contributed to this project, 30 | please add your name in the above alphabetical list. 31 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 1.5.3 2 | -------------------------------------------------------------------------------- /arch/cambridge/dawn/intel/2024.0.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload all modules to be certain 24 | module purge 25 | 26 | # Load modules 27 | module load rhel8/slurm 28 | module load rhel8/global 29 | module load dot 30 | module load dawn-env/2023-12-22 31 | module load intel-oneapi-compilers/2024.0.0 32 | module load intel-oneapi-mpi/2021.11.0 33 | module_load boost/1.83.0 34 | module_load cmake/3.27.9 35 | module_load hdf5/1.14.3 36 | 37 | set -x 38 | 39 | # below should be the default these days 40 | export EnableImplicitScaling=0 41 | # card 0, tile 0 42 | export ZE_AFFINITY_MASK=0.0 43 | export ONEAPI_DEVICE_SELECTOR=level_zero:gpu 44 | # 256 registers per thread, fewer threads 45 | export SYCL_PROGRAM_COMPILE_OPTIONS="-ze-opt-large-register-file" 46 | # this option affects the overhead of SYCL offload calls, in this case 0 seems to help 47 | export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 48 | 49 | # Restore tracing to stored setting 50 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 51 | 52 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 53 | -------------------------------------------------------------------------------- /arch/cambridge/dawn/intel/2024.0.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER FLAGS 11 | #################################################################### 12 | 13 | set( OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "" ) 14 | set( OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" ) 15 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O3") 16 | 17 | #################################################################### 18 | # LINK FLAGS 19 | #################################################################### 20 | 21 | set( ECBUILD_SHARED_LINKER_FLAGS "-Wl,--eh-frame-hdr " ) 22 | set( ECBUILD_MODULE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Wl,-Map,loadmap" ) 23 | set( ECBUILD_EXE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Wl,-Map,loadmap -Wl,--as-needed" ) 24 | -------------------------------------------------------------------------------- /arch/cambridge/dawn/intel/2024.1.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload all modules to be certain 24 | module purge 25 | 26 | # Load modules 27 | module load rhel8/slurm 28 | module load rhel8/global 29 | module load dot 30 | module load dawn-env/2024-04-15 31 | module load intel-oneapi-compilers/2024.1.0 32 | module load intel-oneapi-mpi/2021.12.0 33 | module_load boost/1.84.0 34 | module_load cmake/3.27.9 35 | module_load hdf5/1.14.3 36 | 37 | set -x 38 | 39 | # below should be the default these days 40 | export EnableImplicitScaling=0 41 | # card 0, tile 0 42 | export ZE_AFFINITY_MASK=0.0 43 | export ONEAPI_DEVICE_SELECTOR=level_zero:gpu 44 | # 256 registers per thread, fewer threads 45 | export SYCL_PROGRAM_COMPILE_OPTIONS="-ze-opt-large-register-file" 46 | # this option affects the overhead of SYCL offload calls, in this case 0 seems to help 47 | export SYCL_PI_LEVEL_ZERO_USE_IMMEDIATE_COMMANDLISTS=0 48 | 49 | # Restore tracing to stored setting 50 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 51 | 52 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 53 | -------------------------------------------------------------------------------- /arch/cambridge/dawn/intel/2024.1.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER FLAGS 11 | #################################################################### 12 | 13 | set( OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "" ) 14 | set( OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" ) 15 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O3") 16 | 17 | #################################################################### 18 | # LINK FLAGS 19 | #################################################################### 20 | 21 | set( ECBUILD_SHARED_LINKER_FLAGS "-Wl,--eh-frame-hdr " ) 22 | set( ECBUILD_MODULE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Wl,-Map,loadmap" ) 23 | set( ECBUILD_EXE_LINKER_FLAGS "-Wl,--eh-frame-hdr -Wl,-Map,loadmap -Wl,--as-needed" ) 24 | -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/gnu/11.2.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Store tracing and disable (module is *way* too verbose) 10 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 11 | 12 | module_load() { 13 | echo "+ module load $1" 14 | module load $1 15 | } 16 | module_unload() { 17 | echo "+ module unload $1" 18 | module unload $1 19 | } 20 | 21 | # Unload all modules to be certain 22 | module_unload gcc 23 | module_unload openmpi 24 | module_unload hpcx-openmpi 25 | module_unload boost 26 | module_unload hdf5 27 | module_unload cmake 28 | module_unload python3 29 | module_unload java 30 | 31 | # Load modules 32 | module_load prgenv/gnu 33 | module_load gcc/11.2.0 34 | module_load hpcx-openmpi/2.10.0 35 | module_load boost/1.71.0 36 | module_load hdf5/1.10.6 37 | module_load cmake/3.25.2 38 | module_load python3/3.8.8-01 39 | module_load java/11.0.6 40 | 41 | # Restore tracing to stored setting 42 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 43 | 44 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 45 | -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/gnu/9.3.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Store tracing and disable (module is *way* too verbose) 10 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 11 | 12 | module_load() { 13 | echo "+ module load $1" 14 | module load $1 15 | } 16 | module_unload() { 17 | echo "+ module unload $1" 18 | module unload $1 19 | } 20 | 21 | # Unload all modules to be certain 22 | module_unload gcc 23 | module_unload openmpi 24 | module_unload boost 25 | module_unload hdf5 26 | module_unload cmake 27 | module_unload python3 28 | module_unload java 29 | 30 | # Load modules 31 | module_load prgenv/gnu 32 | module_load gcc/9.3.0 33 | module_load openmpi/4.1.1.1 34 | module_load boost/1.71.0 35 | module_load hdf5/1.10.6 36 | module_load cmake/3.25.2 37 | module_load python3/3.8.8-01 38 | module_load java/11.0.6 39 | 40 | # Restore tracing to stored setting 41 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 42 | 43 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 44 | -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/gnu/9.3.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | 15 | #################################################################### 16 | # Compiler FLAGS 17 | #################################################################### 18 | 19 | # General Flags (add to default) 20 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffpe-trap=invalid,zero,overflow") 21 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fstack-arrays") 22 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fconvert=big-endian") 23 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fbacktrace") 24 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-second-underscore") 25 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffast-math") 26 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-unsafe-math-optimizations") 27 | -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/intel-sycl/2021.4.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload all modules to be certain 24 | module_unload intel 25 | module_unload openmpi 26 | module_unload hpcx-openmpi 27 | module_unload boost 28 | module_unload hdf5 29 | module_unload cmake 30 | module_unload python3 31 | module_unload java 32 | 33 | # Load modules 34 | module_load prgenv/intel 35 | module_load intel/2021.4.0 36 | module_load hpcx-openmpi/2.10.0 37 | module_load boost/1.71.0 38 | module_load hdf5/1.10.6 39 | module_load cmake/3.20.2 40 | module_load python3/3.8.8-01 41 | module_load java/11.0.6 42 | 43 | set -x 44 | 45 | export IntelSYCL_DIR="/usr/local/apps/intel/2023.2.0/compiler/2023.2.0/linux/IntelSYCL" 46 | 47 | # Restore tracing to stored setting 48 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 49 | 50 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 51 | -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/intel-sycl/2021.4.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/ecmwf-hpc2020-intel-sycl.cmake -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/intel/2021.4.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload all modules to be certain 24 | module_unload intel 25 | module_unload openmpi 26 | module_unload hpcx-openmpi 27 | module_unload boost 28 | module_unload hdf5 29 | module_unload cmake 30 | module_unload python3 31 | module_unload java 32 | 33 | # Load modules 34 | module_load prgenv/intel 35 | module_load intel/2021.4.0 36 | module_load hpcx-openmpi/2.10.0 37 | module_load boost/1.71.0 38 | module_load hdf5/1.10.6 39 | module_load cmake/3.20.2 40 | module_load python3/3.8.8-01 41 | module_load java/11.0.6 42 | 43 | set -x 44 | 45 | # Restore tracing to stored setting 46 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 47 | 48 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 49 | -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/intel/2021.4.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/ecmwf-hpc2020-intel.cmake -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/nvhpc/22.1/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload all modules to be certain 24 | module_unload nvidia 25 | module_unload intel-mpi 26 | module_unload openmpi 27 | module_unload hpcx-openmpi 28 | module_unload boost 29 | module_unload hdf5 30 | module_unload cmake 31 | module_unload python3 32 | module_unload java 33 | 34 | # Load modules 35 | module_load prgenv/nvidia 36 | module_load nvidia/22.1 37 | module_load hpcx-openmpi/2.10.0 38 | # module_load boost/1.71.0 39 | module_load hdf5/1.10.6 40 | module_load cmake/3.20.2 41 | module_load python3/3.8.8-01 42 | module_load java/11.0.6 43 | 44 | # Increase stack size to maximum 45 | ulimit -S -s unlimited 46 | 47 | set -x 48 | 49 | # Restore tracing to stored setting 50 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 51 | 52 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 53 | -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/nvhpc/22.1/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/ecmwf-hpc2020-nvhpc.cmake -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/nvhpc/22.11/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload all modules to be certain 24 | module_unload nvidia 25 | module_unload intel-mpi 26 | module_unload openmpi 27 | module_unload hpcx-openmpi 28 | module_unload boost 29 | module_unload hdf5 30 | module_unload cmake 31 | module_unload python3 32 | module_unload java 33 | 34 | # Load modules 35 | module_load prgenv/nvidia 36 | module_load nvidia/22.11 37 | module_load hpcx-openmpi/2.10.0 38 | # module_load boost/1.71.0 39 | module_load hdf5/1.10.6 40 | module_load cmake/3.25.2 41 | module_load python3/3.10.10-01 42 | module_load java/11.0.6 43 | 44 | # Increase stack size to maximum 45 | ulimit -S -s unlimited 46 | 47 | set -x 48 | 49 | # Restore tracing to stored setting 50 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 51 | 52 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 53 | -------------------------------------------------------------------------------- /arch/ecmwf/hpc2020/nvhpc/22.11/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/ecmwf-hpc2020-nvhpc.cmake -------------------------------------------------------------------------------- /arch/ecmwf/leap42/gnu/7.3.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload to be certain 24 | module_unload boost 25 | module_unload intel 26 | module_unload cmake 27 | module_unload gnu 28 | module_unload ecbuild 29 | module_unload openmpi 30 | module_unload hdf5 31 | module_unload python3 32 | module_unload java 33 | 34 | # Load modules 35 | module_load gnu/7.3.0 36 | module_load boost/1.61.0 37 | module_load cmake/3.19.5 38 | module_load openmpi/4.0.3 39 | module_load hdf5/1.10.6 40 | module_load python3/3.8.8-01 41 | module_load java/11 42 | 43 | set -x 44 | 45 | # Increase stack size to maximum 46 | ulimit -S -s unlimited 47 | 48 | # Restore tracing to stored setting 49 | if [[ -n "$tracing_" ]]; then set -x; else set +x; fi 50 | 51 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 52 | export ANT_OPTS="-Dhttp.proxyHost=proxy.ecmwf.int -Dhttp.proxyPort=3333 -Dhttps.proxyHost=proxy.ecmwf.int -Dhttps.proxyPort=3333" 53 | -------------------------------------------------------------------------------- /arch/ecmwf/leap42/gnu/7.3.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/ecmwf-leap42-gnu.cmake -------------------------------------------------------------------------------- /arch/ecmwf/leap42/gnu/9.3.0/env.sh: -------------------------------------------------------------------------------- 1 | # Source me to get the correct configure/build/run environment 2 | 3 | # Store tracing and disable (module is *way* too verbose) 4 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 5 | 6 | module_load() { 7 | echo "+ module load $1" 8 | module load $1 9 | } 10 | module_unload() { 11 | echo "+ module unload $1" 12 | module unload $1 13 | } 14 | 15 | # Unload to be certain 16 | module_unload boost 17 | module_unload intel 18 | module_unload cmake 19 | module_unload gnu 20 | module_unload ecbuild 21 | module_unload openmpi 22 | module_unload hdf5 23 | module_unload python3 24 | module_unload java 25 | 26 | # Load modules 27 | module_load gnu/9.3.0 28 | module_load boost/1.61.0 29 | module_load cmake/3.19.5 30 | module_load openmpi/4.1.0 31 | module_load hdf5/1.10.6 32 | module_load python3/3.8.8-01 33 | module_load java/11 34 | 35 | set -x 36 | 37 | # Increase stack size to maximum 38 | ulimit -S -s unlimited 39 | 40 | # Restore tracing to stored setting 41 | if [[ -n "$tracing_" ]]; then set -x; else set +x; fi 42 | 43 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 44 | export ANT_OPTS="-Dhttp.proxyHost=proxy.ecmwf.int -Dhttp.proxyPort=3333 -Dhttps.proxyHost=proxy.ecmwf.int -Dhttps.proxyPort=3333" 45 | -------------------------------------------------------------------------------- /arch/ecmwf/leap42/gnu/9.3.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/ecmwf-leap42-gnu.cmake -------------------------------------------------------------------------------- /arch/ecmwf/leap42/intel/18.0.1/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload to be certain 24 | module_unload eccodes 25 | module_unload boost 26 | module_unload intel 27 | module_unload cmake 28 | module_unload gnu 29 | module_unload ecbuild 30 | 31 | # Load modules 32 | module_load intel/18.0.1 33 | module_load boost/1.61.0 34 | module_load cmake/3.15.0 35 | 36 | set -x 37 | 38 | # Increase stack size to maximum 39 | ulimit -S -s unlimited 40 | 41 | # Restore tracing to stored setting 42 | if [[ -n "$tracing_" ]]; then set -x; else set +x; fi 43 | 44 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 45 | -------------------------------------------------------------------------------- /arch/ecmwf/leap42/intel/18.0.1/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/ecmwf-leap42-intel.cmake -------------------------------------------------------------------------------- /arch/eurohpc/leonardo/nvhpc/23.1/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # NB: This does currently not support the Serialbox-based build modes 12 | # because the available Boost module does not include the boost_filesystem library 13 | 14 | # Store tracing and disable (module is *way* too verbose) 15 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 16 | 17 | module_load() { 18 | echo "+ module load $1" 19 | module load $1 20 | } 21 | module_unload() { 22 | echo "+ module unload $1" 23 | module unload $1 24 | } 25 | 26 | # Load modules 27 | module_load nvhpc/23.1 28 | module_load openmpi/4.1.4--nvhpc--23.1-cuda-11.8 29 | module_load cmake/3.24.3 30 | module_load cuda/11.8 31 | module_load hdf5/1.12.2--openmpi--4.1.4--nvhpc--23.1 32 | module_load python/3.10.8--gcc--8.5.0 33 | 34 | export CC=nvc 35 | export CXX=nvc++ 36 | export F77=nvfortran 37 | export FC=nvfortran 38 | export F90=nvfortran 39 | 40 | # Increase stack size to maximum 41 | ulimit -S -s unlimited 42 | 43 | set -x 44 | 45 | # Restore tracing to stored setting 46 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 47 | 48 | # Variable no longer required, make sure it is not set 49 | unset ECBUILD_TOOLCHAIN 50 | -------------------------------------------------------------------------------- /arch/eurohpc/leonardo/nvhpc/23.1/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/eurohpc-leonardo-nvhpc.cmake -------------------------------------------------------------------------------- /arch/eurohpc/lumi/amd-gpu/8.3.3/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload to be certain 24 | module reset 25 | 26 | # Load modules 27 | module_load LUMI/22.08 28 | module_load partition/G 29 | module_load PrgEnv-aocc/8.3.3 30 | module_load craype-accel-amd-gfx90a 31 | module_load buildtools/22.08 32 | module_load cray-hdf5/1.12.1.5 33 | module_load cray-python/3.9.12.1 34 | 35 | # Specify compilers 36 | export CC=amdclang CXX=amdclang++ FC=amdflang 37 | #export CC=cc CXX=CC FC=ftn 38 | 39 | set -x 40 | 41 | # Restore tracing to stored setting 42 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 43 | 44 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 45 | -------------------------------------------------------------------------------- /arch/eurohpc/lumi/amd-gpu/8.3.3/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | 15 | #################################################################### 16 | # OpenMP FLAGS 17 | #################################################################### 18 | 19 | set( OpenMP_Fortran_FLAGS "-fopenmp --offload-arch=gfx90a" CACHE STRING "" ) 20 | 21 | #################################################################### 22 | # OpenAcc FLAGS 23 | #################################################################### 24 | 25 | set( ENABLE_ACC OFF CACHE STRING "" ) 26 | 27 | #################################################################### 28 | # COMMON FLAGS 29 | #################################################################### 30 | 31 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fpic -O3") 32 | -------------------------------------------------------------------------------- /arch/eurohpc/lumi/amd-host/8.3.3/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload to be certain 24 | module reset 25 | 26 | # Load modules 27 | module_load LUMI/22.08 28 | module_load partition/C 29 | module_load PrgEnv-aocc/8.3.3 30 | module_load craype-accel-host 31 | module_load buildtools/22.08 32 | module_load cray-hdf5/1.12.1.5 33 | module_load cray-python/3.9.12.1 34 | 35 | # Specify compilers 36 | export CC=cc CXX=CC FC=ftn 37 | 38 | set -x 39 | 40 | # Restore tracing to stored setting 41 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 42 | 43 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 44 | -------------------------------------------------------------------------------- /arch/eurohpc/lumi/amd-host/8.3.3/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | 15 | #################################################################### 16 | # OpenAcc FLAGS 17 | #################################################################### 18 | 19 | set( ENABLE_ACC OFF CACHE STRING "" ) 20 | 21 | #################################################################### 22 | # COMMON FLAGS 23 | #################################################################### 24 | 25 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fpic -O3") 26 | -------------------------------------------------------------------------------- /arch/eurohpc/lumi/cray-gpu/14.0.2/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload to be certain 24 | module reset 25 | 26 | # Load modules 27 | module_load PrgEnv-cray/8.3.3 28 | module_load LUMI/22.08 29 | # module_load partition/G 30 | module_load rocm/5.0.2 31 | module_load cce/14.0.2 32 | module_load cray-libsci/22.08.1.1 33 | module_load cray-mpich/8.1.18 34 | module_load craype/2.7.17 35 | module_load craype-accel-amd-gfx90a 36 | module_load buildtools/22.08 37 | module_load cray-python/3.9.12.1 38 | 39 | ### Handling of "magic" cray modules 40 | # 1) Load the cray modules 41 | module_load cray-hdf5/1.12.1.5 42 | # 2) Store variables to locate the packages 43 | _HDF5_ROOT=${CRAY_HDF5_PREFIX} 44 | # 3) Unload the cray modules in reverse order, removing all the magic 45 | module_unload cray-hdf5 46 | # 4) Define variables that CMake introspects 47 | export HDF5_ROOT=${_HDF5_ROOT} 48 | 49 | # Export environment variable3s 50 | export MPI_HOME=${MPICH_DIR} 51 | export CC=cc 52 | export CXX=CC 53 | export FC=ftn 54 | export HIPCXX=$(hipconfig --hipclangpath)/clang++ 55 | 56 | module list 57 | 58 | set -x 59 | 60 | # Restore tracing to stored setting 61 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 62 | 63 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 64 | -------------------------------------------------------------------------------- /arch/eurohpc/lumi/cray-gpu/17.0.1/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload to be certain 24 | module reset 25 | 26 | # Load modules 27 | module_load LUMI/24.03 28 | module_load partition/G 29 | module_load PrgEnv-cray/8.5.0 30 | module_load cray-mpich/8.1.29 31 | module_load craype-network-ofi 32 | module_load rocm/6.0.3 33 | module_load buildtools/24.03 34 | module_load cray-python/3.10.10 35 | module_load craype-x86-trento 36 | module_load craype-accel-amd-gfx90a 37 | 38 | ### Handling of "magic" cray modules 39 | # 1) Load the cray modules 40 | module_load cray-hdf5/1.12.2.11 41 | # 2) Store variables to locate the packages 42 | _HDF5_ROOT=${CRAY_HDF5_PREFIX} 43 | # 3) Unload the cray modules in reverse order, removing all the magic 44 | module_unload cray-hdf5 45 | # 4) Define variables that CMake introspects 46 | export HDF5_ROOT=${_HDF5_ROOT} 47 | 48 | # Export environment variable3s 49 | export MPI_HOME=${MPICH_DIR} 50 | export CC=cc 51 | export CXX=CC 52 | export FC=ftn 53 | export HIPCXX=$(hipconfig --hipclangpath)/clang++ 54 | 55 | module list 56 | 57 | set -x 58 | 59 | # Restore tracing to stored setting 60 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 61 | 62 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 63 | -------------------------------------------------------------------------------- /arch/eurohpc/lumi/cray-host/14.0.2/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload to be certain 24 | module reset 25 | 26 | # Load modules 27 | module_load PrgEnv-cray/8.3.3 28 | module_load LUMI/22.08 29 | # module_load craype-x86-milan 30 | module_load craype-accel-host 31 | module_load buildtools/22.08 32 | module_load cray-hdf5/1.12.1.5 33 | module_load cray-python/3.9.12.1 34 | 35 | module list 36 | 37 | set -x 38 | 39 | # Restore tracing to stored setting 40 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 41 | 42 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 43 | -------------------------------------------------------------------------------- /arch/eurohpc/lumi/cray-host/14.0.2/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | set( ENABLE_USE_STMT_FUNC ON CACHE STRING "" ) 15 | 16 | #################################################################### 17 | # OpenACC FLAGS 18 | #################################################################### 19 | 20 | set( ENABLE_ACC OFF CACHE STRING "" ) 21 | set( OpenACC_C_FLAGS "-hnoacc" ) 22 | set( OpenACC_CXX_FLAGS "-hnoacc" ) 23 | set( OpenACC_Fortran_FLAGS "-hnoacc" ) 24 | 25 | #################################################################### 26 | # Compiler FLAGS 27 | #################################################################### 28 | 29 | # General Flags (add to default) 30 | set(ECBUILD_Fortran_FLAGS "-hcontiguous") 31 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -hbyteswapio") 32 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Ktrap=fp") 33 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Wl, --as-needed") 34 | 35 | set(ECBUILD_Fortran_FLAGS_BIT "-emf -N 1023 -O3 -hfp1 -hscalar3 -hvector3 -G2 -haggress -DNDEBUG") 36 | -------------------------------------------------------------------------------- /arch/eurohpc/meluxina/nvhpc/21.11/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload all modules to be certain 24 | module_unload ParaStationMPI 25 | module_unload NVHPC 26 | module_unload gompi 27 | module_unload HDF5 28 | module_unload CMake 29 | 30 | # Load modules 31 | module use /apps/USE/easybuild/staging/2022.1/modules/all 32 | 33 | module_load NVHPC/21.11 34 | module_load ParaStationMPI/5.4.11-1-GCC-10.3.0-CUDA-11.3.1 35 | module_load CMake/3.23.1 36 | module_load Boost/1.79.0-GCC-11.3.0 37 | module_load Python/3.10.4-GCCcore-11.3.0 38 | 39 | export CC=nvc 40 | export CXX=nvc++ 41 | export F77=nvfortran 42 | export FC=nvfortran 43 | export F90=nvfortran 44 | 45 | export HDF5_ROOT=/mnt/tier2/project/p200061/nvhpc-install 46 | 47 | # Loki install workaround for new editable installs 48 | export SETUPTOOLS_ENABLE_FEATURES="legacy-editable" 49 | 50 | # Increase stack size to maximum 51 | ulimit -S -s unlimited 52 | 53 | set -x 54 | 55 | # Restore tracing to stored setting 56 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 57 | 58 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 59 | -------------------------------------------------------------------------------- /arch/eurohpc/meluxina/nvhpc/21.11/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/eurohpc-meluxina-nvhpc.cmake -------------------------------------------------------------------------------- /arch/eurohpc/meluxina/nvhpc/22.3/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | # Unload all modules to be certain 24 | module_unload ParaStationMPI 25 | module_unload NVHPC 26 | module_unload gompi 27 | module_unload HDF5 28 | module_unload CMake 29 | 30 | # Load modules 31 | module use /apps/USE/easybuild/staging/2021.5/modules/all 32 | 33 | module_load NVHPC/22.3 34 | module_load ParaStationMPI/5.4.11-1-GCC-10.3.0-CUDA-11.3.1 35 | module_load CMake/3.20.4 36 | module_load CUDA/11.3.1 37 | module_load Boost/1.76.0-GCC-10.3.0 38 | module_load Python/3.9.5-GCCcore-10.3.0 39 | 40 | export CC=nvc 41 | export CXX=nvc++ 42 | export F77=nvfortran 43 | export FC=nvfortran 44 | export F90=nvfortran 45 | 46 | export HDF5_ROOT=/mnt/tier2/project/p200061/nvhpc-install 47 | 48 | # Increase stack size to maximum 49 | ulimit -S -s unlimited 50 | 51 | set -x 52 | 53 | # Restore tracing to stored setting 54 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 55 | 56 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 57 | -------------------------------------------------------------------------------- /arch/eurohpc/meluxina/nvhpc/22.3/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/eurohpc-meluxina-nvhpc.cmake -------------------------------------------------------------------------------- /arch/github/ubuntu/gnu/9.4.0/env.sh: -------------------------------------------------------------------------------- 1 | # Source me to get the correct configure/build/run environment 2 | 3 | export CC=gcc-9 4 | export CXX=g++-9 5 | export FC=gfortran-9 6 | export F77=gfortran-9 7 | export F90=gfortran-9 8 | 9 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 10 | -------------------------------------------------------------------------------- /arch/github/ubuntu/gnu/9.4.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/github-ubuntu-gnu.cmake -------------------------------------------------------------------------------- /arch/github/ubuntu/nvhpc/21.9/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | ### Variables 12 | export NVHPC_INSTALL_DIR=${GITHUB_WORKSPACE}/nvhpc-install 13 | export NVHPC_VERSION=21.9 14 | export NVHPC_DIR=${NVHPC_INSTALL_DIR}/Linux_x86_64/${NVHPC_VERSION} 15 | 16 | ### Compilers 17 | export PATH=${NVHPC_DIR}/compilers/bin:${PATH} 18 | export NVHPC_LIBRARY_PATH=${NVHPC_DIR}/compilers/lib 19 | export LD_LIBRARY_PATH=${NVHPC_LIBRARY_PATH}:${LD_LIBRARY_PATH} 20 | 21 | ### CUDA runtime 22 | export LD_LIBRARY_PATH=${NVHPC_DIR}/cuda/lib64/stubs:${NVHPC_DIR}/cuda/lib64:${LD_LIBRARY_PATH} 23 | 24 | ### MPI 25 | export MPI_HOME=${NVHPC_DIR}/comm_libs/mpi 26 | export PATH=${MPI_HOME}/bin:${PATH} 27 | 28 | ### HDF5 29 | export HDF5_DIR=${GITHUB_WORKSPACE}/hdf5-install 30 | export LD_LIBRARY_PATH=${HDF5_DIR}/lib:${LD_LIBRARY_PATH} 31 | export PATH=${HDF5_DIR}/bin:${PATH} 32 | 33 | ### Compiler variables 34 | export CC=pgcc 35 | export CXX=pgc++ 36 | export FC=pgf90 37 | 38 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 39 | 40 | # Increase stack size to maximum 41 | ulimit -S -s unlimited 42 | -------------------------------------------------------------------------------- /arch/github/ubuntu/nvhpc/21.9/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/github-ubuntu-nvhpc.cmake -------------------------------------------------------------------------------- /arch/github/ubuntu/nvhpc/23.5/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | ### Variables 12 | export NVHPC_INSTALL_DIR=${GITHUB_WORKSPACE}/nvhpc-install 13 | export NVHPC_VERSION=23.5 14 | export NVHPC_DIR=${NVHPC_INSTALL_DIR}/Linux_x86_64/${NVHPC_VERSION} 15 | 16 | ### Compilers 17 | export PATH=${NVHPC_DIR}/compilers/bin:${PATH} 18 | export NVHPC_LIBRARY_PATH=${NVHPC_DIR}/compilers/lib 19 | export LD_LIBRARY_PATH=${NVHPC_LIBRARY_PATH}:${LD_LIBRARY_PATH} 20 | 21 | ### CUDA runtime 22 | export LD_LIBRARY_PATH=${NVHPC_DIR}/cuda/lib64/stubs:${NVHPC_DIR}/cuda/lib64:${LD_LIBRARY_PATH} 23 | 24 | ### MPI 25 | export MPI_HOME=${NVHPC_DIR}/comm_libs/mpi 26 | export PATH=${MPI_HOME}/bin:${PATH} 27 | 28 | ### HDF5 29 | export HDF5_DIR=${GITHUB_WORKSPACE}/hdf5-install 30 | export LD_LIBRARY_PATH=${HDF5_DIR}/lib:${LD_LIBRARY_PATH} 31 | export PATH=${HDF5_DIR}/bin:${PATH} 32 | 33 | ### Compiler variables 34 | export CC=nvc 35 | export CXX=nvc++ 36 | export FC=nvfortran 37 | 38 | # Increase stack size to maximum 39 | ulimit -S -s unlimited 40 | -------------------------------------------------------------------------------- /arch/github/ubuntu/nvhpc/23.5/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/github-ubuntu-nvhpc.cmake -------------------------------------------------------------------------------- /arch/isambard/a64fx/arm/21.0.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | 10 | [ -d $HOME/arm-sve-tools ] || cp -a ~brx-pridley/arm-sve-tools $HOME 11 | source $HOME/arm-sve-tools/isambard-arm.bashrc 12 | 13 | # Requires manual HDF5 installation, e.g. via the script provided 14 | # in https://git.ecmwf.int/users/nabr/repos/build-scripts 15 | source $HOME/deps/arm/21.0.0/deps_env.sh 16 | export HDF5_DIR=$HOME/deps/arm/21.0.0 17 | 18 | export C_INCLUDES=-I$HDF5_DIR/include 19 | export FC_INCLUDES=-I$HDF5_DIR/include 20 | 21 | export CC=armclang 22 | export CXX=armclang++ 23 | export FC=armflang 24 | 25 | # ARM PL math library 26 | module use /software/aarch64/tools/arm-compiler/21.0/modulefiles 27 | module load arm21 28 | module load armpl-AArch64-SVE/21.0.0 29 | 30 | module load openmpi/4.1.0/arm-21.0 31 | module load cmake 32 | 33 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 34 | -------------------------------------------------------------------------------- /arch/isambard/a64fx/arm/21.0.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 15 | 16 | #################################################################### 17 | # OpenMP FLAGS 18 | #################################################################### 19 | 20 | set( OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" ) 21 | set( OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" ) 22 | set( OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "" ) 23 | 24 | #################################################################### 25 | # COMMON FLAGS 26 | #################################################################### 27 | 28 | foreach(LANG IN ITEMS C CXX Fortran LINKER) 29 | set(ECBUILD_${LANG}_FLAGS "${ECBUILD_${LANG}_FLAGS} -fpic") 30 | set(ECBUILD_${LANG}_FLAGS "${ECBUILD_${LANG}_FLAGS} -flto") 31 | endforeach() 32 | 33 | set(ECBUILD_LINKER_FLAGS "${ECBUILD_LINKER_FLAGS} -armpl") 34 | set(CMAKE_EXE_LINKER_FLAGS "${ECBUILD_LINKER_FLAGS}") 35 | set(CMAKE_SHARED_LINKER_FLAGS "${ECBUILD_LINKER_FLAGS}") 36 | 37 | set(ECBUILD_Fortran_FLAGS_BIT "-Ofast -mcpu=a64fx -march=armv8.2-a+sve -I$ENV{ARMPL_INCLUDES} -DNDEBUG") 38 | 39 | # Compatibility with HDF5 1.12 40 | set(H5_USE_110_API ON) 41 | -------------------------------------------------------------------------------- /arch/isambard/a64fx/cray/10.0.1/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | 10 | [ -d $HOME/arm-sve-tools ] || cp -a ~brx-pridley/arm-sve-tools $HOME 11 | source $HOME/arm-sve-tools/isambard-cray.bashrc 12 | 13 | export CC=cc 14 | export CXX=CC 15 | export FC=ftn 16 | 17 | module use /lustre/projects/bristol/modules-a64fx/modulefiles 18 | module load cmake 19 | module load cray-hdf5/1.12.0.2 20 | module load cray-mvapich2_noslurm_nogpu/2.3.4 21 | 22 | module list 23 | 24 | ulimit -S -s unlimited 25 | 26 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 27 | -------------------------------------------------------------------------------- /arch/isambard/a64fx/cray/10.0.1/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # Compiler FLAGS 11 | #################################################################### 12 | 13 | # General Flags (add to default) 14 | set( ECBUILD_FIND_MPI ON ) 15 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 16 | 17 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -hcontiguous") 18 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -hbyteswapio") 19 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Ktrap=fp") 20 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Wl, --as-needed") 21 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -target-accel=host") 22 | 23 | set(ECBUILD_Fortran_FLAGS_BIT "-O3 -hfp1 -hscalar3 -hvector3 -G2 -haggress -DNDEBUG") 24 | 25 | #################################################################### 26 | # LINK FLAGS 27 | #################################################################### 28 | 29 | # Compatibility with HDF5 1.12 30 | set(H5_USE_110_API ON) 31 | -------------------------------------------------------------------------------- /arch/isambard/a64fx/fujitsu/4.3.1/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | 10 | [ -d $HOME/arm-sve-tools ] || cp -a ~brx-pridley/arm-sve-tools $HOME 11 | source $HOME/arm-sve-tools/isambard-fujitsu.bashrc 12 | 13 | # Requires manual HDF5 installation, e.g. via the script provided 14 | # in https://git.ecmwf.int/users/nabr/repos/build-scripts 15 | source $HOME/deps/fujitsu/4.3.1/deps_env.sh 16 | export HDF5_DIR=$HOME/deps/fujitsu/4.3.1 17 | 18 | export CC=fcc 19 | export CXX=FCC 20 | export FC=frt 21 | 22 | module load cmake 23 | 24 | module list 25 | 26 | # export FLIB_HPCFUNC_INFO=TRUE 27 | export FLIB_HPCFUNC=TRUE 28 | export FLIB_FASTOMP=TRUE 29 | # export XOS_MMM_L_PRINT_ENV=on 30 | export XOS_MMM_L_HPAGE_TYPE=hugetlbfs 31 | export XOS_MMM_L_MAX_ARENA_NUM=1 32 | 33 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 34 | -------------------------------------------------------------------------------- /arch/isambard/a64fx/gnu/11.0.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | 10 | [ -d $HOME/arm-sve-tools ] || cp -a ~brx-pridley/arm-sve-tools $HOME 11 | source $HOME/arm-sve-tools/isambard-gcc.bashrc 12 | 13 | # Requires manual HDF5 installation, e.g. via the script provided 14 | # in https://git.ecmwf.int/users/nabr/repos/build-scripts 15 | source $HOME/deps/gcc/11.0.0/deps_env.sh 16 | export HDF5_DIR=$HOME/deps/arm/21.0.0 17 | 18 | export C_INCLUDES=-I$HDF5_DIR/include 19 | export FC_INCLUDES=-I$HDF5_DIR/include 20 | 21 | export CC=gcc 22 | export CXX=g++ 23 | export FC=gfortran 24 | 25 | module load cmake 26 | module load openmpi/4.1.0/gcc-11.0 27 | 28 | # ARM PL math library 29 | module use /software/aarch64/tools/arm-compiler/21.0/modulefiles 30 | module load arm21 31 | module load armpl-AArch64-SVE/21.0.0 32 | 33 | module list 34 | 35 | ulimit -S -s unlimited 36 | 37 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 38 | -------------------------------------------------------------------------------- /arch/isambard/a64fx/gnu/11.0.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 15 | 16 | #################################################################### 17 | # OpenMP FLAGS 18 | #################################################################### 19 | 20 | set( OpenMP_C_FLAGS "-fopenmp" CACHE STRING "" ) 21 | set( OpenMP_CXX_FLAGS "-fopenmp" CACHE STRING "" ) 22 | set( OpenMP_Fortran_FLAGS "-fopenmp" CACHE STRING "" ) 23 | 24 | #################################################################### 25 | # COMMON FLAGS 26 | #################################################################### 27 | 28 | foreach(LANG IN ITEMS C CXX Fortran LINKER) 29 | set(ECBUILD_${LANG}_FLAGS "${ECBUILD_${LANG}_FLAGS} -fpic") 30 | # set(ECBUILD_${LANG}_FLAGS "${ECBUILD_${LANG}_FLAGS} -flto") 31 | endforeach() 32 | 33 | set(ECBUILD_Fortran_FLAGS_BIT "-Ofast -mtune=native -mcpu=a64fx -march=armv8.2-a+sve -fstack-arrays -fallow-argument-mismatch -fconvert=big-endian -fno-second-underscore -ffast-math -DNDEBUG -funroll-all-loops -finline-functions -I$ENV{ARMPL_INCLUDES}") 34 | set(ECBUILD_LINKER_FLAGS "${ECBUILD_LINKER_FLAGS} -L$ENV{ARMPL_LIBRARIES} -larmpl_mp -lamath -lm") 35 | 36 | set(CMAKE_EXE_LINKER_FLAGS "${ECBUILD_LINKER_FLAGS}") 37 | set(CMAKE_SHARED_LINKER_FLAGS "${ECBUILD_LINKER_FLAGS}") 38 | 39 | # Compatibility with HDF5 1.12 40 | set(H5_USE_110_API ON) 41 | -------------------------------------------------------------------------------- /arch/isambard/macs/cray-host/11.0.4/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | export CC=cc 10 | export CXX=CC 11 | export FC=ftn 12 | 13 | module use /lustre/projects/bristol/modules/modulefiles 14 | 15 | module load PrgEnv-cray/8.0.0 16 | module unload craype-broadwell 17 | module unload craype-network-infiniband 18 | module load craype-accel-host 19 | module load craype-x86-rome 20 | module load cmake/3.23.2 21 | module load intel/mpi/64/2020 22 | 23 | export HDF5_DIR=$HOME/dwarf-p-cloudsc/hdf5/cray/11.0.4 24 | export HDF5_ROOT=$HOME/dwarf-p-cloudsc/hdf5/cray/11.0.4 25 | 26 | module list 27 | 28 | ulimit -S -s unlimited 29 | 30 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 31 | -------------------------------------------------------------------------------- /arch/isambard/macs/intel/2021.4.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | export CC=icc 24 | export CXX=icpc 25 | export FC=ifort 26 | 27 | module_unload PrgEnv-cray 28 | 29 | module use /lustre/projects/bristol/modules/modulefiles/ 30 | 31 | module load gcc/10.3.0 32 | # module_load intel/oneapi/2021.1 33 | # module_load IntelOneApi/mpi/2021.4.0 34 | source /lustre/software/x86/tools/oneapi-2021.4.0/setvars.sh || true 35 | module_load cmake/3.23.2 36 | export HDF5_DIR=$HOME/dwarf-p-cloudsc/hdf5/intel/2021.4.0 37 | export HDF5_ROOT=$HOME/dwarf-p-cloudsc/hdf5/intel/2021.4.0 38 | 39 | set -x 40 | 41 | # Restore tracing to stored setting 42 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 43 | 44 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 45 | -------------------------------------------------------------------------------- /arch/isambard/macs/intel/2021.4.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | set( ECBUILD_TRUST_FLAGS ON ) 15 | 16 | #################################################################### 17 | # Compiler FLAGS 18 | #################################################################### 19 | 20 | # General Flags (add to default) 21 | 22 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -qopenmp-threadprivate compat") 23 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -assume byterecl") 24 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -convert big_endian") 25 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -traceback") 26 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -align array64byte") 27 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -warn nounused,nouncalled") 28 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -finline-functions") 29 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -finline-limit=500") 30 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Winline") 31 | 32 | set(ECBUILD_Fortran_FLAGS_BIT "-O3 -march=core-avx2") 33 | -------------------------------------------------------------------------------- /arch/isambard/p3/cray-host/13.0.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | export CC=cc 10 | export CXX=CC 11 | export FC=ftn 12 | 13 | module reset 14 | 15 | module use /lustre/projects/bristol/modules/modulefiles 16 | 17 | module load PrgEnv-cray/8.2.0 18 | module load craype-accel-host 19 | module load craype-x86-milan 20 | module load cray-pals 21 | module load cray-hdf5/1.12.0.7 22 | module load cmake/3.23.2 23 | 24 | module list 25 | 26 | ulimit -S -s unlimited 27 | 28 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 29 | -------------------------------------------------------------------------------- /arch/isambard/p3/intel/2021.4.0/env.sh: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | # Source me to get the correct configure/build/run environment 10 | 11 | # Store tracing and disable (module is *way* too verbose) 12 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 13 | 14 | module_load() { 15 | echo "+ module load $1" 16 | module load $1 17 | } 18 | module_unload() { 19 | echo "+ module unload $1" 20 | module unload $1 21 | } 22 | 23 | export CC=icc 24 | export CXX=icpc 25 | export FC=ifort 26 | 27 | module reset 28 | module_unload PrgEnv-cray 29 | 30 | module use /lustre/projects/bristol/modules/modulefiles 31 | 32 | module load gcc/11.2.0 33 | module_load IntelOneApi/compiler/2021.4.0 34 | # module_load IntelOneApi/mpi/2021.4.0 35 | source /lustre/software/x86/tools/oneapi-2021.4.0/setvars.sh || true 36 | module_load cmake/3.23.2 37 | export HDF5_DIR=$HOME/dwarf-p-cloudsc/hdf5/intel/2021.4.0 38 | export HDF5_ROOT=$HOME/dwarf-p-cloudsc/hdf5/intel/2021.4.0 39 | 40 | set -x 41 | 42 | # Restore tracing to stored setting 43 | { if [[ -n "$tracing_" ]]; then set -x; else set +x; fi } 2>/dev/null 44 | 45 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 46 | -------------------------------------------------------------------------------- /arch/isambard/p3/intel/2021.4.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | set( ECBUILD_TRUST_FLAGS ON ) 15 | 16 | #################################################################### 17 | # Compiler FLAGS 18 | #################################################################### 19 | 20 | # General Flags (add to default) 21 | 22 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -qopenmp-threadprivate compat") 23 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -assume byterecl") 24 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -convert big_endian") 25 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -traceback") 26 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -align array64byte") 27 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -warn nounused,nouncalled") 28 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -finline-functions") 29 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -finline-limit=500") 30 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Winline") 31 | 32 | set(ECBUILD_Fortran_FLAGS_BIT "-O3 -march=core-avx2") 33 | -------------------------------------------------------------------------------- /arch/jsc/deep/gnu/10.3.0/env.sh: -------------------------------------------------------------------------------- 1 | # Source me to get the correct configure/build/run environment 2 | 3 | # Store tracing and disable (module is *way* too verbose) 4 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 5 | 6 | module_load() { 7 | echo "+ module load $1" 8 | module load $1 9 | } 10 | module_unload() { 11 | echo "+ module unload $1" 12 | module unload $1 13 | } 14 | 15 | # Unload to be certain 16 | module_unload Java 17 | module_unload Python 18 | module_unload HDF5 19 | module_unload Boost 20 | module_unload ParaStationMPI 21 | module_unload GCC 22 | module_unload CMake 23 | 24 | # Load modules 25 | module_load CMake/3.18.0 26 | module_load GCC/10.3.0 27 | module_load ParaStationMPI/5.4.9-1 28 | module_load Boost/1.74.0 29 | module_load HDF5/1.10.6 30 | module_load Python/3.8.5 31 | module_load Java/15.0.1 32 | 33 | # Increase stack size to maximum 34 | ulimit -S -s unlimited 35 | 36 | # Restore tracing to stored setting 37 | if [[ -n "$tracing_" ]]; then set -x; else set +x; fi 38 | 39 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 40 | export PSP_OPENIB=1 PSP_UCP=0 41 | -------------------------------------------------------------------------------- /arch/jsc/deep/gnu/10.3.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/jsc-deep-gnu.cmake -------------------------------------------------------------------------------- /arch/jsc/jwb/nvhpc/21.5/env.sh: -------------------------------------------------------------------------------- 1 | # Source me to get the correct configure/build/run environment 2 | 3 | # Store tracing and disable (module is *way* too verbose) 4 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 5 | 6 | module_load() { 7 | echo "+ module load $1" 8 | module load $1 9 | } 10 | module_unload() { 11 | echo "+ module unload $1" 12 | module unload $1 13 | } 14 | 15 | # Unload to be certain 16 | module_unload Java 17 | module_unload Python 18 | module_unload HDF5 19 | module_unload Boost 20 | module_unload ParaStationMPI 21 | module_unload NVHPC 22 | module_unload CMake 23 | 24 | # Load modules 25 | module_load CMake/3.18.0 26 | module_load NVHPC/21.5-GCC-10.3.0 27 | module_load ParaStationMPI/5.4.10-1 28 | module_load Boost/1.74.0-nompi 29 | module_load HDF5/1.10.6 30 | module_load Python/3.8.5 31 | module_load Java/15.0.1 32 | 33 | # Increase stack size to maximum 34 | ulimit -S -s unlimited 35 | 36 | # Restore tracing to stored setting 37 | if [[ -n "$tracing_" ]]; then set -x; else set +x; fi 38 | 39 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 40 | -------------------------------------------------------------------------------- /arch/jsc/jwb/nvhpc/21.5/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/jsc-jwb-nvhpc.cmake -------------------------------------------------------------------------------- /arch/jsc/jwc/gnu/10.3.0/env.sh: -------------------------------------------------------------------------------- 1 | # Source me to get the correct configure/build/run environment 2 | 3 | # Store tracing and disable (module is *way* too verbose) 4 | { tracing_=${-//[^x]/}; set +x; } 2>/dev/null 5 | 6 | module_load() { 7 | echo "+ module load $1" 8 | module load $1 9 | } 10 | module_unload() { 11 | echo "+ module unload $1" 12 | module unload $1 13 | } 14 | 15 | # Unload to be certain 16 | module_unload Java 17 | module_unload Python 18 | module_unload HDF5 19 | module_unload Boost 20 | module_unload ParaStationMPI 21 | module_unload GCC 22 | module_unload CMake 23 | 24 | # Load modules 25 | module_load CMake/3.18.0 26 | module_load GCC/10.3.0 27 | module_load ParaStationMPI/5.4.10-1 28 | module_load Boost/1.74.0 29 | module_load HDF5/1.10.6 30 | module_load Python/3.8.5 31 | module_load Java/15.0.1 32 | 33 | # Increase stack size to maximum 34 | ulimit -S -s unlimited 35 | 36 | # Restore tracing to stored setting 37 | if [[ -n "$tracing_" ]]; then set -x; else set +x; fi 38 | 39 | export ECBUILD_TOOLCHAIN="./toolchain.cmake" 40 | -------------------------------------------------------------------------------- /arch/jsc/jwc/gnu/10.3.0/toolchain.cmake: -------------------------------------------------------------------------------- 1 | ../../../../toolchains/jsc-deep-gnu.cmake -------------------------------------------------------------------------------- /arch/toolchains/ecmwf-leap42-gnu.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | 15 | # Disable OpenACC for Leap42/GNU CPU builds 16 | set( ENABLE_ACC OFF ) 17 | 18 | #################################################################### 19 | # Compiler FLAGS 20 | #################################################################### 21 | 22 | # General Flags (add to default) 23 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffpe-trap=invalid,zero,overflow") 24 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fstack-arrays") 25 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fconvert=big-endian") 26 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fbacktrace") 27 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-second-underscore") 28 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffree-form") 29 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffast-math") 30 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-unsafe-math-optimizations") 31 | -------------------------------------------------------------------------------- /arch/toolchains/ecmwf-leap42-intel.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI OFF ) 14 | 15 | #################################################################### 16 | # Compiler FLAGS 17 | #################################################################### 18 | 19 | # General Flags (add to default) 20 | 21 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -qopenmp-threadprivate compat") 22 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -assume byterecl") 23 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -convert big_endian") 24 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -traceback") 25 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -align array64byte") 26 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -warn nounused,nouncalled") 27 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -xHost") 28 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -finline-functions") 29 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -finline-limit=500") 30 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Winline") 31 | -------------------------------------------------------------------------------- /arch/toolchains/github-ubuntu-gnu.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | #################################################################### 10 | # COMPILER 11 | #################################################################### 12 | 13 | set( ECBUILD_FIND_MPI ON ) 14 | set( ENABLE_ACC OFF CACHE STRING "" ) 15 | 16 | #################################################################### 17 | # Compiler FLAGS 18 | #################################################################### 19 | 20 | # General Flags (add to default) 21 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffpe-trap=invalid,zero,overflow") 22 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fstack-arrays") 23 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fconvert=big-endian") 24 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fbacktrace") 25 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-second-underscore") 26 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffast-math") 27 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-unsafe-math-optimizations") 28 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -foffload=disable") 29 | -------------------------------------------------------------------------------- /arch/toolchains/jsc-deep-gnu.cmake: -------------------------------------------------------------------------------- 1 | #################################################################### 2 | # COMPILER 3 | #################################################################### 4 | 5 | set( ECBUILD_FIND_MPI ON ) 6 | 7 | #################################################################### 8 | # Compiler FLAGS 9 | #################################################################### 10 | 11 | # General Flags (add to default) 12 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffpe-trap=invalid,zero,overflow") 13 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fstack-arrays") 14 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fconvert=big-endian") 15 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fbacktrace") 16 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-second-underscore") 17 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -ffast-math") 18 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -fno-unsafe-math-optimizations") 19 | -------------------------------------------------------------------------------- /arch/toolchains/jsc-jwb-nvhpc.cmake: -------------------------------------------------------------------------------- 1 | #################################################################### 2 | # COMPILER 3 | #################################################################### 4 | 5 | set( ECBUILD_FIND_MPI ON ) 6 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 7 | 8 | set(CMAKE_C_COMPILER nvc) 9 | set(CMAKE_CXX_COMPILER nvc++) 10 | set(CMAKE_Fortran_COMPILER nvfortran) 11 | 12 | #################################################################### 13 | # OpenMP FLAGS 14 | #################################################################### 15 | 16 | set( OpenMP_C_FLAGS "-mp -mp=bind,allcores,numa" ) 17 | set( OpenMP_CXX_FLAGS "-mp -mp=bind,allcores,numa" ) 18 | set( OpenMP_Fortran_FLAGS "-mp -mp=bind,allcores,numa" ) 19 | 20 | #################################################################### 21 | # OpenAcc FLAGS 22 | #################################################################### 23 | 24 | set( OpenACC_Fortran_FLAGS "-acc -ta=tesla:lineinfo,deepcopy,fastmath" ) 25 | set( OpenACC_Fortran_FLAGS "${OpenACC_Fortran_FLAGS} -Minfo" ) 26 | 27 | #################################################################### 28 | # COMMON FLAGS 29 | #################################################################### 30 | 31 | set(ECBUILD_Fortran_FLAGS "-fpic") 32 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mframe") 33 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mbyteswapio") 34 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mstack_arrays") 35 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mrecursive") 36 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Ktrap=fp") 37 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Kieee") 38 | set(ECBUILD_Fortran_FLAGS "${ECBUILD_Fortran_FLAGS} -Mdaz") 39 | 40 | set( ECBUILD_Fortran_FLAGS_BIT "-O2 -gopt" ) 41 | 42 | set( ECBUILD_C_FLAGS "-O2 -gopt -traceback" ) 43 | 44 | set( ECBUILD_CXX_FLAGS "-O2 -gopt" ) 45 | -------------------------------------------------------------------------------- /benchmark/JUBE.md: -------------------------------------------------------------------------------- 1 | # JUBE benchmarking environment 2 | 3 | JUBE is a benchmarking environment that provides a script-based framework to 4 | create benchmark sets, run them and evaluate the results. It is developed at 5 | Forschungszentrum Juelich, Germany. 6 | 7 | Further information: https://www.fz-juelich.de/jsc/jube 8 | 9 | Documentation: https://apps.fz-juelich.de/jsc/jube/jube2/docu/ 10 | 11 | ## Installation 12 | 13 | ```bash 14 | # Python 3 module loaded 15 | python3 -m venv venv 16 | source venv/bin/activate 17 | pip install -r requirements.txt 18 | ``` 19 | 20 | ## Running a benchmark 21 | 22 | ```bash 23 | # Virtual environment loaded 24 | jube run .yml 25 | ``` 26 | 27 | ## Analysing and displaying results 28 | 29 | ```bash 30 | # Virtual environment loaded 31 | jube analyse --id 32 | jube result --id | less -S 33 | ``` 34 | 35 | or, both in one: 36 | 37 | ```bash 38 | # Virtual environment loaded 39 | jube result -a --id | less -S 40 | ``` 41 | 42 | Skipping the benchmark id is equivalent to using the latest benchmark run. 43 | 44 | ## Useful commands 45 | 46 | Update benchmark results after modifying patterns or result table, without 47 | re-running the benchmark: 48 | 49 | ```bash 50 | # Virtual environment loaded 51 | jube result -a -u .yml --id | less -S 52 | ``` 53 | 54 | Run without actually executing benchmark steps (useful to validate the YAML 55 | files and see the parameter space expansion): 56 | 57 | ```bash 58 | # Virtual environment loaded 59 | jube --debug -v run .yml 60 | ``` 61 | -------------------------------------------------------------------------------- /benchmark/arch/hpc2020/gnu/9.3.0/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/ecmwf/hpc2020/gnu/9.3.0"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 2} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 64} 14 | 15 | # MPI launch command to use 16 | - name: launch_cmd 17 | mode: python 18 | separator: ; 19 | _: "'srun -n ${{ NPROC }} --cpus-per-task=${{ NUMOMP }} --hint nomultithread bash -c \"OMP_PLACES={\\$(seq -s \\'},{\\' \\$((\\$SLURM_LOCALID*${{ NUMOMP }})) \\$(((\\$SLURM_LOCALID+1)*${{ NUMOMP }}-1)) )}' if $mpi == 1 else 'OMP_PLACES={$(seq -s \\'},{\\' 0 $((${{ NUMOMP }}-1)) )}'" 20 | - {name: launch_cmd_end, mode: python, _: "'\"' if $mpi == 1 else ''"} 21 | -------------------------------------------------------------------------------- /benchmark/arch/hpc2020/intel/2021.4.0/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/ecmwf/hpc2020/intel/2021.4.0"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 2} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 64} 14 | 15 | # MPI launch command to use 16 | - name: launch_cmd 17 | mode: python 18 | separator: ; 19 | _: "'srun -n ${{ NPROC }} --cpus-per-task=${{ NUMOMP }} --hint nomultithread bash -c \"OMP_PLACES={\\$(seq -s \\'},{\\' \\$((\\$SLURM_LOCALID*${{ NUMOMP }})) \\$(((\\$SLURM_LOCALID+1)*${{ NUMOMP }}-1)) )}' if $mpi == 1 else 'OMP_PLACES={$(seq -s \\'},{\\' 0 $((${{ NUMOMP }}-1)) )}'" 20 | - {name: launch_cmd_end, mode: python, _: "'\"' if $mpi == 1 else ''"} 21 | -------------------------------------------------------------------------------- /benchmark/arch/hpc2020/nvhpc/22.1/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/ecmwf/hpc2020/nvhpc/22.1"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 2} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 64} 14 | 15 | # Number of GPUs available on a node 16 | - {name: gpus, type: int, _: 4} 17 | 18 | # Set CUDA runtime heap size on GPU for SCC variant 19 | - {name: PGI_ACC_CUDA_HEAPSIZE, export: true, _: 12G} 20 | 21 | # MPI launch command to use (inject CUDA_VISIBLE_DEVICES) 22 | - name: launch_cmd 23 | mode: python 24 | _: "'srun -n ${{ NPROC }} --cpus-per-task=${{ NUMOMP }} bash -c \"CUDA_VISIBLE_DEVICES=\\${SLURM_LOCALID}' if $mpi == 1 else ''" 25 | - name: launch_cmd_end 26 | mode: python 27 | _: "'\"' if $mpi == 1 else ''" 28 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/a64fx/arm/21.0.0/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/isambard/a64fx/arm/21.0.0"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 4} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 12} 14 | 15 | - {name: OMP_PLACES, export: true, _: cores} 16 | 17 | # MPI launch command to use 18 | - name: launch_cmd 19 | mode: python 20 | _: "'OMP_NUM_THREADS=${{ NUMOMP }} ' + ('mpirun --map-by socket -np ${{ NPROC }}' if $mpi == 1 else '')" 21 | - {name: launch_cmd_end, _: ""} 22 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/a64fx/arm/21.0.0/include_run.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # The runtime options 3 | - name: run_set 4 | init_with: include/include_run.yml 5 | parameter: 6 | # Increase the default NPROMA value per variant 7 | - name: default_nproma 8 | mode: python 9 | type: int 10 | _: > 11 | { 12 | 'dwarf-cloudsc-fortran': {'sp': 256, 'dp': 256}['$precision'], 13 | 'dwarf-cloudsc-c': {'sp': 32, 'dp': 16}['$precision'], 14 | 'dwarf-cloudsc-gpu-claw': 8192, 15 | 'dwarf-cloudsc-gpu-scc': 256, 16 | 'dwarf-cloudsc-gpu-scc-hoist': 128, 17 | 'dwarf-cloudsc-gpu-omp-scc-hoist': 128, 18 | }['$target'] 19 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/a64fx/cray/10.0.1/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/isambard/a64fx/cray/10.0.1"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 4} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 12} 14 | 15 | - {name: OMP_PLACES, export: true, _: cores} 16 | 17 | # MPI launch command to use 18 | - name: launch_cmd 19 | mode: python 20 | _: "'MV2_CPU_BINDING_POLICY=hybrid MV2_THREADS_PER_PROCESS=${{ NUMOMP }} mpiexec -bind-to socket -np ${{ NPROC }}' if $mpi == 1 else 'OMP_NUM_THREADS=${{ NUMOMP }}'" 21 | - {name: launch_cmd_end, _: ""} 22 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/a64fx/cray/10.0.1/include_run.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # The runtime options 3 | - name: run_set 4 | init_with: include/include_run.yml 5 | parameter: 6 | # Increase the default NPROMA value per variant 7 | - name: default_nproma 8 | mode: python 9 | type: int 10 | _: > 11 | { 12 | 'dwarf-cloudsc-fortran': {'sp': 128, 'dp': 128}['$precision'], 13 | 'dwarf-cloudsc-c': {'sp': 32, 'dp': 16}['$precision'], 14 | 'dwarf-cloudsc-gpu-claw': 8192, 15 | 'dwarf-cloudsc-gpu-scc': 256, 16 | 'dwarf-cloudsc-gpu-scc-hoist': 128, 17 | 'dwarf-cloudsc-gpu-omp-scc-hoist': 128, 18 | }['$target'] 19 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/a64fx/fujitsu/4.3.1/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/isambard/a64fx/fujitsu/4.3.1"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 4} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 12} 14 | 15 | - {name: OMP_PLACES, export: true, _: cores} 16 | 17 | # MPI launch command to use 18 | - name: launch_cmd 19 | mode: python 20 | _: "'OMP_NUM_THREADS=${{ NUMOMP }} ' + ('mpirun --map-by socket -np ${{ NPROC }}' if $mpi == 1 else '')" 21 | - {name: launch_cmd_end, _: ""} 22 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/a64fx/fujitsu/4.3.1/include_run.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # The runtime options 3 | - name: run_set 4 | init_with: include/include_run.yml 5 | parameter: 6 | # Increase the default NPROMA value per variant 7 | - name: default_nproma 8 | mode: python 9 | type: int 10 | _: > 11 | { 12 | 'dwarf-cloudsc-fortran': {'sp': 128, 'dp': 128}['$precision'], 13 | 'dwarf-cloudsc-c': {'sp': 32, 'dp': 16}['$precision'], 14 | 'dwarf-cloudsc-gpu-claw': 8192, 15 | 'dwarf-cloudsc-gpu-scc': 256, 16 | 'dwarf-cloudsc-gpu-scc-hoist': 128, 17 | 'dwarf-cloudsc-gpu-omp-scc-hoist': 128, 18 | }['$target'] 19 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/a64fx/gnu/11.0.0/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/isambard/a64fx/gnu/11.0.0"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 4} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 12} 14 | 15 | - {name: OMP_PLACES, export: true, _: cores} 16 | 17 | # MPI launch command to use 18 | - name: launch_cmd 19 | mode: python 20 | _: "'OMP_NUM_THREADS=${{ NUMOMP }} ' + ('mpirun --map-by socket -np ${{ NPROC }}' if $mpi == 1 else '')" 21 | - {name: launch_cmd_end, _: ""} 22 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/a64fx/gnu/11.0.0/include_run.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # The runtime options 3 | - name: run_set 4 | init_with: include/include_run.yml 5 | parameter: 6 | # Increase the default NPROMA value per variant 7 | - name: default_nproma 8 | mode: python 9 | type: int 10 | _: > 11 | { 12 | 'dwarf-cloudsc-fortran': {'sp': 128, 'dp': 128}['$precision'], 13 | 'dwarf-cloudsc-c': {'sp': 32, 'dp': 16}['$precision'], 14 | 'dwarf-cloudsc-gpu-claw': 8192, 15 | 'dwarf-cloudsc-gpu-scc': 256, 16 | 'dwarf-cloudsc-gpu-scc-hoist': 128, 17 | 'dwarf-cloudsc-gpu-omp-scc-hoist': 128, 18 | }['$target'] 19 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/macs/cray-host/11.0.4/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/isambard/macs/cray-host/11.0.4"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 2} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 64} 14 | 15 | # MPI launch command to use 16 | - name: launch_cmd 17 | mode: python 18 | separator: ; 19 | _: "'I_MPI_PIN=off mpiexec -n ' + ('${{ NPROC }}' if $mpi == 1 else '1') + ' bash -c \"OMP_PLACES={\\$(seq -s \\'},{\\' \\$((\\$MPI_LOCALRANKID*${{ NUMOMP }})) \\$(((\\$MPI_LOCALRANKID+1)*${{ NUMOMP }}-1)) )}'" 20 | - {name: launch_cmd_end, _: "\""} 21 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/macs/intel/2021.4.0/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/isambard/macs/intel/2021.4.0"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 2} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 64} 14 | 15 | # MPI launch command to use 16 | - name: launch_cmd 17 | mode: python 18 | separator: ; 19 | _: "'I_MPI_PIN=off mpirun -n ' + ('${{ NPROC }}' if $mpi == 1 else '1') + ' bash -c \"OMP_PLACES={\\$(seq -s \\'},{\\' \\$((\\$MPI_LOCALRANKID*${{ NUMOMP }})) \\$(((\\$MPI_LOCALRANKID+1)*${{ NUMOMP }}-1)) )}'" 20 | - {name: launch_cmd_end, _: "\""} 21 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/p3/cray-host/13.0.0/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/isambard/p3/cray-host/13.0.0"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 2} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 64} 14 | 15 | # MPI launch command to use 16 | - name: launch_cmd 17 | mode: python 18 | _: "'mpiexec -n ' + ('${{ NPROC }}' if $mpi == 1 else '1') + ' --depth ${{ NUMOMP }} --cpu-bind depth'" 19 | - {name: launch_cmd_end, _: ""} 20 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/p3/cray-host/13.0.0/include_run.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # The runtime options 3 | - name: run_set 4 | init_with: include/include_run.yml 5 | parameter: 6 | # Increase the default NPROMA value per variant 7 | - name: default_nproma 8 | mode: python 9 | type: int 10 | _: > 11 | { 12 | 'dwarf-cloudsc-fortran': {'sp': 64, 'dp': 32}['$precision'], 13 | 'dwarf-cloudsc-c': {'sp': 64, 'dp': 32}['$precision'], 14 | 'dwarf-cloudsc-gpu-claw': 8192, 15 | 'dwarf-cloudsc-gpu-scc': 256, 16 | 'dwarf-cloudsc-gpu-scc-hoist': 128, 17 | 'dwarf-cloudsc-gpu-omp-scc-hoist': 128, 18 | }['$target'] 19 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/p3/intel/2021.4.0/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | init_with: include/include_arch.yml 5 | parameter: 6 | # Architecture definition to pass to bundle build command 7 | - {name: arch, _: "arch/isambard/p3/intel/2021.4.0"} # Choose from arch 8 | 9 | # Number of NUMA domains on a node (e.g., the number of sockets) 10 | - {name: numa_domains, type: int, _: 2} 11 | 12 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 13 | - {name: cores_per_numa_domain, type: int, _: 64} 14 | 15 | # MPI launch command to use 16 | - name: launch_cmd 17 | mode: python 18 | separator: ; 19 | _: "'I_MPI_PIN=off mpirun -n ' + ('${{ NPROC }}' if $mpi == 1 else '1') + ' bash -c \"OMP_PLACES={\\$(seq -s \\'},{\\' \\$((\\$MPI_LOCALRANKID*${{ NUMOMP }})) \\$(((\\$MPI_LOCALRANKID+1)*${{ NUMOMP }}-1)) )}'" 20 | - {name: launch_cmd_end, _: "\""} 21 | -------------------------------------------------------------------------------- /benchmark/arch/isambard/p3/intel/2021.4.0/include_run.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # The runtime options 3 | - name: run_set 4 | init_with: include/include_run.yml 5 | parameter: 6 | # Increase the default NPROMA value per variant 7 | - name: default_nproma 8 | mode: python 9 | type: int 10 | _: > 11 | { 12 | 'dwarf-cloudsc-fortran': {'sp': 64, 'dp': 32}['$precision'], 13 | 'dwarf-cloudsc-c': {'sp': 64, 'dp': 32}['$precision'], 14 | 'dwarf-cloudsc-gpu-claw': 8192, 15 | 'dwarf-cloudsc-gpu-scc': 256, 16 | 'dwarf-cloudsc-gpu-scc-hoist': 128, 17 | 'dwarf-cloudsc-gpu-omp-scc-hoist': 128, 18 | }['$target'] 19 | -------------------------------------------------------------------------------- /benchmark/include/include_analyser.yml: -------------------------------------------------------------------------------- 1 | # Applies patterns to the stdout/stderr of the run step 2 | 3 | analyser: 4 | - name: analyse_results 5 | use: [results_pattern,timing_pattern] 6 | reduce: true 7 | analyse: 8 | step: run 9 | file: [stdout,stderr] 10 | -------------------------------------------------------------------------------- /benchmark/include/include_arch.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # System architecture specification 3 | - name: arch_set 4 | parameter: 5 | # Architecture definition to pass to bundle build command 6 | - {name: arch, _: "arch/ecmwf/hpc2020/gnu/9.3.0"} # Choose from arch 7 | 8 | # Number of NUMA domains on a node (e.g., the number of sockets) 9 | - {name: numa_domains, type: int, _: 1} 10 | 11 | # Number of cores per NUMA domain (e.g., number of cores per CPU) 12 | - {name: cores_per_numa_domain, type: int, _: 4} 13 | 14 | # Number of GPUs available on a node 15 | - {name: gpus, type: int, _: 0} 16 | 17 | # Increase OpenMP stacksize for larger column counts 18 | - {name: OMP_STACKSIZE, export: true, _: 8G} 19 | 20 | # MPI launch command to use (in the form `$launch_cmd $launch_cmd_end`) 21 | - name: launch_cmd 22 | mode: python 23 | _: "'mpirun -np ${{ NPROC }}' if $mpi == 1 else ''" 24 | - name: launch_cmd_end 25 | _: "" 26 | -------------------------------------------------------------------------------- /benchmark/include/include_fileset_substituteset.yml: -------------------------------------------------------------------------------- 1 | fileset: 2 | - name: build_template 3 | copy: templates/build-template.sh 4 | 5 | - name: run_template 6 | copy: templates/run-template.sh 7 | 8 | substituteset: 9 | - name: build_script 10 | iofile: {in: build-template.sh, out: mybuild.sh} 11 | sub: 12 | - {source: "${{ CLOUDSC_HOME }}", dest: $cloudsc_home} 13 | - {source: "${{ JUBE_WP_ABSPATH }}", dest: $jube_wp_abspath} 14 | - {source: "${{ ARCH }}", dest: $arch} 15 | - {source: "${{ PRECISION_FLAG }}", dest: $precision_flag} 16 | - {source: "${{ IO_LIBRARY_FLAG }}", dest: $io_library_flag} 17 | - {source: "${{ MPI_FLAG }}", dest: $mpi_flag} 18 | - {source: "${{ OTHER_FLAGS }}", dest: $other_flags} 19 | 20 | - name: run_script 21 | iofile: {in: run-template.sh, out: run.sh} 22 | sub: 23 | - {source: "${{ LAUNCH_CMD }}", dest: $launch_cmd} 24 | - {source: "${{ LAUNCH_CMD_END }}", dest: $launch_cmd_end} 25 | - {source: "${{ NPROC }}", dest: $nproc} 26 | - {source: "${{ TARGET }}", dest: $target} 27 | - {source: "${{ NUMOMP }}", dest: $numomp} 28 | - {source: "${{ NGPTOTG }}", dest: $ngptotg} 29 | - {source: "${{ NPROMA }}", dest: $nproma} 30 | -------------------------------------------------------------------------------- /benchmark/include/include_parameterset.yml: -------------------------------------------------------------------------------- 1 | # The parameterization of the different build and run configurations 2 | 3 | # JUBE will create the parameter space as the cartesian product of all 4 | # parameters. Individual parameters are overwritten in the main benchmark 5 | # definition files for benchmark configurations where defaults are not 6 | # applicable (e.g., there is no OpenMP-requirement in GPU variants). 7 | 8 | parameterset: 9 | # Generic options 10 | - name: generic_set 11 | parameter: 12 | # Path to CLOUDSC main directory 13 | - {name: cloudsc_home, _: $jube_benchmark_home/..} 14 | 15 | # The build options 16 | - name: build_set 17 | parameter: 18 | # Build single (sp) or double (dp) precision (or both by choosing `dp,sp`) 19 | - {name: precision, tag: "sp+dp" , _: "dp,sp"} 20 | - {name: precision, tag: "!sp" , _: "dp"} 21 | - {name: precision, tag: "sp+!dp", _: "sp"} 22 | - name: precision_flag 23 | mode: python 24 | _: "{'sp': '--single-precision', 'dp': ''}['$precision']" 25 | 26 | # Choose IO library for reading inputs and reference data (`hdf5` or `serialbox`) 27 | - {name: io_library, tag: "!serialbox", _: "hdf5"} 28 | - {name: io_library, tag: "serialbox", _: "serialbox"} 29 | - name: io_library_flag 30 | mode: python 31 | _: "{'hdf5': '', 'serialbox': '--with-serialbox'}['$io_library']" 32 | 33 | # Enable/disable MPI 34 | - {name: mpi, tag: "!mpi", type: int, _: "0"} 35 | - {name: mpi, tag: "mpi", type: int, _: "1"} 36 | - name: mpi_flag 37 | mode: python 38 | _: "['', '--with-mpi'][$mpi]" 39 | 40 | # Specify other options that are passed to the build command 41 | - {name: other_flags, _: ""} 42 | -------------------------------------------------------------------------------- /benchmark/include/include_result.yml: -------------------------------------------------------------------------------- 1 | # Create a table with analyser results 2 | 3 | result: 4 | use: analyse_results 5 | table: 6 | - name: compact 7 | style: pretty 8 | sort: jube_wp_id 9 | column: 10 | - jube_wp_id 11 | - target 12 | - precision 13 | - io_library 14 | - mpi 15 | - tot_nproc 16 | - tot_numomp 17 | - tot_ngptot 18 | - tot_nproma 19 | - tot_ngpblks 20 | - tot_time 21 | - tot_mflops 22 | - thr_time_min 23 | - thr_time_max 24 | - thr_time_avg 25 | - thr_mflops_min 26 | - thr_mflops_max 27 | - thr_mflops_avg 28 | - rnk_time_min 29 | - rnk_time_max 30 | - rnk_time_avg 31 | - rnk_mflops_min 32 | - rnk_mflops_max 33 | - rnk_mflops_avg 34 | - abs_max_err_max 35 | - max_rel_err_max 36 | -------------------------------------------------------------------------------- /benchmark/include/include_run.yml: -------------------------------------------------------------------------------- 1 | parameterset: 2 | # The runtime options 3 | - name: run_set 4 | parameter: 5 | # Number of MPI ranks to launch (or iterate over NUMA domains) 6 | - name: nproc 7 | type: int 8 | mode: python 9 | _: | # Powers of two until total number of available cores 10 | ','.join( 11 | [ 12 | str(2**i) 13 | for i in range(int($numa_domains*$cores_per_numa_domain).bit_length()-1) 14 | ] + [str($numa_domains*$cores_per_numa_domain)] 15 | if $mpi == 1 else [ 16 | str(i+1) for i in range($numa_domains) 17 | ] 18 | ) 19 | 20 | # Number of OpenMP threads to use (per rank) 21 | - name: numomp 22 | type: int 23 | mode: python 24 | _: "$numa_domains*$cores_per_numa_domain//$nproc" 25 | 26 | # Number of horizontal columns 27 | - {name: ngptotg, type: int, _: 163840} 28 | 29 | # Default NPROMA value per variant 30 | - name: default_nproma 31 | mode: python 32 | type: int 33 | _: > 34 | { 35 | 'dwarf-cloudsc-fortran': {'sp': 32, 'dp': 16}['$precision'], 36 | 'dwarf-cloudsc-c': {'sp': 32, 'dp': 16}['$precision'], 37 | 'dwarf-cloudsc-gpu-claw': 8192, 38 | 'dwarf-cloudsc-gpu-scc': 256, 39 | 'dwarf-cloudsc-gpu-scc-hoist': 128, 40 | 'dwarf-cloudsc-gpu-omp-scc-hoist': 128, 41 | }['$target'] 42 | 43 | # Optionally sweep neighbouring NPROMA values 44 | - name: nproma 45 | tag: "sweep_nproma" 46 | type: int 47 | mode: python 48 | _: "','.join(str(int($default_nproma * 2**i)) for i in range(-2, 3))" 49 | - {name: nproma, tag: "!sweep_nproma", _: $default_nproma} 50 | 51 | # Executable(s) to benchmark 52 | - name: target 53 | _: "dwarf-cloudsc-fortran" 54 | -------------------------------------------------------------------------------- /benchmark/include/include_step.yml: -------------------------------------------------------------------------------- 1 | # The operations to carry out as part of the benchmark 2 | 3 | # Each step is executed for every item of the "used" parameter spaces 4 | 5 | step: 6 | # Creating the bundle 7 | - name: create 8 | shared: shared 9 | use: generic_set 10 | work_dir: $cloudsc_home 11 | do: ./cloudsc-bundle create 12 | 13 | # Compiling the code 14 | - name: build 15 | depend: create 16 | use: 17 | - arch_set 18 | - build_template 19 | - build_script 20 | - build_set 21 | do: ./mybuild.sh 22 | 23 | # Running the dwarf 24 | - name: run 25 | depend: build 26 | use: 27 | - run_template 28 | - run_script 29 | - arch_set 30 | - build_set 31 | - run_set 32 | iterations: 3 33 | do: ./run.sh 34 | -------------------------------------------------------------------------------- /benchmark/requirements.txt: -------------------------------------------------------------------------------- 1 | http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version=2.4.2 2 | -------------------------------------------------------------------------------- /benchmark/templates/build-template.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S bash -lxeo pipefail 2 | set -u 3 | 4 | cd ${{ CLOUDSC_HOME }} 5 | 6 | ./cloudsc-bundle build --retry-verbose \ 7 | --build-dir=${{ JUBE_WP_ABSPATH }} \ 8 | --arch=${{ ARCH }} \ 9 | ${{ PRECISION_FLAG }} \ 10 | ${{ IO_LIBRARY_FLAG }} \ 11 | ${{ MPI_FLAG }} \ 12 | ${{ OTHER_FLAGS }} 13 | -------------------------------------------------------------------------------- /benchmark/templates/run-template.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S bash -lxeo pipefail 2 | set -u 3 | cd build 4 | 5 | source ./env.sh 6 | 7 | ${{ LAUNCH_CMD }} bin/${{ TARGET }} ${{ NUMOMP }} ${{ NGPTOTG }} ${{ NPROMA }} ${{ LAUNCH_CMD_END }} 8 | -------------------------------------------------------------------------------- /cloudsc-bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # (C) Copyright 1988- ECMWF. 4 | # 5 | # This software is licensed under the terms of the Apache Licence Version 2.0 6 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 7 | # In applying this licence, ECMWF does not waive the privileges and immunities 8 | # granted to it by virtue of its status as an intergovernmental organisation 9 | # nor does it submit to any jurisdiction. 10 | 11 | 12 | # BOOTSTRAP ecbundle-build or ecbundle-create, 13 | # and pass arguments to it. 14 | 15 | # Check at least one argument was provided: 16 | if [[ $# -eq 0 ]]; then 17 | echo "FAIL: At least one argument expected: 'build' or 'create'" 18 | exit 1 19 | fi 20 | 21 | export ecbundle_VERSION=2.0.0 22 | 23 | # Which script do we run? 24 | # Partial matches are accepted, e.g. "$0 cr" 25 | if [[ "build" == "$1"* ]]; then 26 | BOOTSTRAPPED=${ECBUNDLE_DIR}ecbundle-build 27 | elif [[ "create" == "$1"* ]]; then 28 | BOOTSTRAPPED=${ECBUNDLE_DIR}ecbundle-create 29 | else 30 | echo "FAIL: Expected 'build' or 'create' as first argument" 31 | exit 1 32 | fi 33 | shift 34 | 35 | BUNDLE_DIR="$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd -P )" 36 | 37 | # Download ecbundle scripts if not already available 38 | command_exists () { type "$1" &> /dev/null ; } 39 | if ! command_exists ${BOOTSTRAPPED} ; then 40 | if [[ ! -d ${BUNDLE_DIR}/ecbundle ]]; then 41 | git clone https://github.com/ecmwf/ecbundle.git ${BUNDLE_DIR}/ecbundle 42 | ( cd ${BUNDLE_DIR}/ecbundle && git checkout ${ecbundle_VERSION} ) 43 | fi 44 | export PATH=${BUNDLE_DIR}/ecbundle/bin:${PATH} 45 | fi 46 | 47 | ${BOOTSTRAPPED} "$@" 48 | -------------------------------------------------------------------------------- /cmake/FindLatex.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | ############################################################################### 10 | 11 | # find latex libraries 12 | FIND_PROGRAM (PDFLATEX 13 | NAMES pdflatex 14 | PATHS /usr/local/share/apps/TeXLive/2014/bin/x86_64-linux/) 15 | FIND_PROGRAM (BIBTEX 16 | NAMES bibtex 17 | PATHS /usr/local/share/apps/TeXLive/2014/bin/x86_64-linux/) 18 | FIND_PROGRAM (MAKEINDEX 19 | NAMES makeindex 20 | PATHS /usr/local/share/apps/TeXLive/2014/bin/x86_64-linux/) 21 | FIND_PROGRAM (HTLATEX 22 | NAMES htlatex 23 | PATHS /usr/local/share/apps/TeXLive/2014/bin/x86_64-linux/) 24 | 25 | if ( PDFLATEX AND BIBTEX AND MAKEINDEX AND HTLATEX ) 26 | set( Latex_FOUND TRUE ) 27 | endif() 28 | 29 | 30 | mark_as_advanced(PDFLATEX BIBTEX MAKEINDEX HTLATEX) 31 | 32 | 33 | -------------------------------------------------------------------------------- /cmake/cloudsc_compile_options.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 2020- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | 10 | 11 | if( CMAKE_Fortran_COMPILER_ID MATCHES "NVHPC" ) 12 | ecbuild_add_fortran_flags("-Mlarge_arrays") 13 | 14 | # should really be part of configuration, or ecbuild default? 15 | ecbuild_add_fortran_flags("-traceback" BUILD DEBUG ) 16 | ecbuild_add_fortran_flags("-fast" BUILD RELEASE ) 17 | ecbuild_add_fortran_flags("-gopt -fast" BUILD RELWITHDEBINFO ) 18 | endif() 19 | 20 | 21 | 22 | macro( cloudsc_add_compile_options ) 23 | set( options ) 24 | set( single_value_args FLAGS ) 25 | set( multi_value_args SOURCES ) 26 | cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} ) 27 | if(_PAR_UNPARSED_ARGUMENTS) 28 | ecbuild_critical("Unknown keywords given to cloudsc_add_compile_flags(): \"${_PAR_UNPARSED_ARGUMENTS}\"") 29 | endif() 30 | if(NOT _PAR_SOURCES) 31 | ecbuild_critical("SOURCES keyword missing to cloudsc_add_compile_flags()") 32 | endif() 33 | if(NOT _PAR_FLAGS) 34 | ecbuild_critical("FLAGS keyword missing to cloudsc_add_compile_flags()") 35 | endif() 36 | foreach( _file ${_PAR_SOURCES} ) 37 | ecbuild_warn("Adding custom compile flags for file ${_file} : [${_PAR_FLAGS}]") 38 | if( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_file} ) 39 | ecbuild_error("${_file} does not exist") 40 | endif() 41 | set_source_files_properties( ${_file} PROPERTIES COMPILE_FLAGS "${_PAR_FLAGS}" ) 42 | endforeach() 43 | endmacro() 44 | 45 | -------------------------------------------------------------------------------- /cmake/compat.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | 10 | if( CMAKE_VERSION VERSION_LESS 3.16 ) 11 | set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/compat/3.16;${CMAKE_MODULE_PATH} ) 12 | endif() 13 | 14 | -------------------------------------------------------------------------------- /cmake/compat/README.md: -------------------------------------------------------------------------------- 1 | Since CMake 3.16 there is support for OpenACC::OpenACC_Fortran target which we like to use. 2 | 3 | The contributed file cmake/compat/3.16/FindOpenACC.cmake file is copied from a CMake 3.16 distribution and will be used 4 | instead upon find_package(OpenACC), only when CMake version < 3.16 5 | -------------------------------------------------------------------------------- /cmake/features/OMP/test_omp_target_loop_construct_bind_parallel.F90: -------------------------------------------------------------------------------- 1 | PROGRAM OMP_TARGET_LOOP_CONSTRUCT_BIND_PARALLEL 2 | USE iso_fortran_env 3 | IMPLICIT NONE 4 | 5 | INTEGER, PARAMETER :: NB = 10 6 | INTEGER, PARAMETER :: N = 10 7 | INTEGER :: I, J 8 | REAL(KIND=REAL32) :: TMP(N, NB) 9 | 10 | !$omp target data map(tofrom: TMP) 11 | 12 | !$omp target teams loop 13 | DO I=1,NB 14 | !$omp loop bind(parallel) 15 | DO J=1,N 16 | TMP(J, I) = REAL(J * I, KIND=REAL32) 17 | ENDDO 18 | ENDDO 19 | 20 | !$omp end target data 21 | 22 | END PROGRAM OMP_TARGET_LOOP_CONSTRUCT_BIND_PARALLEL 23 | -------------------------------------------------------------------------------- /cmake/features/OMP/test_omp_target_loop_construct_bind_thread.F90: -------------------------------------------------------------------------------- 1 | PROGRAM OMP_TARGET_LOOP_CONSTRUCT_BIND_THREAD 2 | USE iso_fortran_env 3 | IMPLICIT NONE 4 | 5 | INTEGER, PARAMETER :: NB = 10 6 | INTEGER, PARAMETER :: N = 10 7 | INTEGER :: I, J 8 | REAL(KIND=REAL32) :: TMP(N, NB) 9 | 10 | !$omp target data map(tofrom: TMP) 11 | 12 | !$omp target teams loop 13 | DO I=1,NB 14 | !$omp loop bind(thread) 15 | DO J=1,N 16 | TMP(J, I) = REAL(J * I, KIND=REAL32) 17 | ENDDO 18 | ENDDO 19 | 20 | !$omp end target data 21 | 22 | END PROGRAM OMP_TARGET_LOOP_CONSTRUCT_BIND_THREAD 23 | -------------------------------------------------------------------------------- /cmake/features/OMP/test_omp_target_teams_distribute.F90: -------------------------------------------------------------------------------- 1 | PROGRAM OMP_TARGET_LOOP_CONSTRUCT 2 | USE iso_fortran_env 3 | IMPLICIT NONE 4 | 5 | INTEGER, PARAMETER :: NB = 10 6 | INTEGER, PARAMETER :: N = 10 7 | INTEGER :: I, J 8 | REAL(KIND=REAL32) :: TMP(N, NB) 9 | 10 | !$omp target data map(tofrom: TMP) 11 | 12 | !$omp target teams distribute 13 | DO I=1,NB 14 | !$omp parallel do 15 | DO J=1,N 16 | TMP(J, I) = REAL(J * I, KIND=REAL32) 17 | ENDDO 18 | ENDDO 19 | 20 | !$omp end target data 21 | 22 | END PROGRAM OMP_TARGET_LOOP_CONSTRUCT 23 | -------------------------------------------------------------------------------- /cmake/project_summary.cmake: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | 10 | if( HAVE_ACC ) 11 | ecbuild_info("") 12 | ecbuild_info("OpenACC: ") 13 | if( OpenACC_C_FOUND ) 14 | ecbuild_info(" - C libraries: ${OpenACC_C_LIBRARIES}" ) 15 | ecbuild_info(" - C flags: ${OpenACC_C_FLAGS}" ) 16 | else() 17 | ecbuild_info(" - OpenACC_C_FOUND: FALSE") 18 | endif() 19 | if( OpenACC_Fortran_FOUND ) 20 | ecbuild_info(" - Fortran libraries: ${OpenACC_Fortran_LIBRARIES}" ) 21 | ecbuild_info(" - Fortran flags: ${OpenACC_Fortran_FLAGS}" ) 22 | else() 23 | ecbuild_info(" - OpenACC_Fortran_FOUND: FALSE") 24 | endif() 25 | endif() 26 | 27 | if( HAVE_OMP ) 28 | ecbuild_info("") 29 | ecbuild_info("OpenMP: ") 30 | if( OpenMP_C_FOUND ) 31 | ecbuild_info(" - C libraries: ${OpenMP_C_LIBRARIES}" ) 32 | ecbuild_info(" - C flags: ${OpenMP_C_FLAGS}" ) 33 | else() 34 | ecbuild_info(" - OpenMP_C_FOUND: FALSE") 35 | endif() 36 | if( OpenMP_Fortran_FOUND ) 37 | ecbuild_info(" - Fortran libraries: ${OpenMP_Fortran_LIBRARIES}" ) 38 | ecbuild_info(" - Fortran flags: ${OpenMP_Fortran_FLAGS}" ) 39 | else() 40 | ecbuild_info(" - OpenMP_Fortran_FOUND: FALSE") 41 | endif() 42 | endif() 43 | 44 | ecbuild_info("") 45 | -------------------------------------------------------------------------------- /config-files/cloudsc.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/config-files/cloudsc.bin -------------------------------------------------------------------------------- /config-files/input.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/config-files/input.h5 -------------------------------------------------------------------------------- /config-files/reference.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/config-files/reference.h5 -------------------------------------------------------------------------------- /data/ArchiveMetaData-dummy.json: -------------------------------------------------------------------------------- 1 | { 2 | "archive_name": "Binary", 3 | "archive_version": 0, 4 | "hash_algorithm": "SHA256", 5 | "serialbox_version": 255 6 | } 7 | -------------------------------------------------------------------------------- /data/MetaData-dummy.json: -------------------------------------------------------------------------------- 1 | { 2 | "field_map": null, 3 | "global_meta_info": null, 4 | "prefix": "dummy", 5 | "savepoint_vector": null, 6 | "serialbox_version": 255 7 | } 8 | -------------------------------------------------------------------------------- /data/input_KTYPE.dat: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /data/input_LDCUM.dat: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /data/input_PA.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PA.dat -------------------------------------------------------------------------------- /data/input_PAP.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PAP.dat -------------------------------------------------------------------------------- /data/input_PAPH.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PAPH.dat -------------------------------------------------------------------------------- /data/input_PCLV.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PCLV.dat -------------------------------------------------------------------------------- /data/input_PDYNA.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PDYNA.dat -------------------------------------------------------------------------------- /data/input_PDYNI.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PDYNI.dat -------------------------------------------------------------------------------- /data/input_PDYNL.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PDYNL.dat -------------------------------------------------------------------------------- /data/input_PEXTRA.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PEXTRA.dat -------------------------------------------------------------------------------- /data/input_PHRLW.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PHRLW.dat -------------------------------------------------------------------------------- /data/input_PHRSW.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PHRSW.dat -------------------------------------------------------------------------------- /data/input_PLSM.dat: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/input_PLU.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PLU.dat -------------------------------------------------------------------------------- /data/input_PLUDE.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PLUDE.dat -------------------------------------------------------------------------------- /data/input_PMFU.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PMFU.dat -------------------------------------------------------------------------------- /data/input_PQ.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PQ.dat -------------------------------------------------------------------------------- /data/input_PSUPSAT.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PSUPSAT.dat -------------------------------------------------------------------------------- /data/input_PT.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PT.dat -------------------------------------------------------------------------------- /data/input_PVERVEL.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PVERVEL.dat -------------------------------------------------------------------------------- /data/input_PVFA.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PVFA.dat -------------------------------------------------------------------------------- /data/input_PVFI.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PVFI.dat -------------------------------------------------------------------------------- /data/input_PVFL.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_PVFL.dat -------------------------------------------------------------------------------- /data/input_TENDENCY_CML_A.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_TENDENCY_CML_A.dat -------------------------------------------------------------------------------- /data/input_TENDENCY_CML_CLD.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_TENDENCY_CML_CLD.dat -------------------------------------------------------------------------------- /data/input_TENDENCY_CML_Q.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_TENDENCY_CML_Q.dat -------------------------------------------------------------------------------- /data/input_TENDENCY_CML_T.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_TENDENCY_CML_T.dat -------------------------------------------------------------------------------- /data/input_TENDENCY_TMP_A.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_TENDENCY_TMP_A.dat -------------------------------------------------------------------------------- /data/input_TENDENCY_TMP_CLD.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_TENDENCY_TMP_CLD.dat -------------------------------------------------------------------------------- /data/input_TENDENCY_TMP_Q.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_TENDENCY_TMP_Q.dat -------------------------------------------------------------------------------- /data/input_TENDENCY_TMP_T.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_TENDENCY_TMP_T.dat -------------------------------------------------------------------------------- /data/input_YRECLDP_RBETA.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_YRECLDP_RBETA.dat -------------------------------------------------------------------------------- /data/input_YRECLDP_RBETAP1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/input_YRECLDP_RBETAP1.dat -------------------------------------------------------------------------------- /data/reference_PCOVPTOT.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PCOVPTOT.dat -------------------------------------------------------------------------------- /data/reference_PFCQLNG.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFCQLNG.dat -------------------------------------------------------------------------------- /data/reference_PFCQNNG.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFCQNNG.dat -------------------------------------------------------------------------------- /data/reference_PFCQRNG.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFCQRNG.dat -------------------------------------------------------------------------------- /data/reference_PFCQSNG.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFCQSNG.dat -------------------------------------------------------------------------------- /data/reference_PFHPSL.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFHPSL.dat -------------------------------------------------------------------------------- /data/reference_PFHPSN.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFHPSN.dat -------------------------------------------------------------------------------- /data/reference_PFPLSN.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFPLSN.dat -------------------------------------------------------------------------------- /data/reference_PFSQIF.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFSQIF.dat -------------------------------------------------------------------------------- /data/reference_PFSQITUR.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFSQITUR.dat -------------------------------------------------------------------------------- /data/reference_PFSQLF.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFSQLF.dat -------------------------------------------------------------------------------- /data/reference_PFSQLTUR.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFSQLTUR.dat -------------------------------------------------------------------------------- /data/reference_PFSQRF.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFSQRF.dat -------------------------------------------------------------------------------- /data/reference_PFSQSF.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PFSQSF.dat -------------------------------------------------------------------------------- /data/reference_PLUDE.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_PLUDE.dat -------------------------------------------------------------------------------- /data/reference_PRAINFRAC_TOPRFZ.dat: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/reference_TENDENCY_LOC_A.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_TENDENCY_LOC_A.dat -------------------------------------------------------------------------------- /data/reference_TENDENCY_LOC_CLD.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_TENDENCY_LOC_CLD.dat -------------------------------------------------------------------------------- /data/reference_TENDENCY_LOC_Q.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_TENDENCY_LOC_Q.dat -------------------------------------------------------------------------------- /data/reference_TENDENCY_LOC_T.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/data/reference_TENDENCY_LOC_T.dat -------------------------------------------------------------------------------- /doc/refs.bib: -------------------------------------------------------------------------------- 1 | @article{Forbesetal2011, 2 | author = {Forbes, R.M. and Tompkins, A.M. and Untch, A.}, 3 | title = {A new prognostic bulk microphysics scheme for the {IFS}}, 4 | year = {2011}, 5 | journal = {{ECMWF} Tech. Memo. No.~649}, 6 | } 7 | 8 | @article{ForbesandTompkins2011, 9 | author = {Forbes, R.M. and Tompkins, A.M.}, 10 | title = {An improved representation of cloud and precipitation}, 11 | year = {2011}, 12 | journal = {{ECMWF} Newsletter No.~129}, 13 | pages = {13--18}, 14 | } 15 | 16 | @article{Tiedtke1993, 17 | author = {Tiedtke, M.}, 18 | year = {1993}, 19 | title = {Representation of clouds in large-scale models}, 20 | journal = {Mon. Wea. Rev.}, 21 | volume = {121}, 22 | pages = {3040--3061}, 23 | } 24 | 25 | @article{IFSdoc, 26 | author = {ECMWF}, 27 | year = {2015}, 28 | title = {{IFS Documentation, Part IV Physical Processes, Chapter 7 Clouds 29 | and Large-scale Precipitation}}, 30 | journal = {ECMWF}, 31 | } -------------------------------------------------------------------------------- /doc/version.tex.in: -------------------------------------------------------------------------------- 1 | @VERSION_STR@ 2 | -------------------------------------------------------------------------------- /serialbox2hdf5/README.md: -------------------------------------------------------------------------------- 1 | # serialbox2hdf5 2 | 3 | Convert [Serialbox](https://gridtools.github.io/serialbox/) data to HDF5. 4 | 5 | ## Quickstart 6 | 7 | ### 0. Load required modules (e.g. for ECMWF workstations) 8 | 9 | ``` 10 | module load python3 11 | module load hdf5 12 | module load cmake 13 | ``` 14 | 15 | ### 1. Create virtual environment 16 | 17 | ``` 18 | python3 -m venv venv 19 | . venv/bin/activate 20 | ``` 21 | 22 | ### 2. Install HDF5 23 | 24 | ``` 25 | pip install --upgrade pip wheel 26 | pip install h5py 27 | ``` 28 | 29 | ### 3. Install Serialbox 30 | 31 | ``` 32 | git clone https://github.com/gridtools/serialbox.git 33 | mkdir serialbox/build 34 | cd serialbox/build 35 | cmake ../ -DSERIALBOX_ENABLE_PYTHON=ON -DCMAKE_INSTALL_PREFIX=../../venv 36 | cmake --build . 37 | cmake --build . --target install 38 | cd ../.. 39 | ``` 40 | 41 | ### 4. Run 42 | 43 | ``` 44 | PYTHONPATH=venv/python:$PYTHONPATH python3 serialbox2hdf5.py 45 | ``` 46 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # (C) Copyright 1988- ECMWF. 2 | # 3 | # This software is licensed under the terms of the Apache Licence Version 2.0 4 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | # In applying this licence, ECMWF does not waive the privileges and immunities 6 | # granted to it by virtue of its status as an intergovernmental organisation 7 | # nor does it submit to any jurisdiction. 8 | 9 | add_subdirectory(prototype1) 10 | add_subdirectory(common) 11 | add_subdirectory(cloudsc_fortran) 12 | add_subdirectory(cloudsc_fortran_atlas) 13 | add_subdirectory(cloudsc_pyiface) 14 | add_subdirectory(cloudsc_python) 15 | add_subdirectory(cloudsc_c) 16 | add_subdirectory(cloudsc_cuda) 17 | add_subdirectory(cloudsc_hip) 18 | add_subdirectory(cloudsc_sycl) 19 | add_subdirectory(cloudsc_gpu) 20 | add_subdirectory(cloudsc_loki) 21 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/cloudsc_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #ifndef CLOUDSC_DRIVER_H 12 | #define CLOUDSC_DRIVER_H 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include "yomcst_c.h" 20 | #include "yoethf_c.h" 21 | #include "yoecldp_c.h" 22 | 23 | #include "load_state.h" 24 | #include "cloudsc_c.h" 25 | #include "cloudsc_validate.h" 26 | 27 | void cloudsc_driver(int numthreads, int numcols, int nproma); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/cloudsc_validate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #ifndef CLOUDSC_VALIDATE_H 12 | #define CLOUDSC_VALIDATE_H 13 | 14 | #include "load_state.h" 15 | 16 | void cloudsc_validate(const int nlon, const int nlev, const int nclv, const int ngptot, const int nproma, 17 | double *plude, double *pcovptot, double *prainfrac_toprfz, double *pfsqlf, double *pfsqif, 18 | double *pfcqlng, double *pfcqnng, double *pfsqrf, double *pfsqsf, double *pfcqrng, double *pfcqsng, 19 | double *pfsqltur, double *pfsqitur, double *pfplsl, double *pfplsn, double *pfhpsl, double *pfhpsn, 20 | double *tend_loc_a, double *tend_loc_q, double *tend_loc_t, double *tend_loc_cld); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/load_state.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #ifndef LOAD_STATE_H 12 | #define LOAD_STATE_H 13 | 14 | #include 15 | #include 16 | 17 | #include "yomcst_c.h" 18 | #include "yoethf_c.h" 19 | #include "yoecldp_c.h" 20 | 21 | 22 | void query_state(int *klon, int *klev); 23 | 24 | void load_state(const int nlon, const int nlev, const int nclv, const int ngptot, const int nproma, 25 | double* ptsphy, double* plcrit_aer, double* picrit_aer, 26 | double* pre_ice, double* pccn, double* pnice, double* pt, double* pq, 27 | double* tend_cml_t, double* tend_cml_q, double* tend_cml_a, double* tend_cml_cld, 28 | double* tend_tmp_t, double* tend_tmp_q, double* tend_tmp_a, double* tend_tmp_cld, 29 | double* pvfa, double* pvfl, double* pvfi, double* pdyna, double* pdynl, double* pdyni, 30 | double* phrsw, double* phrlw, double* pvervel, double* pap, double* paph, double* plsm, 31 | int* ktype, double* plu, double* plude, double* psnde, double* pmfu, 32 | double* pmfd, double* pa, double* pclv, double* psupsat); 33 | 34 | 35 | void load_reference(const int nlon, const int nlev, const int nclv, const int ngptot, const int nproma, 36 | double *plude, double *pcovptot, double *prainfrac_toprfz, double *pfsqlf, double *pfsqif, 37 | double *pfcqlng, double *pfcqnng, double *pfsqrf, double *pfsqsf, double *pfcqrng, double *pfcqsng, 38 | double *pfsqltur, double *pfsqitur, double *pfplsl, double *pfplsn, double *pfhpsl, double *pfhpsn, 39 | double *tend_loc_a, double *tend_loc_q, double *tend_loc_t, double *tend_loc_cld); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/mycpu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #if defined(__APPLE__) 12 | static int sched_getcpu() { return 0; } 13 | #else 14 | #include 15 | #endif 16 | 17 | /* 18 | * Find the core the thread belongs to 19 | */ 20 | 21 | int mycpu_ () 22 | { 23 | /* int sched_getcpu(void); */ 24 | int cpu; 25 | #pragma clang diagnostic push 26 | #pragma clang diagnostic ignored "-Wimplicit-function-declaration" 27 | cpu = sched_getcpu(); 28 | #pragma clang diagnostic pop 29 | return cpu; 30 | } 31 | int mycpu() { return mycpu_(); } 32 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/mycpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #ifndef MYCPU_H 12 | #define MYCPU_H 13 | 14 | int mycpu (); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/yoecldp_c.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include "yoecldp_c.h" 12 | 13 | int nclv; // number of microphysics variables 14 | int ncldql; // liquid cloud water 15 | int ncldqi; // ice cloud water 16 | int ncldqr; // rain water 17 | int ncldqs; // snow 18 | int ncldqv; // vapour 19 | 20 | struct TECLDP *yrecldp; 21 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/yoethf_c.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include "yoethf_c.h" 12 | 13 | double r2es; 14 | double r3les; 15 | double r3ies; 16 | double r4les; 17 | double r4ies; 18 | double r5les; 19 | double r5ies; 20 | double rvtmp2; 21 | double rhoh2o; 22 | double r5alvcp; 23 | double r5alscp; 24 | double ralvdcp; 25 | double ralsdcp; 26 | double ralfdcp; 27 | double rtwat; 28 | double rtber; 29 | double rtbercu; 30 | double rtice; 31 | double rticecu; 32 | double rtwat_rtice_r; 33 | double rtwat_rticecu_r; 34 | double rkoop1; 35 | double rkoop2; 36 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/yoethf_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #ifndef YOETHF_H 12 | #define YOETHF_H 13 | 14 | extern double r2es; 15 | extern double r3les; 16 | extern double r3ies; 17 | extern double r4les; 18 | extern double r4ies; 19 | extern double r5les; 20 | extern double r5ies; 21 | extern double rvtmp2; 22 | extern double rhoh2o; 23 | extern double r5alvcp; 24 | extern double r5alscp; 25 | extern double ralvdcp; 26 | extern double ralsdcp; 27 | extern double ralfdcp; 28 | extern double rtwat; 29 | extern double rtber; 30 | extern double rtbercu; 31 | extern double rtice; 32 | extern double rticecu; 33 | extern double rtwat_rtice_r; 34 | extern double rtwat_rticecu_r; 35 | extern double rkoop1; 36 | extern double rkoop2; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/yomcst_c.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include "yomcst_c.h" 12 | 13 | double rpi; 14 | double rclum; 15 | double rhpla; 16 | double rkbol; 17 | double rnavo; 18 | double rday; 19 | double rdayi; 20 | double rhour; 21 | double rea; 22 | double repsm; 23 | double rsiyea; 24 | double rsiday; 25 | double romega; 26 | double ra; 27 | double rg; 28 | double r1sa; 29 | double rsigma; 30 | double ri0; 31 | double r; 32 | double rmd; 33 | double rmv; 34 | double rmo3; 35 | double rd; 36 | double rv; 37 | double rcpd; 38 | double rcpv; 39 | double rcvd; 40 | double rcvv; 41 | double rkappa; 42 | double retv; 43 | double rmco2; 44 | double rmch4; 45 | double rmn2o; 46 | double rmco; 47 | double rmhcho; 48 | double rmno2; 49 | double rmso2; 50 | double rmso4; 51 | double rcw; 52 | double rcs; 53 | double ratm; 54 | double rtt; 55 | double rlvtt; 56 | double rlstt; 57 | double rlvzer; 58 | double rlszer; 59 | double rlmlt; 60 | double rdt; 61 | double restt; 62 | double rgamw; 63 | double rbetw; 64 | double ralpw; 65 | double rgams; 66 | double rbets; 67 | double ralps; 68 | double ralpd; 69 | double rbetd; 70 | double rgamd; 71 | double rsnan; 72 | -------------------------------------------------------------------------------- /src/cloudsc_c/cloudsc/yomcst_c.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #ifndef YOMCST_H 12 | #define YOMCST_H 13 | 14 | extern double rpi; 15 | extern double rclum; 16 | extern double rhpla; 17 | extern double rkbol; 18 | extern double rnavo; 19 | extern double rday; 20 | extern double rdayi; 21 | extern double rhour; 22 | extern double rea; 23 | extern double repsm; 24 | extern double rsiyea; 25 | extern double rsiday; 26 | extern double romega; 27 | extern double ra; 28 | extern double rg; 29 | extern double r1sa; 30 | extern double rsigma; 31 | extern double ri0; 32 | extern double r; 33 | extern double rmd; 34 | extern double rmv; 35 | extern double rmo3; 36 | extern double rd; 37 | extern double rv; 38 | extern double rcpd; 39 | extern double rcpv; 40 | extern double rcvd; 41 | extern double rcvv; 42 | extern double rkappa; 43 | extern double retv; 44 | extern double rmco2; 45 | extern double rmch4; 46 | extern double rmn2o; 47 | extern double rmco; 48 | extern double rmhcho; 49 | extern double rmno2; 50 | extern double rmso2; 51 | extern double rmso4; 52 | extern double rcw; 53 | extern double rcs; 54 | extern double ratm; 55 | extern double rtt; 56 | extern double rlvtt; 57 | extern double rlstt; 58 | extern double rlvzer; 59 | extern double rlszer; 60 | extern double rlmlt; 61 | extern double rdt; 62 | extern double restt; 63 | extern double rgamw; 64 | extern double rbetw; 65 | extern double ralpw; 66 | extern double rgams; 67 | extern double rbets; 68 | extern double ralps; 69 | extern double ralpd; 70 | extern double rbetd; 71 | extern double rgamd; 72 | extern double rsnan; 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /src/cloudsc_c/dwarf_cloudsc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "cloudsc_driver.h" 15 | 16 | 17 | int main( int argc, char *argv[] ) { 18 | 19 | int omp_threads, ngptot, nproma; 20 | int return_code; 21 | 22 | return_code = 0; 23 | 24 | // default values 25 | omp_threads = 1; 26 | ngptot = 100; 27 | nproma = 4; 28 | 29 | if (argc == 1) { 30 | cloudsc_driver(omp_threads, ngptot, nproma); 31 | } 32 | else if (argc == 4) { 33 | omp_threads = atoi( argv[1] ); 34 | ngptot = atoi( argv[2] ); 35 | nproma = atoi( argv[3] ); 36 | if (omp_threads <= 0) { 37 | #ifdef _OPENMP 38 | omp_threads = omp_get_max_threads(); 39 | #else 40 | // if arg is 0 or negative, and OpenMP disabled; defaults to 1 41 | omp_threads = 1; 42 | #endif 43 | } 44 | cloudsc_driver(omp_threads, ngptot, nproma); 45 | } 46 | else { 47 | printf("Calling c-cloudsc with the right number of arguments will work better ;-) \n",argc); 48 | return_code = EXIT_FAILURE; 49 | } 50 | 51 | return return_code; 52 | } 53 | -------------------------------------------------------------------------------- /src/cloudsc_cuda/cloudsc/cloudsc_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "cuda.h" 16 | #include "cuda_runtime.h" 17 | 18 | #include "yoecldp_c.h" 19 | #include "load_state.h" 20 | #include "cloudsc_c.h" 21 | #include "cloudsc_validate.h" 22 | #include "dtype.h" 23 | 24 | void cloudsc_driver(int numthreads, int numcols, int nproma); 25 | -------------------------------------------------------------------------------- /src/cloudsc_cuda/cloudsc/cloudsc_driver_hoist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "cuda.h" 16 | #include "cuda_runtime.h" 17 | 18 | #include "yoecldp_c.h" 19 | #include "load_state.h" 20 | #include "cloudsc_c_hoist.h" 21 | #include "cloudsc_validate.h" 22 | #include "dtype.h" 23 | 24 | void cloudsc_driver(int numthreads, int numcols, int nproma); 25 | -------------------------------------------------------------------------------- /src/cloudsc_cuda/cloudsc/cloudsc_driver_opt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "cuda.h" 16 | #include "cuda_runtime.h" 17 | 18 | #include "yoecldp_c.h" 19 | #include "load_state.h" 20 | #include "cloudsc_c_opt.h" 21 | #include "cloudsc_validate.h" 22 | #include "dtype.h" 23 | 24 | void cloudsc_driver(int numthreads, int numcols, int nproma); 25 | -------------------------------------------------------------------------------- /src/cloudsc_cuda/cloudsc/cloudsc_validate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include "load_state.h" 12 | #include "dtype.h" 13 | 14 | int cloudsc_validate(const int nlon, const int nlev, const int nclv, const int ngptot, const int nproma, 15 | dtype *plude, dtype *pcovptot, dtype *prainfrac_toprfz, dtype *pfsqlf, dtype *pfsqif, 16 | dtype *pfcqlng, dtype *pfcqnng, dtype *pfsqrf, dtype *pfsqsf, dtype *pfcqrng, dtype *pfcqsng, 17 | dtype *pfsqltur, dtype *pfsqitur, dtype *pfplsl, dtype *pfplsn, dtype *pfhpsl, dtype *pfhpsn, 18 | dtype *tend_loc_a, dtype *tend_loc_q, dtype *tend_loc_t, dtype *tend_loc_cld); 19 | -------------------------------------------------------------------------------- /src/cloudsc_cuda/cloudsc/dtype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #ifndef CLOUDSC_DTYPE_H 12 | #define CLOUDSC_DTYPE_H 13 | 14 | // FLOATING POINT PRECISION 15 | #ifdef SINGLE 16 | typedef float dtype; 17 | #else 18 | typedef double dtype; 19 | #endif 20 | 21 | 22 | // MATH FUNCTIONS 23 | #ifdef SINGLE 24 | 25 | #define MYMAX(x,y) fmaxf(x,y) 26 | #define MYMIN(x,y) fminf(x,y) 27 | #define MYEXP(x) expf(x) 28 | #define MYPOW(x,y) powf(x,y) 29 | #define MYPOWN(x,y) powf(x,y) 30 | #define MYABS(x) fabsf(x) 31 | 32 | #else 33 | 34 | #define MYMAX(x,y) fmax(x,y) 35 | #define MYMIN(x,y) fmin(x,y) 36 | #define MYEXP(x) exp(x) 37 | #define MYPOW(x,y) pow(x,y) 38 | #define MYPOWN(x,y) pow(x,y) 39 | #define MYABS(x) fabs(x) 40 | 41 | #endif 42 | 43 | #endif // CLOUDSC_DTYPE_H 44 | -------------------------------------------------------------------------------- /src/cloudsc_cuda/cloudsc/mycpu.cu: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #if defined(__APPLE__) 12 | static int sched_getcpu() { return 0; } 13 | #else 14 | #include 15 | #endif 16 | 17 | /* 18 | * Find the core the thread belongs to 19 | */ 20 | 21 | int mycpu_ () 22 | { 23 | /* int sched_getcpu(void); */ 24 | int cpu; 25 | #pragma clang diagnostic push 26 | #pragma clang diagnostic ignored "-Wimplicit-function-declaration" 27 | cpu = sched_getcpu(); 28 | #pragma clang diagnostic pop 29 | return cpu; 30 | } 31 | int mycpu() { return mycpu_(); } 32 | -------------------------------------------------------------------------------- /src/cloudsc_cuda/cloudsc/mycpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | int mycpu (); 12 | -------------------------------------------------------------------------------- /src/cloudsc_cuda/dwarf_cloudsc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "cloudsc_driver.h" 15 | 16 | 17 | int main( int argc, char *argv[] ) { 18 | 19 | int omp_threads, ngptot, nproma; 20 | int return_code; 21 | 22 | return_code = 0; 23 | 24 | // default values 25 | omp_threads = 1; 26 | ngptot = 100; 27 | nproma = 4; 28 | 29 | if (argc == 1) { 30 | cloudsc_driver(omp_threads, ngptot, nproma); 31 | } 32 | else if (argc == 4) { 33 | omp_threads = atoi( argv[1] ); 34 | ngptot = atoi( argv[2] ); 35 | nproma = atoi( argv[3] ); 36 | if (omp_threads <= 0) { 37 | #ifdef _OPENMP 38 | omp_threads = omp_get_max_threads(); 39 | #else 40 | // if arg is 0 or negative, and OpenMP disabled; defaults to 1 41 | omp_threads = 1; 42 | #endif 43 | } 44 | cloudsc_driver(omp_threads, ngptot, nproma); 45 | } 46 | else { 47 | printf("Calling c-cloudsc with the right number of arguments will work better ;-) \n",argc); 48 | return_code = EXIT_FAILURE; 49 | } 50 | 51 | return return_code; 52 | } 53 | -------------------------------------------------------------------------------- /src/cloudsc_gpu/nlev_mod.F90: -------------------------------------------------------------------------------- 1 | MODULE NLEV_MOD 2 | INTEGER, PARAMETER :: NLEV=137 3 | END MODULE NLEV_MOD 4 | -------------------------------------------------------------------------------- /src/cloudsc_hip/cloudsc/cloudsc_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "hip/hip_runtime_api.h" 16 | #include "hip/hip_runtime.h" 17 | 18 | #include "yoecldp_c.h" 19 | #include "load_state.h" 20 | #include "cloudsc_c.h" 21 | #include "cloudsc_validate.h" 22 | #include "dtype.h" 23 | 24 | void cloudsc_driver(int numthreads, int numcols, int nproma); 25 | -------------------------------------------------------------------------------- /src/cloudsc_hip/cloudsc/cloudsc_driver_hoist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "hip/hip_runtime.h" 16 | #include "hip/hip_runtime.h" 17 | 18 | #include "yoecldp_c.h" 19 | #include "load_state.h" 20 | #include "cloudsc_c_hoist.h" 21 | #include "cloudsc_validate.h" 22 | #include "dtype.h" 23 | 24 | void cloudsc_driver(int numthreads, int numcols, int nproma); 25 | -------------------------------------------------------------------------------- /src/cloudsc_hip/cloudsc/cloudsc_validate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include "load_state.h" 12 | #include "dtype.h" 13 | 14 | int cloudsc_validate(const int nlon, const int nlev, const int nclv, const int ngptot, const int nproma, 15 | dtype *plude, dtype *pcovptot, dtype *prainfrac_toprfz, dtype *pfsqlf, dtype *pfsqif, 16 | dtype *pfcqlng, dtype *pfcqnng, dtype *pfsqrf, dtype *pfsqsf, dtype *pfcqrng, dtype *pfcqsng, 17 | dtype *pfsqltur, dtype *pfsqitur, dtype *pfplsl, dtype *pfplsn, dtype *pfhpsl, dtype *pfhpsn, 18 | dtype *tend_loc_a, dtype *tend_loc_q, dtype *tend_loc_t, dtype *tend_loc_cld); 19 | -------------------------------------------------------------------------------- /src/cloudsc_hip/cloudsc/dtype.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This software is licensed under the terms of the Apache Licence Version 2.0 3 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 4 | * In applying this licence, ECMWF does not waive the privileges and immunities 5 | * granted to it by virtue of its status as an intergovernmental organisation 6 | * nor does it submit to any jurisdiction. 7 | */ 8 | 9 | #ifndef CLOUDSC_DTYPE_H 10 | #define CLOUDSC_DTYPE_H 11 | 12 | // FLOATING POINT PRECISION 13 | #ifdef SINGLE 14 | typedef float dtype; 15 | #else 16 | typedef double dtype; 17 | #endif 18 | 19 | 20 | // MATH FUNCTIONS 21 | #ifdef SINGLE 22 | 23 | #define MYMAX(x,y) fmaxf(x,y) 24 | #define MYMIN(x,y) fminf(x,y) 25 | #define MYEXP(x) exp(x) 26 | #define MYPOW(x,y) pow(x,y) 27 | #define MYPOWN(x,y) pow(x,y) 28 | #define MYABS(x) fabs(x) 29 | 30 | #else 31 | 32 | #define MYMAX(x,y) fmax(x,y) 33 | #define MYMIN(x,y) fmin(x,y) 34 | #define MYEXP(x) exp(x) 35 | #define MYPOW(x,y) pow(x,y) 36 | #define MYPOWN(x,y) pow(x,y) 37 | #define MYABS(x) fabs(x) 38 | 39 | #endif // SINGLE 40 | 41 | #endif // CLOUDSC_DTYPE_H 42 | -------------------------------------------------------------------------------- /src/cloudsc_hip/cloudsc/mycpu.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #if defined(__APPLE__) 12 | static int sched_getcpu() { return 0; } 13 | #else 14 | #include 15 | #endif 16 | 17 | /* 18 | * Find the core the thread belongs to 19 | */ 20 | 21 | int mycpu_ () 22 | { 23 | /* int sched_getcpu(void); */ 24 | int cpu; 25 | #pragma clang diagnostic push 26 | #pragma clang diagnostic ignored "-Wimplicit-function-declaration" 27 | cpu = sched_getcpu(); 28 | #pragma clang diagnostic pop 29 | return cpu; 30 | } 31 | int mycpu() { return mycpu_(); } 32 | -------------------------------------------------------------------------------- /src/cloudsc_hip/cloudsc/mycpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | int mycpu (); 12 | -------------------------------------------------------------------------------- /src/cloudsc_hip/dwarf_cloudsc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "cloudsc_driver.h" 15 | 16 | 17 | int main( int argc, char *argv[] ) { 18 | 19 | int omp_threads, ngptot, nproma; 20 | int return_code; 21 | 22 | return_code = 0; 23 | 24 | // default values 25 | omp_threads = 1; 26 | ngptot = 100; 27 | nproma = 4; 28 | 29 | if (argc == 1) { 30 | cloudsc_driver(omp_threads, ngptot, nproma); 31 | } 32 | else if (argc == 4) { 33 | omp_threads = atoi( argv[1] ); 34 | ngptot = atoi( argv[2] ); 35 | nproma = atoi( argv[3] ); 36 | cloudsc_driver(omp_threads, ngptot, nproma); 37 | } 38 | else { 39 | printf("Calling c-cloudsc with the right number of arguments will work better ;-) \n",argc); 40 | return_code = EXIT_FAILURE; 41 | } 42 | 43 | return return_code; 44 | } 45 | -------------------------------------------------------------------------------- /src/cloudsc_loki/xmod/cloudsc_mpif.xmod: -------------------------------------------------------------------------------- 1 | 2 | cloudsc_mpif 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/cloudsc_pyiface/drivers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/src/cloudsc_pyiface/drivers/__init__.py -------------------------------------------------------------------------------- /src/cloudsc_pyiface/kind_map: -------------------------------------------------------------------------------- 1 | { 2 | 'real': { '' : 'float', 3 | '4' : 'float', 4 | 'isp' : 'float', 5 | '8' : 'double', 6 | 'dp' : 'double', 7 | 'jprb' : 'double'}, 8 | 'complex' : { '' : 'complex_float', 9 | '8' : 'complex_double', 10 | '16' : 'complex_long_double', 11 | 'dp' : 'complex_double'}, 12 | 'integer' : { '4' : 'int', 13 | '8' : 'long_long', 14 | 'jpim' : 'int', 15 | 'dp' : 'long_long' }, 16 | 'character' : {'' : 'char', 17 | '1' : 'char' } 18 | } 19 | -------------------------------------------------------------------------------- /src/cloudsc_pyiface/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools >= 64"] 3 | build-backend = "setuptools.build_meta" 4 | 5 | [project] 6 | name = "pyiface" 7 | version = "0.1.0" 8 | authors = [ 9 | {name = "Zbigniew Piotrowski", email = "zbigniew.piotrowski@ecmwf.int"}, 10 | {name = "Michael Lange", email = "michael.lange@ecmwf.int"} 11 | ] 12 | description = "Python driver that enables execution of the Fortran CLOUDSC dwarf from Python" 13 | readme = "README.md" 14 | requires-python = ">=3.8" 15 | license = {file = "LICENSE"} 16 | classifiers = [ 17 | " Development Status :: 3 - Alpha ", 18 | " Intended Audience:: Science / Research ", 19 | " License :: OSI Approved:: Apache License, Version 2.0 ", 20 | " Natural Language :: English ", 21 | " Operating System :: POSIX ", 22 | " Programming Language :: Python :: 3.8 ", 23 | " Programming Language :: Python :: 3.9 ", 24 | " Programming Language :: Python :: 3.10 ", 25 | " Programming Language :: Python :: 3.11 ", 26 | " Topic :: Scientific/Engineering :: Atmospheric Science " 27 | ] 28 | dependencies = [ 29 | "numpy", 30 | "f90wrap", 31 | "click", 32 | "h5py", 33 | ] 34 | 35 | [project.scripts] 36 | "cloudsc_pyiface.py" = "drivers.cloudsc_pyiface:main" 37 | 38 | [project.urls] 39 | repository = "https://github.com/ecmwf-ifs/dwarf-p-cloudsc" 40 | 41 | [tool.setuptools.packages.find] 42 | where = ["src", "."] 43 | include = ["pyiface*", "drivers*"] 44 | -------------------------------------------------------------------------------- /src/cloudsc_pyiface/src/pyiface/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # (C) Copyright 2018- ECMWF. 4 | 5 | # This software is licensed under the terms of the Apache Licence Version 2.0 6 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 7 | # In applying this licence, ECMWF does not waive the privileges and immunities 8 | # granted to it by virtue of its status as an intergovernmental organisation 9 | # nor does it submit to any jurisdiction. 10 | 11 | from pyiface.cloudsc_data import * # noqa 12 | from pyiface.dynload import * # noqa 13 | -------------------------------------------------------------------------------- /src/cloudsc_pyiface/src/pyiface/dynload.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # (C) Copyright 2018- ECMWF. 4 | 5 | # This software is licensed under the terms of the Apache Licence Version 2.0 6 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 7 | # In applying this licence, ECMWF does not waive the privileges and immunities 8 | # granted to it by virtue of its status as an intergovernmental organisation 9 | # nor does it submit to any jurisdiction. 10 | 11 | """ 12 | Utility routines to dynamically load generated Python modules 13 | """ 14 | 15 | import sys 16 | from pathlib import Path 17 | from importlib import import_module, invalidate_caches, reload 18 | 19 | 20 | __all__ = ['load_module'] 21 | 22 | 23 | def load_module(module, modpath=None): 24 | """ 25 | Utility routine to dynamically load the requested Python module. 26 | """ 27 | 28 | modpath = Path.cwd() if modpath is None else modpath 29 | modpath = str(Path(modpath).absolute()) 30 | if modpath not in sys.path: 31 | sys.path.insert(0, modpath) 32 | if module in sys.modules: 33 | reload(sys.modules[module]) 34 | return sys.modules[module] 35 | 36 | # Trigger the actual module import 37 | try: 38 | return import_module(module) 39 | except ModuleNotFoundError: 40 | # If module caching interferes, try again with clean caches 41 | invalidate_caches() 42 | return import_module(module) 43 | -------------------------------------------------------------------------------- /src/cloudsc_python/drivers/input.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/src/cloudsc_python/drivers/input.h5 -------------------------------------------------------------------------------- /src/cloudsc_python/drivers/reference.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecmwf-ifs/dwarf-p-cloudsc/f7ba9f85ebd91c710496c680db037f3d46f8e82b/src/cloudsc_python/drivers/reference.h5 -------------------------------------------------------------------------------- /src/cloudsc_python/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["setuptools >= 64"] 3 | build-backend = "setuptools.build_meta" 4 | 5 | [project] 6 | name = "cloudscpython" 7 | version = "0.1.0" 8 | authors = [ 9 | {name = "Michael Lange", email = "michael.lange@ecmwf.int"} 10 | ] 11 | description = "Collection of Python variants of the CLOUDSC dwarf" 12 | readme = "README.md" 13 | requires-python = ">=3.8" 14 | license = {file = "LICENSE"} 15 | classifiers = [ 16 | " Development Status :: 3 - Alpha ", 17 | " Intended Audience:: Science / Research ", 18 | " License :: OSI Approved:: Apache License, Version 2.0 ", 19 | " Natural Language :: English ", 20 | " Operating System :: POSIX ", 21 | " Programming Language :: Python :: 3.8 ", 22 | " Programming Language :: Python :: 3.9 ", 23 | " Programming Language :: Python :: 3.10 ", 24 | " Programming Language :: Python :: 3.11 ", 25 | " Topic :: Scientific/Engineering :: Atmospheric Science " 26 | ] 27 | dependencies = [ 28 | "click", 29 | "h5py", 30 | "numpy", 31 | ] 32 | 33 | [project.scripts] 34 | "cloudsc_f2py.py" = "drivers.cloudsc_f2py:main" 35 | 36 | [project.urls] 37 | repository = "https://github.com/ecmwf-ifs/dwarf-p-cloudsc" 38 | 39 | [tool.setuptools.packages.find] 40 | where = ["src", "."] 41 | include = ["cloudscf2py", "drivers*"] 42 | -------------------------------------------------------------------------------- /src/cloudsc_python/src/cloudscf2py/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # (C) Copyright 2018- ECMWF. 4 | 5 | # This software is licensed under the terms of the Apache Licence Version 2.0 6 | # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 7 | # In applying this licence, ECMWF does not waive the privileges and immunities 8 | # granted to it by virtue of its status as an intergovernmental organisation 9 | # nor does it submit to any jurisdiction. 10 | 11 | 12 | from cloudscf2py.inputs import * 13 | from cloudscf2py.cloudsc_py import * 14 | -------------------------------------------------------------------------------- /src/cloudsc_python/src/cloudscf2py/include/abor1.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | SUBROUTINE ABOR1(CDTEXT) 12 | CHARACTER(LEN=*) :: CDTEXT 13 | END SUBROUTINE ABOR1 14 | END INTERFACE 15 | -------------------------------------------------------------------------------- /src/cloudsc_python/src/cloudscf2py/include/fccld.base.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | !* 11 | ! ------------------------------------------------------------------ 12 | ! This COMDECK defines functions to be used in the cloud scheme 13 | ! other than the standard saturation vapour pressure 14 | ! 15 | ! FKOOP modifies the ice saturation mixing ratio for homogeneous 16 | ! nucleation 17 | ! 18 | ! note: PTARE is temperature and is definited in frttre.h 19 | ! which MUST be included before this function block 20 | ! 21 | ! ********************************************** 22 | ! KOOP formula for homogeneous nucleation of ice 23 | ! ********************************************** 24 | ! 25 | ! INPUT : PTARE = TEMPERATURE 26 | REAL(KIND=JPRB) :: FOKOOP 27 | FOKOOP (PTARE) = MIN( _PREFIX1_ RKOOP1 - _PREFIX1_ RKOOP2*PTARE,FOEELIQ(PTARE)/FOEEICE(PTARE)) 28 | -------------------------------------------------------------------------------- /src/cloudsc_python/src/cloudscf2py/include/fccld.func.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | !* 11 | ! ------------------------------------------------------------------ 12 | ! This COMDECK defines functions to be used in the cloud scheme 13 | ! other than the standard saturation vapour pressure 14 | ! 15 | ! FKOOP modifies the ice saturation mixing ratio for homogeneous 16 | ! nucleation 17 | ! 18 | ! note: PTARE is temperature and is definited in frttre.h 19 | ! which MUST be included before this function block 20 | ! 21 | ! ********************************************** 22 | ! KOOP formula for homogeneous nucleation of ice 23 | ! ********************************************** 24 | ! 25 | ! INPUT : PTARE = TEMPERATURE 26 | REAL(KIND=JPRB) :: FOKOOP 27 | FOKOOP (PTARE) = MIN(RKOOP1-RKOOP2*PTARE,FOEELIQ(PTARE)/FOEEICE(PTARE)) 28 | -------------------------------------------------------------------------------- /src/cloudsc_python/src/cloudscf2py/include/fccld.ydthf.h: -------------------------------------------------------------------------------- 1 | #define _PREFIX1_ YDTHF% 2 | #include "fccld.base.h" 3 | #undef _PREFIX1_ 4 | -------------------------------------------------------------------------------- /src/cloudsc_python/src/cloudscf2py/include/fcttre.ycst.h: -------------------------------------------------------------------------------- 1 | #define _PREFIX1_ YDCST% 2 | #define _PREFIX2_ YDTHF% 3 | #include "fcttre.base.h" 4 | #undef _PREFIX1_ 5 | #undef _PREFIX2_ 6 | -------------------------------------------------------------------------------- /src/cloudsc_sycl/cloudsc/cloudsc_driver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "yoecldp_c.h" 17 | #include "load_state.h" 18 | #include "cloudsc_validate.h" 19 | #include "dtype.h" 20 | 21 | void cloudsc_driver(int numthreads, int numcols, int nproma); 22 | -------------------------------------------------------------------------------- /src/cloudsc_sycl/cloudsc/cloudsc_driver_hoist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include "yoecldp_c.h" 17 | #include "load_state.h" 18 | #include "cloudsc_validate.h" 19 | #include "dtype.h" 20 | 21 | void cloudsc_driver(int numthreads, int numcols, int nproma); 22 | -------------------------------------------------------------------------------- /src/cloudsc_sycl/cloudsc/cloudsc_validate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include "load_state.h" 12 | #include "dtype.h" 13 | 14 | int cloudsc_validate(const int nlon, const int nlev, const int nclv, const int ngptot, const int nproma, 15 | dtype *plude, dtype *pcovptot, dtype *prainfrac_toprfz, dtype *pfsqlf, dtype *pfsqif, 16 | dtype *pfcqlng, dtype *pfcqnng, dtype *pfsqrf, dtype *pfsqsf, dtype *pfcqrng, dtype *pfcqsng, 17 | dtype *pfsqltur, dtype *pfsqitur, dtype *pfplsl, dtype *pfplsn, dtype *pfhpsl, dtype *pfhpsn, 18 | dtype *tend_loc_a, dtype *tend_loc_q, dtype *tend_loc_t, dtype *tend_loc_cld); 19 | -------------------------------------------------------------------------------- /src/cloudsc_sycl/cloudsc/mycpu.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #if defined(__APPLE__) 12 | static int sched_getcpu() { return 0; } 13 | #else 14 | #include 15 | #endif 16 | 17 | /* 18 | * Find the core the thread belongs to 19 | */ 20 | 21 | int mycpu_ () 22 | { 23 | /* int sched_getcpu(void); */ 24 | int cpu; 25 | #pragma clang diagnostic push 26 | #pragma clang diagnostic ignored "-Wimplicit-function-declaration" 27 | cpu = sched_getcpu(); 28 | #pragma clang diagnostic pop 29 | return cpu; 30 | } 31 | int mycpu() { return mycpu_(); } 32 | -------------------------------------------------------------------------------- /src/cloudsc_sycl/cloudsc/mycpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | int mycpu (); 12 | -------------------------------------------------------------------------------- /src/cloudsc_sycl/dwarf_cloudsc.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #include 12 | #include 13 | 14 | #include "cloudsc_driver.h" 15 | 16 | 17 | int main( int argc, char *argv[] ) { 18 | 19 | int omp_threads, ngptot, nproma; 20 | int return_code; 21 | 22 | return_code = 0; 23 | 24 | // default values 25 | omp_threads = 1; 26 | ngptot = 100; 27 | nproma = 4; 28 | 29 | if (argc == 1) { 30 | cloudsc_driver(omp_threads, ngptot, nproma); 31 | } 32 | else if (argc == 4) { 33 | omp_threads = atoi( argv[1] ); 34 | ngptot = atoi( argv[2] ); 35 | nproma = atoi( argv[3] ); 36 | if (ngptot % nproma != 0) { 37 | printf("Calling the SYCL variant(s) of cloudsc with non-matching ngptot and nproma won't work!\nMake ngptot a multiple of nproma!\n",argc); 38 | return_code = EXIT_FAILURE; 39 | } 40 | else{ 41 | cloudsc_driver(omp_threads, ngptot, nproma); 42 | } 43 | } 44 | else { 45 | printf("Calling c-cloudsc with the right number of arguments will work better ;-) \n",argc); 46 | return_code = EXIT_FAILURE; 47 | } 48 | 49 | return return_code; 50 | } 51 | -------------------------------------------------------------------------------- /src/common/include/abor1.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | SUBROUTINE ABOR1(CDTEXT) 12 | CHARACTER(LEN=*) :: CDTEXT 13 | END SUBROUTINE ABOR1 14 | END INTERFACE 15 | -------------------------------------------------------------------------------- /src/common/include/fccld.base.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | !* 11 | ! ------------------------------------------------------------------ 12 | ! This COMDECK defines functions to be used in the cloud scheme 13 | ! other than the standard saturation vapour pressure 14 | ! 15 | ! FKOOP modifies the ice saturation mixing ratio for homogeneous 16 | ! nucleation 17 | ! 18 | ! note: PTARE is temperature and is definited in frttre.h 19 | ! which MUST be included before this function block 20 | ! 21 | ! ********************************************** 22 | ! KOOP formula for homogeneous nucleation of ice 23 | ! ********************************************** 24 | ! 25 | ! INPUT : PTARE = TEMPERATURE 26 | REAL(KIND=JPRB) :: FOKOOP 27 | FOKOOP (PTARE) = MIN( _PREFIX1_ RKOOP1 - _PREFIX1_ RKOOP2*PTARE,FOEELIQ(PTARE)/FOEEICE(PTARE)) 28 | -------------------------------------------------------------------------------- /src/common/include/fccld.func.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | !* 11 | ! ------------------------------------------------------------------ 12 | ! This COMDECK defines functions to be used in the cloud scheme 13 | ! other than the standard saturation vapour pressure 14 | ! 15 | ! FKOOP modifies the ice saturation mixing ratio for homogeneous 16 | ! nucleation 17 | ! 18 | ! note: PTARE is temperature and is definited in frttre.h 19 | ! which MUST be included before this function block 20 | ! 21 | ! ********************************************** 22 | ! KOOP formula for homogeneous nucleation of ice 23 | ! ********************************************** 24 | ! 25 | ! INPUT : PTARE = TEMPERATURE 26 | REAL(KIND=JPRB) :: FOKOOP 27 | FOKOOP (PTARE) = MIN(RKOOP1-RKOOP2*PTARE,FOEELIQ(PTARE)/FOEEICE(PTARE)) 28 | -------------------------------------------------------------------------------- /src/common/include/fccld.ydthf.h: -------------------------------------------------------------------------------- 1 | #define _PREFIX1_ YDTHF% 2 | #include "fccld.base.h" 3 | #undef _PREFIX1_ 4 | -------------------------------------------------------------------------------- /src/common/include/fcttre.ycst.h: -------------------------------------------------------------------------------- 1 | #define _PREFIX1_ YDCST% 2 | #define _PREFIX2_ YDTHF% 3 | #include "fcttre.base.h" 4 | #undef _PREFIX1_ 5 | #undef _PREFIX2_ 6 | -------------------------------------------------------------------------------- /src/common/include/mycpu.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | INTEGER FUNCTION mycpu() bind(c) 12 | END FUNCTION mycpu 13 | END INTERFACE 14 | -------------------------------------------------------------------------------- /src/common/module/abor1.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | SUBROUTINE ABOR1(CDTEXT) 11 | CHARACTER(LEN=*) CDTEXT 12 | WRITE(0,*) CDTEXT 13 | call abort() 14 | END SUBROUTINE ABOR1 15 | -------------------------------------------------------------------------------- /src/common/module/cloudsc_mpif.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | MODULE CLOUDSC_MPIF 11 | #include "mpif.h" 12 | END MODULE CLOUDSC_MPIF 13 | -------------------------------------------------------------------------------- /src/common/module/ec_pmon_mod.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | MODULE EC_PMON_MOD 11 | USE PARKIND1, ONLY : JPIM, JPIB 12 | CONTAINS 13 | 14 | SUBROUTINE EC_PMON(ENERGY,POWER) 15 | IMPLICIT NONE 16 | INTEGER(KIND=JPIB),INTENT(OUT) :: ENERGY,POWER 17 | INTEGER(KIND=JPIB),SAVE :: ENERGY_START = 0 18 | INTEGER(KIND=JPIM),SAVE :: MONINIT = 0 19 | INTEGER(KIND=JPIM) :: ISTAT 20 | CHARACTER(LEN=1) :: CLEC_PMON 21 | ENERGY = 0 22 | IF (MONINIT >= 0) THEN 23 | IF (MONINIT == 0) THEN ! The very first time only 24 | CALL GET_ENVIRONMENT_VARIABLE('EC_PMON',CLEC_PMON) 25 | IF (CLEC_PMON == '0') MONINIT = -2 ! Never try again 26 | ENDIF 27 | IF (MONINIT >= 0) THEN 28 | OPEN(503,FILE='/sys/cray/pm_counters/energy',IOSTAT=ISTAT,STATUS='old',ACTION='read') 29 | IF (ISTAT == 0) THEN 30 | READ(503,*,IOSTAT=ISTAT) ENERGY 31 | CLOSE(503) 32 | IF (ISTAT == 0) THEN 33 | IF (MONINIT == 0) THEN 34 | ENERGY_START = ENERGY 35 | MONINIT = 1 ! Ok 36 | ENDIF 37 | ENERGY = ENERGY - ENERGY_START 38 | ENDIF 39 | ENDIF 40 | IF (ISTAT /= 0) THEN 41 | MONINIT = -1 ! Never try again 42 | ENERGY = 0 43 | ENDIF 44 | ENDIF 45 | ENDIF 46 | POWER = 0 47 | IF (MONINIT > 0) THEN 48 | OPEN(504,FILE='/sys/cray/pm_counters/power',IOSTAT=ISTAT,STATUS='old',ACTION='read') 49 | IF (ISTAT == 0) THEN 50 | READ(504,*,IOSTAT=ISTAT) POWER 51 | CLOSE(504) 52 | ENDIF 53 | IF (ISTAT /= 0) POWER = 0 54 | ENDIF 55 | END SUBROUTINE EC_PMON 56 | 57 | END MODULE EC_PMON_MOD 58 | -------------------------------------------------------------------------------- /src/common/module/fccld_mod.cuf.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | 11 | MODULE FCCLD_CUF_MOD 12 | !* 13 | ! ------------------------------------------------------------------ 14 | ! This COMDECK defines functions to be used in the cloud scheme 15 | ! other than the standard saturation vapour pressure 16 | ! 17 | ! FKOOP modifies the ice saturation mixing ratio for homogeneous 18 | ! nucleation 19 | ! 20 | ! note: PTARE is temperature and is definited in frttre.h 21 | ! which MUST be included before this function block 22 | ! 23 | ! ********************************************** 24 | ! KOOP formula for homogeneous nucleation of ice 25 | ! ********************************************** 26 | ! 27 | ! INPUT : PTARE = TEMPERATURE 28 | USE PARKIND1, ONLY : JPIM, JPRB 29 | USE YOETHF_CUF, RKOOP1=>RKOOP1_D, RKOOP2=>RKOOP2_D 30 | USE FCTTRE_CUF_MOD, ONLY : FOEELIQ, FOEEICE 31 | 32 | IMPLICIT NONE 33 | CONTAINS 34 | 35 | ATTRIBUTES(DEVICE) PURE ELEMENTAL FUNCTION FOKOOP(PTARE) 36 | REAL(KIND=JPRB) :: FOKOOP 37 | REAL(KIND=JPRB), VALUE :: PTARE 38 | 39 | FOKOOP = MIN(RKOOP1-RKOOP2*PTARE,FOEELIQ(PTARE)/FOEEICE(PTARE)) 40 | END FUNCTION FOKOOP 41 | 42 | END MODULE FCCLD_CUF_MOD 43 | -------------------------------------------------------------------------------- /src/common/module/mycpu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #if defined(__APPLE__) 12 | static int sched_getcpu() { return 0; } 13 | #else 14 | #include 15 | #endif 16 | 17 | /* 18 | * Find the core the thread belongs to 19 | */ 20 | 21 | int mycpu_ () 22 | { 23 | extern int sched_getcpu(void); 24 | int cpu; 25 | #pragma clang diagnostic push 26 | #pragma clang diagnostic ignored "-Wimplicit-function-declaration" 27 | cpu = sched_getcpu(); 28 | #pragma clang diagnostic pop 29 | return cpu; 30 | } 31 | int mycpu() { return mycpu_(); } 32 | -------------------------------------------------------------------------------- /src/common/module/parkind1.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | MODULE PARKIND1 11 | ! 12 | ! *** Define usual kinds for strong typing *** 13 | ! 14 | IMPLICIT NONE 15 | SAVE 16 | ! 17 | ! Integer Kinds 18 | ! ------------- 19 | ! 20 | INTEGER, PARAMETER :: JPIT = SELECTED_INT_KIND(2) 21 | INTEGER, PARAMETER :: JPIS = SELECTED_INT_KIND(4) 22 | INTEGER, PARAMETER :: JPIM = SELECTED_INT_KIND(9) 23 | INTEGER, PARAMETER :: JPIB = SELECTED_INT_KIND(12) 24 | 25 | !Special integer type to be used for sensative adress calculations 26 | !should be *8 for a machine with 8byte adressing for optimum performance 27 | #ifdef ADDRESS64 28 | INTEGER, PARAMETER :: JPIA = JPIB 29 | #else 30 | INTEGER, PARAMETER :: JPIA = JPIM 31 | #endif 32 | 33 | ! 34 | ! Real Kinds 35 | ! ---------- 36 | ! 37 | INTEGER, PARAMETER :: JPRT = SELECTED_REAL_KIND(2,1) 38 | INTEGER, PARAMETER :: JPRS = SELECTED_REAL_KIND(4,2) 39 | INTEGER, PARAMETER :: JPRM = SELECTED_REAL_KIND(6,37) 40 | #ifdef SINGLE 41 | INTEGER, PARAMETER :: JPRB = SELECTED_REAL_KIND(6,37) 42 | #else 43 | INTEGER, PARAMETER :: JPRB = SELECTED_REAL_KIND(13,300) 44 | #endif 45 | 46 | ! Double real for C code and special places requiring 47 | ! higher precision. 48 | INTEGER, PARAMETER :: JPRD = SELECTED_REAL_KIND(13,300) 49 | 50 | 51 | ! Logical Kinds for RTTOV.... 52 | 53 | INTEGER, PARAMETER :: JPLM = JPIM !Standard logical type 54 | 55 | END MODULE PARKIND1 56 | -------------------------------------------------------------------------------- /src/common/module/routines.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | SUBROUTINE routines 11 | CHARACTER(LEN=*), PARAMETER :: CLPREFIX = 'ERROR: YOU SHOULD HAVE NEVER BE CALLING ROUTINE ' 12 | #include "abor1.intfb.h" 13 | ENTRY DOTPROD2 14 | CALL ABOR1(CLPREFIX//'DOTPROD2') 15 | RETURN 16 | ENTRY DOTPROD3 17 | CALL ABOR1(CLPREFIX//'DOTPROD3') 18 | RETURN 19 | ENTRY VDIV 20 | CALL ABOR1(CLPREFIX//'VDIV') 21 | RETURN 22 | ENTRY VEXP 23 | CALL ABOR1(CLPREFIX//'VEXP') 24 | RETURN 25 | ENTRY VREC 26 | CALL ABOR1(CLPREFIX//'VREC') 27 | RETURN 28 | ENTRY VPOW 29 | CALL ABOR1(CLPREFIX//'VPOW') 30 | RETURN 31 | END SUBROUTINE routines 32 | -------------------------------------------------------------------------------- /src/common/module/yomcst.cuf.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | MODULE YOMCST_CUF 11 | 12 | USE PARKIND1, ONLY : JPRB 13 | USE YOMCST, ONLY: RG, RD, RCPD, RETV, RLVTT, RLSTT, RLMLT, RTT, RV 14 | 15 | IMPLICIT NONE 16 | 17 | REAL(KIND=JPRB), CONSTANT :: RG_D 18 | REAL(KIND=JPRB), CONSTANT :: RD_D 19 | REAL(KIND=JPRB), CONSTANT :: RV_D 20 | REAL(KIND=JPRB), CONSTANT :: RCPD_D 21 | REAL(KIND=JPRB), CONSTANT :: RETV_D 22 | REAL(KIND=JPRB), CONSTANT :: RTT_D 23 | REAL(KIND=JPRB), CONSTANT :: RLVTT_D 24 | REAL(KIND=JPRB), CONSTANT :: RLSTT_D 25 | REAL(KIND=JPRB), CONSTANT :: RLMLT_D 26 | 27 | 28 | ! ------------------------------------------------------------------ 29 | 30 | CONTAINS 31 | 32 | ATTRIBUTES(HOST) SUBROUTINE YOMCST_UPDATE_DEVICE() 33 | RG_D=RG; RD_D=RD; RCPD_D=RCPD; RETV_D=RETV; RLVTT_D=RLVTT; 34 | RLSTT_D=RLSTT; RLMLT_D=RLMLT; RTT_D=RTT; RV_D=RV 35 | END SUBROUTINE YOMCST_UPDATE_DEVICE 36 | 37 | 38 | END MODULE YOMCST_CUF 39 | -------------------------------------------------------------------------------- /src/prototype1/auxiliary/logical_cores: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | NUMLOG=1 3 | CPUFILE=/proc/cpuinfo 4 | if test -f $CPUFILE ; then 5 | NUMLOG=$(grep "processor" $CPUFILE | wc -l) 6 | fi 7 | echo $NUMLOG 8 | exit 0 9 | -------------------------------------------------------------------------------- /src/prototype1/auxiliary/nsockets: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | CPUFILE=/proc/cpuinfo 3 | test -f $CPUFILE || exit 0 4 | NUMPHY=$(grep "physical id" $CPUFILE | sort -u | wc -l) 5 | echo $NUMPHY 6 | -------------------------------------------------------------------------------- /src/prototype1/auxiliary/physical_cores: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | MULT=${1:-1} 3 | 4 | CPUFILE=/proc/cpuinfo 5 | 6 | # Logical number of cores 7 | NUMLOG=1 8 | if test -f $CPUFILE ; then 9 | NUMLOG=$(grep "processor" $CPUFILE | wc -l) 10 | fi 11 | #echo $NUMLOG 12 | 13 | # Physical number of sockets 14 | NUMPHY=$(grep "physical id" $CPUFILE | sort -u | wc -l) 15 | #echo $NUMPHY 16 | 17 | # N-way hyperthreading 18 | HT=1 19 | if [ $NUMLOG -gt 1 ] ; then 20 | HT=`expr $NUMLOG / $NUMPHY` 21 | NUMCORE=$(grep "core id" $CPUFILE | sort -u | wc -l) 22 | # echo $NUMCORE 23 | if [ $NUMCORE -gt 1 ] ; then 24 | HT=`expr $HT / $NUMCORE` 25 | fi 26 | fi 27 | #echo $HT 28 | 29 | NUMPHYS=`expr $NUMLOG / $HT` 30 | 31 | NUM=`expr $NUMPHYS \* $MULT` 32 | echo $NUM 33 | 34 | exit 0 35 | -------------------------------------------------------------------------------- /src/prototype1/auxiliary/system_used: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | host=$(hostname) 3 | echo "${host}: $(date)" 4 | echo "${host}: $(uname -a)" 5 | CPUFILE=/proc/cpuinfo 6 | test -f $CPUFILE || exit 0 7 | NUMPHY=$(grep "physical id" $CPUFILE | sort -u | wc -l) 8 | NUMLOG=$(grep "processor" $CPUFILE | wc -l) 9 | if [ $NUMPHY -eq 1 ] ; then 10 | echo -n "${host}: This system has one CPU-socket" 11 | else 12 | echo -n "${host}: This system has $NUMPHY CPU-sockets" 13 | fi 14 | HT=1 15 | if [ $NUMLOG -gt 1 ] ; then 16 | HT=`expr $NUMLOG / $NUMPHY` 17 | echo " and $NUMLOG logical H/W threads." 18 | NUMCORE=$(grep "core id" $CPUFILE | sort -u | wc -l) 19 | if [ $NUMCORE -gt 1 ] ; then 20 | echo "${host}: For every CPU-socket there are $NUMCORE cores." 21 | HT=`expr $HT / $NUMCORE` 22 | fi 23 | else 24 | echo " and one logical CPU." 25 | fi 26 | echo -n "${host}: The CPU is a"$(grep "model name" $CPUFILE | sort -u | cut -d : -f 2-) 27 | #echo -n " ("$(grep "cpu MHz" $CPUFILE | sort -u | cut -d : -f 2- | sed 's/\n/ /' |awk '{for (i=1;i<=NF;++i) printf("%g ",$i/1000.0)}')"GHz)" 28 | echo " with"$(grep "cache size" $CPUFILE | sort -u | cut -d : -f 2-)" cache" 29 | 30 | if [ $HT -gt 1 ] ; then 31 | ht=enabled 32 | grep -o '^flags\b.*: .*\bht\b' >/dev/null 2>&1 $CPUFILE || ht=disabled 33 | echo "${host}: Hyper-threading is $HT-way and is $ht" 34 | else 35 | echo "${host}: Hyper-threading is disabled" 36 | fi 37 | 38 | MEMFILE=/proc/meminfo 39 | test -f $MEMFILE || exit 0 40 | TOTMEM=$(grep MemTotal $MEMFILE | awk '{$1=""; print $0;}' | sed 's/^[\t ]*//') 41 | echo "${host}: Memory size is $TOTMEM" 42 | 43 | -------------------------------------------------------------------------------- /src/prototype1/cloudsc_dwarf.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | PROGRAM CLOUDSC_DWARF 11 | 12 | USE PARKIND1 ,ONLY : JPIM 13 | use diag_mod ,ONLY : NUMOMP, NGPTOT, NPROMAS_IN 14 | 15 | implicit none 16 | 17 | #include "cloudsc_driver.intfb.h" 18 | 19 | CHARACTER(LEN=20) :: clarg 20 | INTEGER(KIND=JPIM) :: iargs, lenarg, jarg 21 | 22 | iargs = COMMAND_ARGUMENT_COUNT() 23 | NUMOMP = 1 24 | NGPTOT = 0 25 | 26 | if (iargs >= 1) then 27 | CALL GET_COMMAND_ARGUMENT(1, clarg, lenarg) 28 | read(clarg(1:lenarg),*) NUMOMP 29 | if (iargs >= 2) then 30 | CALL GET_COMMAND_ARGUMENT(2, clarg, lenarg) 31 | read(clarg(1:lenarg),*) NGPTOT 32 | if (iargs >= 3) then 33 | allocate(NPROMAS_IN(iargs-2)) 34 | do jarg=1,size(NPROMAS_IN) 35 | CALL GET_COMMAND_ARGUMENT(jarg+2, clarg, lenarg) 36 | read(clarg(1:lenarg),*) NPROMAS_IN(jarg) 37 | enddo 38 | endif 39 | endif 40 | endif 41 | 42 | CALL CLOUDSC_DRIVER 43 | 44 | END PROGRAM CLOUDSC_DWARF 45 | -------------------------------------------------------------------------------- /src/prototype1/include/abor1.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | SUBROUTINE ABOR1(CDTEXT) 12 | CHARACTER(LEN=*) :: CDTEXT 13 | END SUBROUTINE ABOR1 14 | END INTERFACE 15 | -------------------------------------------------------------------------------- /src/prototype1/include/cloud_layer.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | SUBROUTINE CLOUD_LAYER(& 12 | & KDIM, LDSLPHY, LDMAINCALL, PAUX, state, tendency_cml, tendency_tmp, tendency_dyn, tendency_vdf, PRAD,& 13 | & PSAVTENDSAT, PSURF, LLKEYS,& 14 | & AUXL, FLUX, PDIAG,& 15 | & tendency_loc) 16 | USE PARKIND1 ,ONLY : JPIM, JPRB 17 | USE YOMPHYDER ,ONLY : DIMENSION_TYPE, STATE_TYPE, AUX_TYPE,& 18 | & FLUX_TYPE, AUX_DIAG_LOCAL_TYPE, AUX_RAD_TYPE, KEYS_LOCAL_TYPE,& 19 | & SURF_AND_MORE_TYPE, AUX_DIAG_TYPE 20 | TYPE (DIMENSION_TYPE) , INTENT (IN) :: KDIM 21 | LOGICAL , INTENT (IN) :: LDSLPHY 22 | LOGICAL , INTENT (IN) :: LDMAINCALL 23 | TYPE (AUX_TYPE) , INTENT (IN) :: PAUX 24 | TYPE (STATE_TYPE) , INTENT (IN) :: state 25 | TYPE (STATE_TYPE) , INTENT (IN) :: tendency_cml 26 | TYPE (STATE_TYPE) , INTENT (IN) :: tendency_tmp 27 | TYPE (STATE_TYPE) , INTENT (IN) :: tendency_dyn 28 | TYPE (STATE_TYPE) , INTENT (IN) :: tendency_vdf 29 | TYPE (AUX_RAD_TYPE) , INTENT (IN) :: PRAD 30 | REAL(KIND=JPRB) , INTENT (IN) :: PSAVTENDSAT(KDIM%KLON,KDIM%KLEV) 31 | TYPE (SURF_AND_MORE_TYPE) , INTENT(INOUT) :: PSURF 32 | TYPE (KEYS_LOCAL_TYPE) , INTENT (IN) :: LLKEYS 33 | TYPE (AUX_DIAG_LOCAL_TYPE) , INTENT(INOUT) :: AUXL 34 | TYPE (FLUX_TYPE) , INTENT(INOUT) :: FLUX 35 | TYPE (AUX_DIAG_TYPE) , INTENT(INOUT) :: PDIAG 36 | TYPE (STATE_TYPE) , INTENT (OUT) :: tendency_loc 37 | END SUBROUTINE CLOUD_LAYER 38 | END INTERFACE 39 | -------------------------------------------------------------------------------- /src/prototype1/include/cloudsc_driver.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | SUBROUTINE CLOUDSC_DRIVER 12 | END SUBROUTINE CLOUDSC_DRIVER 13 | END INTERFACE 14 | -------------------------------------------------------------------------------- /src/prototype1/include/cuadjtq.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | SUBROUTINE CUADJTQ& 12 | & (KIDIA, KFDIA, KLON, KLEV, KK,& 13 | & PSP, PT, PQ, LDFLAG, KCALL) 14 | USE PARKIND1 ,ONLY : JPIM ,JPRB 15 | INTEGER(KIND=JPIM),INTENT(IN) :: KLON 16 | INTEGER(KIND=JPIM),INTENT(IN) :: KLEV 17 | INTEGER(KIND=JPIM),INTENT(IN) :: KIDIA 18 | INTEGER(KIND=JPIM),INTENT(IN) :: KFDIA 19 | INTEGER(KIND=JPIM),INTENT(IN) :: KK 20 | REAL(KIND=JPRB) ,INTENT(IN) :: PSP(KLON) 21 | REAL(KIND=JPRB) ,INTENT(INOUT) :: PT(KLON,KLEV) 22 | REAL(KIND=JPRB) ,INTENT(INOUT) :: PQ(KLON,KLEV) 23 | LOGICAL ,INTENT(IN) :: LDFLAG(KLON) 24 | INTEGER(KIND=JPIM),INTENT(IN) :: KCALL 25 | END SUBROUTINE CUADJTQ 26 | END INTERFACE 27 | -------------------------------------------------------------------------------- /src/prototype1/include/dotprod2.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | SUBROUTINE DOTPROD2(PGP1,PGP2,PPROD) 12 | USE PARKIND1 ,ONLY : JPIM, JPRB 13 | REAL(KIND=JPRB),INTENT(IN) :: PGP1(:,:,:) 14 | REAL(KIND=JPRB),INTENT(IN) :: PGP2(:,:,:) 15 | REAL(KIND=JPRB),INTENT(OUT) :: PPROD 16 | END SUBROUTINE DOTPROD2 17 | END INTERFACE 18 | -------------------------------------------------------------------------------- /src/prototype1/include/dotprod3.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | SUBROUTINE DOTPROD3(PGP1,PGP2,PPROD) 12 | USE PARKIND1 ,ONLY : JPIM, JPRB 13 | REAL(KIND=JPRB),INTENT(IN) :: PGP1(:,:,:,:) 14 | REAL(KIND=JPRB),INTENT(IN) :: PGP2(:,:,:,:) 15 | REAL(KIND=JPRB),INTENT(OUT) :: PPROD 16 | END SUBROUTINE DOTPROD3 17 | END INTERFACE 18 | -------------------------------------------------------------------------------- /src/prototype1/include/fccld.func.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | !* 11 | ! ------------------------------------------------------------------ 12 | ! This COMDECK defines functions to be used in the cloud scheme 13 | ! other than the standard saturation vapour pressure 14 | ! 15 | ! FKOOP modifies the ice saturation mixing ratio for homogeneous 16 | ! nucleation 17 | ! 18 | ! note: PTARE is temperature and is definited in frttre.h 19 | ! which MUST be included before this function block 20 | ! 21 | ! ********************************************** 22 | ! KOOP formula for homogeneous nucleation of ice 23 | ! ********************************************** 24 | ! 25 | ! INPUT : PTARE = TEMPERATURE 26 | REAL(KIND=JPRB) :: FOKOOP 27 | FOKOOP (PTARE) = MIN(RKOOP1-RKOOP2*PTARE,FOEELIQ(PTARE)/FOEEICE(PTARE)) 28 | -------------------------------------------------------------------------------- /src/prototype1/include/mycpu.intfb.h: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | INTERFACE 11 | INTEGER FUNCTION mycpu() bind(c) 12 | END FUNCTION mycpu 13 | END INTERFACE 14 | -------------------------------------------------------------------------------- /src/prototype1/support/abor1.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | SUBROUTINE ABOR1(CDTEXT) 11 | CHARACTER(LEN=*) CDTEXT 12 | WRITE(0,*) CDTEXT 13 | call abort() 14 | END SUBROUTINE ABOR1 15 | -------------------------------------------------------------------------------- /src/prototype1/support/diag_mod.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | module diag_mod 11 | USE PARKIND1 ,ONLY : JPIM 12 | implicit none 13 | save 14 | public 15 | 16 | INTEGER(KIND=JPIM) :: NUMOMP = 1 ! Number of OpenMP threads for this run 17 | INTEGER(KIND=JPIM) :: NGPTOT = 0 ! Number of grid points (as read from command line) 18 | 19 | INTEGER(KIND=JPIM) :: NPROMA = 0 ! NPROMA blocking factor (currently active) 20 | INTEGER(KIND=JPIM) :: NGPBLKS = 0 ! Number of NPROMA-blocks (currently active) 21 | 22 | INTEGER(KIND=JPIM), ALLOCATABLE :: NPROMAS_IN(:) ! NPROMAs as read from command line 23 | 24 | end module diag_mod 25 | -------------------------------------------------------------------------------- /src/prototype1/support/mycpu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 1988- ECMWF. 3 | * 4 | * This software is licensed under the terms of the Apache Licence Version 2.0 5 | * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 6 | * In applying this licence, ECMWF does not waive the privileges and immunities 7 | * granted to it by virtue of its status as an intergovernmental organisation 8 | * nor does it submit to any jurisdiction. 9 | */ 10 | 11 | #if defined(__APPLE__) 12 | static int sched_getcpu() { return 0; } 13 | #else 14 | #include 15 | #endif 16 | 17 | /* 18 | * Find the core the thread belongs to 19 | */ 20 | 21 | int mycpu_ () 22 | { 23 | /* int sched_getcpu(void); */ 24 | int cpu; 25 | #pragma clang diagnostic push 26 | #pragma clang diagnostic ignored "-Wimplicit-function-declaration" 27 | cpu = sched_getcpu(); 28 | #pragma clang diagnostic pop 29 | return cpu; 30 | } 31 | int mycpu() { return mycpu_(); } 32 | -------------------------------------------------------------------------------- /src/prototype1/support/parkind1.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | MODULE PARKIND1 11 | ! 12 | ! *** Define usual kinds for strong typing *** 13 | ! 14 | IMPLICIT NONE 15 | SAVE 16 | ! 17 | ! Integer Kinds 18 | ! ------------- 19 | ! 20 | INTEGER, PARAMETER :: JPIT = SELECTED_INT_KIND(2) 21 | INTEGER, PARAMETER :: JPIS = SELECTED_INT_KIND(4) 22 | INTEGER, PARAMETER :: JPIM = SELECTED_INT_KIND(9) 23 | INTEGER, PARAMETER :: JPIB = SELECTED_INT_KIND(12) 24 | 25 | !Special integer type to be used for sensative adress calculations 26 | !should be *8 for a machine with 8byte adressing for optimum performance 27 | #ifdef ADDRESS64 28 | INTEGER, PARAMETER :: JPIA = JPIB 29 | #else 30 | INTEGER, PARAMETER :: JPIA = JPIM 31 | #endif 32 | 33 | ! 34 | ! Real Kinds 35 | ! ---------- 36 | ! 37 | INTEGER, PARAMETER :: JPRT = SELECTED_REAL_KIND(2,1) 38 | INTEGER, PARAMETER :: JPRS = SELECTED_REAL_KIND(4,2) 39 | INTEGER, PARAMETER :: JPRM = SELECTED_REAL_KIND(6,37) 40 | #ifdef SINGLE 41 | INTEGER, PARAMETER :: JPRB = SELECTED_REAL_KIND(6,37) 42 | #else 43 | INTEGER, PARAMETER :: JPRB = SELECTED_REAL_KIND(13,300) 44 | #endif 45 | 46 | ! Double real for C code and special places requiring 47 | ! higher precision. 48 | INTEGER, PARAMETER :: JPRD = SELECTED_REAL_KIND(13,300) 49 | 50 | 51 | ! Logical Kinds for RTTOV.... 52 | 53 | INTEGER, PARAMETER :: JPLM = JPIM !Standard logical type 54 | 55 | END MODULE PARKIND1 56 | -------------------------------------------------------------------------------- /src/prototype1/support/routines.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | SUBROUTINE routines 11 | CHARACTER(LEN=*), PARAMETER :: CLPREFIX = 'ERROR: YOU SHOULD HAVE NEVER BE CALLING ROUTINE ' 12 | #include "abor1.intfb.h" 13 | ENTRY DOTPROD2 14 | CALL ABOR1(CLPREFIX//'DOTPROD2') 15 | RETURN 16 | ENTRY DOTPROD3 17 | CALL ABOR1(CLPREFIX//'DOTPROD3') 18 | RETURN 19 | ENTRY VDIV 20 | CALL ABOR1(CLPREFIX//'VDIV') 21 | RETURN 22 | ENTRY VEXP 23 | CALL ABOR1(CLPREFIX//'VEXP') 24 | RETURN 25 | ENTRY VREC 26 | CALL ABOR1(CLPREFIX//'VREC') 27 | RETURN 28 | ENTRY VPOW 29 | CALL ABOR1(CLPREFIX//'VPOW') 30 | RETURN 31 | END SUBROUTINE routines 32 | -------------------------------------------------------------------------------- /src/prototype1/support/timer_mod.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | module timer_mod 11 | USE PARKIND1 ,ONLY : JPIM ,JPRB, JPIB 12 | implicit none 13 | CONTAINS 14 | function ftimer() 15 | implicit none 16 | REAL(KIND=JPRB) :: ftimer 17 | INTEGER(KIND=JPIB) :: t, rate 18 | call system_clock(t,count_rate=rate) 19 | ftimer = real(t,kind(ftimer))/real(rate,kind(ftimer)) 20 | end function ftimer 21 | end module timer_mod 22 | -------------------------------------------------------------------------------- /src/prototype1/support/yomct3.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | MODULE YOMCT3 11 | 12 | USE PARKIND1 ,ONLY : JPIM 13 | 14 | IMPLICIT NONE 15 | 16 | SAVE 17 | 18 | ! ------------------------------------------------------------------ 19 | 20 | !* Control variables for the model (changed at level 3) 21 | 22 | ! NSTEP : current timestep of model 23 | INTEGER(KIND=JPIM) :: NSTEP 24 | 25 | ! ------------------------------------------------------------------ 26 | END MODULE YOMCT3 27 | -------------------------------------------------------------------------------- /src/prototype1/support/yomjfh.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | MODULE YOMJFH 11 | 12 | USE PARKIND1 ,ONLY : JPIM 13 | 14 | IMPLICIT NONE 15 | 16 | SAVE 17 | 18 | ! ------------------------------------------------------------ 19 | 20 | ! Use of MASS library 21 | ! N_VMASS: < or = 0 if not using MASS library vector routines 22 | ! > 0 if using MASS library vector routines 23 | 24 | INTEGER(KIND=JPIM) :: N_VMASS=0 25 | 26 | ! ----------------------------------------------------------------- 27 | 28 | END MODULE YOMJFH 29 | -------------------------------------------------------------------------------- /src/prototype1/support/yomlun_ifsaux.F90: -------------------------------------------------------------------------------- 1 | ! (C) Copyright 1988- ECMWF. 2 | ! 3 | ! This software is licensed under the terms of the Apache Licence Version 2.0 4 | ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 5 | ! 6 | ! In applying this licence, ECMWF does not waive the privileges and immunities 7 | ! granted to it by virtue of its status as an intergovernmental organisation 8 | ! nor does it submit to any jurisdiction. 9 | 10 | MODULE YOMLUN_IFSAUX 11 | 12 | USE PARKIND1 ,ONLY : JPIM 13 | 14 | IMPLICIT NONE 15 | 16 | SAVE 17 | 18 | ! ------------------------------------------------------------------ 19 | 20 | !* Logical units used by code 21 | 22 | ! NULOUT : output unit 23 | ! NULERR : unit number for comparison with reference run 24 | 25 | INTEGER(KIND=JPIM) :: NULOUT = 6 26 | INTEGER(KIND=JPIM) :: NULERR = 0 27 | 28 | ! ------------------------------------------------------------------ 29 | END MODULE YOMLUN_IFSAUX 30 | --------------------------------------------------------------------------------