From 847bcfa89c4fab074f23e3c27c5a7c80b8865d7d Mon Sep 17 00:00:00 2001 From: Dana Singh <115384427+singhd789@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:36:05 -0400 Subject: [PATCH 1/2] Fix LD_LIBRARY_PATH env. var. name --- fre/make/gfdlfremake/buildDocker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fre/make/gfdlfremake/buildDocker.py b/fre/make/gfdlfremake/buildDocker.py index 15b77476..6d33d0d2 100644 --- a/fre/make/gfdlfremake/buildDocker.py +++ b/fre/make/gfdlfremake/buildDocker.py @@ -154,7 +154,7 @@ def writeRunscript(self,RUNenv,containerRun,runOnDisk): """ #create runscript in tmp - create spack environment, install necessary packages, self.createscript = ["#!/bin/bash \n", - "export BACKUP_LD_LIBRARY_PATH=$LD_LIBRARY\n", + "export BACKUP_LD_LIBRARY_PATH=$LD_LIBRARY_PATH\n", "# Set up spack loads\n", RUNenv[0]+"\n"] with open(runOnDisk,"w") as f: From be0192248f33afaf501a2b11980314d8fec1e058 Mon Sep 17 00:00:00 2001 From: Dana Singh Date: Fri, 25 Oct 2024 15:41:19 -0400 Subject: [PATCH 2/2] #212 Make compile and checkout scripts executable - make scripts executable after creating - moved `chmod` lines earlier in scripts --- fre/make/gfdlfremake/buildBaremetal.py | 4 +++- fre/make/gfdlfremake/checkout.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fre/make/gfdlfremake/buildBaremetal.py b/fre/make/gfdlfremake/buildBaremetal.py index f0279a11..fdb4e2d8 100644 --- a/fre/make/gfdlfremake/buildBaremetal.py +++ b/fre/make/gfdlfremake/buildBaremetal.py @@ -110,6 +110,9 @@ def writeScript(self): self.f.write(self.make+"\n") self.f.close() + # Make compile script executable + os.chmod(self.bld+"/compile.sh", 0o744) + ## TODO run as a batch job on the login cluster def run(self): """ @@ -118,7 +121,6 @@ def run(self): - self : The dockerfile object """ ###### TODO make the Makefile - os.chmod(self.bld+"/compile.sh", 0o744) command = [self.bld+"/compile.sh","|","tee",self.bld+"/log.compile"] try: subprocess.run(args=command, check=True) diff --git a/fre/make/gfdlfremake/checkout.py b/fre/make/gfdlfremake/checkout.py index 3a1ffa9b..4e4c905c 100644 --- a/fre/make/gfdlfremake/checkout.py +++ b/fre/make/gfdlfremake/checkout.py @@ -108,6 +108,9 @@ def finish (self,pc): else: self.checkoutScript.close() + # Make checkout script executable + os.chmod(self.src+"/"+self.fname, 0o744) + ## TODO: batch script building def run (self): """ @@ -115,7 +118,6 @@ def run (self): Param: - self The checkout script object """ - os.chmod(self.src+"/"+self.fname, 0o744) try: subprocess.run(args=[self.src+"/"+self.fname], check=True) except: