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