Esempio n. 1
0
def prepare(root,config):
    dep_build_dir=config.get('Main','dependency_build_dir')
    dep_download_dir=config.get('Main','dependency_download_dir')

    # Download files
    tools.checkCreateDir(dep_build_dir+"/dune")
    for i in range(3):
        tools.checkDeleteDirectory(dep_build_dir+"/dune/"+dune_names[i])
        print "Extracting "+dune_names[i]
        try:
            tools.extract_file(dep_download_dir+"/"+dune_fnames[i],
                               dep_build_dir+"/dune/")
        except IOError:
            # Possibly a corrupted/truncated file. Try to download once again
            download(root,config,force=True)
            tools.extract_file(dep_download_dir+"/"+dune_fnames[i],
                               dep_build_dir+"/dune/")
        os.rename(dep_build_dir+"/dune/"+dune_extract_names[i],
                  dep_build_dir+"/dune/"+dune_names[i])
        if i==1:
            print "Patching "+dune_names[i]
            patch=py_patch.fromfile(root+"/installer/patches/dune-grid.patch")
            cwd=os.getcwd()
            os.chdir(dep_build_dir+"/dune/dune-grid/dune/grid/utility")
            patch.apply()
            os.chdir(cwd)
    # Copy over dune-foamgrid
    tools.checkDeleteDirectory(dep_build_dir+"/dune/dune-foamgrid")
    shutil.copytree(root+"/contrib/dune/dune-foamgrid",
                    dep_build_dir+"/dune/dune-foamgrid")

    tools.setCompilerOptions(config,'Dune')
Esempio n. 2
0
def prepare(root,config):
    prefix=config.get('Main','prefix')
    dep_build_dir = config.get('Main','dependency_build_dir')
    dep_download_dir=config.get('Main','dependency_download_dir')
    arma_include_dir=prefix+"/bempp/include"

    print "Extracting Armadillo"
    extract_dir = dep_build_dir+"/"+arma_extract_dir
    tools.checkDeleteDirectory(extract_dir)
    try:
        tools.extract_file(dep_download_dir+"/"+arma_fname,dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root,config,force=True)
        tools.extract_file(dep_download_dir+"/"+arma_fname,dep_build_dir)
    subprocess.check_call("cp -R "+extract_dir+"/include/* "+
                          prefix+"/bempp/include/",shell=True)
    print "Patching Armadillo"
    patch=py_patch.fromfile(root+"/installer/patches/armadillo_config.patch")
    cwd=os.getcwd()
    os.chdir(prefix+"/bempp/include/armadillo_bits")
    patch.apply()
    os.chdir(cwd)

    tools.setDefaultConfigOption(config,"Armadillo","include_dir",
                                 prefix+"/bempp/include",overwrite=True)
Esempio n. 3
0
def prepare(root,config):
    dep_build_dir=config.get('Main','dependency_build_dir')
    dep_download_dir=config.get('Main','dependency_download_dir')

    trilinos_full_dir=dep_build_dir+"/"+trilinos_dir
    trilinos_download_name=dep_download_dir+"/"+trilinos_fname

    prefix=config.get('Main','prefix')

    tools.checkDeleteDirectory(trilinos_full_dir)

    print "Extracting Trilinos"
    try:
        tools.extract_file(dep_download_dir+"/"+trilinos_fname,dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root,config,force=True)
        tools.extract_file(dep_download_dir+"/"+trilinos_fname,dep_build_dir)
    os.rename(dep_build_dir+"/"+trilinos_extract_dir,
              dep_build_dir+"/"+trilinos_dir)
    shutil.copy(root+"/installer/build_scripts/posix/trilinos_build.sh",
                trilinos_full_dir+"/trilinos_build.sh")
    print "Patching Trilinos"
    cwd=os.getcwd()
    os.chdir(dep_build_dir+"/trilinos/packages/stratimikos/adapters/belos/src")
    patch=py_patch.fromfile(root+"/installer/patches/Thyra_BelosLinearOpWithSolve_def.patch")
    patch.apply()
    os.chdir(dep_build_dir+"/trilinos/packages/thyra/core/src/support/nonlinear/model_evaluator/client_support")
    patch=py_patch.fromfile(root+"/installer/patches/thyra_static_initialization_order.patch")
    patch.apply()
    os.chdir(cwd)

    tools.setDefaultConfigOption(config,'Trilinos','cmake_path',prefix+"/bempp/lib/cmake/Trilinos/",overwrite=True)

    tools.setCompilerOptions(config,'Trilinos')
Esempio n. 4
0
def prepare(root, config):
    prefix = config.get('Main', 'prefix')
    dep_build_dir = config.get('Main', 'dependency_build_dir')
    dep_download_dir = config.get('Main', 'dependency_download_dir')
    arma_include_dir = prefix + "/bempp/include"

    print "Extracting Armadillo"
    extract_dir = dep_build_dir + "/" + arma_extract_dir
    tools.checkDeleteDirectory(extract_dir)
    try:
        tools.extract_file(dep_download_dir + "/" + arma_fname, dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root, config, force=True)
        tools.extract_file(dep_download_dir + "/" + arma_fname, dep_build_dir)
    subprocess.check_call("cp -R " + extract_dir + "/include/* " + prefix +
                          "/bempp/include/",
                          shell=True)
    print "Patching Armadillo"
    patch = py_patch.fromfile(root +
                              "/installer/patches/armadillo_config.patch")
    cwd = os.getcwd()
    os.chdir(prefix + "/bempp/include/armadillo_bits")
    patch.apply()
    os.chdir(cwd)

    tools.setDefaultConfigOption(config,
                                 "Armadillo",
                                 "include_dir",
                                 prefix + "/bempp/include",
                                 overwrite=True)
Esempio n. 5
0
def prepare(root,config):

    enable_ahmed = tools.to_bool(tools.setDefaultConfigOption(config,'AHMED','enable_ahmed','false'))
    if enable_ahmed:
        if not config.has_option('AHMED','file_name'):
            raise Exception('Need to give full path of tar.gz archived file with AHMED 1.0 release')
        ahmed_fname=config.get('AHMED','file_name')
        ahmed_fname=tools.normalizePath(config,ahmed_fname)
        config.set('AHMED','with_ahmed','ON')
        prefix=config.get('Main','prefix')
        dep_build_dir = config.get('Main','dependency_build_dir')
        arch = config.get('Main','architecture')
        if arch == 'ia32':
            config.set('AHMED','enable64','OFF')
        else:
            config.set('AHMED','enable64','ON')
        ahmed_full_dir=dep_build_dir+"/ahmed"
        tools.checkDeleteDirectory(ahmed_full_dir)
        if sys.platform.startswith('darwin'):
            config.set('AHMED','lib',prefix+"/bempp/lib/libAHMED.dylib")
        elif sys.platform.startswith('linux'):
            config.set('AHMED','lib',prefix+"/bempp/lib/libAHMED.so")
        else:
            raise Exception("Platform not supported")
        config.set('AHMED','include_dir',prefix+"/bempp/include/AHMED")
        if not os.path.isfile(ahmed_fname):
            raise Exception("File '"+ahmed_fname+"' does not exist")
        print "Extracting AHMED"
        tools.extract_file(ahmed_fname,dep_build_dir)
        os.rename(dep_build_dir+"/AHMED_1.0",ahmed_full_dir)
        shutil.copy(root+"/installer/build_scripts/posix/ahmed_build.sh",ahmed_full_dir+"/ahmed_build.sh")
        print "Patching AHMED"
        cwd=os.getcwd()
        os.chdir(ahmed_full_dir)
        for s in ("ahmed_cmake.patch",
                  "ahmed_addGeHGeH_single_precision.patch",
                  "ahmed_changelog_H.h.patch",
                  "ahmed_pass_clusters_to_aca_matgen_apprx.h.patch",
                  "ahmed_generic_aca_apprx.h.patch",
                  "ahmed_check_error_apprx.h.patch",
                  "ahmed_bbx_apprx.h.patch",
                  "ahmed_pass_clusters_to_aca_matgen_ACA.h.patch",
                  "ahmed_frobenius_norm_ACA.h.patch",
                  "ahmed_zero_pu_pv_ACA.h.patch",
                  "ahmed_retry_if_zero_and_orig_cross_ACA.h.patch",
                  "ahmed_changelog_ACA.h.patch",
                  "ahmed_permuted_indices_bemcluster.h.patch",
                  "ahmed_changelog_bemcluster.h.patch",
		  "ahmed_omp.patch",
                  "ahmed_basmod_h.patch",
                  "ahmed_mblock.patch"):
            py_patch.fromfile(root+"/installer/patches/"+s).apply()
        shutil.copy(root+"/installer/patches/ahmed_bbx_bbxbemcluster.h",
                    "./Include/bbxbemcluster.h")
        shutil.copy(root+"/installer/patches/ahmed_bbx_bbxbemblcluster.h",
                    "./Include/bbxbemblcluster.h")
        os.chdir(cwd)
        tools.setCompilerOptions(config,'AHMED')
    else:
        config.set('AHMED','with_ahmed','OFF')
