short version not needed any more

Abaqus version is year
This commit is contained in:
Martin Diehl 2019-02-15 14:22:26 +01:00
parent 31b3cca1ad
commit c50078bafc
1 changed files with 4 additions and 5 deletions

View File

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