예제 #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
#!/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'