Esempio n. 6
0
def prepare(root, config):
    dep_build_dir = config.get('Main', 'dependency_build_dir')
    dep_download_dir = config.get('Main', 'dependency_download_dir')

    trilinos_full_dir = dep_build_dir + "/" + trilinos_dir
    trilinos_download_name = dep_download_dir + "/" + trilinos_fname

    prefix = config.get('Main', 'prefix')

    tools.checkDeleteDirectory(trilinos_full_dir)

    print "Extracting Trilinos"
    try:
        tools.extract_file(dep_download_dir + "/" + trilinos_fname,
                           dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root, config, force=True)
        tools.extract_file(dep_download_dir + "/" + trilinos_fname,
                           dep_build_dir)
    os.rename(dep_build_dir + "/" + trilinos_extract_dir,
              dep_build_dir + "/" + trilinos_dir)
    shutil.copy(root + "/installer/build_scripts/posix/trilinos_build.sh",
                trilinos_full_dir + "/trilinos_build.sh")
    print "Patching Trilinos"
    cwd = os.getcwd()
    os.chdir(dep_build_dir +
             "/trilinos/packages/stratimikos/adapters/belos/src")
    patch = py_patch.fromfile(
        root + "/installer/patches/Thyra_BelosLinearOpWithSolve_def.patch")
    patch.apply()
    os.chdir(
        dep_build_dir +
        "/trilinos/packages/thyra/core/src/support/nonlinear/model_evaluator/client_support"
    )
    patch = py_patch.fromfile(
        root + "/installer/patches/thyra_static_initialization_order.patch")
    patch.apply()
    os.chdir(dep_build_dir + "/trilinos/cmake/tribits/modules")
    patch = py_patch.fromfile(
        root + "/installer/patches/trilinos_find_python_interp.patch")
    patch.apply()
    os.chdir(dep_build_dir + "/trilinos/packages/teuchos/src")
    patch = py_patch.fromfile(root +
                              "/installer/patches/Teuchos_LAPACK.hpp.patch")
    patch.apply()
    patch = py_patch.fromfile(root +
                              "/installer/patches/Teuchos_LAPACK.cpp.patch")
    patch.apply()

    os.chdir(cwd)

    tools.setDefaultConfigOption(config,
                                 'Trilinos',
                                 'cmake_path',
                                 prefix + "/bempp/lib/cmake/Trilinos/",
                                 overwrite=True)

    tools.setCompilerOptions(config, 'Trilinos')
Esempio n. 7
0
def get_mkl_dirs_and_libs_redistributable(config, lib_dir, extension):
    mkl_tarball = config.get('MKL','tarball')
    mkl_tarball = tools.normalizePath(config,mkl_tarball)
    print 'Extracting MKL redistributables'
    tools.extract_file(mkl_tarball,lib_dir)
    mkl_dirs = [lib_dir]
    mkl_libs = config.get('MKL','lib').split(";")
    mkl_libs = [s.strip() for s in mkl_libs]
    return mkl_dirs,mkl_libs
