seems that testing has Marc 2018.1 already
This commit is contained in:
parent
82a11b7eae
commit
fb61899c5f
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,24 +42,19 @@ 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 ='',
|
||||||
):
|
):
|
||||||
|
|
||||||
|
|
||||||
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