don't distinguish exp and std anymore

This commit is contained in:
Martin Diehl 2018-07-06 13:12:16 +02:00
parent c800e372cb
commit 2a33dcdd04
2 changed files with 4 additions and 11 deletions

View File

@ -29,8 +29,8 @@ class Environment():
def isAvailable(self,software,Nneeded =-1):
licensesNeeded = {'abaqus' :5,
'standard':5,
'explicit':5}
'standard':5
}
if Nneeded == -1: Nneeded = licensesNeeded[software]
try:
cmd = """ ssh mulicense2 "/lm-status | grep 'Users of %s: ' | cut -d' ' -f7,13" """%software

View File

@ -6,19 +6,12 @@ import subprocess,re
class Abaqus(Solver):
def __init__(self,version='',solver=''): # example version string: 6.12-2, solver: std or exp
def __init__(self,version=''): # example version string: 2017
self.solver='Abaqus'
if version =='':
version = damask.Environment().options['ABAQUS_VERSION']
else:
self.version = version
if solver.lower() in ['','std','standard']:
self.solver = 'std'
elif solver.lower() in ['exp','explicit']:
self.solver = 'exp'
else:
raise Exception('unknown Abaqus solver %'%solver)
def return_run_command(self,model):
env=damask.Environment()
@ -32,4 +25,4 @@ class Abaqus(Solver):
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_%s interactive'%(cmd,model,env.rootDir(),self.solver)
return '%s -job %s -user %s/src/DAMASK_abaqus_std interactive'%(cmd,model,env.rootDir())