From: Cédric Aguerre Date: Mon, 30 Nov 2015 17:01:17 +0000 (+0100) Subject: update resources X-Git-Tag: simple_cmake~2^2~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7013096b0fd7785033381efcaa192f87bf549f4e;p=tools%2Fmedcoupling.git update resources --- diff --git a/doc/user/doxygen/doxfiles/appendix/install.dox b/doc/user/doxygen/doxfiles/appendix/install.dox index d2374d51e..5386739c5 100644 --- a/doc/user/doxygen/doxfiles/appendix/install.dox +++ b/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/resources/CMakeLists.txt b/resources/CMakeLists.txt index e891af65c..549b4ea55 100644 --- a/resources/CMakeLists.txt +++ b/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/resources/Mesh3D_10_2d1.med new file mode 100644 index 000000000..508781d32 Binary files /dev/null and b/resources/Mesh3D_10_2d1.med differ diff --git a/resources/Mesh3D_10_2d2.med b/resources/Mesh3D_10_2d2.med new file mode 100644 index 000000000..071d4a3dc Binary files /dev/null and b/resources/Mesh3D_10_2d2.med differ diff --git a/resources/Mesh3D_11.med b/resources/Mesh3D_11.med new file mode 100644 index 000000000..5088b55b3 Binary files /dev/null and b/resources/Mesh3D_11.med differ diff --git a/resources/poly3D.med b/resources/poly3D.med new file mode 100644 index 000000000..5a42c3ff9 Binary files /dev/null and b/resources/poly3D.med differ diff --git a/resources/polygones.med b/resources/polygones.med new file mode 100644 index 000000000..0782b0098 Binary files /dev/null and b/resources/polygones.med differ diff --git a/resources/square1_split b/resources/square1_split new file mode 100644 index 000000000..c6a1bce25 --- /dev/null +++ b/resources/square1_split @@ -0,0 +1,6 @@ +#MED Fichier V 2.3 +# +3 +Mesh_2 1 Mesh_2_1 localhost /home/vb144235/resources/square1_split1.med +Mesh_2 2 Mesh_2_2 localhost /home/vb144235/resources/square1_split2.med +Mesh_2 3 Mesh_2_3 localhost /home/vb144235/resources/square1_split3.med diff --git a/resources/square1_split1.med b/resources/square1_split1.med new file mode 100644 index 000000000..c3ec2b8f5 Binary files /dev/null and b/resources/square1_split1.med differ diff --git a/resources/square1_split2.med b/resources/square1_split2.med new file mode 100644 index 000000000..42e0777a1 Binary files /dev/null and b/resources/square1_split2.med differ diff --git a/resources/square1_split3.med b/resources/square1_split3.med new file mode 100644 index 000000000..c77d0688c Binary files /dev/null and b/resources/square1_split3.med differ diff --git a/resources/square2_split b/resources/square2_split new file mode 100644 index 000000000..bad1d1a8f --- /dev/null +++ b/resources/square2_split @@ -0,0 +1,5 @@ +#MED Fichier V 2.3 +# +2 +Mesh_3 1 Mesh_3_1 localhost /home/vb144235/resources/square2_split1.med +Mesh_3 2 Mesh_3_2 localhost /home/vb144235/resources/square2_split2.med diff --git a/resources/square2_split1.med b/resources/square2_split1.med new file mode 100644 index 000000000..497957256 Binary files /dev/null and b/resources/square2_split1.med differ diff --git a/resources/square2_split2.med b/resources/square2_split2.med new file mode 100644 index 000000000..109f2500f Binary files /dev/null and b/resources/square2_split2.med differ diff --git a/src/MEDLoader/Test/MEDLoaderTest.cxx b/src/MEDLoader/Test/MEDLoaderTest.cxx index 0eb08c206..d502eb118 100644 --- a/src/MEDLoader/Test/MEDLoaderTest.cxx +++ b/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/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx index 42899d94a..4a18a8c08 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest.cxx +++ b/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)