Skip to content
Snippets Groups Projects
Commit 877a740c authored by Boman Romain's avatar Boman Romain
Browse files

Merge remote-tracking branch 'origin/master' into boman

parents e6b52a05 83b69362
No related branches found
No related tags found
No related merge requests found
add2env LD_LIBRARY_PATH "/opt/lagamine/lib"
add2env INCLUDE "/opt/lagamine/include"
add2env LIB "/opt/lagamine/lib"
add2env PATH "/opt/matlab/bin"
File moved
File moved
File moved
add2env PATH "/opt/parasolid/shared_object"
add2env INCLUDE "/opt/parasolid"
export P_SCHEMA=/opt/parasolid/schema
export SAM_ZONE=200000000
add2env PATH "/opt/samcef"
......@@ -2,6 +2,9 @@
# -*- coding: utf-8 -*-
#
# Define external program paths according to local configuration
#
# under linux, call config_ld_library_path(key) to extend LD_LIBRARY_PATH to be able to find .so
#
from prmClasses import *
import os, os.path, shutil #, distutils.spawn
......@@ -91,7 +94,7 @@ class ExtProgs(PRMSet):
print("\t Use 'externalProgramPathGui' to define the full program path (recommanded)")
print("\t or add %s in your user path (not recommanded)"%key)
return False
def configAction(self):
PRMAction(self.actions, 'a', self.pars['SAMCEF'])
PRMAction(self.actions, 'b', self.pars['GMSH'])
......@@ -113,6 +116,14 @@ class ExtProgs(PRMSet):
SaveAction(self.actions , 'S')
QuitAction(self.actions , 'Q')
def config_ld_library_path(self, key): # add progPath/bin/../lib to LD_LIBRARY_PATH (else may not found .so)
progLibPath = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(self.pars[key].val)),'..','lib'))
if os.path.exists(progLibPath):
for p in os.environ['LD_LIBRARY_PATH'].split(':'):
if os.path.exists(p) and os.path.samefile(progLibPath, p): # deja dans le LD_LIBRARY_PATH => on skippe l'ajout
break
else : # pas trouvé dans le LD_LIBRARY_PATH => on ajoute dans le LD_LIBRARY_PATH
os.environ['LD_LIBRARY_PATH'] = progLibPath + ':' + os.environ['LD_LIBRARY_PATH']
#=================================================================================
def main():
progsConf = ExtProgs() #verb=True)
......
......@@ -199,7 +199,7 @@ class LaunchJob(ParametricJob):
return jobname.encode('ascii','ignore') # convert to ASCII if some strings were unicode
def getOutFileName(self):
outFileName = "%s.%s-%s.txt" % (self.pars['OUTFILE'].val, self.pars['ALGORITHM'].val,self.jobId)
outFileName = "%s.%s%s.txt" % (self.pars['OUTFILE'].val, self.pars['ALGORITHM'].val,self.jobId)
if self.debug:
print("outFileName = ", outFileName)
return outFileName
......@@ -353,6 +353,7 @@ class LaunchJob(ParametricJob):
pin.write(b'battery = b.Battery() \n')
pin.write(b'battery.keepFacs = True\n')
pin.write(('battery.dirs = [r"%s"]\n'%tests).encode('utf-8'))
pin.write(('battery.jobId = r"%s"\n'%self.jobId).encode('utf-8'))
if (self.pars['ALGORITHM'].val == "execfile"):
reg1=r"(.+)_0*([1-9][0-9]*)\.py"
......
646574612B0A060C031B13305B736D657470666F722024372D0F021B1900102D0F0C1703161163666F727D6574611A6F726D047461660C726D65E161666FE26D657471666F7211657461076F726D06746166FA726D65E561666FCE676574
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment