Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ mark_as_advanced(PARSEC_SCHED_DEPS_MASK)
mark_as_advanced(PARSEC_DIST_THREAD PARSEC_DIST_PRIORITIES)
option(PARSEC_DIST_WITH_MPI
"Build PaRSEC for distributed memory with MPI backend (conflicts all other backends)" ON)
if(PARSEC_DIST_WITH_MPI AND 0)
message(FATAL_ERROR "PARSEC_DIST_WITH_MPI and PARSEC_DIST_WITH_OTHER are mutually exclusive, please select only one")
option(PARSEC_DIST_WITH_UCX
"Build PaRSEC for distributed memory with UCX backend bootstrapped by PMIx" OFF)
if(PARSEC_DIST_WITH_MPI AND PARSEC_DIST_WITH_UCX)
message(FATAL_ERROR "The UCX backend currently requires PARSEC_DIST_WITH_MPI=OFF because the MPI build still exposes MPI_Datatype in the public datatype ABI")
endif()
option(PARSEC_MPI_IS_GPU_AWARE
"Build PaRSEC assuming the MPI library is GPU-aware, aka. can move data directly to and from GPU memory.\
Expand Down Expand Up @@ -647,6 +649,17 @@ if( BUILD_PARSEC )
endif (NOT MPI_C_FOUND)
list(APPEND EXTRA_LIBS ${MPI_C_LIBRARIES})
endif (PARSEC_DIST_WITH_MPI)
if (PARSEC_DIST_WITH_UCX)
find_package(PkgConfig REQUIRED)
pkg_check_modules(PARSEC_UCX REQUIRED ucx)
pkg_check_modules(PARSEC_PMIX REQUIRED pmix)
set(PARSEC_HAVE_UCX TRUE)
set(PARSEC_HAVE_PMIX TRUE)
include_directories(BEFORE ${PARSEC_UCX_INCLUDE_DIRS} ${PARSEC_PMIX_INCLUDE_DIRS})
link_directories(${PARSEC_UCX_LIBRARY_DIRS} ${PARSEC_PMIX_LIBRARY_DIRS})
list(APPEND EXTRA_INCLUDES ${PARSEC_UCX_INCLUDE_DIRS} ${PARSEC_PMIX_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${PARSEC_UCX_LIBRARIES} ${PARSEC_PMIX_LIBRARIES})
endif (PARSEC_DIST_WITH_UCX)
#
# Check to see if
# support for MPI 2.0 is available
Expand Down
15 changes: 7 additions & 8 deletions parsec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ set(SOURCES
private_mempool.c
remote_dep.c
parsec_comm_engine.c
datatype/datatype_module.c
scheduling.c
compound.c
vpmap.c
Expand All @@ -130,16 +131,13 @@ set(SOURCES
if( PARSEC_PROF_TRACE )
list(APPEND SOURCES dictionary.c)
endif( PARSEC_PROF_TRACE )
if( PARSEC_HAVE_MPI )
if( PARSEC_HAVE_MPI OR PARSEC_HAVE_UCX )
list(APPEND SOURCES
parsec_mpi_funnelled.c
remote_dep_mpi.c)
endif( PARSEC_HAVE_MPI )
if( NOT MPI_C_FOUND )
remote_dep_comm.c)
endif( PARSEC_HAVE_MPI OR PARSEC_HAVE_UCX )
if( NOT PARSEC_HAVE_MPI )
list(APPEND SOURCES datatype/datatype.c)
else( NOT MPI_C_FOUND )
list(APPEND SOURCES datatype/datatype_mpi.c)
endif( NOT MPI_C_FOUND )
endif( NOT PARSEC_HAVE_MPI )
list(APPEND SOURCES parsec_hwloc.c)

if( PARSEC_PROF_GRAPHER )
Expand Down Expand Up @@ -310,6 +308,7 @@ if( BUILD_PARSEC )
${CMAKE_CURRENT_SOURCE_DIR}/include/parsec/parsec_config_bottom.h
${CMAKE_CURRENT_SOURCE_DIR}/include/parsec/data_distribution.h
${CMAKE_CURRENT_SOURCE_DIR}/datatype.h
${CMAKE_CURRENT_SOURCE_DIR}/datatype_module.h
${CMAKE_CURRENT_SOURCE_DIR}/profiling.h
${CMAKE_CURRENT_SOURCE_DIR}/dictionary.h
${CMAKE_CURRENT_SOURCE_DIR}/data.h
Expand Down
2 changes: 1 addition & 1 deletion parsec/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ static void parsec_arena_datatype_construct(parsec_object_t *obj) {
adt->ht_item.next_item = NULL; /* keep Coverity happy */
adt->ht_item.hash64 = 0; /* keep Coverity happy */
adt->ht_item.key = 0; /* keep Coverity happy */
adt->opaque_dtt = NULL;
adt->opaque_dtt = PARSEC_DATATYPE_NULL;
}

static void parsec_arena_datatype_destruct(parsec_object_t *obj) {
Expand Down
13 changes: 9 additions & 4 deletions parsec/datatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) 2015-2021 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2026 NVIDIA Corporation. All rights reserved.
*/

#ifndef PARSEC_DATATYPE_H_HAS_BEEN_INCLUDED
Expand Down Expand Up @@ -66,9 +67,12 @@ typedef intptr_t parsec_datatype_t;
BEGIN_C_DECLS

/**
* Map the datatype creation to the well designed and well known MPI datatype
* API. The datatype support remains extremely basic, providing API only for
* basic datatypes and functions to mix them together.
* Datatype portability API used by communication and data-movement engines.
*
* The public parsec_type_* functions are stable entry points. Their
* implementation is selected by the active communication backend, so MPI builds
* can keep MPI datatypes while other transports can provide another
* representation.
*/
int parsec_type_size(parsec_datatype_t type,
int *size);
Expand Down Expand Up @@ -120,7 +124,8 @@ int parsec_type_match(parsec_datatype_t dtt1,
/**
* Routine to check if a datatype is contiguous.
* @param[in] parsec_datatype_t datatype
* @return PARSEC_SUCCESS if it was created with MPI_Type_contiguous, PARSEC_ERROR otherwise.
* @return PARSEC_SUCCESS if the selected backend recognizes it as contiguous,
* PARSEC_ERROR otherwise.
*/
int parsec_type_contiguous(parsec_datatype_t dtt);
END_C_DECLS
Expand Down
Loading
Loading