From dbd4c52f51117efb37701c4d5638c728f62a71cf Mon Sep 17 00:00:00 2001 From: Jonas Jucker Date: Tue, 16 Jul 2024 09:12:56 +0200 Subject: [PATCH 1/7] FIX: only append _out_of_source to logfile if really out-of-source --- test/system_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/system_test.py b/test/system_test.py index ba9e77e4f1..48e5e7402d 100644 --- a/test/system_test.py +++ b/test/system_test.py @@ -181,14 +181,16 @@ def icon_env_test(spack_env: str, out_of_source: bool = False): check=True, shell=True) + log_filename = sanitized_filename(spack_env) + if out_of_source: build_dir = os.path.join(unique_folder, 'build') os.makedirs(build_dir, exist_ok=True) shutil.copytree(os.path.join(unique_folder, 'config'), os.path.join(build_dir, 'config')) unique_folder = build_dir + log_filename += '_out_of_source' - log_filename = sanitized_filename(spack_env) + '_out_of_source' log_with_spack('spack install -n -v', 'system_test', log_filename, From 1ab704cd88981bbd437e19a1ac758130f1ec5509 Mon Sep 17 00:00:00 2001 From: Jonas Jucker Date: Tue, 16 Jul 2024 14:35:08 +0200 Subject: [PATCH 2/7] only use srun on Daint and Tsa --- src/spack_commands.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/spack_commands.py b/src/spack_commands.py index 12e347c46e..82e27ee907 100644 --- a/src/spack_commands.py +++ b/src/spack_commands.py @@ -31,9 +31,8 @@ def log_with_spack(command: str, if uenv: spack_env += ' /user-environment' - # Only use srun as Jenkins user and not on balfrin - use_srun = allow_srun and getpass.getuser() == 'jenkins' and machine_name( - ) != 'balfrin' + # Only use srun as Jenkins user and on machines where it is available + use_srun = allow_srun and getpass.getuser() == 'jenkins' and machine_name() in ['daint', 'tsa'] uenv_args = '' if uenv: From eb2c4f0b115ae9fa67a83839cc037abe19848480 Mon Sep 17 00:00:00 2001 From: Jonas Jucker Date: Tue, 16 Jul 2024 14:35:57 +0200 Subject: [PATCH 3/7] cleanup --- src/spack_commands.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/spack_commands.py b/src/spack_commands.py index 82e27ee907..8ad7013b43 100644 --- a/src/spack_commands.py +++ b/src/spack_commands.py @@ -47,7 +47,6 @@ def log_with_spack(command: str, # The '-c' argument should be in sync with # sysconfig//config.yaml config:build_jobs for max efficiency - # No entry for balfrin, trigger and error instead if requested to run with srun srun = { 'daint': 'srun -t 02:00:00 -C gpu -A g110 -c 12 -n 1', 'tsa': 'srun -t 02:00:00 -c 6', From 5a4e7180e62d72440e0b82914834931efff0d30b Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 16 Jul 2024 12:36:38 +0000 Subject: [PATCH 4/7] GitHub Action: Apply Pep8-formatting --- src/spack_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spack_commands.py b/src/spack_commands.py index 8ad7013b43..73efaa080c 100644 --- a/src/spack_commands.py +++ b/src/spack_commands.py @@ -32,7 +32,8 @@ def log_with_spack(command: str, spack_env += ' /user-environment' # Only use srun as Jenkins user and on machines where it is available - use_srun = allow_srun and getpass.getuser() == 'jenkins' and machine_name() in ['daint', 'tsa'] + use_srun = allow_srun and getpass.getuser() == 'jenkins' and machine_name( + ) in ['daint', 'tsa'] uenv_args = '' if uenv: From 9d22c172a08682569c9d6095cfd3fcf6417dca3a Mon Sep 17 00:00:00 2001 From: Jonas Jucker Date: Thu, 18 Jul 2024 11:23:06 +0200 Subject: [PATCH 5/7] separate cache as well --- setup-env.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup-env.sh b/setup-env.sh index aec1f4530e..dbfc7fb5ba 100755 --- a/setup-env.sh +++ b/setup-env.sh @@ -11,12 +11,13 @@ fi if [[ ${machine:0:1} == "/" ]]; then export SPACK_SYSTEM_CONFIG_PATH="$machine"/config export SPACK_USER_CONFIG_PATH="$parent_dir"/sysconfigs/uenv + export SPACK_USER_CACHE_PATH="$parent_dir"/user-cache/uenv else export SPACK_SYSTEM_CONFIG_PATH="$parent_dir"/sysconfigs/"$machine" export SPACK_USER_CONFIG_PATH="$parent_dir"/user-config + export SPACK_USER_CACHE_PATH="$parent_dir"/user-cache/"$machine" fi -export SPACK_USER_CACHE_PATH="$parent_dir"/user-cache . "$parent_dir"/spack/share/spack/setup-env.sh From 292dc7b1a0b6ada965d1b45de2d5d414e0f06bfd Mon Sep 17 00:00:00 2001 From: Jonas Jucker Date: Thu, 18 Jul 2024 12:10:36 +0200 Subject: [PATCH 6/7] remove uenv-test with Python --- test/system_test.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test/system_test.py b/test/system_test.py index 48e5e7402d..f845dc32f5 100644 --- a/test/system_test.py +++ b/test/system_test.py @@ -330,13 +330,6 @@ def test_py_black_install_default(devirt_env): spack_install('py-black') -@pytest.mark.no_tsa # No uenv on Tsa -@pytest.mark.no_daint # No uenv on Daint -@pytest.mark.py_black -def test_install_py_black_default_uenv(devirt_env): - spack_install('py-black', uenv=PREPOST) - - @pytest.mark.py_boltons def test_py_boltons_install_default(devirt_env): spack_install('py-boltons') From b5ddb2acb7234f5e1eee5f6bf40a7b6bc2cd153b Mon Sep 17 00:00:00 2001 From: Jonas Jucker Date: Thu, 18 Jul 2024 13:23:53 +0200 Subject: [PATCH 7/7] deactivate uenv tests --- test/system_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/system_test.py b/test/system_test.py index f845dc32f5..329f292629 100644 --- a/test/system_test.py +++ b/test/system_test.py @@ -76,6 +76,7 @@ def test_install_libfyaml_default(): @pytest.mark.no_tsa # No uenv on Tsa @pytest.mark.no_daint # No uenv on Daint +@pytest.mark.no_balfrin # Does not work as expected @pytest.mark.libfyaml def test_install_libfyaml_default_uenv(): spack_install('libfyaml', test_root=False, uenv=PREPOST)