From 2077aa809a815783d77afd3c2b773ff6ffe6544a Mon Sep 17 00:00:00 2001 From: Sebastian Achilles Date: Thu, 27 Oct 2022 16:26:25 +0200 Subject: [PATCH 1/2] use gfortran for -g77 in NVHPC --- easybuild/easyblocks/n/nvhpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyblocks/n/nvhpc.py b/easybuild/easyblocks/n/nvhpc.py index eabb8f0600..b0216c5700 100644 --- a/easybuild/easyblocks/n/nvhpc.py +++ b/easybuild/easyblocks/n/nvhpc.py @@ -164,7 +164,7 @@ def install_step(self): line = re.sub(r"^PATH=/", r"#PATH=/", line) sys.stdout.write(line) - cmd = "%s -x %s -g77 /" % (makelocalrc_filename, compilers_subdir) + cmd = "%s -x %s -g77 gfortran" % (makelocalrc_filename, compilers_subdir) run_cmd(cmd, log_all=True, simple=True) # If an OS libnuma is NOT found, makelocalrc creates symbolic links to libpgnuma.so From cf9f565d89ee60642c0515665349be1aff9b339c Mon Sep 17 00:00:00 2001 From: Sebastian Achilles Date: Tue, 17 Jan 2023 20:37:03 +0100 Subject: [PATCH 2/2] do not use -g77 option when installing NVHPC 22.9+ --- easybuild/easyblocks/n/nvhpc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/n/nvhpc.py b/easybuild/easyblocks/n/nvhpc.py index 761fb1e468..b9b27cb009 100644 --- a/easybuild/easyblocks/n/nvhpc.py +++ b/easybuild/easyblocks/n/nvhpc.py @@ -164,7 +164,10 @@ def install_step(self): line = re.sub(r"^PATH=/", r"#PATH=/", line) sys.stdout.write(line) - cmd = "%s -x %s -g77 gfortran" % (makelocalrc_filename, compilers_subdir) + if LooseVersion(self.version) >= LooseVersion('22.9'): + cmd = "%s -x %s" % (makelocalrc_filename, compilers_subdir) + else: + cmd = "%s -x %s -g77 /" % (makelocalrc_filename, compilers_subdir) run_cmd(cmd, log_all=True, simple=True) # If an OS libnuma is NOT found, makelocalrc creates symbolic links to libpgnuma.so