Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
4c9b86f
working hapi port
Dec 12, 2025
66b8e92
patches for bugs
Dec 24, 2025
82e168d
mpi for rdma + ipc for multiple processes per gpu case
Jan 8, 2026
f2df1c6
fix qd issue
Jan 9, 2026
0cba429
fix memcpy det_pe seet
Sh0g0-1758 Jan 10, 2026
5ecffbb
a couple patches
Sh0g0-1758 Jan 14, 2026
dbc3815
mpi smp for chareArray and group
Sh0g0-1758 Jan 15, 2026
60d6ebf
fix barrier issues for smp
Sh0g0-1758 Jan 15, 2026
79ccdda
isend/irecv for mpi smp
Sh0g0-1758 Jan 17, 2026
a68d1ef
mpi rget and cached access windows
Sh0g0-1758 Jan 21, 2026
d5938df
richer prints
Sh0g0-1758 Jan 26, 2026
33ebcd6
cleanup
Sh0g0-1758 Feb 2, 2026
e328447
Rget and polling for non-smp
Sh0g0-1758 Feb 4, 2026
ceb4ad1
Revert "Rget and polling for non-smp"
Sh0g0-1758 Feb 4, 2026
b0def3d
Reapply "Rget and polling for non-smp"
Sh0g0-1758 Feb 4, 2026
f048dbc
use MPI_Testsome to test a vector of rdma_requests at once
Sh0g0-1758 Feb 4, 2026
332a306
Update latency benchmark
adityapb Feb 10, 2026
22c350a
Update latency benchmark
adityapb Feb 10, 2026
954893b
Update latency benchmark
adityapb Feb 10, 2026
5acece1
Update latency benchmark
adityapb Feb 10, 2026
6cffad0
Fix UCX build
adityapb Feb 17, 2026
7c01904
use lci rdmaget for inter-node gpu comms
Sh0g0-1758 Mar 30, 2026
50d524b
Merge branch 'reconverse-support' into hapi_portable_reconverse_support
Sh0g0-1758 Apr 7, 2026
882a326
manually add definition for findTransferModeDevice
Sh0g0-1758 Apr 7, 2026
c2597d0
fixes to run intermittently
Sh0g0-1758 Apr 14, 2026
b0dfef5
Merge branch 'hapi_portable_reconverse_support' of https://github.com…
ritvikrao Apr 14, 2026
c94f387
loopback handling moved to reconverse
ritvikrao Apr 15, 2026
bca7c36
changes to prevent double free, cudastreamsynchronize and buddy alloc…
Sh0g0-1758 Apr 15, 2026
9e48ce9
merge reconverse changes with lb
ritvikrao Apr 17, 2026
10efec6
merge
ritvikrao Apr 17, 2026
0d203f1
Merge branch 'hapi_portable_reconverse_support' into cupti_lb_reconverse
ritvikrao Apr 17, 2026
2a98e2e
build fix
ritvikrao Apr 17, 2026
b332938
debugging ckactiveobject crash
Sh0g0-1758 Apr 18, 2026
7e9f389
remove debug prints
Sh0g0-1758 Apr 19, 2026
bfec3b5
passing PUP size to stratergy and using user data to pass alloc size …
Sh0g0-1758 Apr 19, 2026
e2efb9d
remove one extra level of cudaMalloc/cudaFree calls during laod balan…
Sh0g0-1758 Apr 19, 2026
99413bd
malloc for load balancing buffers
Sh0g0-1758 Apr 19, 2026
1df662f
better debugs
Sh0g0-1758 Apr 19, 2026
b9dcb92
lb buffer size not restricted to power of 2 + changes to get alloc si…
Sh0g0-1758 Apr 20, 2026
9301b37
hip is hapi now, cuda is also hapi
Sh0g0-1758 Apr 21, 2026
2a8b924
nit
Sh0g0-1758 Apr 21, 2026
537d5b0
nit
Sh0g0-1758 Apr 21, 2026
3ad64a0
nit
Sh0g0-1758 Apr 21, 2026
04bb679
more hapi hip changes
Sh0g0-1758 Apr 22, 2026
6f7a309
verify and jacobi
Sh0g0-1758 Apr 22, 2026
a8a08ca
search for rocm paths
ritvikrao Apr 27, 2026
6b54206
add hapimemcpy2d
Sh0g0-1758 Apr 30, 2026
57499ee
hipStreamCreateWithPriority
ritvikrao Apr 30, 2026
4f32e66
hapiStreamNonBlocking
ritvikrao Apr 30, 2026
f878118
hipHostFree
ritvikrao May 3, 2026
598563e
getLastError
ritvikrao May 7, 2026
aa309d5
trying to build git tracing && bug fixed in IPC communication
Sh0g0-1758 May 24, 2026
e337bcc
New build for reconverse
ritvikrao Jun 2, 2026
6841dfe
fix CMK_OPTIMIZE redefinition
ritvikrao Jun 17, 2026
6c8e7c0
fix in metis
ritvikrao Jul 7, 2026
85dc995
move _XOPEN_SOURCE
ritvikrao Jul 7, 2026
43651fd
add reconverse-linux-arm8 build
ritvikrao Jul 13, 2026
9460a34
reconverse-darwin-arm8: compile with C++17 - Apple clang default C++9…
lvkale Jul 15, 2026
9794fea
copy conv-rdma from reconverse
ritvikrao Jul 28, 2026
86db407
copy persistent.h from reconverse
ritvikrao Jul 28, 2026
da9a5f2
tests/charm++/qd: repeated CkStartQD without exit (phased ring pingpong)
lvkale Jul 30, 2026
3d1fdd8
Merge branch 'reconverse-specific-build' into reconverse-persistent
ritvikrao Jul 30, 2026
98694d4
Merge branch 'cupti_lb_reconverse_hapi' into reconverse-specific-build
ritvikrao Aug 11, 2026
fdbe226
Fix GPU/CPU build breakage exposed by the hapi merge
ritvikrao Aug 11, 2026
34eca2f
verify example: default CHARM_DIR to the in-tree AMD build, honour RO…
ritvikrao Aug 11, 2026
931d720
cuda fixes
ritvikrao Aug 12, 2026
f7c7605
remove debug prints
ritvikrao Aug 14, 2026
9af1de4
compile fix to allow cpu codes to compile
ritvikrao Aug 17, 2026
90ef159
trace-summary: self-closing shutdown for reconverse (summary/sumDetai…
lvkale Aug 12, 2026
e606c33
tests/charm++/qd: cliff-diagnosis knobs for qdbench
lvkale Aug 24, 2026
cdaf6a4
tests/charm++/anytime_bcastred: anytime migration vs broadcasts/reduc…
lvkale Aug 25, 2026
7030c2e
anytime_bcastred: -B p2p step mode, -w watchdog knob
lvkale Aug 25, 2026
9d1177d
Fix reduction hang when anytime migration leaves a PE obligation-free…
lvkale Aug 25, 2026
56758e7
record-replay repairs: broadcast crash, flush durability, truncated-l…
lvkale Aug 25, 2026
ba308f7
Fix +replay stall and crash on chare array broadcasts (#3940)
lvkale Aug 25, 2026
6b1d94d
anytime_bcastred: remove accidentally committed binary
lvkale Aug 25, 2026
c1471a6
buildcmake: don't force RECONVERSE=ON for every build (#3941)
lvkale Aug 25, 2026
15f774f
build: stop forcing RECONVERSE into every build; fix conv-static wiri…
lvkale Aug 25, 2026
e498b42
hello/1darray: restore the mainline example (drop committed debug edits)
lvkale Aug 25, 2026
3f88476
fetch_reconverse: pin reconverse by commit SHA instead of branch 'main'
lvkale Aug 25, 2026
50dbead
cmake: charm_cxx_utils must wait for charmxi-generated decls
lvkale Aug 25, 2026
bf73293
Add reconverse,lci,lcw to rpath
ritvikrao Aug 25, 2026
360ee69
track main
ritvikrao Aug 27, 2026
f6c7407
Fix Charm4py target for Reconverse
ritvikrao Sep 13, 2026
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
200 changes: 173 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ else()
endif()

# Build options
set(NETWORK "netlrts" CACHE STRING "Target network layer, can be one of mpi,multicore,netlrts,gni,ofi,pami,pamilrts,ucx,verbs")
set(NETWORK "netlrts" CACHE STRING "Target network layer, can be one of mpi,multicore,netlrts,reconverse,gni,ofi,pami,pamilrts,ucx,verbs")
set(TARGET "charm++" CACHE STRING "Target build type, can be one of charm++,AMPI,LIBS,charm4py,ChaNGa,everylb,all-test")
set(ARCH "" CACHE STRING "Target architecture, can be one of i386,x86_64,arm7,arm8,ppc64le") # By default, detect arch we are running on.

Expand Down Expand Up @@ -208,6 +208,7 @@ option(BUILD_SHARED "Build Charm++ dynamic libraries" OFF)

# Other options
option(BUILD_CUDA "Build with CUDA support" OFF)
option(BUILD_HIP "Build with HIP support" OFF)
option(PXSHM "Build with PXSHM" OFF)

# LRTS PMI options
Expand Down Expand Up @@ -245,6 +246,12 @@ else()
set(BUILD_CHANGA 0)
endif()

# The GPU-aware load balancers store each object's device allocation size in LB
# user data (registered by CentralLB::initLB), so GPU builds imply LBUSERDATA.
if(BUILD_CUDA OR BUILD_HIP)
set(LBUSERDATA 1)
endif()

if(${TARGET} STREQUAL "everylb")
set(TARGET "LIBS")
endif()
Expand All @@ -266,6 +273,10 @@ else()
set(CMK_TASKQUEUE 0)
endif()

if(${NETWORK} STREQUAL "reconverse")
set(RECONVERSE ON)
endif()

if(${RECONVERSE})
set(CMK_RECONVERSE 1)
else()
Expand All @@ -290,8 +301,10 @@ else()
set(CMK_SMP 0)
endif()

if(${NETWORK} STREQUAL "multicore")
if(${NETWORK} STREQUAL "multicore" OR ${NETWORK} STREQUAL "reconverse")
set(CMK_SMP 1)
endif()
if(${NETWORK} STREQUAL "multicore")
set(CMK_MULTICORE 1)
else()
set(CMK_MULTICORE 0)
Expand Down Expand Up @@ -327,7 +340,7 @@ IF(JPEG_FOUND)
set(CMK_USE_LIBJPEG 1)
ENDIF()

if(NETWORK STREQUAL "pami")
if(NETWORK STREQUAL "pami" OR NETWORK STREQUAL "reconverse")
set(CMK_USE_LRTS 0)
else()
set(CMK_USE_LRTS 1)
Expand Down Expand Up @@ -471,6 +484,15 @@ if (NOT CMAKE_BUILD_TYPE)
endif()

if(RECONVERSE)
# Reconverse has to be built with the same GPU support as Charm++, so that
# its GPU-aware loopback copies and LCI's GPUDirect registration are enabled.
# These must be set before the subdirectory is added.
if(BUILD_CUDA)
set(RECONVERSE_ENABLE_CUDA ON CACHE BOOL "Enable CUDA support in reconverse" FORCE)
endif()
if(BUILD_HIP)
set(RECONVERSE_ENABLE_HIP ON CACHE BOOL "Enable HIP support in reconverse" FORCE)
endif()
# This needs to be include before we set charmc as the linker
# but after CMAKE_LIBRARY_OUTPUT_DIRECTORY has been set
add_subdirectory(cmake/fetch_reconverse)
Expand Down Expand Up @@ -533,8 +555,12 @@ else()
set(CMK_BUILD_CHARMRUN 1)
endif()

set(CHARMRUN_ELASTIC_DIR src/arch/common)
set(CHARMRUN_HAPI_DIR src/arch/common)

include(cmake/detect-features.cmake)
include(cmake/ci-files.cmake)
add_custom_target(ci-generated DEPENDS ${all-ci-outputs})


if(${TARGET} STREQUAL "all-test")
Expand Down Expand Up @@ -660,6 +686,8 @@ configure_file(src/arch/common/cc-msvc.sh include/ COPYONLY)
configure_file(src/arch/common/conv-mach-craype.sh include/ COPYONLY)
configure_file(src/arch/common/conv-mach-cuda.sh include/ COPYONLY)
configure_file(src/arch/common/conv-mach-cuda.h include/ COPYONLY)
configure_file(src/arch/common/conv-mach-hip.sh include/ COPYONLY)
configure_file(src/arch/common/conv-mach-hip.h include/ COPYONLY)
configure_file(src/arch/common/conv-mach-darwin.sh include/ COPYONLY)
configure_file(src/arch/common/conv-mach-flang.h include/ COPYONLY)
configure_file(src/arch/common/conv-mach-flang.sh include/ COPYONLY)
Expand Down Expand Up @@ -688,29 +716,116 @@ configure_file(src/arch/common/conv-mach-tsan.h include/ COPYONLY)
configure_file(src/arch/common/conv-mach-tsan.sh include/ COPYONLY)
configure_file(src/scripts/conv-config.sh include/ COPYONLY)
configure_file(src/arch/${VDIR}/conv-mach.sh include/ COPYONLY)
configure_file(src/util/ckrescale.h include/ COPYONLY)

add_library(ckrescale src/util/ckrescale.C)

set(CUDA_DIR "")
if(BUILD_CUDA)
set(HIP_DIR "")
if(BUILD_CUDA OR BUILD_HIP)

file(GLOB_RECURSE hybridAPI-h-sources ${CMAKE_SOURCE_DIR}/src/arch/cuda/*.h)
file(GLOB_RECURSE hybridAPI-cxx-sources ${CMAKE_SOURCE_DIR}/src/arch/cuda/*.cpp)
foreach(file ${hybridAPI-h-sources})
configure_file(${file} include/ COPYONLY)
endforeach()

if(CMAKE_VERSION VERSION_GREATER 3.17 OR CMAKE_VERSION VERSION_EQUAL 3.17)
find_package(CUDAToolkit REQUIRED)
set(CMAKE_CUDA_COMPILER "${CUDAToolkit_NVCC_EXECUTABLE}")
enable_language(CUDA)
set(CUDA_DIR "${CUDAToolkit_TARGET_DIR}")
else()
find_package(CUDA REQUIRED)
set(CUDA_DIR "${CUDA_TOOLKIT_ROOT_DIR}")
if (BUILD_CUDA)
if(CMAKE_VERSION VERSION_GREATER 3.17 OR CMAKE_VERSION VERSION_EQUAL 3.17)
find_package(CUDAToolkit REQUIRED)
set(CMAKE_CUDA_COMPILER "${CUDAToolkit_NVCC_EXECUTABLE}")
enable_language(CUDA)
set(CUDA_DIR "${CUDAToolkit_TARGET_DIR}")
else()
find_package(CUDA REQUIRED)
set(CUDA_DIR "${CUDA_TOOLKIT_ROOT_DIR}")
endif()

# Find CUPTI library and include directory
find_library(CUPTI_LIBRARY cupti
HINTS "${CUDA_DIR}/extras/CUPTI/lib64"
"${CUDA_DIR}/lib64"
)
set(CUPTI_INCLUDE_DIR "${CUDA_DIR}/extras/CUPTI/include")
if(NOT CUPTI_LIBRARY)
message(WARNING "CUPTI library not found. GPU load balancing will not be available.")
else()
message(STATUS "Found CUPTI: ${CUPTI_LIBRARY}")
endif()

add_library(hybridapi ${hybridAPI-cxx-sources} $<TARGET_OBJECTS:ckrescale>)
add_dependencies(hybridapi ci-generated)

if(CUPTI_LIBRARY)
target_include_directories(hybridapi PRIVATE "${CUPTI_INCLUDE_DIR}")
target_link_libraries(hybridapi ${CUPTI_LIBRARY})
endif()

if(TRACING)
target_compile_definitions(hybridapi PRIVATE HAPI_TRACE)
endif()
endif()

if (BUILD_HIP)
add_compile_definitions(__HIP_PLATFORM_AMD__)
# Modern ROCm/HIP detection
if(NOT DEFINED ROCM_PATH)
if(NOT DEFINED ENV{ROCM_PATH})
set(ROCM_PATH "/opt/rocm" CACHE PATH "Path to ROCm installation")
else()
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Path to ROCm installation")
endif()
endif()

# Find hipcc wrapper for reference
find_program(HIP_HIPCC_EXECUTABLE
NAMES hipcc
PATHS "${ROCM_PATH}/bin" "${ROCM_PATH}/hip/bin"
NO_DEFAULT_PATH
)

if(NOT HIP_HIPCC_EXECUTABLE)
message(FATAL_ERROR "Could not find hipcc. Please set ROCM_PATH to your ROCm installation directory.")
endif()

# Find the actual clang compiler used by ROCm (required by CMake)
find_program(CMAKE_HIP_COMPILER
NAMES clang++
PATHS "${ROCM_PATH}/llvm/bin" "${ROCM_PATH}/bin"
NO_DEFAULT_PATH
)

if(NOT CMAKE_HIP_COMPILER)
message(FATAL_ERROR "Could not find ROCm clang++ compiler in ${ROCM_PATH}")
endif()

set(HIP_DIR "${ROCM_PATH}")
set(CMAKE_HIP_ARCHITECTURES "gfx803;gfx900;gfx906;gfx908;gfx90a;gfx1030;gfx1100" CACHE STRING "HIP architectures")

# Enable HIP language support
enable_language(HIP)

add_library(hybridapi ${hybridAPI-cxx-sources})
add_dependencies(hybridapi ci-generated)
target_include_directories(hybridapi PRIVATE "${ROCM_PATH}/include")

if(TRACING)
target_compile_definitions(hybridapi PRIVATE HAPI_TRACE)
endif()
endif()
add_library(cudahybridapi ${hybridAPI-cxx-sources})
if(TRACING)
target_compile_definitions(cudahybridapi PRIVATE HAPI_TRACE)

# hapi_memory_daemon - standalone executable for shrink/expand GPU memory management
if(BUILD_CUDA)
add_executable(hapi_memory_daemon src/arch/cuda/hybridAPI/hapi_memory_daemon.cpp)
set(hapi_memory_daemon_deps hybridapi ck converse moduleNDMeshStreamer ckmain modulecompletion)
# ckqt and conv-static are only built for non-reconverse builds; reconverse
# provides its own converse layer and threading.
if(NOT RECONVERSE)
list(APPEND hapi_memory_daemon_deps ckqt conv-static)
endif()
add_dependencies(hapi_memory_daemon ${hapi_memory_daemon_deps})
endif()

endif()

if(EXISTS ${CMAKE_SOURCE_DIR}/src/arch/${VDIR}/conv-mach-cxi.sh)
Expand Down Expand Up @@ -786,7 +901,9 @@ if(CMK_COMPILER STREQUAL "msvc")
endif()

# Header files
configure_file(src/arch/${GDIR}/conv-common.h include/ COPYONLY)
if(EXISTS src/arch/${GDIR}/conv-common.h)
configure_file(src/arch/${GDIR}/conv-common.h include/ COPYONLY)
endif()
if(EXISTS src/arch/${GDIR}/conv-common.sh)
configure_file(src/arch/${GDIR}/conv-common.sh include/ COPYONLY)
endif()
Expand Down Expand Up @@ -880,7 +997,9 @@ include(cmake/hwloc.cmake)

# Converse
include(cmake/converse.cmake)
add_subdirectory(src/QuickThreads)
if(NOT RECONVERSE)
add_subdirectory(src/QuickThreads)
endif()
# add_subdirectory(src/util/boost-context)
# add_subdirectory(src/conv-core)

Expand Down Expand Up @@ -911,6 +1030,12 @@ if(${CMK_BUILD_CHARMRUN})
add_dependencies(charmrun create_symlinks)
else()
configure_file(${CHARMRUN_DIR}/charmrun ${CMAKE_BINARY_DIR}/bin COPYONLY)
if(EXISTS ${CMAKE_SOURCE_DIR}/${CHARMRUN_ELASTIC_DIR}/charmrun_elastic)
configure_file(${CHARMRUN_ELASTIC_DIR}/charmrun_elastic ${CMAKE_BINARY_DIR}/bin COPYONLY)
endif()
if(EXISTS ${CMAKE_SOURCE_DIR}/${CHARMRUN_HAPI_DIR}/charmrun_hapi)
configure_file(${CHARMRUN_HAPI_DIR}/charmrun_hapi ${CMAKE_BINARY_DIR}/bin COPYONLY)
endif()
endif()
configure_file(src/scripts/testrun bin/ COPYONLY)

Expand Down Expand Up @@ -993,14 +1118,26 @@ if(${TARGET} STREQUAL "charm4py")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
add_library(charm SHARED empty.cpp)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib_so)
if(RECONVERSE)
# Reconverse does not provide CCS, but Charm4py's extension references its
# two public entry points even when CCS is disabled.
target_sources(charm PRIVATE src/conv-ccs/charm4py-ccs-stubs.C)
set(CHARM4PY_RUNTIME_TARGETS reconverse charm_cxx_utils ckrescale)
else()
set(CHARM4PY_RUNTIME_TARGETS converse memory-default threads-default ldb-rand)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(charm ck converse memory-default threads-default ldb-rand "-Llib/ -standalone -all_load -c++stl -shared")
target_link_libraries(charm ck ${CHARM4PY_RUNTIME_TARGETS} "-Llib/ -standalone -all_load -c++stl -shared")
else()
target_link_libraries(charm ck converse memory-default threads-default ldb-rand "-Llib/ -standalone -whole-archive -c++stl -shared")
target_link_libraries(charm ck ${CHARM4PY_RUNTIME_TARGETS} "-Llib/ -standalone -whole-archive -c++stl -shared")
endif()

if (${BUILD_CUDA})
target_link_libraries(charm cudart cudahybridapi)
target_link_libraries(charm cudart hybridapi)
endif()

if (${BUILD_HIP})
target_link_libraries(charm hiprtc hybridapi)
endif()

if(${TRACING})
Expand All @@ -1019,9 +1156,14 @@ else()
if(RECONVERSE)
target_link_libraries(ckhello PRIVATE reconverse)
endif()
add_dependencies(ckhello ck ckqt conv-static
converse ckmain
moduleNDMeshStreamer modulecompletion)
set(ckhello_deps ck converse ckmain ckrescale moduleNDMeshStreamer modulecompletion)
if(NOT RECONVERSE)
list(APPEND ckhello_deps ckqt conv-static)
endif()
if(BUILD_CUDA OR BUILD_HIP)
list(APPEND ckhello_deps hybridapi)
endif()
add_dependencies(ckhello ${ckhello_deps})
endif()

# Create conv-mach-opt.sh
Expand Down Expand Up @@ -1067,7 +1209,7 @@ foreach(l BUILDOPTS CMK_AMPI_WITH_ROMIO CMK_BUILD_PYTHON CMK_CAN_LINK_FORTRAN
CXX_NO_AS_NEEDED LDXX_WHOLE_ARCHIVE_PRE LDXX_WHOLE_ARCHIVE_POST
CMK_MACOSX CMK_POST_EXE CMK_SHARED_SUF CMK_USER_SUFFIX OPTS_LD
CMK_COMPILER_KNOWS_FVISIBILITY CMK_LINKER_KNOWS_UNDEFINED
CMK_SUPPORTS_MEMORY_ISOMALLOC CUDA_DIR CMK_USER_DISABLED_TLS CMK_CXI)
CMK_SUPPORTS_MEMORY_ISOMALLOC CUDA_DIR HIP_DIR CMK_USER_DISABLED_TLS CMK_CXI)
file(APPEND ${optfile_sh} "${l}=\"${${l}}\"\n" )
endforeach(l)

Expand All @@ -1087,10 +1229,13 @@ endif()
set(optfile_h ${CMAKE_BINARY_DIR}/include/conv-mach-opt.h)

file(WRITE ${optfile_h} "/* Build-time options header, automatically generated by cmake. */\n")
foreach(l CMK_AMPI_WITH_ROMIO CMK_OPTIMIZE CMK_AMPI_ONLY CMK_POST_EXE CMK_SHARED_SUF
foreach(l CMK_AMPI_WITH_ROMIO CMK_AMPI_ONLY CMK_POST_EXE CMK_SHARED_SUF
CMK_USER_SUFFIX CMK_CXI)
file(APPEND ${optfile_h} "#define ${l} ${${l}}\n")
endforeach(l)
# Use #undef before #define so this overrides converse.h's #ifndef default
# regardless of include order, without triggering a redefinition warning.
file(APPEND ${optfile_h} "#undef CMK_OPTIMIZE\n#define CMK_OPTIMIZE ${CMK_OPTIMIZE}\n")

if(NOT ${NETWORK} STREQUAL "mpi" AND NOT ${NETWORK} MATCHES "gni-" AND NOT ${NETWORK} MATCHES "-cray")
file(APPEND ${optfile_h} "#include \"cc-${CMK_COMPILER}.h\"\n")
Expand All @@ -1104,7 +1249,7 @@ endif()
set(optfile_mak ${CMAKE_BINARY_DIR}/include/conv-mach-opt.mak)

file(WRITE ${optfile_mak} "# Build-time options header for Makefiles, automatically generated by cmake.\n")
foreach(l CUDA_DIR BUILD_CUDA CMK_AMPI_WITH_ROMIO CMK_MACOSX CMK_BUILD_PYTHON
foreach(l CUDA_DIR HIP_DIR BUILD_CUDA BUILD_HIP CMK_AMPI_WITH_ROMIO CMK_MACOSX CMK_BUILD_PYTHON
CMK_CHARMDEBUG CMK_COMPILER CMK_GDIR CMK_HAS_MALLOC_HOOK CMK_HAS_MMAP CMK_LIBJPEG
CMK_LUSTREAPI CMK_MULTICORE CMK_NO_BUILD_SHARED CMK_NO_PARTITIONS CMK_SHARED_SUF
CMK_SMP CMK_SUPPORTS_FSGLOBALS CMK_SUPPORTS_PIPGLOBALS CMK_SUPPORTS_PIEGLOBALS
Expand All @@ -1117,7 +1262,8 @@ endforeach(l)

# Add options
set(CUDA ${BUILD_CUDA}) # need CUDA to match conv-mach file name
foreach(opt SMP OMP TCP PTHREADS SYNCFT PXSHM PERSISTENT OOC CUDA PAPI CXI)
set(HIP ${BUILD_HIP}) # need HIP to match conv-mach file name
foreach(opt SMP OMP TCP PTHREADS SYNCFT PXSHM PERSISTENT OOC CUDA HIP PAPI CXI)
if(${opt})
string(TOLOWER ${opt} optl)
file(APPEND ${optfile_sh} ". ${CMAKE_BINARY_DIR}/include/conv-mach-${optl}.sh\n")
Expand Down
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM mpioperator/openmpi

RUN apt update && apt install -y build-essential zlib1g-dev ca-certificates cmake git

RUN apt update \
&& apt install -y --no-install-recommends \
g++ \
gfortran \
libopenmpi-dev \
&& rm -rf /var/lib/apt/lists/*

#RUN git clone https://github.com/charmplusplus/charm.git
RUN mkdir /home/mpiuser/charm
COPY . /home/mpiuser/charm
RUN cd charm && git checkout shrinkexpand-mpi && ./build charm++ mpi-linux-x86_64 --enable-shrinkexpand -j8 --force --with-production

RUN cd charm/examples/charm++/shrink_expand && make clean && make
RUN cd charm/examples/charm++/shrink_expand/jacobi2d-iter && make clean && make
RUN cd charm/examples/charm++/shrink_expand/startup && make clean && make
RUN mkdir /app
RUN cp charm/examples/charm++/shrink_expand/jacobi2d-iter/charmrun /app/
RUN cp charm/examples/charm++/shrink_expand/jacobi2d-iter/charmrun_elastic /app/
RUN cp charm/examples/charm++/shrink_expand/jacobi2d-iter/jacobi2d /app/
RUN cp charm/examples/charm++/shrink_expand/startup/startup /app/
RUN chmod 777 /app
Loading
Loading