don't distinguish exp and std anymore
This commit is contained in:
parent
c800e372cb
commit
2a33dcdd04
|
@ -29,8 +29,8 @@ class Environment():
|
||||||
|
|
||||||
def isAvailable(self,software,Nneeded =-1):
|
def isAvailable(self,software,Nneeded =-1):
|
||||||
licensesNeeded = {'abaqus' :5,
|
licensesNeeded = {'abaqus' :5,
|
||||||
'standard':5,
|
'standard':5
|
||||||
'explicit':5}
|
}
|
||||||
if Nneeded == -1: Nneeded = licensesNeeded[software]
|
if Nneeded == -1: Nneeded = licensesNeeded[software]
|
||||||
try:
|
try:
|
||||||
cmd = """ ssh mulicense2 "/lm-status | grep 'Users of %s: ' | cut -d' ' -f7,13" """%software
|
cmd = """ ssh mulicense2 "/lm-status | grep 'Users of %s: ' | cut -d' ' -f7,13" """%software
|
||||||
|
|
|
@ -6,19 +6,12 @@ import subprocess,re
|
||||||
|
|
||||||
class Abaqus(Solver):
|
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'
|
self.solver='Abaqus'
|
||||||
if version =='':
|
if version =='':
|
||||||
version = damask.Environment().options['ABAQUS_VERSION']
|
version = damask.Environment().options['ABAQUS_VERSION']
|
||||||
else:
|
else:
|
||||||
self.version = version
|
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):
|
def return_run_command(self,model):
|
||||||
env=damask.Environment()
|
env=damask.Environment()
|
||||||
|
@ -32,4 +25,4 @@ class Abaqus(Solver):
|
||||||
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 %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())
|
||||||
|
|
Loading…
Reference in New Issue