ecl: This module is purely for convenience, all the symbols in the package are explicitly imported into this module, ensuring that all symbols in the package are available under the common namespace 'ecl'. """ from ert.cwrap import clib import ert.util import ert.geo try: clib.load("libgomp" , "libgomp.so.1") openmp = True except ImportError: openmp = False ECL_LIB = clib.ert_load("libecl.so") from .ecl_sum import EclSum #, EclSumVector, EclSumNode, EclSMSPECNode from .ecl_util import EclFileEnum, EclFileFlagEnum, EclPhaseEnum, EclTypeEnum, EclUtil from .ecl_default import EclDefault from .ecl_rft_cell import EclPLTCell, EclRFTCell from .ecl_rft import EclRFT, EclRFTFile from .fortio import FortIO from .ecl_kw import EclKW from .ecl_file import EclFile
The modules included in the util package are: tvector.py: This module implements the classes IntVector, DoubleVector and BoolVector. This is a quite normal implementation of a typed growable vector; but with a special twist regarding default values. util_func.py: This module wraps a couple of stateless (i.e. there is no class involved) functions from the util.c file. """ import ert.cwrap.clib as clib clib.load("libz" , "libz.so.1") # Depending on the Fortran compiler which has been used to compile # blas / lapack the there might be an additional dependency on libg2c: try: # First try to load without libg2c clib.load("libblas.so" , "libblas.so.3") clib.load("liblapack.so") except ImportError: # Then try to load with libg2c clib.load("libg2c.so.0") clib.load("libblas.so" , "libblas.so.3") clib.load("liblapack.so") UTIL_LIB = clib.ert_load("libert_util.so")
# # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ERT is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. # # See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> # for more details. """ This module will load the libecl.so shared library. """ # This statement is necessary for side-effects (i.e. the final # dlopen("libutil.so") call). import ert.util.libutil import ert.geo.libgeo import ert.cwrap.clib as clib try: clib.load("libgomp", "libgomp.so.1") openmp = True except ImportError: openmp = False lib = clib.ert_load("libecl.so")
import ert.ecl.libecl import ert.cwrap.clib as clib lib = clib.load("libwell.so")
# # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ERT is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. # # See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> # for more details. import ert.cwrap.clib as clib clib.load("libz", "libz.so.1") # Depending on the Fortran compiler which has been used to compile # blas / lapack the there might be an additional dependency on libg2c: try: # First try to load without libg2c clib.load("libblas.so", "libblas.so.3") clib.load("liblapack.so") except: # Then try to load with libg2c clib.load("libg2c.so.0") clib.load("libblas.so", "libblas.so.3") clib.load("liblapack.so") lib = clib.ert_load("libert_util.so")
# Copyright (C) 2011 Statoil ASA, Norway. # # The file 'libenkf.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ERT is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. # # See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> # for more details. import ert.util.libutil import ert.ecl.libecl import ert.job_queue.libjob_queue import ert.rms.librms import ert.cwrap.clib as clib clib.load("libsched.so") clib.load("libanalysis.so") lib = clib.load("libenkf.so")
os.environ[ var ] = value # 1: Setting up the full LSF environment LSF_HOME = os.getenv( "LSF_HOME") if LSF_HOME: setenv( "LSF_BINDIR" , "%s/bin" % LSF_HOME ) setenv( "LSF_LIBDIR" , "%s/lib" % LSF_HOME ) setenv( "XLSF_UIDDIR" , "%s/lib/uid" % LSF_HOME ) setenv( "LSF_SERVERDIR" , "%s/etc" % LSF_HOME) setenv( "LSF_ENVDIR" , "%s/conf" % LSF_HOME) # This one might be too simple minded. # 2: Loading the LSF libraries LSF_LIBDIR = os.getenv("LSF_LIBDIR") try: clib.load("libnsl.so" , "libnsl.so.1") clib.load("libnsl.so.1") if LSF_LIBDIR: clib.load("%s/liblsf.so" % LSF_LIBDIR) clib.load("%s/libbat.so" % LSF_LIBDIR) else: clib.load( "liblsf.so" ) clib.load( "libbat.so" ) HAVE_LSF = True except: HAVE_LSF = False # 3: Loading the libjob_queue library, which might (depending on the # value of INCLUDE_LSF used when building) depend on the LSF # libraries we tried to load at the previous step.
# Copyright (C) 2011 Statoil ASA, Norway. # # The file 'librms.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ERT is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. # # See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html> # for more details. import ctypes import ert.cwrap.clib as clib lib = clib.load("librms.so")