Esempio n. 8
0
def prepare(root,config):
    dep_build_dir=config.get('Main','dependency_build_dir')
    dep_download_dir=config.get('Main','dependency_download_dir')

    # Download files
    tools.checkCreateDir(dep_build_dir+"/dune")
    for i in range(4):
        tools.checkDeleteDirectory(dep_build_dir+"/dune/"+dune_names[i])
        print "Extracting "+dune_names[i]
        try:
            tools.extract_file(dep_download_dir+"/"+dune_fnames[i],
                               dep_build_dir+"/dune/")
        except IOError:
            # Possibly a corrupted/truncated file. Try to download once again
            download(root,config,force=True)
            tools.extract_file(dep_download_dir+"/"+dune_fnames[i],
                               dep_build_dir+"/dune/")
        os.rename(dep_build_dir+"/dune/"+dune_extract_names[i],
                  dep_build_dir+"/dune/"+dune_names[i])
        if i==3:
            print "Patching "+dune_names[i]
            cwd=os.getcwd()

            os.chdir(dep_build_dir+"/dune/dune-localfunctions/dune/localfunctions/raviartthomas/raviartthomas02d")
            patch=py_patch.fromfile(root+"/installer/patches/dune-localfunctions_raviartthomas.patch")
            patch.apply()

            os.chdir(dep_build_dir+"/dune/dune-localfunctions/dune/localfunctions/lagrange/pk2d")
            patch=py_patch.fromfile(root+"/installer/patches/dune-localfunctions_pk2dlocalbasis.h.patch")
            patch.apply()

            os.chdir(cwd)
        elif i==2:
            print "Patching "+dune_names[i]
            cwd = os.getcwd()
            os.chdir(dep_build_dir+"/dune")
            patch = py_patch.fromfile(root+"/installer/patches/dune-grid_dgfparser.patch")
            patch.apply()
            
            patch = py_patch.fromfile(root+"/installer/patches/dune-grid_yaspgrid.patch")
            patch.apply()
            os.chdir(cwd)
        elif i==0:
            print "Patching "+dune_names[i]
            cwd = os.getcwd()
            os.chdir(dep_build_dir+"/dune")
            patch = py_patch.fromfile(root+"/installer/patches/dune-common_nullptr.patch")
            patch.apply()
            os.chdir(cwd)


    # Copy over dune-foamgrid
    tools.checkDeleteDirectory(dep_build_dir+"/dune/dune-foamgrid")
    shutil.copytree(root+"/contrib/dune/dune-foamgrid",
                    dep_build_dir+"/dune/dune-foamgrid")

    tools.setCompilerOptions(config,'Dune')
Esempio n. 9
0
def get_mkl_dirs_and_libs_redistributable(config, lib_dir, extension):
    mkl_tarball = config.get('MKL', 'tarball')
    mkl_tarball = tools.normalizePath(config, mkl_tarball)
    print 'Extracting MKL redistributables'
    tools.extract_file(mkl_tarball, lib_dir)
    mkl_dirs = [lib_dir]
    mkl_libs = config.get('MKL', 'lib').split(";")
    mkl_libs = [s.strip() for s in mkl_libs]
    return mkl_dirs, mkl_libs
Esempio n. 10
0
File: tbb.py Progetto: wsmigaj/bempp
def prepare(root, config):
    dep_build_dir = config.get('Main', 'dependency_build_dir')
    dep_download_dir = config.get('Main', 'dependency_download_dir')
    prefix = config.get('Main', 'prefix')

    print "Extracting Tbb"

    tools.checkDeleteDirectory(dep_build_dir + "/tbb")
    try:
        tools.extract_file(dep_download_dir + "/" + tbb_fname_short,
                           dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root, config, force=True)
        tools.extract_file(dep_download_dir + "/" + tbb_fname_short,
                           dep_build_dir)
    os.rename(dep_build_dir + "/" + tbb_extract_dir, dep_build_dir + "/tbb")
    subprocess.check_call("cp -R " + dep_build_dir + "/tbb/include/* " +
                          prefix + "/bempp/include/",
                          shell=True)

    if sys.platform.startswith('darwin'):
        libdir_orig = dep_build_dir + "/tbb/lib"
        tbb_lib_name = "libtbb.dylib"
        tbb_lib_name_debug = "libtbb_debug.dylib"
    elif sys.platform.startswith('linux'):
        tbb_lib_name = "libtbb.so"
        tbb_lib_name_debug = "libtbb_debug.so"
        arch = config.get('Main', 'architecture')
        if arch in ('intel64', 'ia32', 'ia64'):
            libdir_orig = (dep_build_dir + "/tbb/lib/" + arch +
                           "/cc4.1.0_libc2.4_kernel2.6.16.21")
        else:
            raise Exception("Unrecognized architecture: '" + arch + "'")
    else:
        raise Exception("Platform not supported")

    subprocess.check_call("cp -R " + libdir_orig + "/* " + prefix +
                          "/bempp/lib/",
                          shell=True)

    tools.setDefaultConfigOption(config,
                                 "Tbb",
                                 'lib',
                                 prefix + "/bempp/lib/" + tbb_lib_name,
                                 overwrite=True)
    tools.setDefaultConfigOption(config,
                                 "Tbb",
                                 "lib_debug",
                                 prefix + "/bempp/lib/" + tbb_lib_name_debug,
                                 overwrite=True)
    tools.setDefaultConfigOption(config,
                                 "Tbb",
                                 'include_dir',
                                 prefix + "/bempp/include",
                                 overwrite=True)
