From 68026ddd2105dc98f2d4e53ae7af0dce686042d3 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Wed, 22 Nov 2023 08:17:15 +0000 Subject: [PATCH] Loki: Update loki config files to new format --- src/ecwam/ecwam_loki.config | 62 +++++++++++++++++++---------- src/ecwam/ecwam_loki_gpu.config | 69 ++++++++++++++++++++++----------- 2 files changed, 88 insertions(+), 43 deletions(-) diff --git a/src/ecwam/ecwam_loki.config b/src/ecwam/ecwam_loki.config index a6a0a40bf..fd95a55b2 100644 --- a/src/ecwam/ecwam_loki.config +++ b/src/ecwam/ecwam_loki.config @@ -3,30 +3,50 @@ mode = "idem" role = "kernel" expand = true strict = true -disable = ["DR_HOOK", "lhook", "jphook", "omp_get_wtime", "flush", "jwim", "jwrb", "jwru", "jwro", "environment", "frequency", "forcing_fields", "intgt_param_fields", "wave2ocean", "abort1", "iu06"] +disable = [ + "DR_HOOK", "lhook", "jphook", "omp_get_wtime", "flush", "jwim", + "jwrb", "jwru", "jwro", "environment", "frequency", + "forcing_fields", "intgt_param_fields", "wave2ocean", "abort1", + "iu06" +] utility_routines = ['dr_hook', 'abort1', 'write(iu06'] enable_imports = false -[[routine]] -name = "wamintgr" -role = "driver" -expand = true -disable = ["PROPAG_WAM", "NEWWIND", "GSTATS", "FREQUENCY_FIELD%INIT", "ENVIRONMENT_FIELD%INIT", "FORCING_FIELDS_FIELD%INIT", "WAVE2OCEAN_FIELD%INIT", "INTGT_PARAM_FIELDS_FIELD%INIT", "FREQUENCY_FIELD%UPDATE_VIEW", "ENVIRONMENT_FIELD%UPDATE_VIEW", "FORCING_FIELDS_FIELD%UPDATE_VIEW", "WAVE2OCEAN_FIELD%UPDATE_VIEW", "INTGT_PARAM_FIELDS_FIELD%UPDATE_VIEW", "SOURCE_CONTRIBS_FIELD%INIT", "SOURCE_CONTRIBS_FIELD%UPDATE_VIEW", "INCDATE", "DR_HOOK", "omp_get_wtime", "abort1", "wam_user_clock", "FREQUENCY_FIELD%FINAL", "ENVIRONMENT_FIELD%FINAL", "FORCING_FIELDS_FIELD%FINAL", "WAVE2OCEAN_FIELD%FINAL", "INTGT_PARAM_FIELDS_FIELD%FINAL", "SOURCE_CONTRIBS_FIELD%INIT", "SOURCE_CONTRIBS_FIELD%FINAL"] -real_kind = 'JWRB' +# Define entry point for call-tree transformation +[routines] -[[dimension]] -name = "horizontal" -size = "KIJL" -index = "IJ" -bounds = ["KIJS", "KIJL"] -aliases = ["NPROMA_WAM"] +[routines.wamintgr] + role = "driver" + expand = true + disable = [ + "PROPAG_WAM", "NEWWIND", "GSTATS", "FREQUENCY_FIELD%INIT", + "ENVIRONMENT_FIELD%INIT", "FORCING_FIELDS_FIELD%INIT", + "WAVE2OCEAN_FIELD%INIT", "INTGT_PARAM_FIELDS_FIELD%INIT", + "FREQUENCY_FIELD%UPDATE_VIEW", "ENVIRONMENT_FIELD%UPDATE_VIEW", + "FORCING_FIELDS_FIELD%UPDATE_VIEW", "WAVE2OCEAN_FIELD%UPDATE_VIEW", + "INTGT_PARAM_FIELDS_FIELD%UPDATE_VIEW", + "SOURCE_CONTRIBS_FIELD%INIT", "SOURCE_CONTRIBS_FIELD%UPDATE_VIEW", + "INCDATE", "DR_HOOK", "omp_get_wtime", "abort1", "wam_user_clock", + "FREQUENCY_FIELD%FINAL", "ENVIRONMENT_FIELD%FINAL", + "FORCING_FIELDS_FIELD%FINAL", "WAVE2OCEAN_FIELD%FINAL", + "INTGT_PARAM_FIELDS_FIELD%FINAL", "SOURCE_CONTRIBS_FIELD%INIT", + "SOURCE_CONTRIBS_FIELD%FINAL" + ] + real_kind = 'JWRB' -[[dimension]] -name = "vertical" -size = "NFRE" -index = "M" +# Define indices and bounds for array dimensions +[dimensions] -[[dimension]] -name = "block_dim" -size = "NCHNK" -index = "ICHNK" +[dimensions.horizontal] + size = "KIJL" + index = "IJ" + bounds = ["KIJS", "KIJL"] + aliases = ["NPROMA_WAM"] + +[dimensions.vertical] + size = "NFRE" + index = "M" + +[dimensions.block_dim] + size = "NCHNK" + index = "ICHNK" diff --git a/src/ecwam/ecwam_loki_gpu.config b/src/ecwam/ecwam_loki_gpu.config index 819b27bcc..302bf9685 100644 --- a/src/ecwam/ecwam_loki_gpu.config +++ b/src/ecwam/ecwam_loki_gpu.config @@ -3,31 +3,56 @@ mode = "idem" role = "kernel" expand = true strict = true -disable = ["DR_HOOK", "lhook", "jphook", "omp_get_wtime", "flush", "jwim", "jwrb", "jwru", "jwro", "environment", "frequency", "forcing_fields", "intgt_param_fields", "wave2ocean", "abort1", "iu06"] +disable = [ + "DR_HOOK", "lhook", "jphook", "omp_get_wtime", "flush", "jwim", + "jwrb", "jwru", "jwro", "environment", "frequency", + "forcing_fields", "intgt_param_fields", "wave2ocean", "abort1", + "iu06" +] utility_routines = ['dr_hook', 'abort1', 'write(iu06'] enable_imports = true -[[routine]] -name = "wamintgr_loki_gpu" -role = "driver" -expand = true -disable = ["PROPAG_WAM", "NEWWIND", "GSTATS", "FREQUENCY_FIELD%INIT", "ENVIRONMENT_FIELD%INIT", "FORCING_FIELDS_FIELD%INIT", "WAVE2OCEAN_FIELD%INIT", "INTGT_PARAM_FIELDS_FIELD%INIT", "FREQUENCY_FIELD%UPDATE_DEVICE", "ENVIRONMENT_FIELD%UPDATE_DEVICE", "FORCING_FIELDS_FIELD%UPDATE_DEVICE", "WAVE2OCEAN_FIELD%UPDATE_DEVICE", "INTGT_PARAM_FIELDS_FIELD%UPDATE_DEVICE", "SOURCE_CONTRIBS_FIELD%INIT", "SOURCE_CONTRIBS_FIELD%UPDATE_DEVICE", "INCDATE", "DR_HOOK", "omp_get_wtime", "abort1", "wam_user_clock", "FREQUENCY_FIELD%ENSURE_HOST", "ENVIRONMENT_FIELD%ENSURE_HOST", "FORCING_FIELDS_FIELD%ENSURE_HOST", "WAVE2OCEAN_FIELD%ENSURE_HOST", "INTGT_PARAM_FIELDS_FIELD%ENSURE_HOST", "SOURCE_CONTRIBS_FIELD%INIT", "SOURCE_CONTRIBS_FIELD%ENSURE_HOST", "FREQUENCY_FIELD%FINAL", "ENVIRONMENT_FIELD%FINAL", "FORCING_FIELDS_FIELD%FINAL", "WAVE2OCEAN_FIELD%FINAL", "INTGT_PARAM_FIELDS_FIELD%FINAL", "SOURCE_CONTRIBS_FIELD%INIT", "SOURCE_CONTRIBS_FIELD%FINAL"] -enable_imports = false -real_kind = 'JWRB' +# Define entry point for call-tree transformation +[routines] -[[dimension]] -name = "horizontal" -size = "KIJL" -index = "IJ" -bounds = ["KIJS", "KIJL"] -aliases = ["NPROMA_WAM"] +[routines.wamintgr_loki_gpu] + role = "driver" + expand = true + disable = [ + "PROPAG_WAM", "NEWWIND", "GSTATS", "FREQUENCY_FIELD%INIT", + "ENVIRONMENT_FIELD%INIT", "FORCING_FIELDS_FIELD%INIT", + "WAVE2OCEAN_FIELD%INIT", "INTGT_PARAM_FIELDS_FIELD%INIT", + "FREQUENCY_FIELD%UPDATE_DEVICE", "ENVIRONMENT_FIELD%UPDATE_DEVICE", + "FORCING_FIELDS_FIELD%UPDATE_DEVICE", + "WAVE2OCEAN_FIELD%UPDATE_DEVICE", + "INTGT_PARAM_FIELDS_FIELD%UPDATE_DEVICE", + "SOURCE_CONTRIBS_FIELD%INIT", "SOURCE_CONTRIBS_FIELD%UPDATE_DEVICE", + "INCDATE", "DR_HOOK", "omp_get_wtime", "abort1", "wam_user_clock", + "FREQUENCY_FIELD%ENSURE_HOST", "ENVIRONMENT_FIELD%ENSURE_HOST", + "FORCING_FIELDS_FIELD%ENSURE_HOST", "WAVE2OCEAN_FIELD%ENSURE_HOST", + "INTGT_PARAM_FIELDS_FIELD%ENSURE_HOST", + "SOURCE_CONTRIBS_FIELD%INIT", "SOURCE_CONTRIBS_FIELD%ENSURE_HOST", + "FREQUENCY_FIELD%FINAL", "ENVIRONMENT_FIELD%FINAL", + "FORCING_FIELDS_FIELD%FINAL", "WAVE2OCEAN_FIELD%FINAL", + "INTGT_PARAM_FIELDS_FIELD%FINAL", "SOURCE_CONTRIBS_FIELD%INIT", + "SOURCE_CONTRIBS_FIELD%FINAL" + ] + enable_imports = false + real_kind = 'JWRB' -[[dimension]] -name = "vertical" -size = "NFRE" -index = "M" +# Define indices and bounds for array dimensions +[dimensions] -[[dimension]] -name = "block_dim" -size = "NCHNK" -index = "ICHNK" +[dimensions.horizontal] + size = "KIJL" + index = "IJ" + bounds = ["KIJS", "KIJL"] + aliases = ["NPROMA_WAM"] + +[dimensions.vertical] + size = "NFRE" + index = "M" + +[dimensions.block_dim] + size = "NCHNK" + index = "ICHNK"