From 18b04b37f85fcad5a7a25362be67e279179152ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Mon, 30 Nov 2015 18:01:17 +0100 Subject: [PATCH] update resources --- .../doxygen/doxfiles/appendix/install.dox | 49 +++++++++--------- medtool/resources/CMakeLists.txt | 24 ++++----- .../resources}/Mesh3D_10_2d1.med | Bin .../resources}/Mesh3D_10_2d2.med | Bin .../resources}/Mesh3D_11.med | Bin {resources => medtool/resources}/poly3D.med | Bin .../resources}/polygones.med | Bin .../resources}/square1_split | 0 .../resources}/square1_split1.med | Bin .../resources}/square1_split2.med | Bin .../resources}/square1_split3.med | Bin .../resources}/square2_split | 0 .../resources}/square2_split1.med | Bin .../resources}/square2_split2.med | Bin medtool/src/MEDLoader/Test/MEDLoaderTest.cxx | 16 +++--- medtool/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx | 30 ++++------- 16 files changed, 54 insertions(+), 65 deletions(-) rename {resources => medtool/resources}/Mesh3D_10_2d1.med (100%) rename {resources => medtool/resources}/Mesh3D_10_2d2.med (100%) rename {resources => medtool/resources}/Mesh3D_11.med (100%) rename {resources => medtool/resources}/poly3D.med (100%) rename {resources => medtool/resources}/polygones.med (100%) rename {resources => medtool/resources}/square1_split (100%) rename {resources => medtool/resources}/square1_split1.med (100%) rename {resources => medtool/resources}/square1_split2.med (100%) rename {resources => medtool/resources}/square1_split3.med (100%) rename {resources => medtool/resources}/square2_split (100%) rename {resources => medtool/resources}/square2_split1.med (100%) rename {resources => medtool/resources}/square2_split2.med (100%) diff --git a/medtool/doc/user/doxygen/doxfiles/appendix/install.dox b/medtool/doc/user/doxygen/doxfiles/appendix/install.dox index d2374d51e..5386739c5 100644 --- a/medtool/doc/user/doxygen/doxfiles/appendix/install.dox +++ b/medtool/doc/user/doxygen/doxfiles/appendix/install.dox @@ -5,38 +5,39 @@ The install procedure of the %MED SALOME module can handle a variety of configurations to suit the needs of its user. Instructions for configuring and installing the module can be found here. +Partitioning and parallel functionalities are optional. -The libraries in SALOME MED can be configured in several manners so that it can run inside or outside the Salome platform. -Also, partitioning and parallel functionalities are optional. - -The sources of the library are located in the \a MED_SRC directory. +Assume that the library sources are located in \a MEDCOUPLING_SRC directory. Build and install directories are MEDCOUPLING_BUILD and MEDCOUPLING_INSTALL, respectively. The first step consists in preparing the CMake build precedure : \verbatim -mkdir MED_BUILD -cd ${MED_BUILD} -cmake -DCMAKE_BUILD_TYPE= -DCMAKE_INSTALL_PREFIX=`pwd`/../MED_INSTALL ../ +mkdir +cd +cmake -DCMAKE_BUILD_TYPE= -DCMAKE_INSTALL_PREFIX= \endverbatim , where is build mode (Release or Debug). -This will create SALOME MED libraries with link to the SALOME Kernel. -Sometimes, if it is desirable to have a standalone version of the library to be used independently from SALOME, use : +This will configure the library without splitting functionalities. The \ref parallel "parallel functionalities" will be compiled if an MPI version has been found. + +The following options can be useful to configure MEDCoupling : +- \a -DMEDTOOL_MED_PARTITIONER_METIS=ON enables metis graph library in MEDPartitioner, +- \a -DMEDTOOL_MED_PARTITIONER_PARMETIS=ON enables parmetis graph library in MEDPartitioner, +- \a -DMEDTOOL_MED_PARTITIONER_SCOTCH=ON enables scotch graph library in MEDPartitioner, +- \a -DMEDTOOL_MED_MICROMED=ON build MED with MED file dependancy, +- \a -DMEDTOOL_MED_ENABLE_PYTHON=ON builds PYTHON bindings, +- \a -DMEDTOOL_MED_ENABLE_PARTITIONER builds MEDPartitioner, +- \a -DMEDTOOL_MED_ENABLE_RENUMBER builds Renumber, +- \a -DMEDTOOL_USE_MPI=ON uses MPI containers. + +According to set options and compilation environment, user may need to define some _ROOT_DIR variables. For example if in SALOME environment: \verbatim -mkdir MED_BUILD -cd ${MED_BUILD} -cmake -DCMAKE_BUILD_TYPE= -DCMAKE_INSTALL_PREFIX=`pwd`/../MED_INSTALL _DSALOME_MED_STANDALONE=ON ../ +export MEDFILE_ROOT_DIR=${MED3HOME} +export METIS_ROOT_DIR=$METISDIR +export SCOTCH_ROOT_DIR=$SCOTCHDIR +export BOOST_ROOT_DIR=$BOOST_ROOT +export GRAPHVIZ_ROOT_DIR=$GRAPHVIZHOME +export CPPUNIT_ROOT_DIR=$CPPUNIT_ROOT \endverbatim -This will configure the library without splitting functionalities. The -\ref parallel "parallel functionalities" will be compiled if an MPI version has been found. - -The following options can be useful to configure SALOME MED : -- \a -DSALOME_MED_PARTITIONER_METIS=ON enables metis graph library in MEDPartitioner, -- \a -DSALOME_MED_PARTITIONER_PARMETIS=ON enables parmetis graph library in MEDPartitioner, -- \a -DSALOME_MED_PARTITIONER_SCOTCH=ON enables scotch graph library in MEDPartitioner, -- \a -DSALOME_MED_MICROMED=ON build MED with MED file dependancy, -- \a -DSALOME_MED_ENABLE_PYTHON=ON builds PYTHON bindings, -- \a -DSALOME_MED_ENABLE_PARTITIONER builds MEDPartitioner, -- \a -DSALOME_MED_ENABLE_RENUMBER builds Renumber, -- \a -DSALOME_USE_MPI=ON uses MPI containers. +If using MPI, the PARMETIS_ROOT_DIR variable should be set. */ diff --git a/medtool/resources/CMakeLists.txt b/medtool/resources/CMakeLists.txt index e891af65c..549b4ea55 100644 --- a/medtool/resources/CMakeLists.txt +++ b/medtool/resources/CMakeLists.txt @@ -124,9 +124,9 @@ SET(MED_RESOURCES_FILES #Old_maillage_chemvalIV_cas1_40elts.med #pointe_nomorereadable21.med pointe.med - #poly3D.med + poly3D.med #polyedres.med - #polygones.med + polygones.med #recoll_bord.med #test19.med # test_2D.med @@ -180,18 +180,18 @@ SET(MED_RESOURCES_FILES MovedHexaBox2.med BoxTetra2.med square1.med - # square1_split - # square1_split1.med - # square1_split2.med - # square1_split3.med + square1_split + square1_split1.med + square1_split2.med + square1_split3.med square2.med - # square2_split - # square2_split1.med - # square2_split2.med + square2_split + square2_split1.med + square2_split2.med # testStructCart3D.med - # Mesh3D_10_2d1.med - # Mesh3D_10_2d2.med - # Mesh3D_11.med + Mesh3D_10_2d1.med + Mesh3D_10_2d2.med + Mesh3D_11.med Pol1.fig Pol2.fig Pol3.fig diff --git a/resources/Mesh3D_10_2d1.med b/medtool/resources/Mesh3D_10_2d1.med similarity index 100% rename from resources/Mesh3D_10_2d1.med rename to medtool/resources/Mesh3D_10_2d1.med diff --git a/resources/Mesh3D_10_2d2.med b/medtool/resources/Mesh3D_10_2d2.med similarity index 100% rename from resources/Mesh3D_10_2d2.med rename to medtool/resources/Mesh3D_10_2d2.med diff --git a/resources/Mesh3D_11.med b/medtool/resources/Mesh3D_11.med similarity index 100% rename from resources/Mesh3D_11.med rename to medtool/resources/Mesh3D_11.med diff --git a/resources/poly3D.med b/medtool/resources/poly3D.med similarity index 100% rename from resources/poly3D.med rename to medtool/resources/poly3D.med diff --git a/resources/polygones.med b/medtool/resources/polygones.med similarity index 100% rename from resources/polygones.med rename to medtool/resources/polygones.med diff --git a/resources/square1_split b/medtool/resources/square1_split similarity index 100% rename from resources/square1_split rename to medtool/resources/square1_split diff --git a/resources/square1_split1.med b/medtool/resources/square1_split1.med similarity index 100% rename from resources/square1_split1.med rename to medtool/resources/square1_split1.med diff --git a/resources/square1_split2.med b/medtool/resources/square1_split2.med similarity index 100% rename from resources/square1_split2.med rename to medtool/resources/square1_split2.med diff --git a/resources/square1_split3.med b/medtool/resources/square1_split3.med similarity index 100% rename from resources/square1_split3.med rename to medtool/resources/square1_split3.med diff --git a/resources/square2_split b/medtool/resources/square2_split similarity index 100% rename from resources/square2_split rename to medtool/resources/square2_split diff --git a/resources/square2_split1.med b/medtool/resources/square2_split1.med similarity index 100% rename from resources/square2_split1.med rename to medtool/resources/square2_split1.med diff --git a/resources/square2_split2.med b/medtool/resources/square2_split2.med similarity index 100% rename from resources/square2_split2.med rename to medtool/resources/square2_split2.med diff --git a/medtool/src/MEDLoader/Test/MEDLoaderTest.cxx b/medtool/src/MEDLoader/Test/MEDLoaderTest.cxx index 0eb08c206..d502eb118 100644 --- a/medtool/src/MEDLoader/Test/MEDLoaderTest.cxx +++ b/medtool/src/MEDLoader/Test/MEDLoaderTest.cxx @@ -1150,16 +1150,16 @@ std::string MEDLoaderTest::getResourceFile( const std::string& filename ) const { std::string resourceFile = ""; - if ( getenv("top_srcdir") ) { - // we are in 'make test' step - resourceFile = getenv("top_srcdir"); - resourceFile += "/resources/"; + if ( getenv("MEDTOOL_ROOT_DIR") ) { + // use MEDTOOL_ROOT_DIR env.var + resourceFile = getenv("MEDTOOL_ROOT_DIR"); + resourceFile += "/share/resources/med/"; } - else if ( getenv("MED_ROOT_DIR") ) { - // use MED_ROOT_DIR env.var - resourceFile = getenv("MED_ROOT_DIR"); - resourceFile += "/share/salome/resources/med/"; + else { + resourceFile = get_current_dir_name(); + resourceFile += "/../../../resources/"; } + resourceFile += filename; return resourceFile; } diff --git a/medtool/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx b/medtool/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx index 42899d94a..4a18a8c08 100644 --- a/medtool/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx +++ b/medtool/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx @@ -30,32 +30,20 @@ #include #endif -//================================================================================ -/*! - * \brief Get path to the resources file. - * - * When running 'make test' source file is taken from MED_SRC/resources folder. - * Otherwise, file is searched in ${MED_ROOT_DIR}/share/salome/resources/med folder. - * - * \param filename name of the resource file (should not include a path) - * \return full path to the resource file - */ -//================================================================================ - std::string ParaMEDMEMTest::getResourceFile( const std::string& filename ) { std::string resourceFile = ""; - if ( getenv("top_srcdir") ) { - // we are in 'make test' step - resourceFile = getenv("top_srcdir"); - resourceFile += "/resources/"; + if ( getenv("MEDTOOL_ROOT_DIR") ) { + // use MEDTOOL_ROOT_DIR env.var + resourceFile = getenv("MEDTOOL_ROOT_DIR"); + resourceFile += "/share/resources/med/"; } - else if ( getenv("MED_ROOT_DIR") ) { - // use MED_ROOT_DIR env.var - resourceFile = getenv("MED_ROOT_DIR"); - resourceFile += "/share/salome/resources/med/"; + else { + resourceFile = get_current_dir_name(); + resourceFile += "/../../resources/"; } + resourceFile += filename; return resourceFile; } @@ -92,7 +80,7 @@ std::string ParaMEDMEMTest::getTmpDirectory() //================================================================================ /*! - * \brief Creates a copy of source file (if source file is specified) + * \brief Creates a copy of source file (if source file is specified) * in the temporary directory and returns a path to the tmp file * * \param tmpfile name of the temporary file (without path) -- 2.39.2