Esempio n. 11
0
def prepare(root,config):
    dep_build_dir=config.get('Main','dependency_build_dir')
    dep_download_dir=config.get('Main','dependency_download_dir')
    prefix=config.get('Main','prefix')

    print "Extracting Tbb"

    tools.checkDeleteDirectory(dep_build_dir+"/tbb")
    try:
        tools.extract_file(dep_download_dir+"/"+tbb_fname,dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root,config,force=True)
        tools.extract_file(dep_download_dir+"/"+tbb_fname,dep_build_dir)
    os.rename(dep_build_dir+"/"+tbb_extract_dir,dep_build_dir+"/tbb")
    print "Patching Tbb"
    cwd=os.getcwd()

    os.chdir(dep_build_dir+"/tbb")
    patch=py_patch.fromfile(root+"/installer/patches/tbb_pipeline.patch")
    patch.apply()
    os.chdir(cwd)

    subprocess.check_call("cp -R "+dep_build_dir+"/tbb/include/* "+
                          prefix+"/bempp/include/",shell=True)


    if sys.platform.startswith('darwin'):
        libdir_orig = dep_build_dir+"/tbb/lib"
        tbb_lib_name="libtbb.dylib"
        tbb_lib_name_debug="libtbb_debug.dylib"
        tbb_libmalloc_name="libtbbmalloc.dylib"
        tbb_libmalloc_name_debug="libtbbmalloc_debug.dylib"
    elif sys.platform.startswith('linux'):
        tbb_lib_name = "libtbb.so"
        tbb_lib_name_debug = "libtbb_debug.so"
        tbb_libmalloc_name = "libtbbmalloc.so"
        tbb_libmalloc_name_debug = "libtbbmalloc_debug.so"
        arch = config.get('Main','architecture')
        if arch in ('intel64','ia32','ia64'):
            libdir_orig = (dep_build_dir+"/tbb/lib/"+arch+
                           "/gcc4.4")
        else:
            raise Exception("Unrecognized architecture: '"+arch+"'")
    else:
        raise Exception("Platform not supported")

    subprocess.check_call("cp -R "+libdir_orig+"/* "+prefix+"/bempp/lib/",shell=True)

    tools.setDefaultConfigOption(config,"Tbb",'lib',prefix+"/bempp/lib/"+tbb_lib_name,overwrite=True)
    tools.setDefaultConfigOption(config,"Tbb","lib_debug",prefix+"/bempp/lib/"+tbb_lib_name_debug,overwrite=True)
    tools.setDefaultConfigOption(config,"Tbb",'libmalloc',prefix+"/bempp/lib/"+tbb_libmalloc_name,overwrite=True)
    tools.setDefaultConfigOption(config,"Tbb","libmalloc_debug",prefix+"/bempp/lib/"+tbb_libmalloc_name_debug,overwrite=True)
    tools.setDefaultConfigOption(config,"Tbb",'include_dir',prefix+"/bempp/include",overwrite=True)
