Commit 4f09896c authored by Jeremy Cohen's avatar Jeremy Cohen

Made changes requested in review of !1143

parent b639f0ee
Pipeline #1878 passed with stages
in 241 minutes and 14 seconds
......@@ -9,11 +9,9 @@
INCLUDE(ExternalProject)
IF (WIN32 AND NEKTAR_USE_MPI)
OPTION(NEKTAR_USE_METIS
"Use Metis library for performing mesh partitioning." ON)
OPTION(NEKTAR_USE_METIS "Use Metis library for performing mesh partitioning." ON)
ELSE ()
OPTION(NEKTAR_USE_METIS
"Use Metis library for performing mesh partitioning." OFF)
OPTION(NEKTAR_USE_METIS "Use Metis library for performing mesh partitioning." OFF)
ENDIF ()
IF (NEKTAR_USE_METIS)
......@@ -62,18 +60,18 @@ IF (NEKTAR_USE_METIS)
DEPENDEES download)
ENDIF()
ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# Metis build fails on more recent MSVC compiler versions. The issue
# and suggested fix are described in
# https://github.com/jlblancoc/suitesparse-metis-for-windows/issues/30
# and gk_arch.h is patched here based on this suggested fix
EXTERNALPROJECT_ADD_STEP(metis-5.1.0 patch-install-path
COMMAND powershell -Command "(Get-Content ${TPSRC}/metis-5.1.0/GKlib/gk_arch.h) -replace '(#define rint\\(x\\)[\\w\\(\\) \\+\\.]+)',( \"#if (_MSC_VER " < " 1800)`n\"+'$1'+\"`n#endif\") | Out-File -filepath ${TPSRC}/metis-5.1.0/GKlib/gk_arch.h -encoding ASCII"
COMMAND powershell -Command "(Get-Content ${TPSRC}/metis-5.1.0/GKlib/gk_arch.h) -replace '(#define INFINITY FLT_MAX)',(\"#if (_MSC_VER " < " 1800)`n\"+'$1'+\"`n#endif\") | Out-File -filepath ${TPSRC}/metis-5.1.0/GKlib/gk_arch.h -encoding ASCII"
COMMAND powershell -Command "(Get-Content ${TPSRC}/metis-5.1.0/CMakeLists.txt) -replace 'set\\(METIS_INSTALL FALSE\\)','set(METIS_INSTALL TRUE)' | Out-File -filepath ${TPSRC}/metis-5.1.0/CMakeLists.txt -encoding ASCII"
DEPENDERS build
DEPENDEES download)
ENDIF ()
# Metis build fails on more recent MSVC compiler versions. The issue
# and suggested fix are described in
# https://github.com/jlblancoc/suitesparse-metis-for-windows/issues/30
# and gk_arch.h is patched here based on this suggested fix
EXTERNALPROJECT_ADD_STEP(metis-5.1.0 patch-install-path
COMMAND powershell -Command "(Get-Content ${TPSRC}/metis-5.1.0/GKlib/gk_arch.h) -replace '(#define rint\\(x\\)[\\w\\(\\) \\+\\.]+)',( \"#if (_MSC_VER " < " 1800)`n\"+'$1'+\"`n#endif\") | Out-File -filepath ${TPSRC}/metis-5.1.0/GKlib/gk_arch.h -encoding ASCII"
COMMAND powershell -Command "(Get-Content ${TPSRC}/metis-5.1.0/GKlib/gk_arch.h) -replace '(#define INFINITY FLT_MAX)',(\"#if (_MSC_VER " < " 1800)`n\"+'$1'+\"`n#endif\") | Out-File -filepath ${TPSRC}/metis-5.1.0/GKlib/gk_arch.h -encoding ASCII"
COMMAND powershell -Command "(Get-Content ${TPSRC}/metis-5.1.0/CMakeLists.txt) -replace 'set\\(METIS_INSTALL FALSE\\)','set(METIS_INSTALL TRUE)' | Out-File -filepath ${TPSRC}/metis-5.1.0/CMakeLists.txt -encoding ASCII"
DEPENDERS build
DEPENDEES download
)
ENDIF ()
THIRDPARTY_LIBRARY(METIS_LIBRARY STATIC metis DESCRIPTION "Metis library")
MARK_AS_ADVANCED(METIS_LIBRARY)
......
......@@ -104,6 +104,8 @@ IF (NEKTAR_USE_MPI)
ADD_NEKTAR_TEST(Helmholtz2D_CG_P7_Modes_AllBCs_xxt_sc)
ADD_NEKTAR_TEST(Helmholtz2D_CG_P7_Modes_AllBCs_iter_full_par2)
ADD_NEKTAR_TEST(Helmholtz2D_CG_P7_Modes_AllBCs_iter_sc_par2)
# These tests have been disabled on WIN32 because there's no support
# for MLSC on Windows builds.
IF (NOT WIN32)
ADD_NEKTAR_TEST(Helmholtz2D_CG_P7_Modes_AllBCs_iter_ml_par3)
ADD_NEKTAR_TEST(Helmholtz2D_CG_P7_Modes_xxt_ml)
......
......@@ -160,21 +160,21 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES )
ADD_NEKTAR_TEST(ChanFlow_3DH1D_Parallel_mode2)
ADD_NEKTAR_TEST(ChanFlow_m3_par)
ADD_NEKTAR_TEST(ChanFlow_m8_BodyForce_par LENGTHY)
IF (NOT WIN32)
ADD_NEKTAR_TEST(KovaFlow_expFromFile_par)
ADD_NEKTAR_TEST(KovaFlow_varP_per_par)
ADD_NEKTAR_TEST(Hex_channel_varP_par)
ENDIF ()
ADD_NEKTAR_TEST(Hex_channel_m3_par LENGTHY)
ADD_NEKTAR_TEST(Pyr_channel_m6_par LENGTHY)
ADD_NEKTAR_TEST(Hex_channel_m3_par LENGTHY)
ADD_NEKTAR_TEST(Pyr_channel_m6_par LENGTHY)
ADD_NEKTAR_TEST(Hex_channel_m3_srhs_par LENGTHY)
IF (NOT WIN32)
ADD_NEKTAR_TEST(Tet_channel_m4_per_xxt_ml_par)
ENDIF ()
ADD_NEKTAR_TEST(Tet_channel_m8_par)
ADD_NEKTAR_TEST(Tet_channel_m8_iter_ml_par LENGTHY)
ADD_NEKTAR_TEST(bfs_tg_par LENGTHY)
......
......@@ -17,9 +17,9 @@ IF (NEKTAR_SOLVER_ELASTICITY)
ADD_NEKTAR_TEST(L-domain)
IF (NEKTAR_USE_MPI)
IF (WIN32)
TARGET_LINK_LIBRARIES(LinearElasticSolver LINK_PRIVATE ${GSMPI_LIBRARY} ${XXT_LIBRARY})
ENDIF (WIN32)
IF (WIN32)
TARGET_LINK_LIBRARIES(LinearElasticSolver LINK_PRIVATE ${GSMPI_LIBRARY} ${XXT_LIBRARY})
ENDIF (WIN32)
ADD_NEKTAR_TEST(L-domain-par)
ENDIF (NEKTAR_USE_MPI)
ENDIF (NEKTAR_SOLVER_ELASTICITY)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment