parent
31b3cca1ad
commit
c50078bafc
|
@ -15,14 +15,13 @@ class Abaqus(Solver):
|
||||||
|
|
||||||
def return_run_command(self,model):
|
def return_run_command(self,model):
|
||||||
env=damask.Environment()
|
env=damask.Environment()
|
||||||
shortVersion = re.sub('[\.,-]', '',self.version)
|
|
||||||
try:
|
try:
|
||||||
cmd='abq'+shortVersion
|
cmd='abq'+self.version
|
||||||
subprocess.check_output(['abq'+shortVersion,'information=release'])
|
subprocess.check_output([cmd,'information=release'])
|
||||||
except OSError: # link to abqXXX not existing
|
except OSError: # link to abqXXX not existing
|
||||||
cmd='abaqus'
|
cmd='abaqus'
|
||||||
process = subprocess.Popen(['abaqus','information=release'],stdout = subprocess.PIPE,stderr = subprocess.PIPE)
|
process = subprocess.Popen(['abaqus','information=release'],stdout = subprocess.PIPE,stderr = subprocess.PIPE)
|
||||||
detectedVersion = process.stdout.readlines()[1].split()[1]
|
detectedVersion = process.stdout.readlines()[1].split()[1]
|
||||||
if self.version != detectedVersion:
|
if self.version != detectedVersion:
|
||||||
raise Exception('found Abaqus version %s, but requested %s'%(detectedVersion,self.version))
|
raise Exception('found Abaqus version {}, but requested {}'.format(detectedVersion,self.version))
|
||||||
return '%s -job %s -user %s/src/DAMASK_abaqus interactive'%(cmd,model,env.rootDir())
|
return '{} -job {} -user {}/src/DAMASK_abaqus interactive'.format(cmd,model,env.rootDir())
|
||||||
|
|
Loading…
Reference in New Issue