Esempio n. 12
0
def prepare(root, config):

    enable_ahmed = tools.to_bool(
        tools.setDefaultConfigOption(config, 'AHMED', 'enable_ahmed', 'false'))
    if enable_ahmed:
        if not config.has_option('AHMED', 'file_name'):
            raise Exception(
                'Need to give full path of tar.gz archived file with AHMED 1.0 release'
            )
        ahmed_fname = config.get('AHMED', 'file_name')
        ahmed_fname = tools.normalizePath(config, ahmed_fname)
        config.set('AHMED', 'with_ahmed', 'ON')
        prefix = config.get('Main', 'prefix')
        dep_build_dir = config.get('Main', 'dependency_build_dir')
        arch = config.get('Main', 'architecture')
        if arch == 'ia32':
            config.set('AHMED', 'enable64', 'OFF')
        else:
            config.set('AHMED', 'enable64', 'ON')
        ahmed_full_dir = dep_build_dir + "/ahmed"
        tools.checkDeleteDirectory(ahmed_full_dir)
        if sys.platform.startswith('darwin'):
            config.set('AHMED', 'lib', prefix + "/bempp/lib/libAHMED.dylib")
        elif sys.platform.startswith('linux'):
            config.set('AHMED', 'lib', prefix + "/bempp/lib/libAHMED.so")
        else:
            raise Exception("Platform not supported")
        config.set('AHMED', 'include_dir', prefix + "/bempp/include/AHMED")
        if not os.path.isfile(ahmed_fname):
            raise Exception("File '" + ahmed_fname + "' does not exist")
        print "Extracting AHMED"
        tools.extract_file(ahmed_fname, dep_build_dir)
        os.rename(dep_build_dir + "/AHMED_1.0", ahmed_full_dir)
        shutil.copy(root + "/installer/build_scripts/posix/ahmed_build.sh",
                    ahmed_full_dir + "/ahmed_build.sh")
        print "Patching AHMED"
        cwd = os.getcwd()
        os.chdir(ahmed_full_dir)
        for s in ("ahmed_cmake.patch",
                  "ahmed_addGeHGeH_single_precision.patch",
                  "ahmed_pass_clusters_to_aca_matgen_apprx.h.patch",
                  "ahmed_generic_aca_apprx.h.patch",
                  "ahmed_check_error_apprx.h.patch",
                  "ahmed_pass_clusters_to_aca_matgen_ACA.h.patch",
                  "ahmed_frobenius_norm_ACA.h.patch",
                  "ahmed_zero_pu_pv_ACA.h.patch",
                  "ahmed_retry_if_zero_and_orig_cross_ACA.h.patch",
                  "ahmed_permuted_indices_bemcluster.h.patch"):
            py_patch.fromfile(root + "/installer/patches/" + s).apply()
        os.chdir(cwd)
        tools.setCompilerOptions(config, 'AHMED')
    else:
        config.set('AHMED', 'with_ahmed', 'OFF')
Esempio n. 13
0
def prepare(root, config):
    dep_build_dir = config.get("Main", "dependency_build_dir")
    dep_download_dir = config.get("Main", "dependency_download_dir")

    trilinos_full_dir = dep_build_dir + "/" + trilinos_dir
    trilinos_download_name = dep_download_dir + "/" + trilinos_fname

    prefix = config.get("Main", "prefix")

    tools.checkDeleteDirectory(trilinos_full_dir)

    print "Extracting Trilinos"
    try:
        tools.extract_file(dep_download_dir + "/" + trilinos_fname, dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root, config, force=True)
        tools.extract_file(dep_download_dir + "/" + trilinos_fname, dep_build_dir)
    os.rename(dep_build_dir + "/" + trilinos_extract_dir, dep_build_dir + "/" + trilinos_dir)
    shutil.copy(root + "/installer/build_scripts/posix/trilinos_build.sh", trilinos_full_dir + "/trilinos_build.sh")
    print "Patching Trilinos"
    cwd = os.getcwd()
    os.chdir(dep_build_dir + "/trilinos")
    patch = py_patch.fromfile(root + "/installer/patches/Thyra_BelosLinearOpWithSolve_def.patch")
    patch.apply()
    os.chdir(cwd)
    # os.chdir(dep_build_dir+"/trilinos/packages/thyra/core/src/support/nonlinear/model_evaluator/client_support")
    # patch=py_patch.fromfile(root+"/installer/patches/thyra_static_initialization_order.patch")
    # patch.apply()
    # os.chdir(dep_build_dir+"/trilinos/cmake/tribits/modules")
    # patch=py_patch.fromfile(root+"/installer/patches/trilinos_find_python_interp.patch")
    # patch.apply()
    # os.chdir(dep_build_dir+"/trilinos/packages/teuchos/numerics/src")
    # patch=py_patch.fromfile(root+"/installer/patches/Teuchos_LAPACK.hpp.patch")
    # patch.apply()
    # patch=py_patch.fromfile(root+"/installer/patches/Teuchos_LAPACK.cpp.patch")
    # patch.apply()
    os.chdir(dep_build_dir + "/trilinos/packages/epetra/src")
    patch = py_patch.fromfile(root + "/installer/patches/Epetra_ConfigDefs.h.patch")
    patch.apply()
    os.chdir(cwd)

    tools.setDefaultConfigOption(
        config, "Trilinos", "cmake_path", prefix + "/bempp/lib/cmake/Trilinos/", overwrite=True
    )

    tools.setCompilerOptions(config, "Trilinos")
    trilinos_cxxflags = config.get("Trilinos", "cxxflags")
    trilinos_cxxflags = trilinos_cxxflags + " -Wno-c++11-narrowing"
    config.set("Trilinos", "cxxflags", trilinos_cxxflags)
