From 03cbb38cd237d69bf9c4f14ce5af41043ea6ad72 Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Tue, 15 Aug 2023 01:46:58 +0200 Subject: [PATCH] Update helper text --- CMakeLists.txt | 28 ++++++++++++------------- Option.cmake | 57 ++++++++++++++++++++++++++------------------------ 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23156c2e1..64ce563ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,18 +37,18 @@ include(${ROOT}/Option.cmake) link_directories(${PROJECT_BINARY_DIR}/Libs) add_executable(${PROJECT_NAME} - "suanPan.cpp" - "Include/fmt/src/format.cc" - "Include/whereami/whereami.c" - "Include/catch/catch_amalgamated.cpp" - "Constraint/CMakeLists.txt" - "Database/CMakeLists.txt" - "Domain/CMakeLists.txt" - "Load/CMakeLists.txt" - "Recorder/CMakeLists.txt" - "Step/CMakeLists.txt" - "Toolbox/CMakeLists.txt" - "UnitTest/CMakeLists.txt" + suanPan.cpp + Include/fmt/src/format.cc + Include/whereami/whereami.c + Include/catch/catch_amalgamated.cpp + Constraint/CMakeLists.txt + Database/CMakeLists.txt + Domain/CMakeLists.txt + Load/CMakeLists.txt + Recorder/CMakeLists.txt + Step/CMakeLists.txt + Toolbox/CMakeLists.txt + UnitTest/CMakeLists.txt ) if (MSVC) @@ -87,10 +87,10 @@ if (FORTRAN_STATUS) add_subdirectory(Toolbox/mumps-src) add_subdirectory(Toolbox/fext) target_link_libraries(${PROJECT_NAME} fext) - message("Linking additional amd arpack mumps feast") + message("Linking additional amd arpack mumps feast libraries.") elseif (COMPILER_IDENTIFIER MATCHES "vs") target_link_libraries(${PROJECT_NAME} libfext) - message("Linking precompiled fext (packed with amd arpack mumps feast)") + message("Linking precompiled fext (packed with amd arpack mumps feast) library.") else () message(FATAL_ERROR "Please install a valid FORTRAN compiler.") endif () diff --git a/Option.cmake b/Option.cmake index 1f3be19f6..a168b5051 100644 --- a/Option.cmake +++ b/Option.cmake @@ -9,25 +9,25 @@ message("CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") set(BUILD_PACKAGE "" CACHE STRING "DEB OR RPM") -option(BUILD_DLL_EXAMPLE "BUILD DYNAMIC LIBRARY EXAMPLE" OFF) -option(BUILD_MULTITHREAD "BUILD MULTI THREADED VERSION" OFF) -option(BUILD_SHARED "LINK ALL SHARED LIBRARY" OFF) -option(USE_SUPERLUMT "USE MULTI THREADED SUPERLU" OFF) -option(USE_EXTERNAL_VTK "USE EXTERNAL VTK LIBRARY TO ENABLE VISUALIZATION" OFF) -option(USE_HDF5 "ENABLE HDF5 SUPPORT TO RECORD DATA" ON) -option(USE_AVX "USE AVX" ON) -option(USE_AVX2 "USE AVX2" OFF) -option(USE_AVX512 "USE AVX512" OFF) -option(USE_MKL "USE INTEL MKL" OFF) +option(BUILD_DLL_EXAMPLE "Build dynamic linked library examples." OFF) +option(BUILD_MULTITHREAD "Build with multi-threaded support via TBB." OFF) +option(BUILD_SHARED "Build all libraries as shared ones." OFF) +option(USE_SUPERLUMT "Use multi-threaded SuperLU. Note the performance may not be better than the sequential version." OFF) +option(USE_EXTERNAL_VTK "Enable visualisation via VTK. Note external VTK libraries need to be compiled in advance." OFF) +option(USE_HDF5 "Enable recording results in HDF5 format." ON) +option(USE_AVX "Enable AVX support." ON) +option(USE_AVX2 "Enable AVX2 support." OFF) +option(USE_AVX512 "Enable AVX512 support." OFF) +option(USE_MKL "Use Intel MKL instead of OpenBLAS." OFF) if (USE_MKL) - option(USE_INTEL_OPENMP "USE INTEL OPENMP IMPLEMENTATION ON LINUX AND MACOS" ON) - option(LINK_DYNAMIC_MKL "LINK DYNAMIC MKL LIBRARY" ON) - option(USE_MPI "ENABLE MPI BASED SOLVERS" OFF) + option(USE_INTEL_OPENMP "Use Intel OpenMP implementation on Linux and macOS" ON) + option(LINK_DYNAMIC_MKL "Link dynamic Intel MKL libraries." ON) + option(USE_MPI "Enable MPI based global solvers." OFF) if (USE_MPI) - option(USE_INTEL_MPI "USE INTEL MPI IMPLEMENTATION ON LINUX AND MACOS" ON) + option(USE_INTEL_MPI "Use Intel MPI implementation on Linux and macOS." ON) if (NOT USE_INTEL_MPI) - set(MPI_INC "INCLUDE PATH OF OPENMPI" CACHE PATH "") - set(MPI_LIB "LIB PATH OF OPENMPI" CACHE PATH "") + set(MPI_INC "OpenMPI include path." CACHE PATH "") + set(MPI_LIB "OpenMPI lib path." CACHE PATH "") endif () endif () else () @@ -47,7 +47,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows") # WINDOWS PLATFORM if (FORTRAN_STATUS) set(BUILD_SHARED OFF CACHE BOOL "" FORCE) endif () - option(USE_EXTERNAL_CUDA "USE EXTERNAL CUDA LIBRARY TO UTILIZE GPU" OFF) + option(USE_EXTERNAL_CUDA "Enable GPU based global solvers via CUDA." OFF) endif () elseif (CMAKE_SYSTEM_NAME MATCHES "Linux") # LINUX PLATFORM set(SP_EXTERNAL_LIB_PATH "linux") @@ -61,7 +61,7 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "Linux") # LINUX PLATFORM elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # Clang COMPILER set(COMPILER_IDENTIFIER "clang-linux") endif () - option(USE_EXTERNAL_CUDA "USE EXTERNAL CUDA LIBRARY TO UTILIZE GPU" OFF) + option(USE_EXTERNAL_CUDA "Enable GPU based global solvers via CUDA." OFF) elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin") # MAC PLATFORM set(SP_EXTERNAL_LIB_PATH "mac") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") # GNU GCC COMPILER @@ -79,7 +79,7 @@ if (COMPILER_IDENTIFIER MATCHES "unknown") endif () if (USE_MKL AND USE_EXTERNAL_CUDA) - option(USE_MAGMA "USE MAGMA LIBRARY" OFF) + option(USE_MAGMA "Enable GPU based global solvers via MAGMA." OFF) endif () link_directories(Libs/${SP_EXTERNAL_LIB_PATH}) @@ -94,7 +94,7 @@ if (USE_MKL) set(MKLROOT "" CACHE PATH "MKL library path which contains /include and /lib folders.") find_file(MKL_HEADER NAMES mkl.h PATHS ${MKLROOT}/include) if (MKL_HEADER MATCHES "MKL_HEADER-NOTFOUND") - message(FATAL_ERROR "The mkl.h is not found under the path: ${MKLROOT}/include") + message(FATAL_ERROR "The is not found under the path: ${MKLROOT}/include.") endif () add_compile_definitions(SUANPAN_MKL) # add_compile_definitions(ARMA_USE_MKL_ALLOC) @@ -137,7 +137,7 @@ if (USE_EXTERNAL_CUDA) cmake_policy(SET CMP0146 OLD) find_package(CUDA) if (NOT CUDA_FOUND) - set(CUDA_PATH "" CACHE PATH "CUDA library path which contains /include folder") + set(CUDA_PATH "" CACHE PATH "CUDA library path which contains /include folder.") find_package(CUDA PATHS ${CUDA_PATH}) if (NOT CUDA_FOUND) message(FATAL_ERROR "CUDA library is not found, please indicate its path.") @@ -152,7 +152,7 @@ if (USE_MAGMA) set(MAGMAROOT "" CACHE PATH "Magma library path which contains /include and /lib folders.") find_file(MAGMA_HEADER NAMES magma.h PATHS ${MAGMAROOT}/include) if (MAGMA_HEADER MATCHES "MAGMA_HEADER-NOTFOUND") - message(FATAL_ERROR "The magma.h is not found under the path: ${MAGMAROOT}/include") + message(FATAL_ERROR "The is not found under the path: ${MAGMAROOT}/include.") endif () include_directories(${MAGMAROOT}/include) link_directories(${MAGMAROOT}/lib) @@ -171,7 +171,7 @@ if (USE_EXTERNAL_VTK) add_compile_definitions(SUANPAN_VTK) set(HAVE_VTK TRUE CACHE INTERNAL "") else () - set(VTK_PATH "" CACHE PATH "VTK library path which contains /include folder") + set(VTK_PATH "" CACHE PATH "VTK library path which contains /include folder.") find_package(VTK PATHS ${VTK_PATH}) if (NOT VTK_FOUND) message(FATAL_ERROR "VTK library is not found, please indicate its path.") @@ -207,10 +207,13 @@ if (BUILD_MULTITHREAD) else () link_libraries(tbb) endif () - # for armadillo to use tbb allocator - add_compile_definitions(ARMA_USE_TBB_ALLOC) - include_directories(Include/oneapi) # because armadillo assumes oneapi be in the include path - link_libraries(tbbmalloc tbbmalloc_proxy) + option(USE_TBB_ALLOC "Use tbb memory allocator. Enable if no other allocators will be used." OFF) + if (USE_TBB_ALLOC) + # for armadillo to use tbb allocator + add_compile_definitions(ARMA_USE_TBB_ALLOC) + include_directories(Include/oneapi) # because armadillo assumes oneapi be in the include path + link_libraries(tbbmalloc tbbmalloc_proxy) + endif () endif () if (BUILD_SHARED)