From 145c1301cbc5552b122fbe25654269232d330699 Mon Sep 17 00:00:00 2001 From: Ruth Geen Date: Fri, 15 May 2020 16:22:47 +0100 Subject: [PATCH 1/2] Print a warning if the isca python installation used is inconsistent with the GFDL_BASE directory --- src/extra/python/isca/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/extra/python/isca/__init__.py b/src/extra/python/isca/__init__.py index 5bf28c1a9..f5f3f7b52 100644 --- a/src/extra/python/isca/__init__.py +++ b/src/extra/python/isca/__init__.py @@ -13,6 +13,9 @@ log.error('Environment variables GFDL_BASE, GFDL_WORK, GFDL_DATA must be set') raise ValueError('Environment variables GFDL_BASE, GFDL_WORK, GFDL_DATA must be set') +if not GFDL_BASE in _module_directory: + log.warning('Warning: Isca python module version used is located in "%s" but GFDL_BASE is "%s"' % (_module_directory, GFDL_BASE)) + # GFDL_ENV: The environment on which the model is being run. # Primarily, this determines which compilers and libraries are to be used # to compile the code. From 25f39aca400721d8099520c6371713fb8906fc34 Mon Sep 17 00:00:00 2001 From: Ruth Geen Date: Mon, 18 May 2020 16:23:19 +0100 Subject: [PATCH 2/2] Add detail to error message --- src/extra/python/isca/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extra/python/isca/__init__.py b/src/extra/python/isca/__init__.py index f5f3f7b52..4270f47c2 100644 --- a/src/extra/python/isca/__init__.py +++ b/src/extra/python/isca/__init__.py @@ -14,7 +14,7 @@ raise ValueError('Environment variables GFDL_BASE, GFDL_WORK, GFDL_DATA must be set') if not GFDL_BASE in _module_directory: - log.warning('Warning: Isca python module version used is located in "%s" but GFDL_BASE is "%s"' % (_module_directory, GFDL_BASE)) + log.warning('Warning: Isca python module version used is located in "%s" but GFDL_BASE is "%s". This may cause conflicts/compilation failure if the CodeBase is updated.' % (_module_directory, GFDL_BASE)) # GFDL_ENV: The environment on which the model is being run. # Primarily, this determines which compilers and libraries are to be used