Esempio n. 14
0
def prepare(root,config):
        dep_build_dir=config.get('Main','dependency_build_dir')
        dep_download_dir=config.get('Main','dependency_download_dir')
        prefix=config.get('Main','prefix')

        cmake_full_dir=dep_build_dir+"/"+cmake_dir
        cmake_download_name=dep_download_dir+"/"+cmake_fname

        cmake_executable=prefix+"/bempp/bin/cmake"
        tools.checkDeleteDirectory(cmake_full_dir)

        print "Extracting CMake"
        try:
            tools.extract_file(dep_download_dir+"/"+cmake_fname,dep_build_dir)
        except IOError:
            # Possibly a corrupted/truncated file. Try to download once again
            download(root,config,force=True)
            tools.extract_file(dep_download_dir+"/"+cmake_fname,dep_build_dir)
        os.rename(dep_build_dir+"/"+cmake_extract_dir,cmake_full_dir)
Esempio n. 15
0
def prepare(root, config):
    dep_build_dir = config.get('Main', 'dependency_build_dir')
    boost_full_dir = dep_build_dir + "/" + boost_dir
    dep_download_dir = config.get('Main', 'dependency_download_dir')
    boost_download_name = dep_download_dir + "/" + boost_fname

    prefix = config.get('Main', 'prefix')
    boost_include_dir = prefix + "/bempp/include"

    if sys.platform.startswith('darwin'):
        unit_test_lib_name = "libboost_unit_test_framework-mt.dylib"
    elif sys.platform.startswith('linux'):
        unit_test_lib_name = "libboost_unit_test_framework-mt.so"
    else:
        raise Exception("Platform not supported")

    boost_unit_test_lib = prefix + "/bempp/lib/" + unit_test_lib_name

    tools.checkDeleteDirectory(boost_full_dir)

    print "Extracting Boost"
    try:
        tools.extract_file(boost_download_name, dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root, config, force=True)
        tools.extract_file(boost_download_name, dep_build_dir)
    os.rename(dep_build_dir + "/" + boost_extract_dir, boost_full_dir)
    shutil.copy(root + "/installer/build_scripts/posix/boost_build.sh",
                boost_full_dir + "/boost_build.sh")

    tools.setDefaultConfigOption(config,
                                 "Boost",
                                 "unit_test_lib",
                                 boost_unit_test_lib,
                                 overwrite=True)
    tools.setDefaultConfigOption(config,
                                 "Boost",
                                 "include_dir",
                                 boost_include_dir,
                                 overwrite=True)

    tools.setCompilerOptions(config, 'Boost')
