-
Gilles MARCKMANN authored
Author: Salzman Alexis <alexis.salzman@ec-nantes.fr> Date: Fri Dec 1 13:36:40 2017 +0100 Remove find MPI4 and set_cxx_compiler I originally add set_cxx_compiler to handle TAU warper and complete FIND MPI3 with LIGER specific search in FIND MPI4. It gives me a quick solution to use titan,liger,... but was not working so well regarding mandatory fortran MPI libray required by MUMPS (F90 library) Both changes, as pointed by N.C., where a insane way of dealing with MPI project when using CMAKE. This commit try to propose a more "conventional" way of doing those thinks. * Now find is done with official find MPI function provided with CMAKE * Now compiler used for all compilation is the C++ compiler, not the MPI warper. FINDMPI provide include and libs in MPI_<LANG>_INCLUDE_PATH and MPI_<LANG>_LIBRARIES. This setting have been used where it have to. In fact it is almost everywhere now, as we switch eXlibris in MPI. But I did want to trace real usage of those MPI material. So please don't add those include and library in a top level CMakefile.txt This work shows that many files have been changed, too many .... But clearly it show that in term of dependency eXlibris_tools (in particular for xMPIEnv) depend on MPI include and libraries. Then all library/executable using eXlibris_tools will depend on MPI. It turns out that using transitiveness of last CMAKE functionality would have transform this work into a simple modification of one target, other inhering naturally those changes .... I hope that one day we come to use thing like that ... Now regarding what does "find FINDMPI" it is an other story. We may hope that next version will be more "efficient". This commit have been test on the following: titan: centos7 + mvapich2.2 (rpm install) + g++ 4.8.2 titan: centos7 + mvapich2.2 (rpm install) + g++ 4.8.2 + TAU liger: Red Hat Enterprise Linux Server release 6.6 + intel mpi + intel compiler (back end g++ 4.9) desktop: fedora core 19 + mpich3 (rpm install) + g++ 4.8.3 laptop: OpenSuse 42.3 + openmpi 10 + g++ xxx On all those platform some setting where in fact provided in LocalConfig.cmake that correspond more or less to what we where expecting from FINDMPI. Anyway the good aspect is that now adapted setting are not anymore introduced in a proprietary FINDMPI with a huge maintenance cost and a arguable performance. Those adapted setting are : * MPI_<C,CXX,Fortran>_COMPILER (in LocalConfig): If you need to set compiler for one language do it for all( In some platforme FINDTRHEAD need C lanquage to be activate which imply for FINDMPI, with required argument, that MPI_C_COMPILER is found even if we don't need it). Fortran use here and there imply fortran language enable and like C impose a MPI fortran compiler available. I don't think that this constraint is so important as in general an MPI library provide all those compilers. For tau giving taucc,taucxx and tauf90 is fine and works nicely. * MPIEXEC (in LocalConfig): surprisingly FINDMPI is not giving always the launcher corresponding to the given compiler !? Typically for titan it gives the hpmpi version ? On liger it was found by FINDMPI but in fact mpirun was the correct launcher to use with impi. This commit have modified all test so that they use those MPIEXEC,MPIEXEC_NUMPROC_FLAG,MPIEXEC_PREFLAGS and MPIEXEC_POSTFLAGS variable. Please maintain this way of writing. * for intel mpi compiled with ifort an extra ifcore library must be provided at linking stage (see main CMakeFile.txt) Not that now there is only one call find_package(MPI REQUIRED) in the top CMakeLists.txt (GemUtil). The idea is that you use this files for all what you need (Appli,lib,Atomic,test,...). By including machine dependent feature and doing appropriate test it permit to have every thing normally working. TTK is to be treated ... soon and hopefully like said above. ==================== This commit check Atomic and Xtest test: On all those platforms 4 tests crash: front cube_planar_crack geometricderivative singular3d_one (mostly related to something in xLevelset new // version) And ~9 test give inappropriate results compare to reference when ndiff was available in those platform. (to be investigate. But already: spacePolyOctree has been not modified at time of some change in spaces => it naturally cannot work anymore) Author: Salzman Alexis <alexis.salzman@ec-nantes.fr> Date: Wed Nov 22 14:23:17 2017 +0100 cmake: retrieving Atomic strategy of master branch + some debug Atomic test are back in top buildir location Atomic are now under BUILD_ATOMIC family options only (if you want to run atomic test on already installed library or in the course of compiling needed library or in a step by step manner it is possible ) =>Change CMakeLists.txt of atomic test so that they can be done independently of the library it test. Miscellaneous bug correction (with G.M.): * in some test correct way of launching program * add a FindLinearAlgebra for Atomic LinearAlgebra test * good test in FindXmodule so that ERROR message stop process * set_cxx_compiler: This function should not exist. When someone get time a look to tau warper may give a way to use standard standard CMAKE project language selection with MPI include. Then library given by standard MPI find and some extra stuff for TAU will be used with CXX compiler found by cmake. Anyway, bugg here was related to newer version of CMAKE that refuse to change variable setted in parent scope when setting them in the cache. An extra setting n this function using PARENT_SCOPE correct this problem. * Remove add_definitions in CMakeLists.txt file of eXlibris_tools so that xMPIENV is not using any imposed initialisation. This have to be modified in the source. But I don't have a nett solution for now so it stays like that for the moment Author: Gilles Marckmann <gilles.marckmann@ec-nantes.fr> Date: Tue Nov 14 17:52:30 2017 +0100 suppress set_internal( )command and replace with suitable add_definition(...) at the bottom level if needed correction of bug in definitions of tests for ctest Author: Gilles Marckmann <gilles.marckmann@ec-nantes.fr> Date: Tue Nov 14 14:00:49 2017 +0100 split Util/cmakeUtil/FindSolverInterfaces.cmake into : Util/cmakeUtil/FindInterfaceKSPParallel.cmake Util/cmakeUtil/FindInterfaceLapack.cmake Util/cmakeUtil/FindInterfaceMtl.cmake Util/cmakeUtil/FindInterfaceMumps.cmake Util/cmakeUtil/FindInterfaceNonLinearSolver.cmake Util/cmakeUtil/FindInterfacePastix.cmake Util/cmakeUtil/FindInterfacePetscParallel.cmake Util/cmakeUtil/FindInterfacePetscSeq.cmake Util/cmakeUtil/FindInterfaceSparsKit.cmake Util/cmakeUtil/FindInterfaceSuperLu.cmake Util/cmakeUtil/FindInterfaceTaucs.cmake Util/cmakeUtil/FindSolverBase.cmake Split Xinterfaces/SolverInterfaces/CMakeLists.txt into: Xinterfaces/SolverInterfaces/Itl/CMakeLists.txt Xinterfaces/SolverInterfaces/KSPParallel/CMakeLists.txt Xinterfaces/SolverInterfaces/Lapack/CMakeLists.txt Xinterfaces/SolverInterfaces/Itl/CMakeLists.txt Xinterfaces/SolverInterfaces/KSPParallel/CMakeLists.txt Xinterfaces/SolverInterfaces/Lapack/CMakeLists.txt Xinterfaces/SolverInterfaces/PetscParallel/CMakeLists.txt Xinterfaces/SolverInterfaces/PetscSeq/CMakeLists.txt Xinterfaces/SolverInterfaces/SolverBase/CMakeLists.txt Xinterfaces/SolverInterfaces/Mtl/CMakeLists.txt Xinterfaces/SolverInterfaces/NonLinearSolver/CMakeLists.txt Xinterfaces/SolverInterfaces/Taucs/CMakeLists.txt Split find_package(SolverInterfaces) into appropriate find_package(Interface<Solver>): Author: Salzman Alexis <alexis.salzman@ec-nantes.fr> Date: Tue Nov 14 09:46:49 2017 +0100 Miscellaneous modification FindLAPACK2 =========== use of function instead of particular hand made instruction FindMETIS.cmake =============== detail FindMPI4 ======== order of mpi fortran lib for liger FindNoHeaderLibrary/FindStandardLibrary (from G.M. and A.S. work) ================================================================= reshaping those function so that one call the other for lib and when user give a path find stick to hit and not to everywhere below it. common_functions.cmake ====================== add is_not_installed function for LocalConfig.cmake file correct bug on link CMakeLists.txt of SolverInterfaces ================================== update Xfem/Xfem/src/xRefMesh.h ======================== comment #define so that associated option do something Author: Gregory Legrain <gregory.legrain@ec-nantes.fr> Date: Thu Nov 9 18:07:44 2017 +0100 * Options have to be set from the main CmakeLists.txt. If you want to build a standalone component of the library, you should adapt its CMakeLists.txt by befining the required options * Replace XXXX_APPLI by USE_XXXX Author: Gregory Legrain <gregory.legrain@ec-nantes.fr> Date: Wed Nov 8 21:30:27 2017 +0100 Fix a warning in FindBLAS2.cmake (cmake 3.9) Fix an issue in FindMPI4.cmake : do not reset MPI_PREFIX_PATH if it was already set from outside Author: Salzman Alexis <alexis.salzman@ec-nantes.fr> Date: Wed Nov 8 15:18:01 2017 +0100 cmake: general option related to ATOMIC test is now in cmakefiles NOTE: As mentioned in previous commit, general atomic option is now used where it have to, instead of having a painful function to maintain. Somme option have been removed. Here situation have to be clarified. Most option are general and have them on top CMAKEFILE is natural. Setting then in intermediate CMAKEFILE is somehow painful to maintain, and removing them from those intermediate files look like a simplification. But some others are less general. For example if in Xcut we don't need GEOM but in XFEM yes what do we do with the potential USE_GEOM on top CMAKEFILE. A solution is to comment it and set it to "off" in XCUT CMAKEFILE and "on" in XFEM CMAKEFILE ...and then we would be glade that they already exist.... So this commit has just removed few intermediate option declaration. But reflection must progress on this aspect ... if we keep this system. Author: Salzman Alexis <alexis.salzman@ec-nantes.fr> Date: Tue Nov 7 16:10:44 2017 +0100 cmake: to stick to NEW policy with 3.7 version Author: Salzman Alexis <alexis.salzman@ec-nantes.fr> Date: Fri Oct 27 19:40:44 2017 +0200 cmakeUtil: add force_atomic function to follow new option BUILD_ATOMIC_TEST See commit in GemUtil for explanation. Should be removed when all cmake will take into account the BUILD_ATOMIC_TEST option Author: Gilles Marckmann <gilles.marckmann@ec-nantes.fr> Date: Mon Oct 16 14:51:26 2017 +0200 All CMakeLists.txt have been modified to take into account : 1. Ability to turn ON or OFF the verbosity of the CMakeLists.txt while executing cmake command: Option VERBOSE has been added. It works with a new function message_verbose() defined in Xfiles/Util/cmakeUtil/common_functions.cmake. This function displays a string variable: set(text "my text to print when option VERBOSE is ON") message_verbose(text) 2. Customization of installation path: 2.1. LIBRARIES_INSTALL_PATH is a new cmake variable which describes the destination of the librairies (where they will be installed or where they are installed). If this variable is not defined, libraries will be installed in ${DEVROOT}/lib, like in the previous CMakeLists version. 2.2. EXECUTABLES_INSTALL_PATH is a new cmake variable which describes the destination of the executables (where tests will be writen). If this variable is not defined, libraries will be writen in the build directory of the executable, like in the previous CMakeLists version. The ARCHOS suffix is added to the name of the test to create the name of the executable. In this way, several executables can be written in the same test directory but can be distinguished. Nevertheless, the test names for ctest command are the name of the test-cases without ARCHOS suffix. Thus, the ctest command executes the latest built executables. 3. Simplification of the find_XXX.cmake = find_package(XXX) : 3.1. findXmodule.cmake describes a new function standardizing the find_package() of each module of eXlibris (Xfem, Octre, Xcut, ...) in the present organization. (See examples in FindXfem.cmake, FindOctree.cmake, ...). Modules are searched: - as a target if any, - in the subdirectory ARCHOS or the LIBRARIES_INSTALL_PATH, - a FATAL_ERROR appears if the module is NOTFOUND or void. - includes are always known as DEVROOT is known. - when FOUND, librairies are forced in the cache to ensure unicity. A message is displayed even if VERBOSE is OFF. - when the library and includes are known, no more search is done (the cache variables are taken and displayed if VERBOSE is ON), - mark_as_advanced() functions are removed so that libraries can be displayed in cmake GUIs. 3.2. External librairies are searched in a new ways: 3.2.1. In the DEVROOT directory, a new file called ExternalLibrariesPaths.cmake describes the path of external librairies (ANN, CGAL, MPI, ...). All directory containing the libraries to find can be set() with the name <the library>_LIBRARY_PATH and <the library>_INCLUDE_PATH. Default paths can be set() in CMAKE_PREFIX_PATH for libraries and CMAKE_SYSTEM_PREFIX_PATH for MPI (See example in GeMUtil/ExternalLibrariesPaths_titan.cmake) 3.2.2. cmakeUtil/FindStandardLibrary.cmake describes a new function to find a library and its include directory (see example in FindITL.cmake or FindANN.cmake). A FATAL_ERROR appears if the library or includes are NOTFOUND. 3.2.3. cmakeUtil/FindNoHeaderLibrary.cmake describes a new function to find a library without includes (see example in FindSUPERLU.cmake). A FATAL_ERROR appears if the library is NOTFOUND. 3.2.4 For the sake of consistency FindAOMDInterfaceGeneral.cmake has been renamed in FindXAOMDInterfaceGeneral.cmake. Library variable is XAOMDInterfaceGeneral_LIBRARIES and includes are in XAOMDInterfaceGeneral_INCLUDE_DIR. 3.2.5 FindXInterfaces.cmake is now obsolete. We have to be more precise by using: - find_package(SolverInterfaces) - find_package(XAOMDInterfaceGeneral) - find_package(XoctreeInterface) - find_package(XsplitMeshInterface) 4. Access of options in the main CMakeLists.txt: all options are gathered in the main CMakeLists.txt. 4.1. New options are added to build the librairies, atomic tests and tests: - Options BUILD_EXLIBRISTOOLS, BUILD_GEOM, BUILD_MESHMACHINE, BUILD_OCTREE, BUILD_PHYSICS, BUILD_TRELLIS, BUILD_XCRACK, BUILD_XCUT, BUILD_XEXT, BUILD_XFEM, BUILD_XTLS and BUILD_SOLVERBASE to build the modules. - Options BUILD_INTERFACE_MUMPS, BUILD_INTERFACE_LAPACK, BUILD_INTERFACE_SUPERLU , BUILD_INTERFACE_TAUCS, BUILD_INTERFACE_NONLINEARSOLVER, BUILD_DISTMESH, BUILD_LINEARALGEBRA, BUILD_SPLITMESH, BUILD_XAOMDINTERFACEGENERAL BUILD_INTERFACE_MTL, BUILD_INTERFACE_PETSC_SEQUENTIEL, BUILD_INTERFACE_SPARSKIT, BUILD_INTERFACE_KSPPARALLEL, BUILD_INTERFACE_PETSC_PARALLEL, BUILD_INTERFACE_PASTIX to build the interface (sub-modules). - Options BUILD_EXLIBRIS_TOOLS_TEST, BUILD_TRELLIS_TEST, BUILD_OCTREE_TEST, BUILD_SPLIT_TEST, BUILD_LINEARALGEBRA_TEST, BUILD_DISTMESH_TEST, BUILD_FASTMARCHING_TEST, BUILD_XTLS_TEST, BUILD_SOLVERBASE_TEST, BUILD_SUPERLU_TEST, BUILD_LAPACK_TEST,BUILD_NONLINEARSOLVER_TEST, BUILD_ANALYTICAL_TEST, BUILD_LINEARALGEBRA_TEST to build atomic tests. - Options BUILD_GEOM_TEST, BUILD_PHYSICS_SEQ_TEST, BUILD_SOLVERINTERFACES_TEST, BUILD_XCRACK_TEST, BUILD_XCUT_TEST, BUILD_XEXT_TEST, BUILD_XFEM_PARA_TEST, BUILD_XFEM_SEQ_TEST, BUILD_XOCTREEINTERFACE_TEST, BUILD_XTLS_TEST, BUILD_XSPLITMESHINTERFACE_TEST to build tests of Xtest. 4.2. Options are harmonized to use or not the librairies, even ever they are build or found. Options names ENABLE_<library> has been renamed in USE_<library> which suggests that we will use the library or not: - USE_ANN, USE_XCUT, USE_XEXT, USE_AOMD, USE_PHYSICS, USE_XREFMESH_WITH_SUB, USE_MULTICUT, USE_FASTMARCHING, USE_MTL, USE_ITL, USE_SUPERLU, USE_TAUCS, USE_PETSC_SEQUENTIE, USE_SPARSKIT, USE_NONLINEARSOLVER, USE_KSPPARALLEL, USE_PETSC_SEQUENTIEL, USE_MUMPS, USE_PARMETIS, USE_PTSCOTCH, USE_PASTIX, USE_MKL, USE_BOOST_SYS_MT 5. Simplification of the project names: all project() functions have been remouved. The project() must been defined in the main CMakeLists.txt as all modules and tests belong to the same project(). This avoid loop in building because of the reset of the C++ compiler (MPIC++ for eXlibris).
418b9ec4