예제 #1
0
 def checkpoint(self):
     for obj in [
             SeisflowsParameters(),
             SeisflowsPaths(),
             SeisflowsObjects()
     ]:
         obj.save(PATH.OUTPUT)
예제 #2
0
    def __init__(self):
        """ Loads any required dependencies
        """
        from seisflows.tools.config import SeisflowsParameters, SeisflowsPaths
        import solver

        PAR = SeisflowsParameters()
        PATH = SeisflowsPaths()

        self.path = PATH.PRECOND
        self.load = solver.load
        self.merge = solver.merge
예제 #3
0
import os
from os.path import abspath, join

import numpy as np

from seisflows.tools import unix
from seisflows.tools.config import SeisflowsParameters, SeisflowsPaths, \
    ParameterError, loadclass

PAR = SeisflowsParameters()
PATH = SeisflowsPaths()


class serial(loadclass('system', 'base')):
    """ An interface through which to submit workflows, run tasks in serial or 
      parallel, and perform other system functions.

      By hiding environment details behind a python interface layer, these 
      classes provide a consistent command set across different computing
      environments.

      For more informations, see 
      http://seisflows.readthedocs.org/en/latest/manual/manual.html#system-interfaces
    """

    def check(self):
        """ Checks parameters and paths
        """

        if 'TITLE' not in PAR:
예제 #4
0
from seisflows.tools.config import custom_import
from seisflows.tools.config import ParameterError, SeisflowsParameters, SeisflowsPaths

PAR = SeisflowsParameters()
PATH = SeisflowsPaths()
""" For users of tiger.princeton.edu, determines whether
  slurm_sm, slurm_md, or slurm_lg should be used.
"""

# ensure number of processers per forward simulation is defined
if 'NPROC' not in PAR:
    raise Exception

# there are 16 processers per node on tiger
if 'NODESIZE' in PAR:
    assert (PAR.NODESIZE == 16)
else:
    PAR.NODESIZE = 16

# which system interface is appropriate?
if PAR.NPROC >= PAR.NODESIZE:
    tiger = custom_import('system', 'tiger_lg')
elif PAR.NPROC > 1:
    tiger = custom_import('system', 'tiger_md')
else:
    tiger = custom_import('system', 'tiger_sm')
예제 #5
0
#!/bin/env python

from seisflows.tools.config import SeisflowsObjects, SeisflowsParameters, SeisflowsPaths, \
    loadclass

SeisflowsParameters().load()
SeisflowsPaths().load()

PAR = SeisflowsParameters()
PATH = SeisflowsPaths()


# run test
if __name__ == '__main__':

    if 'SYSTEM' not in PAR:
        PAR.SYSTEM = 'serial'

    if 'PREPROCESS' not in PAR:
        PAR.PREPROCESS = None

    if 'SOLVER' not in PAR:
        PAR.SOLVER = None

    if 'POSTPROCESS' not in PAR:
        PAR.POSTPROCESS = None

    if 'OPTIMIZE' not in PAR:
        PAR.OPTIMIZE = 'base'

    if 'WORKFLOW' not in PAR:
예제 #6
0
#!/bin/env python

from seisflows.tools.config import SeisflowsObjects, SeisflowsParameters, SeisflowsPaths, \
    loadclass

SeisflowsParameters().load()
SeisflowsPaths().load()

PAR = SeisflowsParameters()
PATH = SeisflowsPaths()

# run test
if __name__ == '__main__':

    if 'SYSTEM' not in PAR:
        PAR.SYSTEM = 'serial'

    if 'PREPROCESS' not in PAR:
        PAR.PREPROCESS = None

    if 'SOLVER' not in PAR:
        PAR.SOLVER = None

    if 'POSTPROCESS' not in PAR:
        PAR.POSTPROCESS = None

    if 'OPTIMIZE' not in PAR:
        PAR.OPTIMIZE = None

    if 'WORKFLOW' not in PAR:
        PAR.WORKFLOW = 'test_system'
예제 #7
0
#!/bin/env python

from seisflows.tools.config import SeisflowsObjects, SeisflowsParameters, SeisflowsPaths, \
    loadclass

SeisflowsParameters().load()
SeisflowsPaths().load()

PAR = SeisflowsParameters()
PATH = SeisflowsPaths()


# run test
if __name__ == '__main__':

    if 'SYSTEM' not in PAR:
        PAR.SYSTEM = 'serial'

    if 'PREPROCESS' not in PAR:
        PAR.PREPROCESS = None

    if 'SOLVER' not in PAR:
        PAR.SOLVER = None

    if 'POSTPROCESS' not in PAR:
        PAR.POSTPROCESS = None

    if 'OPTIMIZE' not in PAR:
        PAR.OPTIMIZE = None

    if 'WORKFLOW' not in PAR:
예제 #8
0
from seisflows.tools.config import custom_import
from seisflows.tools.config import ParameterError, SeisflowsParameters, SeisflowsPaths

PAR = SeisflowsParameters()
PATH = SeisflowsPaths()

""" For users of tiger.princeton.edu, determines whether
  slurm_sm, slurm_md, or slurm_lg should be used.
"""

# ensure number of processers per forward simulation is defined
if 'NPROC' not in PAR:
    raise Exception

# there are 16 processers per node on tiger
if 'NODESIZE' in PAR:
    assert(PAR.NODESIZE == 16)
else:
    PAR.NODESIZE = 16

# which system interface is appropriate?
if PAR.NPROC >= PAR.NODESIZE:
    tiger = custom_import('system','tiger_lg')
elif PAR.NPROC > 1:
    tiger = custom_import('system','tiger_md')
else:
    tiger = custom_import('system','tiger_sm')