From 4648b8f7998ae76d87d033116ba2c25b4f336ecf Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Thu, 9 Nov 2023 21:06:50 -0500 Subject: [PATCH 01/43] effort to resolve build breaking gasnet issues --- .jenkins/lsu/env-clang-12.sh | 8 ++++---- .jenkins/lsu/env-clang-13.sh | 8 ++++---- .jenkins/lsu/env-clang-14.sh | 8 ++++---- .jenkins/lsu/env-clang-15.sh | 8 ++++---- .jenkins/lsu/env-clang-16.sh | 8 ++++---- .jenkins/lsu/env-clang-17.sh | 8 ++++---- .jenkins/lsu/env-gcc-10.sh | 8 ++++---- .jenkins/lsu/env-gcc-12.sh | 8 ++++---- .jenkins/lsu/env-gcc-13.sh | 8 ++++---- cmake/HPX_AddTest.cmake | 3 --- cmake/templates/hpxrun.py.in | 14 +++++++++++--- libs/core/gasnet_base/src/gasnet_environment.cpp | 10 +++++----- 12 files changed, 52 insertions(+), 47 deletions(-) diff --git a/.jenkins/lsu/env-clang-12.sh b/.jenkins/lsu/env-clang-12.sh index 15e920431f54..112b3e4ccd68 100644 --- a/.jenkins/lsu/env-clang-12.sh +++ b/.jenkins/lsu/env-clang-12.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DCMAKE_BUILD_TYPE=${build_type}" configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" @@ -25,11 +25,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" # The pwrapi library still needs to be set up properly on rostam diff --git a/.jenkins/lsu/env-clang-13.sh b/.jenkins/lsu/env-clang-13.sh index 4582dd0dba9f..ba0f1ade923b 100644 --- a/.jenkins/lsu/env-clang-13.sh +++ b/.jenkins/lsu/env-clang-13.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="17" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DCMAKE_BUILD_TYPE=${build_type}" configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" @@ -25,11 +25,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_TESTS_COMMAND_LINE=--hpx:queuing=local-workrequesting-fifo" diff --git a/.jenkins/lsu/env-clang-14.sh b/.jenkins/lsu/env-clang-14.sh index 5a52f3c2dca5..208248512990 100644 --- a/.jenkins/lsu/env-clang-14.sh +++ b/.jenkins/lsu/env-clang-14.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DCMAKE_BUILD_TYPE=${build_type}" configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" @@ -25,11 +25,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" diff --git a/.jenkins/lsu/env-clang-15.sh b/.jenkins/lsu/env-clang-15.sh index b92c378bd2ce..cf5542cb55e9 100644 --- a/.jenkins/lsu/env-clang-15.sh +++ b/.jenkins/lsu/env-clang-15.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DCMAKE_BUILD_TYPE=${build_type}" configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" @@ -25,11 +25,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" diff --git a/.jenkins/lsu/env-clang-16.sh b/.jenkins/lsu/env-clang-16.sh index c1cf84333a6d..d4eac31d296c 100644 --- a/.jenkins/lsu/env-clang-16.sh +++ b/.jenkins/lsu/env-clang-16.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DCMAKE_BUILD_TYPE=${build_type}" configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" @@ -25,11 +25,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" diff --git a/.jenkins/lsu/env-clang-17.sh b/.jenkins/lsu/env-clang-17.sh index fc0a9d8eee59..9a4ff5e32679 100644 --- a/.jenkins/lsu/env-clang-17.sh +++ b/.jenkins/lsu/env-clang-17.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DCMAKE_BUILD_TYPE=${build_type}" configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" @@ -25,11 +25,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" diff --git a/.jenkins/lsu/env-gcc-10.sh b/.jenkins/lsu/env-gcc-10.sh index 3953fae9420a..cf6c79a9f081 100644 --- a/.jenkins/lsu/env-gcc-10.sh +++ b/.jenkins/lsu/env-gcc-10.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="17" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" configure_extra_options+=" -DHPX_WITH_MALLOC=system" @@ -25,11 +25,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=gcc" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" # The pwrapi library still needs to be set up properly on rostam # configure_extra_options+=" -DHPX_WITH_POWER_COUNTER=ON" diff --git a/.jenkins/lsu/env-gcc-12.sh b/.jenkins/lsu/env-gcc-12.sh index 80b5c4a9df10..275614a83b69 100644 --- a/.jenkins/lsu/env-gcc-12.sh +++ b/.jenkins/lsu/env-gcc-12.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" configure_extra_options+=" -DHPX_WITH_MALLOC=system" @@ -24,11 +24,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=gcc" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" configure_extra_options+=" -DHPX_WITH_EVE_TAG=main" diff --git a/.jenkins/lsu/env-gcc-13.sh b/.jenkins/lsu/env-gcc-13.sh index 032c33b297a7..72e7b14eb97e 100644 --- a/.jenkins/lsu/env-gcc-13.sh +++ b/.jenkins/lsu/env-gcc-13.sh @@ -14,7 +14,7 @@ module load pwrapi/1.1.1 export HPXRUN_RUNWRAPPER=srun export CXX_STD="20" -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH configure_extra_options+=" -DHPX_WITH_CXX_STANDARD=${CXX_STD}" configure_extra_options+=" -DHPX_WITH_MALLOC=system" @@ -24,11 +24,11 @@ configure_extra_options+=" -DHPX_WITH_COMPILER_WARNINGS_AS_ERRORS=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_MPI=ON" configure_extra_options+=" -DHPX_WITH_PARCELPORT_LCI=ON" configure_extra_options+=" -DHPX_WITH_FETCH_LCI=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" configure_extra_options+=" -DCMAKE_C_COMPILER=gcc" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=smp" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" configure_extra_options+=" -DHPX_WITH_EVE_TAG=main" diff --git a/cmake/HPX_AddTest.cmake b/cmake/HPX_AddTest.cmake index 863c003fea9e..5baa20c41f84 100644 --- a/cmake/HPX_AddTest.cmake +++ b/cmake/HPX_AddTest.cmake @@ -92,9 +92,6 @@ function(add_hpx_test category name) endif() set(ENV_VAR "") - if(HPX_WITH_PARCELPORT_GASNET) - set(ENV_VAR "GASNET_PSHM_NODES=2") - endif() # cmake-format: off set(cmd diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index 21a5badbd411..2fd68925b0a4 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -195,10 +195,18 @@ def run_mpi(cmd, localities, verbose): print('Executing command: ' + ' '.join(exec_cmd)) subproc(exec_cmd) -# Run with amudprun -# This is executing amudprun with the "-np" option set to the number of localities def run_gasnet(cmd, localities, verbose): - exec_cmd = ['amudprun', '-np', str(localities)] + cmd + os.environ['GASNET_QUIET'] = 'yes' + os.environ['GASNET_ROUTE_OUTPUT'] = '0' + mpiexec = '@MPIEXEC@' + if mpiexec == '': + mpiexec = '@MPIEXEC_EXECUTABLE@' + if mpiexec == '': + msg = 'mpiexec not available on this platform. ' + msg += 'Please rerun CMake with HPX_PARCELPORT_MPI=True.' + print(msg, sys.stderr) + sys.exit(1) + exec_cmd = [mpiexec, '@MPIEXEC_NUMPROC_FLAG@', str(localities)] + cmd if verbose: print('Executing command: ' + ' '.join(exec_cmd)) subproc(exec_cmd) diff --git a/libs/core/gasnet_base/src/gasnet_environment.cpp b/libs/core/gasnet_base/src/gasnet_environment.cpp index 5c09db35185a..d00c4f624f57 100644 --- a/libs/core/gasnet_base/src/gasnet_environment.cpp +++ b/libs/core/gasnet_base/src/gasnet_environment.cpp @@ -251,7 +251,7 @@ namespace hpx::util { bool gasnet_environment::check_gasnet_environment( util::runtime_configuration const& cfg) { -#if defined(HPX_HAVE_NETWORKING) && defined(HPX_HAVE_MODULE_GASNET_BASE) +#if defined(HPX_HAVE_NETWORKING) && defined(HPX_HAVE_PARCELPORT_GASNET) // We disable the GASNET parcelport if any of these hold: // // - The parcelport is explicitly disabled @@ -262,9 +262,9 @@ namespace hpx::util { (get_entry_as(cfg, "hpx.parcel.tcp.enable", 1) && (get_entry_as(cfg, "hpx.parcel.tcp.priority", 1) > get_entry_as(cfg, "hpx.parcel.gasnet.priority", 0))) || - (get_entry_as(cfg, "hpx.parcel.gasnet.enable", 1) && - (get_entry_as(cfg, "hpx.parcel.gasnet.priority", 1) > - get_entry_as(cfg, "hpx.parcel.mpi.priority", 0)))) + (get_entry_as(cfg, "hpx.parcel.mpi.enable", 1) && + (get_entry_as(cfg, "hpx.parcel.mpi.priority", 1) > + get_entry_as(cfg, "hpx.parcel.gasnet.priority", 0)))) { LBT_(info) << "GASNET support disabled via configuration settings\n"; @@ -278,7 +278,7 @@ namespace hpx::util { } } // namespace hpx::util -#if (defined(HPX_HAVE_NETWORKING) && defined(HPX_HAVE_MODULE_GASNET_BASE)) +#if (defined(HPX_HAVE_NETWORKING) && defined(HPX_HAVE_PARCELPORT_GASNET)) namespace hpx::util { From 85494d9f6cb9d4ce77bc667d2ddbde8d02772fea Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Thu, 9 Nov 2023 22:00:34 -0500 Subject: [PATCH 02/43] working on corrections to gasnet-mpi --- cmake/HPX_SetupGasnet.cmake | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 26653ac1d944..e33a0aa9abbd 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -149,31 +149,36 @@ macro(hpx_setup_gasnet) endif() if(NOT TARGET Mpi::mpi) - message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") + find_package(MPI REQUIRED QUIET COMPONENTS CXX) + add_library(Mpi::mpi INTERFACE IMPORTED) + target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) + + # Ensure compatibility with older versions + if(MPI_LIBRARY) + target_link_libraries(Mpi::mpi INTERFACE ${MPI_LIBRARY}) + endif() + if(MPI_EXTRA_LIBRARY) + target_link_libraries(Mpi::mpi INTERFACE ${MPI_EXTRA_LIBRARY}) + endif() + hpx_info("MPI version: " ${MPI_CXX_VERSION}) endif() - if(${MPI_C_COMPILER}) - set(MPI_C_COMPILER ${CMAKE_C_COMPILER}) - set(MPI_CC ${CMAKE_C_COMPILER}) - set(ENV{MPI_CC} ${CMAKE_C_COMPILER}) - elseif(${MPI_CC}) - set(MPI_CC ${CMAKE_C_COMPILER}) - set(ENV{MPI_CC} ${CMAKE_C_COMPILER}) - elseif($ENV{MPI_CC}) - set(MPI_CC ${CMAKE_C_COMPILER}) - set(ENV{MPI_CC} ${CMAKE_C_COMPILER}) - else() - message(FATAL_ERROR "GASNet MPI Conduit selected; $MPI_CC not found!") + if(NOT MPI_C_LIBRARIES) + message(FATAL_ERROR "GASNet MPI: $MPI_C_LIBRARIES not found!") + elseif(NOT MPI_LIBRARY) + message(FATAL_ERROR "GASNet MPI: $MPI_C_LIBRARY not found!") endif() - if(NOT "$CMAKE_C_COMPILER" STREQUAL "${MPI_CC}") - message(FATAL_ERROR "GASNet MPI: $MPI_CC != $CMAKE_C_COMPILER!") + if(MPI_C_LIBRARIES) + set(MPI_LIBS "${MPI_C_LIBRARIES}") + elseif(MPI_LIBRARY) + set(MPI_LIBS "${MPI_LIBRARY}") endif() execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=${MPI_C_LIBRARIES} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=${MPI_LIBS} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From be6d3fe1e77afe5e8e68a201f3cd72b1e670abc9 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Thu, 9 Nov 2023 22:14:42 -0500 Subject: [PATCH 03/43] fixed logical error in cmake gasnet script --- cmake/HPX_SetupGasnet.cmake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index e33a0aa9abbd..9afd1be4a514 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -160,19 +160,18 @@ macro(hpx_setup_gasnet) if(MPI_EXTRA_LIBRARY) target_link_libraries(Mpi::mpi INTERFACE ${MPI_EXTRA_LIBRARY}) endif() - hpx_info("MPI version: " ${MPI_CXX_VERSION}) - endif() - - if(NOT MPI_C_LIBRARIES) - message(FATAL_ERROR "GASNet MPI: $MPI_C_LIBRARIES not found!") - elseif(NOT MPI_LIBRARY) - message(FATAL_ERROR "GASNet MPI: $MPI_C_LIBRARY not found!") + hpx_info("MPI version: " ${MPI_CXX_VERSION}) endif() if(MPI_C_LIBRARIES) set(MPI_LIBS "${MPI_C_LIBRARIES}") elseif(MPI_LIBRARY) set(MPI_LIBS "${MPI_LIBRARY}") + else() + message( + FATAL_ERROR + "GASNet MPI: $MPI_C_LIBRARIES and $MPI_LIBRARY not found!" + ) endif() execute_process( From fb32dfce8ebe0904146cd23a8eaeed765971881b Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Fri, 10 Nov 2023 09:02:51 -0500 Subject: [PATCH 04/43] added gasnet mpi-cflag --- cmake/HPX_SetupGasnet.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 9afd1be4a514..973210fa6cc8 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -177,7 +177,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=${MPI_LIBS} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=${MPI_LIBS} --with-mpi-cflags=-fPIC --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From 5415d7e592010e09f9c6d24c2490809c712293d5 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Fri, 10 Nov 2023 19:50:17 -0500 Subject: [PATCH 05/43] added missing MPI detection support to gasnet --- cmake/HPX_SetupGasnet.cmake | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 973210fa6cc8..f7abadba668e 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -145,23 +145,23 @@ macro(hpx_setup_gasnet) ) elseif("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi") if(NOT MPI_FOUND) - message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") + find_package(MPI REQUIRED QUIET COMPONENTS CXX) + if(NOT MPI_FOUND) + message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") + endif() endif() - if(NOT TARGET Mpi::mpi) - find_package(MPI REQUIRED QUIET COMPONENTS CXX) - add_library(Mpi::mpi INTERFACE IMPORTED) - target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) + add_library(Mpi::mpi INTERFACE IMPORTED) + target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) - # Ensure compatibility with older versions - if(MPI_LIBRARY) - target_link_libraries(Mpi::mpi INTERFACE ${MPI_LIBRARY}) - endif() - if(MPI_EXTRA_LIBRARY) - target_link_libraries(Mpi::mpi INTERFACE ${MPI_EXTRA_LIBRARY}) - endif() - hpx_info("MPI version: " ${MPI_CXX_VERSION}) + # Ensure compatibility with older versions + if(MPI_LIBRARY) + target_link_libraries(Mpi::mpi INTERFACE ${MPI_LIBRARY}) + endif() + if(MPI_EXTRA_LIBRARY) + target_link_libraries(Mpi::mpi INTERFACE ${MPI_EXTRA_LIBRARY}) endif() + hpx_info("MPI version: " ${MPI_CXX_VERSION}) if(MPI_C_LIBRARIES) set(MPI_LIBS "${MPI_C_LIBRARIES}") From b348e42a94279059ba31499b1b8c111f2505a272 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sat, 11 Nov 2023 13:30:11 -0700 Subject: [PATCH 06/43] check for add_library Mpi::mpi --- cmake/HPX_SetupGasnet.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index f7abadba668e..093034a60680 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -151,7 +151,10 @@ macro(hpx_setup_gasnet) endif() endif() - add_library(Mpi::mpi INTERFACE IMPORTED) + if(NOT Mpi::mpi) + add_library(Mpi::mpi INTERFACE IMPORTED) + endif() + target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) # Ensure compatibility with older versions From 3e6a85de3402fa8c0002b4e0e3a38ab9939e5bb6 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sat, 11 Nov 2023 13:49:15 -0700 Subject: [PATCH 07/43] fix add_library Mpi::mpi --- cmake/HPX_SetupGasnet.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 093034a60680..fee25beb156f 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -151,10 +151,6 @@ macro(hpx_setup_gasnet) endif() endif() - if(NOT Mpi::mpi) - add_library(Mpi::mpi INTERFACE IMPORTED) - endif() - target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) # Ensure compatibility with older versions From 01c6a3a955387e99caa4305214309dc4bf19b7d4 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sat, 11 Nov 2023 19:30:48 -0700 Subject: [PATCH 08/43] continue work to fix Mpi::mpi --- cmake/HPX_SetupGasnet.cmake | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index fee25beb156f..2a5ce2c6eec7 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -151,21 +151,24 @@ macro(hpx_setup_gasnet) endif() endif() - target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) + #add_library(Mpi::mpi INTERFACE IMPORTED) + #target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) # Ensure compatibility with older versions - if(MPI_LIBRARY) - target_link_libraries(Mpi::mpi INTERFACE ${MPI_LIBRARY}) - endif() - if(MPI_EXTRA_LIBRARY) - target_link_libraries(Mpi::mpi INTERFACE ${MPI_EXTRA_LIBRARY}) - endif() + #if(MPI_LIBRARY) + # target_link_libraries(Mpi::mpi INTERFACE ${MPI_LIBRARY}) + #endif() + #if(MPI_EXTRA_LIBRARY) + # target_link_libraries(Mpi::mpi INTERFACE ${MPI_EXTRA_LIBRARY}) + #endif() hpx_info("MPI version: " ${MPI_CXX_VERSION}) if(MPI_C_LIBRARIES) set(MPI_LIBS "${MPI_C_LIBRARIES}") elseif(MPI_LIBRARY) set(MPI_LIBS "${MPI_LIBRARY}") + elseif(MPI_EXTRA_LIBRARY) + set(MPI_LIBS "${MPI_EXTRA_LIBRARY}") else() message( FATAL_ERROR From 6f746f009e077746191c0a19c05951b3db1606c0 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Wed, 15 Nov 2023 09:23:21 -0700 Subject: [PATCH 09/43] fixed broken runwrapper argument handling by adding gasnet --- cmake/templates/hpxrun.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index 2fd68925b0a4..1763a15cf9b5 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -302,7 +302,7 @@ def check_options(parser, options, args): sys.exit(1) check_valid_runwrapper = (lambda x: - x == 'none' or x == 'mpi' or x == 'srun' or x =='jsrun'); + x == 'none' or x == 'mpi' or x == 'srun' or x =='jsrun' or x == 'gasnet'); if not check_valid_runwrapper(options.runwrapper): print('Error: Runwrapper option not valid\n', sys.stderr) parser.print_help() From d64ae2c693dbe5b21bcaa2b764919230937f9212 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Wed, 15 Nov 2023 09:27:23 -0700 Subject: [PATCH 10/43] gasnet cmake format isse --- cmake/HPX_SetupGasnet.cmake | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 2a5ce2c6eec7..ef35c4279e24 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -151,16 +151,13 @@ macro(hpx_setup_gasnet) endif() endif() - #add_library(Mpi::mpi INTERFACE IMPORTED) - #target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) - - # Ensure compatibility with older versions - #if(MPI_LIBRARY) - # target_link_libraries(Mpi::mpi INTERFACE ${MPI_LIBRARY}) - #endif() - #if(MPI_EXTRA_LIBRARY) - # target_link_libraries(Mpi::mpi INTERFACE ${MPI_EXTRA_LIBRARY}) - #endif() + # add_library(Mpi::mpi INTERFACE IMPORTED) + # target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) + + # Ensure compatibility with older versions if(MPI_LIBRARY) + # target_link_libraries(Mpi::mpi INTERFACE ${MPI_LIBRARY}) endif() + # if(MPI_EXTRA_LIBRARY) target_link_libraries(Mpi::mpi INTERFACE + # ${MPI_EXTRA_LIBRARY}) endif() hpx_info("MPI version: " ${MPI_CXX_VERSION}) if(MPI_C_LIBRARIES) From 53b34d763c13539b787385a7b81b947418a513cf Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Fri, 17 Nov 2023 12:04:38 -0700 Subject: [PATCH 11/43] expanded compilation and include arguments --- cmake/HPX_SetupGasnet.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 9fb64613a243..8fe0ac41ce8e 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -174,8 +174,14 @@ macro(hpx_setup_gasnet) if(MPI_C_LIBRARIES) set(MPI_LIBS "${MPI_C_LIBRARIES}") + set(MPI_CFLAGS "-fPIC ${MPI_C_COMPILE_FLAGS} ${MPI_C_INCLUDE_PATH}") + set(MPI_CXXFLAGS + "-fPIC ${MPI_CXX_COMPILE_FLAGS} ${MPI_CXX_INCLUDE_PATH}" + ) elseif(MPI_LIBRARY) set(MPI_LIBS "${MPI_LIBRARY}") + set(MPI_CFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") + set(MPI_CXXFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") elseif(MPI_EXTRA_LIBRARY) set(MPI_LIBS "${MPI_EXTRA_LIBRARY}") else() From 38f50cb29859df23a6de1e49de9410028b518c37 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Fri, 17 Nov 2023 15:43:36 -0700 Subject: [PATCH 12/43] added escaped quotes around -fPIC arguments --- cmake/HPX_SetupGasnet.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 8fe0ac41ce8e..76fccb81ddea 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -119,7 +119,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC --enable-udp && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" --enable-udp && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -129,7 +129,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC --enable-smp && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" --enable-smp && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -139,7 +139,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-ofi --with-ofi-home=${OFI_DIR} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-ofi --with-ofi-home=${OFI_DIR} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -149,7 +149,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-ucx --with-ucx-home=${UCX_DIR} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-ucx --with-ucx-home=${UCX_DIR} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -184,6 +184,8 @@ macro(hpx_setup_gasnet) set(MPI_CXXFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") elseif(MPI_EXTRA_LIBRARY) set(MPI_LIBS "${MPI_EXTRA_LIBRARY}") + set(MPI_CFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") + set(MPI_CXXFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") else() message( FATAL_ERROR @@ -194,7 +196,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=${MPI_LIBS} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBS}\" --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From 61544883725a2bc65a3cb30d7f27200155e81995 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sat, 18 Nov 2023 00:39:48 -0500 Subject: [PATCH 13/43] added debug message --- cmake/HPX_SetupGasnet.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 76fccb81ddea..5761fa358f55 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -193,6 +193,11 @@ macro(hpx_setup_gasnet) ) endif() + message( + STATUS + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBS}\" --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + ) + execute_process( COMMAND bash -c From d9325e8c11822ec6861f6af599995fc30a4b929a Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 20 Nov 2023 11:33:42 -0500 Subject: [PATCH 14/43] added gasnet_tools to mpi build --- cmake/HPX_SetupGasnet.cmake | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 5761fa358f55..25c843efcd47 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -216,6 +216,51 @@ macro(hpx_setup_gasnet) ) else() + find_file(GASNET_TOOLS_PKGCONFIG_FILE_FOUND + gasnet_tools-par.pc + ${GASNET_DIR}/install/lib/pkgconfig + ) + + if(NOT GASNET_TOOLS_PKGCONFIG_FILE_FOUND) + message( + FATAL_ERROR + "PKG-CONFIG ERROR (${GASNET_TOOLS_PKGCONFIG_FILE_FOUND}) -> CANNOT FIND COMPILED GASNET_TOOLS: ${GASNET_DIR}/install/lib/pkgconfig" + ) + endif() + + install(CODE "set(GASNET_PATH \"${GASNET_DIR}\")") + + install( + CODE [[ + file( + READ + ${GASNET_PATH}/install/lib/pkgconfig/gasnet_tools-par.pc + GASNET_TOOLS_PKGCONFIG_FILE_CONTENT + ) + + if(NOT GASNET_TOOLS_PKGCONFIG_FILE_CONTENT) + message(FATAL_ERROR "ERROR INSTALLING GASNET_TOOLS") + endif() + + string(REPLACE "${GASNET_PATH}/install" "${CMAKE_INSTALL_PREFIX}" + GASNET_TOOLS_PKGCONFIG_FILE_CONTENT + ${GASNET_TOOLS_PKGCONFIG_FILE_CONTENT} + ) + + file( + WRITE + ${GASNET_PATH}/install/lib/pkgconfig/gasnet_tools-par.pc + ${GASNET_TOOLS_PKGCONFIG_FILE_CONTENT} + ) + + file(GLOB_RECURSE GASNET_FILES ${GASNET_PATH}/install/*) + + if(NOT GASNET_FILES) + message(STATUS "ERROR INSTALLING GASNET") + endif() + ]] + ) + find_file(GASNET_PKGCONFIG_FILE_FOUND gasnet-${HPX_WITH_PARCELPORT_GASNET_CONDUIT}-par.pc ${GASNET_DIR}/install/lib/pkgconfig From e1e864fec454e5eb5a953bdaec110ee3ccd21c0a Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 20 Nov 2023 12:56:56 -0500 Subject: [PATCH 15/43] switching to pkgconfig for mpi check --- cmake/HPX_SetupGasnet.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 25c843efcd47..4af6f60fa45b 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -157,7 +157,12 @@ macro(hpx_setup_gasnet) ) elseif("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi") if(NOT MPI_FOUND) - find_package(MPI REQUIRED QUIET COMPONENTS CXX) + #find_package(MPI REQUIRED QUIET COMPONENTS CXX) + pkg_search_module( + GASNET IMPORTED_TARGET GLOBAL + gasnet-${HPX_WITH_PARCELPORT_GASNET_CONDUIT}-par + ) + if(NOT MPI_FOUND) message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") endif() From a28ca449629c0462329b98161b242d56087b9731 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 20 Nov 2023 15:26:38 -0500 Subject: [PATCH 16/43] switching to pkgconfig for mpi check --- cmake/HPX_SetupGasnet.cmake | 50 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 4af6f60fa45b..1152d11e4bcd 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -158,55 +158,51 @@ macro(hpx_setup_gasnet) elseif("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi") if(NOT MPI_FOUND) #find_package(MPI REQUIRED QUIET COMPONENTS CXX) + pkg_search_module( - GASNET IMPORTED_TARGET GLOBAL - gasnet-${HPX_WITH_PARCELPORT_GASNET_CONDUIT}-par + MPI IMPORTED_TARGET GLOBAL + ompi ) if(NOT MPI_FOUND) message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") endif() - endif() - # add_library(Mpi::mpi INTERFACE IMPORTED) - # target_link_libraries(Mpi::mpi INTERFACE MPI::MPI_CXX) + list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) + list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) + + list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) + list(JOIN MPI_LDFLAGS_OTHER " " MPI_LDFLAGS_OTHER_STR) + + list(JOIN MPI_LIBRARY_DIRS " -L" MPI_LIBRARY_DIRS_STR) + set(MPI_LIBRARY_DIRS_STR "-L${MPI_LIBRARY_DIRS_STR}") + + list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) + set(MPI_LIBRARIES "-l${MPI_LIBRARIES_STR}") + + list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) + set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") + + endif() - # Ensure compatibility with older versions if(MPI_LIBRARY) - # target_link_libraries(Mpi::mpi INTERFACE ${MPI_LIBRARY}) endif() - # if(MPI_EXTRA_LIBRARY) target_link_libraries(Mpi::mpi INTERFACE - # ${MPI_EXTRA_LIBRARY}) endif() hpx_info("MPI version: " ${MPI_CXX_VERSION}) - if(MPI_C_LIBRARIES) - set(MPI_LIBS "${MPI_C_LIBRARIES}") - set(MPI_CFLAGS "-fPIC ${MPI_C_COMPILE_FLAGS} ${MPI_C_INCLUDE_PATH}") - set(MPI_CXXFLAGS - "-fPIC ${MPI_CXX_COMPILE_FLAGS} ${MPI_CXX_INCLUDE_PATH}" - ) - elseif(MPI_LIBRARY) - set(MPI_LIBS "${MPI_LIBRARY}") - set(MPI_CFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") - set(MPI_CXXFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") - elseif(MPI_EXTRA_LIBRARY) - set(MPI_LIBS "${MPI_EXTRA_LIBRARY}") - set(MPI_CFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") - set(MPI_CXXFLAGS "-fPIC ${MPI_COMPILE_FLAGS} ${MPI_INCLUDE_PATH}") - else() + if(MPI_FOUND) message( FATAL_ERROR - "GASNet MPI: $MPI_C_LIBRARIES and $MPI_LIBRARY not found!" + "GASNet MPI: MPI not found!" ) endif() message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBS}\" --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBS}\" --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From 116e7f546a351903c802d93af09b56917fc4332e Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 20 Nov 2023 22:16:27 -0500 Subject: [PATCH 17/43] fixed logic error --- cmake/HPX_SetupGasnet.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 1152d11e4bcd..edbfd2e0dbba 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -187,7 +187,7 @@ macro(hpx_setup_gasnet) hpx_info("MPI version: " ${MPI_CXX_VERSION}) - if(MPI_FOUND) + if(NOT MPI_FOUND) message( FATAL_ERROR "GASNet MPI: MPI not found!" From 6c2970fdbef0fc3f39fcff4e69ee3b336847ab0a Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 20 Nov 2023 22:49:19 -0500 Subject: [PATCH 18/43] fixed logic error --- cmake/HPX_SetupGasnet.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index edbfd2e0dbba..637bb4f214ce 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -159,8 +159,8 @@ macro(hpx_setup_gasnet) if(NOT MPI_FOUND) #find_package(MPI REQUIRED QUIET COMPONENTS CXX) - pkg_search_module( - MPI IMPORTED_TARGET GLOBAL + pkg_check_modules( + MPI REQUIRED IMPORTED_TARGET GLOBAL ompi ) @@ -168,18 +168,25 @@ macro(hpx_setup_gasnet) message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") endif() + set(MPI_CFLAGS_STR "") list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) + set(MPI_CFLAGS_OTHER_STR "") list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) + set(MPI_LDFLAGS_STR "") list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) + set(MPI_LDFLAGS_OTHER_STR "") list(JOIN MPI_LDFLAGS_OTHER " " MPI_LDFLAGS_OTHER_STR) + set(MPI_LIBRARY_DIRS_STR "") list(JOIN MPI_LIBRARY_DIRS " -L" MPI_LIBRARY_DIRS_STR) set(MPI_LIBRARY_DIRS_STR "-L${MPI_LIBRARY_DIRS_STR}") + set(MPI_LIBRARIES_STR "") list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) set(MPI_LIBRARIES "-l${MPI_LIBRARIES_STR}") + set(MPI_INCLUDE_DIRS_STR "") list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") @@ -194,6 +201,7 @@ macro(hpx_setup_gasnet) ) endif() + message(STATUS "${MPI_LIBRARIES} ${ message( STATUS "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" From 42d6c6d624da1bba11521ebac3904a196b214309 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 20 Nov 2023 23:22:00 -0500 Subject: [PATCH 19/43] debugging pkgconfig --- cmake/HPX_SetupGasnet.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 637bb4f214ce..8e0b26ce9778 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -201,7 +201,7 @@ macro(hpx_setup_gasnet) ) endif() - message(STATUS "${MPI_LIBRARIES} ${ + message(STATUS "${MPI_LIBRARIES} ${MPI_LIBRARIES_STR}") message( STATUS "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" From e231a2a88356092672829e57e1ba1366c89c28a4 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Tue, 21 Nov 2023 09:46:11 -0500 Subject: [PATCH 20/43] adding debugging messages --- cmake/HPX_SetupGasnet.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 8e0b26ce9778..ef67f34c9612 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -168,6 +168,12 @@ macro(hpx_setup_gasnet) message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") endif() + message(STATUS "MPI_CFLAGS\t${MPI_CFLAGS}") + message(STATUS "MPI_CFLAGS_OTHER\t${MPI_CFLAGS_OTHER}") + message(STATUS "MPI_LDFLAGS\t${MPI_LDFLAGS}") + message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARY_DIRS}) + message(STATUS "MPI_INCLUDE_DIRS\t${MPI_INCLUDE_DIRS}") + set(MPI_CFLAGS_STR "") list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) set(MPI_CFLAGS_OTHER_STR "") @@ -201,7 +207,6 @@ macro(hpx_setup_gasnet) ) endif() - message(STATUS "${MPI_LIBRARIES} ${MPI_LIBRARIES_STR}") message( STATUS "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" From 731d06d31a3defb21bfacfcbb5dfc7b3df6992f0 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Tue, 21 Nov 2023 10:17:46 -0500 Subject: [PATCH 21/43] adding debugging messages --- cmake/HPX_SetupGasnet.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index ef67f34c9612..389238b11400 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -171,7 +171,7 @@ macro(hpx_setup_gasnet) message(STATUS "MPI_CFLAGS\t${MPI_CFLAGS}") message(STATUS "MPI_CFLAGS_OTHER\t${MPI_CFLAGS_OTHER}") message(STATUS "MPI_LDFLAGS\t${MPI_LDFLAGS}") - message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARY_DIRS}) + message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARY_DIRS}") message(STATUS "MPI_INCLUDE_DIRS\t${MPI_INCLUDE_DIRS}") set(MPI_CFLAGS_STR "") From c339b4b3be4fd4b359dd0ff9bd6d7b84a3e77cd6 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Tue, 21 Nov 2023 10:33:20 -0500 Subject: [PATCH 22/43] ordering corrections --- cmake/HPX_SetupGasnet.cmake | 46 ++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 389238b11400..b1a310c79e61 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -167,36 +167,36 @@ macro(hpx_setup_gasnet) if(NOT MPI_FOUND) message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") endif() + endif() - message(STATUS "MPI_CFLAGS\t${MPI_CFLAGS}") - message(STATUS "MPI_CFLAGS_OTHER\t${MPI_CFLAGS_OTHER}") - message(STATUS "MPI_LDFLAGS\t${MPI_LDFLAGS}") - message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARY_DIRS}") - message(STATUS "MPI_INCLUDE_DIRS\t${MPI_INCLUDE_DIRS}") - set(MPI_CFLAGS_STR "") - list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) - set(MPI_CFLAGS_OTHER_STR "") - list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) + message(STATUS "MPI_CFLAGS\t${MPI_CFLAGS}") + message(STATUS "MPI_CFLAGS_OTHER\t${MPI_CFLAGS_OTHER}") + message(STATUS "MPI_LDFLAGS\t${MPI_LDFLAGS}") + message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARY_DIRS}") + message(STATUS "MPI_INCLUDE_DIRS\t${MPI_INCLUDE_DIRS}") - set(MPI_LDFLAGS_STR "") - list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) - set(MPI_LDFLAGS_OTHER_STR "") - list(JOIN MPI_LDFLAGS_OTHER " " MPI_LDFLAGS_OTHER_STR) + set(MPI_CFLAGS_STR "") + list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) + set(MPI_CFLAGS_OTHER_STR "") + list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) - set(MPI_LIBRARY_DIRS_STR "") - list(JOIN MPI_LIBRARY_DIRS " -L" MPI_LIBRARY_DIRS_STR) - set(MPI_LIBRARY_DIRS_STR "-L${MPI_LIBRARY_DIRS_STR}") + set(MPI_LDFLAGS_STR "") + list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) + set(MPI_LDFLAGS_OTHER_STR "") + list(JOIN MPI_LDFLAGS_OTHER " " MPI_LDFLAGS_OTHER_STR) - set(MPI_LIBRARIES_STR "") - list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) - set(MPI_LIBRARIES "-l${MPI_LIBRARIES_STR}") + set(MPI_LIBRARY_DIRS_STR "") + list(JOIN MPI_LIBRARY_DIRS " -L" MPI_LIBRARY_DIRS_STR) + set(MPI_LIBRARY_DIRS_STR "-L${MPI_LIBRARY_DIRS_STR}") - set(MPI_INCLUDE_DIRS_STR "") - list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) - set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") + set(MPI_LIBRARIES_STR "") + list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) + set(MPI_LIBRARIES "-l${MPI_LIBRARIES_STR}") - endif() + set(MPI_INCLUDE_DIRS_STR "") + list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) + set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") hpx_info("MPI version: " ${MPI_CXX_VERSION}) From 3eb8c76472edb3ac77a7504ce18cf0684eb4b488 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Tue, 21 Nov 2023 20:12:07 -0500 Subject: [PATCH 23/43] rollback to cmake find mpi --- cmake/HPX_SetupGasnet.cmake | 42 +++++++++++++------------------------ 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index b1a310c79e61..918679cb542d 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -157,45 +157,33 @@ macro(hpx_setup_gasnet) ) elseif("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi") if(NOT MPI_FOUND) - #find_package(MPI REQUIRED QUIET COMPONENTS CXX) - - pkg_check_modules( - MPI REQUIRED IMPORTED_TARGET GLOBAL - ompi - ) - + find_package(MPI REQUIRED QUIET COMPONENTS CXX) if(NOT MPI_FOUND) message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") endif() endif() - - message(STATUS "MPI_CFLAGS\t${MPI_CFLAGS}") - message(STATUS "MPI_CFLAGS_OTHER\t${MPI_CFLAGS_OTHER}") - message(STATUS "MPI_LDFLAGS\t${MPI_LDFLAGS}") - message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARY_DIRS}") - message(STATUS "MPI_INCLUDE_DIRS\t${MPI_INCLUDE_DIRS}") + message(STATUS "MPI_CFLAGS\t${MPI_C_COMPILE_OPTIONS}") + message(STATUS "MPI_CFLAGS_OTHER\t${MPI_C_COMPILE_DEFINITIONS}") + message(STATUS "MPI_LDFLAGS\t${MPI_C_LINK_FLAGS}") + message(STATUS "MPI_LIBRARY_DIRS\t${MPI_C_LIBRARIES}") + message(STATUS "MPI_INCLUDE_DIRS\t${MPI_C_INCLUDE_DIRS}") set(MPI_CFLAGS_STR "") - list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) + list(JOIN MPI_C_COMPILE_OPTIONS " " MPI_CFLAGS_STR) + set(MPI_CFLAGS_OTHER_STR "") - list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) + list(JOIN MPI_C_COMPILE_DEFINITIONS " " MPI_CFLAGS_OTHER_STR) set(MPI_LDFLAGS_STR "") - list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) - set(MPI_LDFLAGS_OTHER_STR "") - list(JOIN MPI_LDFLAGS_OTHER " " MPI_LDFLAGS_OTHER_STR) - - set(MPI_LIBRARY_DIRS_STR "") - list(JOIN MPI_LIBRARY_DIRS " -L" MPI_LIBRARY_DIRS_STR) - set(MPI_LIBRARY_DIRS_STR "-L${MPI_LIBRARY_DIRS_STR}") + list(JOIN MPI_C_LINK_FLAGS " " MPI_LDFLAGS_STR) set(MPI_LIBRARIES_STR "") - list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) - set(MPI_LIBRARIES "-l${MPI_LIBRARIES_STR}") + list(JOIN MPI_C_LIBRARIES " -l" MPI_LIBRARIES_STR) + set(MPI_LIBRARIES_STR "-l${MPI_LIBRARIES_STR}") set(MPI_INCLUDE_DIRS_STR "") - list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) + list(JOIN MPI_C_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") hpx_info("MPI version: " ${MPI_CXX_VERSION}) @@ -209,13 +197,13 @@ macro(hpx_setup_gasnet) message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_INCLUDE_DIRS_STR} ${MPI_LIBRARY_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From 6d6cdb1b6c56694c46ad2f0aa4666b48082f9536 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Tue, 21 Nov 2023 21:33:56 -0500 Subject: [PATCH 24/43] debugging prints --- cmake/HPX_SetupGasnet.cmake | 42 +++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 918679cb542d..6946bc0009b1 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -157,37 +157,57 @@ macro(hpx_setup_gasnet) ) elseif("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi") if(NOT MPI_FOUND) - find_package(MPI REQUIRED QUIET COMPONENTS CXX) - if(NOT MPI_FOUND) + #find_package(MPI REQUIRED QUIET COMPONENTS CXX) + pkg_search_module( + MPI_C + REQUIRED + GLOBAL + ompi + ompi-c + ompi_c + openmpi + mpi + ) + if(NOT MPI_C_FOUND) message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") endif() endif() - message(STATUS "MPI_CFLAGS\t${MPI_C_COMPILE_OPTIONS}") - message(STATUS "MPI_CFLAGS_OTHER\t${MPI_C_COMPILE_DEFINITIONS}") - message(STATUS "MPI_LDFLAGS\t${MPI_C_LINK_FLAGS}") - message(STATUS "MPI_LIBRARY_DIRS\t${MPI_C_LIBRARIES}") + message(STATUS "MPI_CFLAGS\t${MPI_C_CFLAGS}") + message(STATUS "MPI_CFLAGS_OTHER\t${MPI_C_CFLAGS_OTHE}") + message(STATUS "MPI_LDFLAGS\t${MPI_C_LDFLAGS}") + message(STATUS "MPI_LIBRARY_DIRS\t${MPI_C_LIBRARIES} ${MPI_C_LIBRARY_DIRS}") message(STATUS "MPI_INCLUDE_DIRS\t${MPI_C_INCLUDE_DIRS}") set(MPI_CFLAGS_STR "") - list(JOIN MPI_C_COMPILE_OPTIONS " " MPI_CFLAGS_STR) + list(JOIN MPI_C_CFLAGS " " MPI_CFLAGS_STR) set(MPI_CFLAGS_OTHER_STR "") - list(JOIN MPI_C_COMPILE_DEFINITIONS " " MPI_CFLAGS_OTHER_STR) + list(JOIN MPI_C_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) set(MPI_LDFLAGS_STR "") - list(JOIN MPI_C_LINK_FLAGS " " MPI_LDFLAGS_STR) + list(JOIN MPI_C_LDFLAGS " " MPI_LDFLAGS_STR) set(MPI_LIBRARIES_STR "") list(JOIN MPI_C_LIBRARIES " -l" MPI_LIBRARIES_STR) set(MPI_LIBRARIES_STR "-l${MPI_LIBRARIES_STR}") + set(MPI_LIBRARY_DIR_STR "") + list(JOIN MPI_C_LIBRARY_DIRS " -l" MPI_LIBRARY_DIR_STR) + set(MPI_LIBRARY_DIR_STR "-l${MPI_LIBRARY_DIR_STR}") + set(MPI_INCLUDE_DIRS_STR "") list(JOIN MPI_C_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") hpx_info("MPI version: " ${MPI_CXX_VERSION}) + message(STATUS "MPI_CFLAGS\t${MPI_CFLAGS_STR}") + message(STATUS "MPI_CFLAGS_OTHER\t${MPI_CFLAGS_OTHER_STR}") + message(STATUS "MPI_LDFLAGS\t${MPI_LDFLAGS_STR}") + message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARIES_STR} ${MPI_LIBRARY_DIR_STR}") + message(STATUS "MPI_INCLUDE_DIRS\t${MPI_INCLUDE_DIRS_STR}") + if(NOT MPI_FOUND) message( FATAL_ERROR @@ -197,13 +217,13 @@ macro(hpx_setup_gasnet) message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From c18df1e7d19f3e37d331bf02396ceab2c1d02b80 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Wed, 22 Nov 2023 09:14:07 -0500 Subject: [PATCH 25/43] using different pkgconfig functionality --- cmake/HPX_SetupGasnet.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 6946bc0009b1..9eafa9ba67e8 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -158,7 +158,7 @@ macro(hpx_setup_gasnet) elseif("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi") if(NOT MPI_FOUND) #find_package(MPI REQUIRED QUIET COMPONENTS CXX) - pkg_search_module( + pkg_check_modules( MPI_C REQUIRED GLOBAL From 67ffe9594120d732e8d46e07f53125881f724c33 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Wed, 22 Nov 2023 09:54:36 -0500 Subject: [PATCH 26/43] fixing variable naming issue --- cmake/HPX_SetupGasnet.cmake | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 9eafa9ba67e8..365952003fd1 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -157,9 +157,8 @@ macro(hpx_setup_gasnet) ) elseif("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi") if(NOT MPI_FOUND) - #find_package(MPI REQUIRED QUIET COMPONENTS CXX) pkg_check_modules( - MPI_C + MPI REQUIRED GLOBAL ompi @@ -168,36 +167,30 @@ macro(hpx_setup_gasnet) openmpi mpi ) - if(NOT MPI_C_FOUND) + if(NOT MPI_FOUND) message(FATAL_ERROR "GASNet MPI Conduit selected; MPI not found!") endif() endif() - message(STATUS "MPI_CFLAGS\t${MPI_C_CFLAGS}") - message(STATUS "MPI_CFLAGS_OTHER\t${MPI_C_CFLAGS_OTHE}") - message(STATUS "MPI_LDFLAGS\t${MPI_C_LDFLAGS}") - message(STATUS "MPI_LIBRARY_DIRS\t${MPI_C_LIBRARIES} ${MPI_C_LIBRARY_DIRS}") - message(STATUS "MPI_INCLUDE_DIRS\t${MPI_C_INCLUDE_DIRS}") - set(MPI_CFLAGS_STR "") - list(JOIN MPI_C_CFLAGS " " MPI_CFLAGS_STR) + list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) set(MPI_CFLAGS_OTHER_STR "") - list(JOIN MPI_C_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) + list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) set(MPI_LDFLAGS_STR "") - list(JOIN MPI_C_LDFLAGS " " MPI_LDFLAGS_STR) + list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) set(MPI_LIBRARIES_STR "") - list(JOIN MPI_C_LIBRARIES " -l" MPI_LIBRARIES_STR) + list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) set(MPI_LIBRARIES_STR "-l${MPI_LIBRARIES_STR}") set(MPI_LIBRARY_DIR_STR "") - list(JOIN MPI_C_LIBRARY_DIRS " -l" MPI_LIBRARY_DIR_STR) + list(JOIN MPI_LIBRARY_DIRS " -l" MPI_LIBRARY_DIR_STR) set(MPI_LIBRARY_DIR_STR "-l${MPI_LIBRARY_DIR_STR}") set(MPI_INCLUDE_DIRS_STR "") - list(JOIN MPI_C_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) + list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") hpx_info("MPI version: " ${MPI_CXX_VERSION}) From c77ff3b1af8c13410af2d247bb2c17efd043d4ca Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Wed, 22 Nov 2023 12:11:58 -0500 Subject: [PATCH 27/43] fixing situation where MPI is found but none of the associated cmake varibles are defined --- cmake/HPX_SetupGasnet.cmake | 78 ++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 365952003fd1..57ee9ba81c5e 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -172,33 +172,75 @@ macro(hpx_setup_gasnet) endif() endif() - set(MPI_CFLAGS_STR "") - list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) + if(NOT MPI_CFLAGS) + set(MPI_CFLAGS_STR "-fPIC") + else() + list(LENGTH MPI_CFLAGS MPI_CFLAGS_COUNT) + if(MPI_CFLAGS_COUNT LESS "1") + set(MPI_CFLAGS_STR "") + list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) + endif() + endif() - set(MPI_CFLAGS_OTHER_STR "") - list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) + if(NOT MPI_CFLAGS_OTHER) + set(MPI_CFLAGS_OTHER_STR "-fPIC") + else() + list(LENGTH MPI_CFLAGS_OTHER MPI_CFLAGS_OTHER_COUNT) + if(MPI_CFLAGS_OTHER_COUNT LESS "1") + set(MPI_CFLAGS_OTHER_STR "") + list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) + endif() + endif() - set(MPI_LDFLAGS_STR "") - list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) + if(NOT MPI_LDFLAGS) + set(MPI_LDFLAGS_STR "-fPIC") + else() + list(LENGTH MPI_LDFLAGS MPI_LDFLAGS_COUNT) + if(MPI_LDFLAGS_COUNT LESS "1") + set(MPI_LDFLAGS_STR "") + list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) + endif() + endif() - set(MPI_LIBRARIES_STR "") - list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) - set(MPI_LIBRARIES_STR "-l${MPI_LIBRARIES_STR}") + if(NOT MPI_LIBRARIES) + set(MPI_LIBRARIES_STR "-lmpi") + else() + list(LENGTH MPI_LIBRARIES MPI_LIBRARIES_COUNT) + if(MPI_LIBRARIES_COUNT LESS "1") + set(MPI_LIBRARIES_STR "") + list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) + set(MPI_LIBRARIES_STR "-l${MPI_LIBRARIES_STR}") + endif() + endif() - set(MPI_LIBRARY_DIR_STR "") - list(JOIN MPI_LIBRARY_DIRS " -l" MPI_LIBRARY_DIR_STR) - set(MPI_LIBRARY_DIR_STR "-l${MPI_LIBRARY_DIR_STR}") + if(NOT MPI_LIBRARY_DIRS) + set(MPI_LIBRARY_DIRS_STR "") + else() + list(LENGTH MPI_LIBRARY_DIRS MPI_LIBRARY_DIRS_COUNT) + if(MPI_LIBRARIES_DIRS_COUNT LESS "1") + set(MPI_LIBRARY_DIRS_STR "") + list(JOIN MPI_LIBRARY_DIRS " -l" MPI_LIBRARY_DIRS_STR) + set(MPI_LIBRARY_DIRS_STR "-l${MPI_LIBRARY_DIRS_STR}") + endif() + endif() - set(MPI_INCLUDE_DIRS_STR "") - list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) - set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") + if(NOT MPI_INCLUDE_DIRS) + set(MPI_INCLUDE_DIRS_STR "") + else() + list(LENGTH MPI_INCLUDE_DIRS MPI_INCLUDE_DIRS_COUNT) + if(MPI_INCLUDE_DIRS_COUNT LESS "1") + set(MPI_INCLUDE_DIRS_STR "") + list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) + set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") + endif() + endif() hpx_info("MPI version: " ${MPI_CXX_VERSION}) message(STATUS "MPI_CFLAGS\t${MPI_CFLAGS_STR}") message(STATUS "MPI_CFLAGS_OTHER\t${MPI_CFLAGS_OTHER_STR}") message(STATUS "MPI_LDFLAGS\t${MPI_LDFLAGS_STR}") - message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARIES_STR} ${MPI_LIBRARY_DIR_STR}") + message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARIES_STR} ${MPI_LIBRARY_DIRS_STR}") message(STATUS "MPI_INCLUDE_DIRS\t${MPI_INCLUDE_DIRS_STR}") if(NOT MPI_FOUND) @@ -210,13 +252,13 @@ macro(hpx_setup_gasnet) message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIR_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From fa4dd595f594088360c5392496ffec16a5b8534d Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Wed, 22 Nov 2023 13:21:27 -0500 Subject: [PATCH 28/43] fixing missing flag and redundant flags --- cmake/HPX_SetupGasnet.cmake | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 57ee9ba81c5e..64c5f2752ec6 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -177,27 +177,33 @@ macro(hpx_setup_gasnet) else() list(LENGTH MPI_CFLAGS MPI_CFLAGS_COUNT) if(MPI_CFLAGS_COUNT LESS "1") + set(MPI_CFLAGS_STR "-fPIC") + else() set(MPI_CFLAGS_STR "") list(JOIN MPI_CFLAGS " " MPI_CFLAGS_STR) endif() endif() if(NOT MPI_CFLAGS_OTHER) - set(MPI_CFLAGS_OTHER_STR "-fPIC") + set(MPI_CFLAGS_OTHER_STR "") else() list(LENGTH MPI_CFLAGS_OTHER MPI_CFLAGS_OTHER_COUNT) if(MPI_CFLAGS_OTHER_COUNT LESS "1") set(MPI_CFLAGS_OTHER_STR "") + else() + set(MPI_CFLAGS_OTHER_STR "") list(JOIN MPI_CFLAGS_OTHER " " MPI_CFLAGS_OTHER_STR) endif() endif() if(NOT MPI_LDFLAGS) - set(MPI_LDFLAGS_STR "-fPIC") + set(MPI_LDFLAGS_STR "") else() list(LENGTH MPI_LDFLAGS MPI_LDFLAGS_COUNT) if(MPI_LDFLAGS_COUNT LESS "1") set(MPI_LDFLAGS_STR "") + else() + set(MPI_LDFLAGS_STR "") list(JOIN MPI_LDFLAGS " " MPI_LDFLAGS_STR) endif() endif() @@ -207,6 +213,8 @@ macro(hpx_setup_gasnet) else() list(LENGTH MPI_LIBRARIES MPI_LIBRARIES_COUNT) if(MPI_LIBRARIES_COUNT LESS "1") + set(MPI_LIBRARIES_STR "-lmpi") + else() set(MPI_LIBRARIES_STR "") list(JOIN MPI_LIBRARIES " -l" MPI_LIBRARIES_STR) set(MPI_LIBRARIES_STR "-l${MPI_LIBRARIES_STR}") @@ -219,6 +227,8 @@ macro(hpx_setup_gasnet) list(LENGTH MPI_LIBRARY_DIRS MPI_LIBRARY_DIRS_COUNT) if(MPI_LIBRARIES_DIRS_COUNT LESS "1") set(MPI_LIBRARY_DIRS_STR "") + else() + set(MPI_LIBRARY_DIRS_STR "") list(JOIN MPI_LIBRARY_DIRS " -l" MPI_LIBRARY_DIRS_STR) set(MPI_LIBRARY_DIRS_STR "-l${MPI_LIBRARY_DIRS_STR}") endif() @@ -230,6 +240,8 @@ macro(hpx_setup_gasnet) list(LENGTH MPI_INCLUDE_DIRS MPI_INCLUDE_DIRS_COUNT) if(MPI_INCLUDE_DIRS_COUNT LESS "1") set(MPI_INCLUDE_DIRS_STR "") + else() + set(MPI_INCLUDE_DIRS_STR "") list(JOIN MPI_INCLUDE_DIRS " -I" MPI_INCLUDE_DIRS_STR) set(MPI_INCLUDE_DIRS_STR "-I${MPI_INCLUDE_DIRS_STR}") endif() From 6b27528ba65fe081db424766de6e177b9f7097f6 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Fri, 24 Nov 2023 15:01:30 -0500 Subject: [PATCH 29/43] rm'ing extraneous flags --- cmake/HPX_SetupGasnet.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 64c5f2752ec6..023b82f6472b 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -270,7 +270,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From 4000c36fe80a50a805c80824269b90d632ab685f Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sat, 25 Nov 2023 23:54:30 -0500 Subject: [PATCH 30/43] rm'ing extraneous quotes --- cmake/HPX_SetupGasnet.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 023b82f6472b..196368252286 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -249,12 +249,6 @@ macro(hpx_setup_gasnet) hpx_info("MPI version: " ${MPI_CXX_VERSION}) - message(STATUS "MPI_CFLAGS\t${MPI_CFLAGS_STR}") - message(STATUS "MPI_CFLAGS_OTHER\t${MPI_CFLAGS_OTHER_STR}") - message(STATUS "MPI_LDFLAGS\t${MPI_LDFLAGS_STR}") - message(STATUS "MPI_LIBRARY_DIRS\t${MPI_LIBRARIES_STR} ${MPI_LIBRARY_DIRS_STR}") - message(STATUS "MPI_INCLUDE_DIRS\t${MPI_INCLUDE_DIRS_STR}") - if(NOT MPI_FOUND) message( FATAL_ERROR @@ -264,13 +258,13 @@ macro(hpx_setup_gasnet) message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CCFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" CXXFLAGS=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --with-mpi-libs=\"${MPI_LIBRARIES_STR}\" --prefix=${GASNET_DIR}/install --with-cflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" --with-cxxflags=\"${MPI_CFLAGS_STR} ${MPI_CFLAGS_OTHER_STR} ${MPI_LDFLAGS_STR} ${MPI_LIBRARY_DIRS_STR} ${MPI_LIBRARIES_STR} ${MPI_INCLUDE_DIRS_STR}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From 9c71cfe1a43c6c76ecf81a92ff1882948b256309 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sun, 26 Nov 2023 00:36:46 -0500 Subject: [PATCH 31/43] added manual pkgconfig commands --- cmake/HPX_SetupGasnet.cmake | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 196368252286..29ab66a7becb 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -270,6 +270,55 @@ macro(hpx_setup_gasnet) OUTPUT_FILE ${GASNET_BUILD_OUTPUT} ERROR_FILE ${GASNET_ERROR_FILE} ) + + if(GASNET_BUILD_STATUS) + execute_process( + COMMAND + bash -c + "pkg-config --cflags ompi" + WORKING_DIRECTORY ${GASNET_DIR} + RESULT_VARIABLE PKGCONFIG_CFLAGS_STATUS + OUTPUT_VARIABLE PKGCONFIG_CFLAGS_FLAGS + OUTPUT_FILE ${PKGCONFIG_CFLAGS_OUTPUT} + ERROR_FILE ${PKGCONFIG_CFLAGS_ERROR_FILE} + ) + + if(PKGCONFIG_CFLAGS_STATUS) + message( + FATAL_ERROR + "`pkg-config --cflags ompi` result = ${PKGCONFIG_CFLAGS_STATUS} - see ${PKGCONFIG_CFLAGS_OUTPUT} for more details" + ) + endif() + + execute_process( + COMMAND + bash -c + "pkg-config --libs ompi" + WORKING_DIRECTORY ${GASNET_DIR} + RESULT_VARIABLE PKGCONFIG_LIBS_STATUS + OUTPUT_VARIABLE PKGCONFIG_LIBS_FLAGS + OUTPUT_FILE ${PKGCONFIG_LIBS_OUTPUT} + ERROR_FILE ${PKGCONFIG_LIBS_ERROR_FILE} + ) + + if(PKGCONFIG_LIBS_STATUS) + message( + FATAL_ERROR + "`pkg-config --libs ompi` result = ${PKGCONFIG_LIBS_STATUS} - see ${PKGCONFIG_LIBS_OUTPUT} for more details" + ) + endif() + + execute_process( + COMMAND + bash -c + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + WORKING_DIRECTORY ${GASNET_DIR} + RESULT_VARIABLE GASNET_BUILD_STATUS + OUTPUT_FILE ${GASNET_BUILD_OUTPUT} + ERROR_FILE ${GASNET_ERROR_FILE} + ) + + endif() endif() if(GASNET_BUILD_STATUS) From 08449faf93247b0841daa5107f9f42f28f4480a6 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sun, 26 Nov 2023 07:46:41 -0500 Subject: [PATCH 32/43] forgot to remove from pkgconfig cflags and libs --- cmake/HPX_SetupGasnet.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 29ab66a7becb..ca1b2ba098a8 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -279,8 +279,8 @@ macro(hpx_setup_gasnet) WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE PKGCONFIG_CFLAGS_STATUS OUTPUT_VARIABLE PKGCONFIG_CFLAGS_FLAGS - OUTPUT_FILE ${PKGCONFIG_CFLAGS_OUTPUT} - ERROR_FILE ${PKGCONFIG_CFLAGS_ERROR_FILE} + OUTPUT_FILE PKGCONFIG_CFLAGS_OUTPUT + ERROR_FILE PKGCONFIG_CFLAGS_ERROR_FILE ) if(PKGCONFIG_CFLAGS_STATUS) @@ -297,8 +297,8 @@ macro(hpx_setup_gasnet) WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE PKGCONFIG_LIBS_STATUS OUTPUT_VARIABLE PKGCONFIG_LIBS_FLAGS - OUTPUT_FILE ${PKGCONFIG_LIBS_OUTPUT} - ERROR_FILE ${PKGCONFIG_LIBS_ERROR_FILE} + OUTPUT_FILE PKGCONFIG_LIBS_OUTPUT + ERROR_FILE PKGCONFIG_LIBS_ERROR_FILE ) if(PKGCONFIG_LIBS_STATUS) @@ -308,6 +308,11 @@ macro(hpx_setup_gasnet) ) endif() + message( + STATUS + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + ) + execute_process( COMMAND bash -c From 15b73a33052eb6fcb5d368ab9edefdd7ef9eaf6e Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sun, 26 Nov 2023 13:10:43 -0500 Subject: [PATCH 33/43] added default configuration mode --- cmake/HPX_SetupGasnet.cmake | 46 +++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index ca1b2ba098a8..19f175275793 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -286,7 +286,7 @@ macro(hpx_setup_gasnet) if(PKGCONFIG_CFLAGS_STATUS) message( FATAL_ERROR - "`pkg-config --cflags ompi` result = ${PKGCONFIG_CFLAGS_STATUS} - see ${PKGCONFIG_CFLAGS_OUTPUT} for more details" + "`pkg-config --cflags ompi` result = ${PKGCONFIG_CFLAGS_STATUS} - see ${PKGCONFIG_CFLAGS_ERROR_FILE} for more details" ) endif() @@ -304,25 +304,41 @@ macro(hpx_setup_gasnet) if(PKGCONFIG_LIBS_STATUS) message( FATAL_ERROR - "`pkg-config --libs ompi` result = ${PKGCONFIG_LIBS_STATUS} - see ${PKGCONFIG_LIBS_OUTPUT} for more details" + "`pkg-config --libs ompi` result = ${PKGCONFIG_LIBS_STATUS} - see ${PKGCONFIG_LIBS_ERROR_FILE} for more details" ) endif() - message( - STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" - ) + if(PKGCONFIG_LIBS_STATUS OR PKGCONFIG_CFLAGS_STATUS) + message( + STATUS + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + ) - execute_process( - COMMAND - bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" - WORKING_DIRECTORY ${GASNET_DIR} - RESULT_VARIABLE GASNET_BUILD_STATUS - OUTPUT_FILE ${GASNET_BUILD_OUTPUT} - ERROR_FILE ${GASNET_ERROR_FILE} - ) + execute_process( + COMMAND + bash -c + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + WORKING_DIRECTORY ${GASNET_DIR} + RESULT_VARIABLE GASNET_BUILD_STATUS + OUTPUT_FILE ${GASNET_BUILD_OUTPUT} + ERROR_FILE ${GASNET_ERROR_FILE} + ) + else() + message( + STATUS + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + ) + execute_process( + COMMAND + bash -c + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + WORKING_DIRECTORY ${GASNET_DIR} + RESULT_VARIABLE GASNET_BUILD_STATUS + OUTPUT_FILE ${GASNET_BUILD_OUTPUT} + ERROR_FILE ${GASNET_ERROR_FILE} + ) + endif() endif() endif() From 6b20543786f8ace79cb9d86fa79a84feba31a02d Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sun, 26 Nov 2023 13:47:44 -0500 Subject: [PATCH 34/43] modified configuration ordering --- cmake/HPX_SetupGasnet.cmake | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 19f175275793..e3f97f0ae1fb 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -283,13 +283,6 @@ macro(hpx_setup_gasnet) ERROR_FILE PKGCONFIG_CFLAGS_ERROR_FILE ) - if(PKGCONFIG_CFLAGS_STATUS) - message( - FATAL_ERROR - "`pkg-config --cflags ompi` result = ${PKGCONFIG_CFLAGS_STATUS} - see ${PKGCONFIG_CFLAGS_ERROR_FILE} for more details" - ) - endif() - execute_process( COMMAND bash -c @@ -301,23 +294,16 @@ macro(hpx_setup_gasnet) ERROR_FILE PKGCONFIG_LIBS_ERROR_FILE ) - if(PKGCONFIG_LIBS_STATUS) - message( - FATAL_ERROR - "`pkg-config --libs ompi` result = ${PKGCONFIG_LIBS_STATUS} - see ${PKGCONFIG_LIBS_ERROR_FILE} for more details" - ) - endif() - if(PKGCONFIG_LIBS_STATUS OR PKGCONFIG_CFLAGS_STATUS) message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -326,13 +312,13 @@ macro(hpx_setup_gasnet) else() message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From de628092be3e48f358ceaed0534e49c57d41886d Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Sun, 26 Nov 2023 14:52:31 -0500 Subject: [PATCH 35/43] modified configuration ordering --- cmake/HPX_SetupGasnet.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index e3f97f0ae1fb..4b4e3224cf15 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -264,14 +264,14 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} - RESULT_VARIABLE GASNET_BUILD_STATUS + RESULT_VARIABLE GASNET_BUILD_STATUS_A OUTPUT_FILE ${GASNET_BUILD_OUTPUT} ERROR_FILE ${GASNET_ERROR_FILE} ) - if(GASNET_BUILD_STATUS) + if(GASNET_BUILD_STATUS_A) execute_process( COMMAND bash -c @@ -318,7 +318,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} From 0c73168080fcba9f44a695af49fac5c9aebeea74 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 27 Nov 2023 13:30:24 -0500 Subject: [PATCH 36/43] switching from gasnet-mpi to gasnet-udp due to openmpi pkgconfig issues --- .jenkins/lsu/env-clang-12.sh | 2 +- .jenkins/lsu/env-clang-13.sh | 2 +- .jenkins/lsu/env-clang-14.sh | 2 +- .jenkins/lsu/env-clang-15.sh | 2 +- .jenkins/lsu/env-clang-16.sh | 2 +- .jenkins/lsu/env-clang-17.sh | 2 +- .jenkins/lsu/env-gcc-10.sh | 2 +- .jenkins/lsu/env-gcc-12.sh | 2 +- .jenkins/lsu/env-gcc-13.sh | 2 +- cmake/HPX_SetupGasnet.cmake | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.jenkins/lsu/env-clang-12.sh b/.jenkins/lsu/env-clang-12.sh index 112b3e4ccd68..20b0f0845741 100644 --- a/.jenkins/lsu/env-clang-12.sh +++ b/.jenkins/lsu/env-clang-12.sh @@ -29,7 +29,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" # The pwrapi library still needs to be set up properly on rostam diff --git a/.jenkins/lsu/env-clang-13.sh b/.jenkins/lsu/env-clang-13.sh index ba0f1ade923b..a8aa852e6093 100644 --- a/.jenkins/lsu/env-clang-13.sh +++ b/.jenkins/lsu/env-clang-13.sh @@ -29,7 +29,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_TESTS_COMMAND_LINE=--hpx:queuing=local-workrequesting-fifo" diff --git a/.jenkins/lsu/env-clang-14.sh b/.jenkins/lsu/env-clang-14.sh index 208248512990..8aa708b4a52b 100644 --- a/.jenkins/lsu/env-clang-14.sh +++ b/.jenkins/lsu/env-clang-14.sh @@ -29,7 +29,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" diff --git a/.jenkins/lsu/env-clang-15.sh b/.jenkins/lsu/env-clang-15.sh index cf5542cb55e9..5cc044589588 100644 --- a/.jenkins/lsu/env-clang-15.sh +++ b/.jenkins/lsu/env-clang-15.sh @@ -29,7 +29,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" diff --git a/.jenkins/lsu/env-clang-16.sh b/.jenkins/lsu/env-clang-16.sh index d4eac31d296c..f491c1cfee45 100644 --- a/.jenkins/lsu/env-clang-16.sh +++ b/.jenkins/lsu/env-clang-16.sh @@ -29,7 +29,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" diff --git a/.jenkins/lsu/env-clang-17.sh b/.jenkins/lsu/env-clang-17.sh index 9a4ff5e32679..dfff068c39f5 100644 --- a/.jenkins/lsu/env-clang-17.sh +++ b/.jenkins/lsu/env-clang-17.sh @@ -29,7 +29,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=clang" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" configure_extra_options+=" -DHPX_WITH_LOGGING=OFF" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" diff --git a/.jenkins/lsu/env-gcc-10.sh b/.jenkins/lsu/env-gcc-10.sh index cf6c79a9f081..e1d2ba736c39 100644 --- a/.jenkins/lsu/env-gcc-10.sh +++ b/.jenkins/lsu/env-gcc-10.sh @@ -29,7 +29,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=gcc" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" # The pwrapi library still needs to be set up properly on rostam # configure_extra_options+=" -DHPX_WITH_POWER_COUNTER=ON" diff --git a/.jenkins/lsu/env-gcc-12.sh b/.jenkins/lsu/env-gcc-12.sh index 275614a83b69..0f1f7a08848c 100644 --- a/.jenkins/lsu/env-gcc-12.sh +++ b/.jenkins/lsu/env-gcc-12.sh @@ -28,7 +28,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=gcc" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" configure_extra_options+=" -DHPX_WITH_EVE_TAG=main" diff --git a/.jenkins/lsu/env-gcc-13.sh b/.jenkins/lsu/env-gcc-13.sh index 72e7b14eb97e..2c77402bbfcb 100644 --- a/.jenkins/lsu/env-gcc-13.sh +++ b/.jenkins/lsu/env-gcc-13.sh @@ -28,7 +28,7 @@ configure_extra_options+=" -DCMAKE_C_COMPILER=gcc" configure_extra_options+=" -DCMAKE_C_FLAGS=-fPIC" configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET=ON" configure_extra_options+=" -DHPX_WITH_FETCH_GASNET=ON" -configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=mpi" +configure_extra_options+=" -DHPX_WITH_PARCELPORT_GASNET_CONDUIT=udp" configure_extra_options+=" -DHPX_WITH_DATAPAR_BACKEND=EVE" configure_extra_options+=" -DHPX_WITH_FETCH_EVE=ON" configure_extra_options+=" -DHPX_WITH_EVE_TAG=main" diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index 4b4e3224cf15..e140fcc6dd8a 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -294,7 +294,7 @@ macro(hpx_setup_gasnet) ERROR_FILE PKGCONFIG_LIBS_ERROR_FILE ) - if(PKGCONFIG_LIBS_STATUS OR PKGCONFIG_CFLAGS_STATUS) + if(NOT (PKGCONFIG_LIBS_STATUS AND PKGCONFIG_CFLAGS_STATUS)) message( STATUS "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" From 0194f1d8a3bd4ebda20cb44d803ff8b8e8398124 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 27 Nov 2023 17:14:41 -0500 Subject: [PATCH 37/43] switching to gasnet-udp due to openmpi pkgconfig issues --- cmake/HPX_AddTest.cmake | 2 +- cmake/templates/hpxrun.py.in | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cmake/HPX_AddTest.cmake b/cmake/HPX_AddTest.cmake index bb2c9f63cfac..b1de975580e9 100644 --- a/cmake/HPX_AddTest.cmake +++ b/cmake/HPX_AddTest.cmake @@ -198,7 +198,7 @@ function(add_hpx_test category name) if(_add_test) set(_full_name "${category}.distributed.gasnet.${name}") add_test(NAME "${_full_name}" COMMAND ${cmd} "-p" "gasnet" "-r" - "gasnet-smp" ${args} + "gasnet" ${args} ) set_tests_properties( "${_full_name}" diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index 666821ba7a14..1763a15cf9b5 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -237,9 +237,6 @@ def run(cmd, runwrapper, localities, nodes, verbose): if runwrapper == 'gasnet': assert nodes is None, "nodes option only valid with tcp parcelport." run_gasnet(cmd, localities, verbose) - if runwrapper == 'gasnet-smp': - assert nodes is None, "nodes option only valid with smp parcelport." - run_gasnet_smp(cmd, localities, verbose) if runwrapper == 'srun': assert nodes is None, "nodes option only valid with tcp parcelport." run_srun(cmd, localities, verbose) @@ -390,7 +387,7 @@ Used by the tcp parcelport only. parser.add_option('-r', '--runwrapper' , action='store', type='string' , dest='runwrapper', default=default_env('HPXRUN_RUNWRAPPER', 'none') - , help='Which runwrapper to use (Options are: none, mpi, gasnet, gasnet-smp, srun, jsrun) ' + , help='Which runwrapper to use (Options are: none, mpi, gasnet, srun, jsrun) ' '(environment variable HPXRUN_RUNWRAPPER)') parser.add_option('-e', '--expected' From 6041e26e0a253f59ee466c8bf3a840d7a50206c5 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Mon, 27 Nov 2023 19:58:32 -0500 Subject: [PATCH 38/43] switching to gasnet-udp due to openmpi pkgconfig issues --- cmake/templates/hpxrun.py.in | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index 1763a15cf9b5..14ec89947d02 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -195,22 +195,6 @@ def run_mpi(cmd, localities, verbose): print('Executing command: ' + ' '.join(exec_cmd)) subproc(exec_cmd) -def run_gasnet(cmd, localities, verbose): - os.environ['GASNET_QUIET'] = 'yes' - os.environ['GASNET_ROUTE_OUTPUT'] = '0' - mpiexec = '@MPIEXEC@' - if mpiexec == '': - mpiexec = '@MPIEXEC_EXECUTABLE@' - if mpiexec == '': - msg = 'mpiexec not available on this platform. ' - msg += 'Please rerun CMake with HPX_PARCELPORT_MPI=True.' - print(msg, sys.stderr) - sys.exit(1) - exec_cmd = [mpiexec, '@MPIEXEC_NUMPROC_FLAG@', str(localities)] + cmd - if verbose: - print('Executing command: ' + ' '.join(exec_cmd)) - subproc(exec_cmd) - # Run with srun # This is executing srun with the '-n' option set to the number of localities def run_srun(cmd, localities, verbose): @@ -236,7 +220,9 @@ def run(cmd, runwrapper, localities, nodes, verbose): run_mpi(cmd, localities, verbose) if runwrapper == 'gasnet': assert nodes is None, "nodes option only valid with tcp parcelport." - run_gasnet(cmd, localities, verbose) + os.environ['GASNET_QUIET'] = 'yes' + os.environ['GASNET_ROUTE_OUTPUT'] = '0' + run_srun(cmd, localities, verbose) if runwrapper == 'srun': assert nodes is None, "nodes option only valid with tcp parcelport." run_srun(cmd, localities, verbose) From 87d15d0cdca2a4457dc21fb9468a918d127ad93e Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Tue, 28 Nov 2023 14:47:46 -0500 Subject: [PATCH 39/43] changing how gasnet is deployed within hpxrun --- cmake/templates/hpxrun.py.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index 14ec89947d02..8a366dc0d055 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -219,10 +219,9 @@ def run(cmd, runwrapper, localities, nodes, verbose): assert nodes is None, "nodes option only valid with tcp parcelport." run_mpi(cmd, localities, verbose) if runwrapper == 'gasnet': - assert nodes is None, "nodes option only valid with tcp parcelport." os.environ['GASNET_QUIET'] = 'yes' os.environ['GASNET_ROUTE_OUTPUT'] = '0' - run_srun(cmd, localities, verbose) + run_none(cmd, localities, nodes, verbose) if runwrapper == 'srun': assert nodes is None, "nodes option only valid with tcp parcelport." run_srun(cmd, localities, verbose) From 094dba666ba51db555a1ebbdf2c3312729aac3ae Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Tue, 28 Nov 2023 22:45:36 -0500 Subject: [PATCH 40/43] changing how gasnet hpxrun.py to amudprun w/ssh support --- cmake/templates/hpxrun.py.in | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index 8a366dc0d055..d0ea287ff2a7 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -179,6 +179,19 @@ def run_none(cmd, localities, nodes, verbose): print('Executing command: ' + ' '.join(cmd)) subproc(cmd) +def run_amudprun(cmd, localities, nodes, verbose): + assert len(nodes) == localities, "Number of localities must match number of nodes." + os.environ['GASNET_SPAWNFN'] = 'S' + os.environ['GASNET_SSH_SERVERS'] = ' '.join([ str(node) for node in nodes ]) + os.environ['SSH_SERVERS'] = os.environ['GASNET_SSH_SERVERS'] + os.environ['GASNET_ROUTE_OUTPUT'] = '0' + + exec_cmd = ['amudprun', '-np', len(nodes), cmd] + + if verbose: + print('Executing command: ' + ' '.join(exec_cmd)) + subproc(exec_cmd) + # Run with mpiexec # This is executing mpiexec with the "-np" option set to the number of localities def run_mpi(cmd, localities, verbose): @@ -215,13 +228,11 @@ def run_jsrun(cmd, localities, verbose): def run(cmd, runwrapper, localities, nodes, verbose): if runwrapper == 'none': run_none(cmd, localities, nodes, verbose) + if runwrapper == 'gasnet': + run_amudprun(cmd, localities, nodes, verbose) if runwrapper == 'mpi': assert nodes is None, "nodes option only valid with tcp parcelport." run_mpi(cmd, localities, verbose) - if runwrapper == 'gasnet': - os.environ['GASNET_QUIET'] = 'yes' - os.environ['GASNET_ROUTE_OUTPUT'] = '0' - run_none(cmd, localities, nodes, verbose) if runwrapper == 'srun': assert nodes is None, "nodes option only valid with tcp parcelport." run_srun(cmd, localities, verbose) From 7a63a9a219ac91a25eef4b9ba85de1cfaa3f3176 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Wed, 29 Nov 2023 10:54:03 -0500 Subject: [PATCH 41/43] explicitly turn off gasnet conduits the user does not select; test the compiled application using srun; leave amudprun in the hpxrun script --- cmake/HPX_SetupGasnet.cmake | 20 ++++++++++---------- cmake/templates/hpxrun.py.in | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/cmake/HPX_SetupGasnet.cmake b/cmake/HPX_SetupGasnet.cmake index e140fcc6dd8a..227d037fef83 100644 --- a/cmake/HPX_SetupGasnet.cmake +++ b/cmake/HPX_SetupGasnet.cmake @@ -119,7 +119,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" --enable-udp && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" --enable-udp --disable-mpi --disable-smp --disable-ofi --disable-ucx && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -129,7 +129,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" --enable-smp && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" --enable-smp --disable-udp --disable-ofi --disable-mpi --disable-ucx && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -139,7 +139,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-ofi --with-ofi-home=${OFI_DIR} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-ofi --with-ofi-home=${OFI_DIR} --disable-smp --disable-mpi --disable-ucx --disable-udp --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -149,7 +149,7 @@ macro(hpx_setup_gasnet) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-ucx --with-ucx-home=${UCX_DIR} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-ucx --with-ucx-home=${UCX_DIR} --disable-smp --disable-mpi --disable-ofi --disable-udp --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -258,13 +258,13 @@ macro(hpx_setup_gasnet) message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --disable-udp --disable-smp --disable-ucx --disable-ofi --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --disable-udp --disable-smp --disable-ucx --disable-ofi --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS_A OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -297,13 +297,13 @@ macro(hpx_setup_gasnet) if(NOT (PKGCONFIG_LIBS_STATUS AND PKGCONFIG_CFLAGS_STATUS)) message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --disable-udp --disable-smp --disable-ucx --disable-ofi --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CCFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" CXXFLAGS=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --disable-udp --disable-smp --disable-ucx --disable-ofi --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" --with-cxxflags=\"-fPIC ${PKGCONFIG_CFLAGS_FLAGS} ${PKGCONFIG_LIBS_FLAGS}\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} @@ -312,13 +312,13 @@ macro(hpx_setup_gasnet) else() message( STATUS - "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "GASNet Build Command\nCC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-fPIC CCFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --disable-udp --disable-smp --disable-ucx --disable-ofi --prefix=${GASNET_DIR}/install --with-cflags=-fPIC --with-cxxflags=-fPIC && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" ) execute_process( COMMAND bash -c - "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" + "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=\"-fPIC\" CCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" ./configure --enable-mpi --with-mpi-cc=${CMAKE_C_COMPILER} --disable-udp --disable-smp --disable-ucx --disable-ofi --prefix=${GASNET_DIR}/install --with-cflags=\"-fPIC\" --with-cxxflags=\"-fPIC\" && make -j ${GASNET_BUILD_PARALLEL_LEVEL} && make install" WORKING_DIRECTORY ${GASNET_DIR} RESULT_VARIABLE GASNET_BUILD_STATUS OUTPUT_FILE ${GASNET_BUILD_OUTPUT} diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index d0ea287ff2a7..ac1530ab6f63 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -229,7 +229,8 @@ def run(cmd, runwrapper, localities, nodes, verbose): if runwrapper == 'none': run_none(cmd, localities, nodes, verbose) if runwrapper == 'gasnet': - run_amudprun(cmd, localities, nodes, verbose) + #run_amudprun(cmd, localities, nodes, verbose) + run_srun(cmd, localities, verbose) if runwrapper == 'mpi': assert nodes is None, "nodes option only valid with tcp parcelport." run_mpi(cmd, localities, verbose) From 8877fede07000e1b803e1930ed8bf5190c948451 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Thu, 30 Nov 2023 13:11:44 -0500 Subject: [PATCH 42/43] refined amudprun support in the test code and in the hpxrun launcher --- cmake/HPX_AddTest.cmake | 2 +- cmake/templates/hpxrun.py.in | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/HPX_AddTest.cmake b/cmake/HPX_AddTest.cmake index b1de975580e9..beceaf8ebd23 100644 --- a/cmake/HPX_AddTest.cmake +++ b/cmake/HPX_AddTest.cmake @@ -198,7 +198,7 @@ function(add_hpx_test category name) if(_add_test) set(_full_name "${category}.distributed.gasnet.${name}") add_test(NAME "${_full_name}" COMMAND ${cmd} "-p" "gasnet" "-r" - "gasnet" ${args} + "amudprun" ${args} ) set_tests_properties( "${_full_name}" diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index ac1530ab6f63..0b39ea13ae8c 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -228,9 +228,8 @@ def run_jsrun(cmd, localities, verbose): def run(cmd, runwrapper, localities, nodes, verbose): if runwrapper == 'none': run_none(cmd, localities, nodes, verbose) - if runwrapper == 'gasnet': - #run_amudprun(cmd, localities, nodes, verbose) - run_srun(cmd, localities, verbose) + if runwrapper == 'amudprun': + run_amudprun(cmd, localities, nodes, verbose) if runwrapper == 'mpi': assert nodes is None, "nodes option only valid with tcp parcelport." run_mpi(cmd, localities, verbose) @@ -299,7 +298,7 @@ def check_options(parser, options, args): sys.exit(1) check_valid_runwrapper = (lambda x: - x == 'none' or x == 'mpi' or x == 'srun' or x =='jsrun' or x == 'gasnet'); + x == 'none' or x == 'mpi' or x == 'srun' or x =='jsrun' or x == 'amudprun'); if not check_valid_runwrapper(options.runwrapper): print('Error: Runwrapper option not valid\n', sys.stderr) parser.print_help() @@ -384,7 +383,7 @@ Used by the tcp parcelport only. parser.add_option('-r', '--runwrapper' , action='store', type='string' , dest='runwrapper', default=default_env('HPXRUN_RUNWRAPPER', 'none') - , help='Which runwrapper to use (Options are: none, mpi, gasnet, srun, jsrun) ' + , help='Which runwrapper to use (Options are: none, mpi, amudprun, srun, jsrun) ' '(environment variable HPXRUN_RUNWRAPPER)') parser.add_option('-e', '--expected' From b5694fcac43dd29b99b7a37c0b4815ddf562acc2 Mon Sep 17 00:00:00 2001 From: ct-clmsn Date: Wed, 21 Feb 2024 20:47:39 -0500 Subject: [PATCH 43/43] updates to correct for gasnet on srun, removed amudprun support --- cmake/HPX_AddTest.cmake | 2 +- cmake/templates/hpxrun.py.in | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/cmake/HPX_AddTest.cmake b/cmake/HPX_AddTest.cmake index beceaf8ebd23..7d4f0c4b2979 100644 --- a/cmake/HPX_AddTest.cmake +++ b/cmake/HPX_AddTest.cmake @@ -198,7 +198,7 @@ function(add_hpx_test category name) if(_add_test) set(_full_name "${category}.distributed.gasnet.${name}") add_test(NAME "${_full_name}" COMMAND ${cmd} "-p" "gasnet" "-r" - "amudprun" ${args} + "srun" ${args} ) set_tests_properties( "${_full_name}" diff --git a/cmake/templates/hpxrun.py.in b/cmake/templates/hpxrun.py.in index 0b39ea13ae8c..711eadcc390b 100755 --- a/cmake/templates/hpxrun.py.in +++ b/cmake/templates/hpxrun.py.in @@ -179,19 +179,6 @@ def run_none(cmd, localities, nodes, verbose): print('Executing command: ' + ' '.join(cmd)) subproc(cmd) -def run_amudprun(cmd, localities, nodes, verbose): - assert len(nodes) == localities, "Number of localities must match number of nodes." - os.environ['GASNET_SPAWNFN'] = 'S' - os.environ['GASNET_SSH_SERVERS'] = ' '.join([ str(node) for node in nodes ]) - os.environ['SSH_SERVERS'] = os.environ['GASNET_SSH_SERVERS'] - os.environ['GASNET_ROUTE_OUTPUT'] = '0' - - exec_cmd = ['amudprun', '-np', len(nodes), cmd] - - if verbose: - print('Executing command: ' + ' '.join(exec_cmd)) - subproc(exec_cmd) - # Run with mpiexec # This is executing mpiexec with the "-np" option set to the number of localities def run_mpi(cmd, localities, verbose): @@ -228,8 +215,11 @@ def run_jsrun(cmd, localities, verbose): def run(cmd, runwrapper, localities, nodes, verbose): if runwrapper == 'none': run_none(cmd, localities, nodes, verbose) - if runwrapper == 'amudprun': - run_amudprun(cmd, localities, nodes, verbose) + if runwrapper == 'gasnet': + assert nodes is None, "nodes option only valid with tcp parcelport." + os.environ['GASNET_SPAWNFN'] = 'C' + os.environ['GASNET_CSPAWN_CMD'] = '' + run_srun(cmd, localities, verbose) if runwrapper == 'mpi': assert nodes is None, "nodes option only valid with tcp parcelport." run_mpi(cmd, localities, verbose) @@ -298,7 +288,7 @@ def check_options(parser, options, args): sys.exit(1) check_valid_runwrapper = (lambda x: - x == 'none' or x == 'mpi' or x == 'srun' or x =='jsrun' or x == 'amudprun'); + x == 'none' or x == 'mpi' or x == 'srun' or x =='jsrun'); if not check_valid_runwrapper(options.runwrapper): print('Error: Runwrapper option not valid\n', sys.stderr) parser.print_help() @@ -383,7 +373,7 @@ Used by the tcp parcelport only. parser.add_option('-r', '--runwrapper' , action='store', type='string' , dest='runwrapper', default=default_env('HPXRUN_RUNWRAPPER', 'none') - , help='Which runwrapper to use (Options are: none, mpi, amudprun, srun, jsrun) ' + , help='Which runwrapper to use (Options are: none, mpi, srun, jsrun) ' '(environment variable HPXRUN_RUNWRAPPER)') parser.add_option('-e', '--expected'