#!/usr/bin/env python import sys import time from ert.enkf import EnKFMain # This will instantiate the EnkFMain object and create a handle to # "everything" ert related for this instance. ert = EnKFMain(sys.argv[1]) site_config = ert.siteConfig() jobs = site_config.get_installed_jobs() for job in jobs: print job.name() print " config : %s" % job.get_config_file() print " executable: %s" % job.get_executable() print
ert = EnKFMain( sys.argv[1] ) fs_manager = ert.getEnkfFsManager( ) fs = fs_manager.getCurrentFileSystem( ) # Initialize the realisations. for iens in range( ert.getEnsembleSize()): realisation = ert.getRealisation( iens ) realisation.initialize( fs ) # Fetch out the job_queue from the SiteConfig object. In addition we # create a JobQueueManager objects which wraps the queue. The purpose # of this manager object is to let the queue run nonblocking in the # background. site_config = ert.siteConfig( ) queue_manager = JobQueueManager( site_config.getJobQueue( ) ) queue_manager.startQueue( ert.getEnsembleSize( ) , verbose = False ) # Create list of RunArg instances which hold metadata for one running # realisation, create the directory where the simulation should run # and submit the simulation. path_fmt = "/tmp/run%d" arg_list = [ RunArg.createEnsembleExperimentRunArg(fs, iens, path_fmt % iens) for iens in range(ert.getEnsembleSize()) ] for arg in arg_list: ert.createRunPath( arg ) ert.submitSimulation( arg ) while True: