diff --git a/cfg/clifton/cmake.profile b/cfg/clifton/cmake.profile new file mode 100644 index 0000000000000000000000000000000000000000..91ac9e5d2144bc5532ef934ee557ef6fa70ec4d7 --- /dev/null +++ b/cfg/clifton/cmake.profile @@ -0,0 +1 @@ +add2env PATH "/opt/cmake/bin" front diff --git a/cfg/spring/gmsh.profile b/cfg/spring/gmsh.profile new file mode 100644 index 0000000000000000000000000000000000000000..412f3fcb47cd01cfd224b34e5ac684e0516fecd4 --- /dev/null +++ b/cfg/spring/gmsh.profile @@ -0,0 +1,3 @@ +add2env PATH "/opt/gmsh/bin" front +add2env LD_LIBRARY_PATH "/opt/gmsh/lib" +add2env PYTHONPATH "/opt/gmsh/lib" diff --git a/cfg/spring/matlab.profile b/cfg/spring/matlab.profile new file mode 100644 index 0000000000000000000000000000000000000000..0ff358894261fe6d720b2ad0368687cf5a7ce5f1 --- /dev/null +++ b/cfg/spring/matlab.profile @@ -0,0 +1 @@ +add2env PATH "/opt/matlab/bin" diff --git a/cfg/spring/mumps.profile b/cfg/spring/mumps.profile new file mode 100644 index 0000000000000000000000000000000000000000..57e0adabd33cd60503f6133f2c8fa4acd4e77105 --- /dev/null +++ b/cfg/spring/mumps.profile @@ -0,0 +1,3 @@ +add2env LD_LIBRARY_PATH "/opt/mumps/lib" +add2env LIB "/opt/mumps/lib" +add2env INCLUDE "/opt/mumps/include" diff --git a/cfg/spring/oneApi.bashrc b/cfg/spring/oneApi.bashrc new file mode 100644 index 0000000000000000000000000000000000000000..b87d57ad00fd18bb47079ec45e0c325bcc1d73ff --- /dev/null +++ b/cfg/spring/oneApi.bashrc @@ -0,0 +1,15 @@ +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") + +if [ -d /opt/intel ] ; then + #. /opt/intel/oneapi/setvars.sh intel64 + # since last update of one api latest -> 2022.2.0 (not complete) + . /opt/intel/oneapi/tbb/latest/env/vars.sh intel64 + . /opt/intel/oneapi/mkl/latest/env/vars.sh intel64 + . /opt/intel/oneapi/compiler/latest/env/vars.sh intel64 + #. /opt/intel/oneapi/tbb/2021.6.0/env/vars.sh intel64 + #. /opt/intel/oneapi/mkl/2022.1.0/env/vars.sh intel64 + #. /opt/intel/oneapi/compiler/2022.1.0/env/vars.sh intel64 + +fi diff --git a/cfg/spring/oneApi.profile b/cfg/spring/oneApi.profile new file mode 100644 index 0000000000000000000000000000000000000000..a3b39398ee7ab4a2a72182bd6a379ce039b77ce6 --- /dev/null +++ b/cfg/spring/oneApi.profile @@ -0,0 +1,11 @@ +# Intel compiler and/or TBB/MKL +# +# EXPLANATIONS [RB]: (see "cfg/garfield/compilers.*") + +if [ -d /opt/intel ] ; then + #. /opt/intel/oneapi/setvars.sh intel64 + . /opt/intel/oneapi/tbb/latest/env/vars.sh intel64 + . /opt/intel/oneapi/mkl/latest/env/vars.sh intel64 + . /opt/intel/oneapi/compiler/latest/env/vars.sh intel64 + +fi diff --git a/cfg/spring/parasolid.profile b/cfg/spring/parasolid.profile new file mode 100644 index 0000000000000000000000000000000000000000..274a996eb48d830daf85b035b511c8f37e9ca6ff --- /dev/null +++ b/cfg/spring/parasolid.profile @@ -0,0 +1,5 @@ +# Parasolid + +add2env PATH "/opt/parasolid/shared_object" +add2env INCLUDE "/opt/parasolid" +export P_SCHEMA=/opt/parasolid/schema diff --git a/cfg/spring/samcef.profile b/cfg/spring/samcef.profile new file mode 100644 index 0000000000000000000000000000000000000000..834343ee4c4dcc979289fc859455636e016269dc --- /dev/null +++ b/cfg/spring/samcef.profile @@ -0,0 +1,2 @@ +export SAM_ZONE=200000000 +add2env PATH "/opt/samcef" diff --git a/cfg/vaillant/cmake.profile b/cfg/vaillant/cmake.profile new file mode 100644 index 0000000000000000000000000000000000000000..a3447db47ab8e1d4624653c728f82215be82bb88 --- /dev/null +++ b/cfg/vaillant/cmake.profile @@ -0,0 +1,2 @@ +# +add2env PATH "/opt/cmake/bin" front diff --git a/parametricJob.py b/parametricJob.py index 616d0badbff4a049eb1dd7186c145871912d364a..2f19121a67565f9a689f32dac9f681cafa661413 100644 --- a/parametricJob.py +++ b/parametricJob.py @@ -4,7 +4,7 @@ #from future import standard_library #standard_library.install_aliases() import sys, os, os.path, shutil, socket, platform, glob, fnmatch -import datetime, tarfile, subprocess, string +import datetime, tarfile, subprocess, string, re from prmClasses import * # -- Base Class ---------------------------------------------------------------- @@ -35,7 +35,6 @@ class ParametricJob(PRMSet): return niceCmd def getMailData(self): - import re fromAddr = "%s@%s" % (os.path.basename(sys.argv[0]), socket.gethostbyaddr(socket.gethostname())[0]) toAddr = self.pars['MAIL_ADDR'].val if re.match('(.+)@(.+)',toAddr): @@ -166,7 +165,6 @@ class ParametricJob(PRMSet): return cfgfile def hasSysCmd(self, cmd): - import subprocess status, result = subprocess.getstatusoutput("which %s" % cmd) return status==0 @@ -269,7 +267,6 @@ class ParametricJob(PRMSet): # get guess profile cfgfile = self.guessProfile() cfgFileName, cfgFileExtension = os.path.splitext(self.cfgfile) - import re m = re.compile(cfgFileName+'([0-9]+)\\'+cfgFileExtension) #print (cfgFileName+'([0-9]+)\\'+cfgFileExtension) launchId = 0 @@ -297,7 +294,7 @@ class ParametricJob(PRMSet): #file.write("echo \"at JobId = $jobId\"\n") #file.write('%s -x -i $jobId -d "%s"\n' % (sys.argv[0], os.getcwd()) ) script = re.sub(r'(.+)Gui.pyw',r'\1.py', sys.argv[0]) #if launched through a Gui => use the basic script instead in batch - file.write('%s -x -i %d -d "%s"\n' % (script, launchId, os.getcwd()) ) + file.write('setsid %s -x -i %d -d "%s"\n' % (script, launchId, os.getcwd()) ) # setsid added to generate a new process group (used to easily kill process tree), else the process group is the same as atd daemon (=> killScript kill all at process running) file.close() os.chmod(scriptname,0o700) @@ -312,14 +309,12 @@ class ParametricJob(PRMSet): #shcmd="at now + 1 minutes -f %s" % (scriptname) #shcmd="at now %s" % scriptname print("shcmd = ", shcmd) - import subprocess status, result = subprocess.getstatusoutput(shcmd) if status!=0: print("Job submission FAILED!") else: print("Submission SUCCESSFUL!") #print "result = ", result - import re m = re.search('job ([0-9]+)',result) batchId = m.group(1) #print m.group @@ -402,14 +397,12 @@ class ParametricJob(PRMSet): # send to sge print("sending job '%s' to SGE" % jobname) shcmd="qsub ./%s" % scriptname - import subprocess status, result = subprocess.getstatusoutput(shcmd) print(result) if status!=0: print("Job submission FAILED!") else: print("Submission SUCCESSFUL!") - import re m = re.compile('Your job ([0-9]+)').match(result) sgeId = m.group(1) if m: @@ -498,14 +491,12 @@ class ParametricJob(PRMSet): # send to slurm print("sending job '%s' to Slurm" % jobname) shcmd="sbatch ./%s" % scriptname - import subprocess status, result = subprocess.getstatusoutput(shcmd) print(result) if status!=0: print("Job submission FAILED!") else: print("Submission SUCCESSFUL!") - import re m = re.compile('Submitted batch job ([0-9]+)').match(result) slurmId = m.group(1) if m: @@ -628,7 +619,6 @@ class ParametricJob(PRMSet): # send to PBS print('sending job "%s" to PBS' % jobname) shcmd='qsub ./%s' % scriptname - import subprocess status, result = subprocess.getstatusoutput(shcmd) print('command status = ', status) print('command result = ', result) @@ -644,23 +634,6 @@ class ParametricJob(PRMSet): self.PBSCancelScript(PbsId) print("\tuse ' qstat -f %s ' to check the status of the PBS scheduling queue of your job" % PbsId) print("\tuse ' qdel %s ' to kill your job" % PbsId) - ''' - #import re - #m = re.compile('waiting for job ([0-9]+) to start').match(result) - #result : 3067709.frontal2 - #m = re.compile('([0-9]+)\.(.+)').match(result) - #print "m = ", m - #PbsId = m.group(1) - if m: - cfgFileName, cfgFileExtension = os.path.splitext(self.cfgfile) - os.system("cp %s %s%s%s"%(self.cfgfile, cfgFileName, PbsId, cfgFileExtension)) - self.PBSCancelScript(PbsId) - print "\tuse ' qstat -f %s ' to check the status of the PBS scheduling queue of your job" % PbsId - #print "\tuse ' sprio -l -j %s ' to check the factor priority of your job" % PbsId - #print "\tuse ' sstat -a --format=JobID,NTasks,MaxRSS,MaxVMSize -j %s ' to get information about your running job (adapt format to your needs)" % PbsId - print "\tuse ' qdel %s ' to kill your job" % PbsId - #print "\tuse ' sacct --format=JobID,NTasks,NCPUS,CPUTime,Elapsed,MaxRSS,MaxVMSize -j %s ' to get information about your finished job (adapt format to your needs)" % PbsId - ''' # to avoid closing the gui if not (re.match(r'(.+)Gui.pyw', sys.argv[0])): sys.exit()