Merge branch 'MiscImprovements' of magit1.mpie.de:/damask/DAMASK into MiscImprovements
This commit is contained in:
commit
8d66136f9c
|
@ -69,10 +69,10 @@ variables:
|
||||||
PETSc_MPICH_Intel: "$PETSc3_10_3IMPI2018Intel18_4"
|
PETSc_MPICH_Intel: "$PETSc3_10_3IMPI2018Intel18_4"
|
||||||
PETSc_MPICH_GNU: "$PETSc3_10_3MPICH3_3GNU8_2"
|
PETSc_MPICH_GNU: "$PETSc3_10_3MPICH3_3GNU8_2"
|
||||||
# ++++++++++++ commercial FEM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++ commercial FEM ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
MSC2018: "FEM/MSC/2018"
|
MSC2018_1: "FEM/MSC/2018.1"
|
||||||
MSC2019: "FEM/MSC/2019"
|
MSC2019: "FEM/MSC/2019"
|
||||||
# ------------ Defaults ----------------------------------------------
|
# ------------ Defaults ----------------------------------------------
|
||||||
MSC: "$MSC2018"
|
MSC: "$MSC2018_1"
|
||||||
IntelMarc: "$IntelCompiler17_8"
|
IntelMarc: "$IntelCompiler17_8"
|
||||||
IntelAbaqus: "$IntelCompiler16_4"
|
IntelAbaqus: "$IntelCompiler16_4"
|
||||||
HDF5Marc: "HDF5/1.10.4/Intel-17.8"
|
HDF5Marc: "HDF5/1.10.4/Intel-17.8"
|
||||||
|
|
2
CONFIG
2
CONFIG
|
@ -4,7 +4,7 @@
|
||||||
set DAMASK_NUM_THREADS = 4
|
set DAMASK_NUM_THREADS = 4
|
||||||
|
|
||||||
set MSC_ROOT = /opt/msc
|
set MSC_ROOT = /opt/msc
|
||||||
set MARC_VERSION = 2018
|
set MARC_VERSION = 2018.1
|
||||||
|
|
||||||
set ABAQUS_VERSION = 2019
|
set ABAQUS_VERSION = 2019
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,9 @@ class Marc(Solver):
|
||||||
|
|
||||||
#--------------------------
|
#--------------------------
|
||||||
def submit_job(self,
|
def submit_job(self,
|
||||||
model = 'model',
|
model,
|
||||||
job = 'job1',
|
job = 'job1',
|
||||||
logfile = None,
|
logfile = False,
|
||||||
compile = False,
|
compile = False,
|
||||||
optimization ='',
|
optimization ='',
|
||||||
):
|
):
|
||||||
|
@ -52,14 +52,9 @@ class Marc(Solver):
|
||||||
|
|
||||||
damaskEnv = damask.environment.Environment()
|
damaskEnv = damask.environment.Environment()
|
||||||
|
|
||||||
user = 'not found'
|
user = os.path.join(damaskEnv.relPath('src'),'DAMASK_marc{}.{}'.format(self.version,'f90' if compile else 'marc'))
|
||||||
|
if not os.path.isfile(user):
|
||||||
if compile:
|
raise FileNotFoundError("DAMASK4Marc ({}) '{}' not found".format(('source' if compile else 'binary'),user))
|
||||||
if os.path.isfile(os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc{}.f90'.format(self.version))):
|
|
||||||
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc{}'.format(self.version))
|
|
||||||
else:
|
|
||||||
if os.path.isfile(os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc{}.marc'.format(self.version))):
|
|
||||||
user = os.path.join(damaskEnv.relPath('src/'),'DAMASK_marc{}'.format(self.version))
|
|
||||||
|
|
||||||
# Define options [see Marc Installation and Operation Guide, pp 23]
|
# Define options [see Marc Installation and Operation Guide, pp 23]
|
||||||
script = 'run_damask_{}mp'.format(optimization)
|
script = 'run_damask_{}mp'.format(optimization)
|
||||||
|
@ -68,12 +63,11 @@ class Marc(Solver):
|
||||||
' -jid ' + model + '_' + job + \
|
' -jid ' + model + '_' + job + \
|
||||||
' -nprocd 1 -autorst 0 -ci n -cr n -dcoup 0 -b no -v no'
|
' -nprocd 1 -autorst 0 -ci n -cr n -dcoup 0 -b no -v no'
|
||||||
|
|
||||||
if compile: cmd += ' -u ' + user+'.f90' + ' -save y'
|
if compile: cmd += ' -u ' + user + ' -save y'
|
||||||
else: cmd += ' -prog ' + user
|
else: cmd += ' -prog ' + os.path.splitext(user)[0]
|
||||||
|
|
||||||
print('job submission with{} compilation: {}'.format({False:'out',True:''}[compile],user))
|
print('job submission with{} compilation: {}'.format('' if compile else 'out',user))
|
||||||
if logfile:
|
if logfile: log = open(logfile, 'w')
|
||||||
log = open(logfile, 'w')
|
|
||||||
print(cmd)
|
print(cmd)
|
||||||
process = subprocess.Popen(shlex.split(cmd),stdout = log,stderr = subprocess.STDOUT)
|
process = subprocess.Popen(shlex.split(cmd),stdout = log,stderr = subprocess.STDOUT)
|
||||||
log.close()
|
log.close()
|
||||||
|
|
Loading…
Reference in New Issue