Skip to content

Commit

Permalink
Attempt to simplify build system support for the gasnet pp
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jul 13, 2023
1 parent 3d36a26 commit 3286869
Show file tree
Hide file tree
Showing 23 changed files with 962 additions and 1,012 deletions.
3 changes: 2 additions & 1 deletion .cmake-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@
'RUN_SERIAL',
'NO_PARCELPORT_TCP',
'NO_PARCELPORT_LCI',
'NO_PARCELPORT_MPI'],
'NO_PARCELPORT_MPI',
'NO_PARCELPORT_GASNET'],
'nargs': '2+'}},
'add_hpx_source_group': { 'kwargs': { 'CLASS': 1,
'NAME': 1,
Expand Down
53 changes: 18 additions & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ if(APPLE
OR HPX_WITH_CUDA
OR HPX_WITH_HIP
OR HPX_WITH_PARCELPORT_LCI
OR HPX_WITH_PARCELPORT_GASNET
)
set(HPX_WITH_PKGCONFIG_DEFAULT OFF)
endif()
Expand Down Expand Up @@ -1150,37 +1149,11 @@ if(HPX_WITH_NETWORKING)
)
if(HPX_WITH_PARCELPORT_GASNET)
hpx_add_config_define(HPX_HAVE_PARCELPORT_GASNET)
endif()

hpx_option(
HPX_WITH_PARCELPORT_GASNET_CONDUIT
STRING
"Define which conduit to use for the gasnet parcelport"
"udp"
STRINGS "smp;udp;mpi;ofi;ucx;ibv"
)

if(HPX_WITH_PARCELPORT_GASNET_CONDUIT AND ${HPX_WITH_PARCELPORT_GASNET_CONDUIT} STREQUAL "mpi")
hpx_add_config_define(HPX_WITH_PARCELPORT_GASNET_MPI)
set(HPX_WITH_PARCELPORT_GASNET_MPI ON)
elseif(HPX_WITH_PARCELPORT_GASNET_CONDUIT AND ${HPX_WITH_PARCELPORT_GASNET_CONDUIT} STREQUAL "smp")
hpx_add_config_define(HPX_WITH_PARCELPORT_GASNET_SMP)
set(HPX_WITH_PARCELPORT_GASNET_SMP ON)
elseif(HPX_WITH_PARCELPORT_GASNET_CONDUIT AND ${HPX_WITH_PARCELPORT_GASNET_CONDUIT} STREQUAL "ibv")
hpx_add_config_define(HPX_WITH_PARCELPORT_GASNET_IBV)
set(HPX_WITH_PARCELPORT_GASNET_IBV ON)
elseif(HPX_WITH_PARCELPORT_GASNET_CONDUIT AND ${HPX_WITH_PARCELPORT_GASNET_CONDUIT} STREQUAL "ofi")
hpx_add_config_define(HPX_WITH_PARCELPORT_GASNET_OFI)
set(HPX_WITH_PARCELPORT_GASNET_OFI ON)
elseif(HPX_WITH_PARCELPORT_GASNET_CONDUIT AND ${HPX_WITH_PARCELPORT_GASNET_CONDUIT} STREQUAL "ucx")
hpx_add_config_define(HPX_WITH_PARCELPORT_GASNET_UCX)
set(HPX_WITH_PARCELPORT_GASNET_UCX ON)
elseif(HPX_WITH_PARCELPORT_GASNET_CONDUIT AND ${HPX_WITH_PARCELPORT_GASNET_CONDUIT} STREQUAL "udp")
hpx_add_config_define(HPX_WITH_PARCELPORT_GASNET_UDP)
set(HPX_WITH_PARCELPORT_GASNET_UDP ON)
else()
hpx_add_config_define(HPX_WITH_PARCELPORT_GASNET_UDP)
set(HPX_WITH_PARCELPORT_GASNET_UDP ON)
hpx_option(
HPX_WITH_PARCELPORT_GASNET_CONDUIT STRING
"Define which conduit to use for the gasnet parcelport" "udp"
STRINGS "smp;udp;mpi;ofi;ucx;ibv"
)
endif()

hpx_option(
Expand Down Expand Up @@ -1220,7 +1193,10 @@ else(HPX_WITH_NETWORKING)
)
endif(HPX_WITH_NETWORKING)

if((HPX_WITH_NETWORKING AND HPX_WITH_PARCELPORT_MPI) OR HPX_WITH_ASYNC_MPI OR HPX_WITH_PARCELPORT_GASNET_MPI)
if((HPX_WITH_NETWORKING AND HPX_WITH_PARCELPORT_MPI)
OR HPX_WITH_ASYNC_MPI
OR ("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi")
)
# mpi parcelport settings
hpx_option(
HPX_WITH_PARCELPORT_MPI_ENV
Expand Down Expand Up @@ -2165,13 +2141,20 @@ add_hpx_library_headers_noglob(hpx_external)
# Setup plugins (set here cause if we include it inside plugins, it will not be
# defined in src/CMakeLists.txt where we call add_static_parcelports)
include(HPX_SetupMPI) # must come before APEX
if((HPX_WITH_NETWORKING AND HPX_WITH_PARCELPORT_MPI) OR HPX_WITH_ASYNC_MPI OR HPX_WITH_PARCELPORT_GASNET_MPI)
if((HPX_WITH_NETWORKING AND HPX_WITH_PARCELPORT_MPI)
OR HPX_WITH_ASYNC_MPI
OR ("${HPX_WITH_PARCELPORT_GASNET_CONDUIT}" STREQUAL "mpi")
)
hpx_setup_mpi()
endif()
include(HPX_SetupLCI)
if(HPX_WITH_NETWORKING AND HPX_WITH_PARCELPORT_LCI)
include(HPX_SetupLCI)
hpx_setup_lci()
endif()
if(HPX_WITH_NETWORKING AND HPX_WITH_PARCELPORT_GASNET)
include(HPX_SetupGasnet)
hpx_setup_gasnet()
endif()

# Setup packages and subprojects
include(HPX_SetupSYCL)
Expand Down
Loading

0 comments on commit 3286869

Please sign in to comment.