Merge remote-tracking branch 'origin/marc-solver-polish' into development
This commit is contained in:
commit
69bafea023
|
@ -8,7 +8,7 @@ _msc_root = '/opt/msc'
|
||||||
_damask_root = str(Path(__file__).parents[3])
|
_damask_root = str(Path(__file__).parents[3])
|
||||||
|
|
||||||
class Marc:
|
class Marc:
|
||||||
"""Wrapper to run DAMASK with MSCMarc."""
|
"""Wrapper to run DAMASK with MSC.Marc."""
|
||||||
|
|
||||||
def __init__(self,msc_version=_msc_version,msc_root=_msc_root,damask_root=_damask_root):
|
def __init__(self,msc_version=_msc_version,msc_root=_msc_root,damask_root=_damask_root):
|
||||||
"""
|
"""
|
||||||
|
@ -47,7 +47,23 @@ class Marc:
|
||||||
def submit_job(self, model, job,
|
def submit_job(self, model, job,
|
||||||
compile = False,
|
compile = False,
|
||||||
optimization = ''):
|
optimization = ''):
|
||||||
|
"""
|
||||||
|
Assemble command line arguments and call Marc executable.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
model : str
|
||||||
|
Name of model.
|
||||||
|
job : str
|
||||||
|
Name of job.
|
||||||
|
compile : bool, optional
|
||||||
|
Compile DAMASK_Marc user subroutine (and save for future use).
|
||||||
|
Defaults to False.
|
||||||
|
optimization : str, optional
|
||||||
|
Optimization level '' (-O0), 'l' (-O1), or 'h' (-O3).
|
||||||
|
Defaults to ''.
|
||||||
|
|
||||||
|
"""
|
||||||
usersub = (self.damask_root/'src/DAMASK_Marc').with_suffix('.f90' if compile else '.marc')
|
usersub = (self.damask_root/'src/DAMASK_Marc').with_suffix('.f90' if compile else '.marc')
|
||||||
if not usersub.is_file():
|
if not usersub.is_file():
|
||||||
raise FileNotFoundError(f'subroutine ({"source" if compile else "binary"}) "{usersub}" not found')
|
raise FileNotFoundError(f'subroutine ({"source" if compile else "binary"}) "{usersub}" not found')
|
||||||
|
|
Loading…
Reference in New Issue