Esempio n. 16
0
def prepare(root, config):
    dep_build_dir = config.get('Main', 'dependency_build_dir')
    dep_download_dir = config.get('Main', 'dependency_download_dir')
    prefix = config.get('Main', 'prefix')

    cmake_full_dir = dep_build_dir + "/" + cmake_dir
    cmake_download_name = dep_download_dir + "/" + cmake_fname

    cmake_executable = prefix + "/bempp/bin/cmake"

    tools.checkDeleteDirectory(cmake_full_dir)

    print "Extracting CMake"
    try:
        tools.extract_file(dep_download_dir + "/" + cmake_fname, dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root, config, force=True)
        tools.extract_file(dep_download_dir + "/" + cmake_fname, dep_build_dir)
    os.rename(dep_build_dir + "/" + cmake_extract_dir, cmake_full_dir)
Esempio n. 17
0
def prepare(root, config):
    dep_build_dir = config.get("Main", "dependency_build_dir")
    dep_download_dir = config.get("Main", "dependency_download_dir")
    prefix = config.get("Main", "prefix")

    swig_full_dir = dep_build_dir + "/" + swig_dir
    swig_download_name = dep_download_dir + "/" + swig_fname

    swig_executable = prefix + "/bempp/bin/swig"

    tools.checkDeleteDirectory(swig_full_dir)

    print "Extracting Swig"
    try:
        tools.extract_file(dep_download_dir + "/" + swig_fname, dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root, config, force=True)
        tools.extract_file(dep_download_dir + "/" + swig_fname, dep_build_dir)
    os.rename(dep_build_dir + "/" + swig_extract_dir, swig_full_dir)

    tools.setDefaultConfigOption(config, "Swig", "exe", swig_executable, overwrite=True)
    tools.setCompilerOptions(config, "Swig")
Esempio n. 18
0
File: boost.py Progetto: UCL/bempp
def prepare(root,config):
    dep_build_dir=config.get('Main','dependency_build_dir')
    boost_full_dir=dep_build_dir+"/"+boost_dir
    dep_download_dir=config.get('Main','dependency_download_dir')
    boost_download_name=dep_download_dir+"/"+boost_fname

    prefix=config.get('Main','prefix')
    boost_include_dir=prefix+"/bempp/include"

    if sys.platform.startswith('darwin'):
        unit_test_lib_name="libboost_unit_test_framework-mt.dylib"
    elif sys.platform.startswith('linux'):
        unit_test_lib_name="libboost_unit_test_framework-mt.so"
    else:
        raise Exception("Platform not supported")

    boost_unit_test_lib=prefix+"/bempp/lib/"+unit_test_lib_name

    tools.checkDeleteDirectory(boost_full_dir)

    print "Extracting Boost"
    try:
        tools.extract_file(boost_download_name,dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root,config,force=True)
        tools.extract_file(boost_download_name,dep_build_dir)
    os.rename(dep_build_dir+"/"+boost_extract_dir,boost_full_dir)
    shutil.copy(root+"/installer/build_scripts/posix/boost_build.sh",
                boost_full_dir+"/boost_build.sh")

    tools.setDefaultConfigOption(config,"Boost","unit_test_lib",
                                 boost_unit_test_lib,overwrite=True)
    tools.setDefaultConfigOption(config,"Boost","include_dir",
                                 boost_include_dir,overwrite=True)

    tools.setCompilerOptions(config,'Boost')
Esempio n. 19
0
def prepare(root,config):
    dep_build_dir=config.get('Main','dependency_build_dir')
    dep_download_dir=config.get('Main','dependency_download_dir')
    prefix=config.get('Main','prefix')

    swig_full_dir=dep_build_dir+"/"+swig_dir
    swig_download_name=dep_download_dir+"/"+swig_fname

    swig_executable=prefix+"/bempp/bin/swig"

    tools.checkDeleteDirectory(swig_full_dir)

    print "Extracting Swig"
    try:
        tools.extract_file(dep_download_dir+"/"+swig_fname,dep_build_dir)
    except IOError:
        # Possibly a corrupted/truncated file. Try to download once again
        download(root,config,force=True)
        tools.extract_file(dep_download_dir+"/"+swig_fname,dep_build_dir)
    os.rename(dep_build_dir+"/"+swig_extract_dir,swig_full_dir)

    tools.setDefaultConfigOption(config,"Swig","exe",swig_executable,
                                 overwrite=True)
    tools.setCompilerOptions(config,'Swig')