Skip to content

Commit c6c92f3

Browse files
rbuchevan-charmworks
authored andcommitted
Add mpi-crayshasta build
1 parent 52d1748 commit c6c92f3

File tree

7 files changed

+100
-6
lines changed

7 files changed

+100
-6
lines changed

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ if(CMAKE_Fortran_COMPILER)
7171
include(FortranCInterface)
7272
FortranCInterface_VERIFY()
7373
FortranCInterface_VERIFY(CXX)
74+
if(CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
75+
# Needed to make lowercase modules on Cray platforms
76+
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ef")
77+
endif()
7478
else()
7579
message(STATUS "Charm++: No Fortran support.")
7680
endif()
@@ -386,7 +390,7 @@ set(CMK_BUILD_CRAY 0)
386390
if(${NETWORK} MATCHES "gni-")
387391
set(CHARM_PLATFORM "${NETWORK}")
388392
set(CMK_BUILD_CRAY 1)
389-
elseif(${NETWORK} MATCHES "mpi-crayx")
393+
elseif(${NETWORK} MATCHES "mpi-cray")
390394
set(CHARM_PLATFORM "${NETWORK}")
391395
endif()
392396

@@ -560,7 +564,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/src/arch/${NETWORK}/gdir_link)
560564
file(STRINGS src/arch/${NETWORK}/gdir_link GDIR)
561565
elseif(${NETWORK} MATCHES "gni-")
562566
set(GDIR "gni")
563-
elseif(${NETWORK} MATCHES "mpi-crayx")
567+
elseif(${NETWORK} MATCHES "mpi-cray")
564568
set(GDIR "mpi")
565569
else()
566570
set(GDIR ${NETWORK})
@@ -905,7 +909,7 @@ file(APPEND ${optfile_sh} "[ -z \"$CHARMINC\" ] && CHARMINC=\".\"\n")
905909
# This needs to appear before sourcing the cc-$compiler.sh file
906910
file(APPEND ${optfile_sh} "CMK_COMPILER_SUFFIX=${CMK_COMPILER_SUFFIX}\n")
907911

908-
if(NOT ${NETWORK} STREQUAL "mpi" AND NOT ${NETWORK} MATCHES "gni-" AND NOT ${NETWORK} MATCHES "-crayx")
912+
if(NOT ${NETWORK} STREQUAL "mpi" AND NOT ${NETWORK} MATCHES "gni-" AND NOT ${NETWORK} MATCHES "-cray")
909913
file(APPEND ${optfile_sh} ". ${CMAKE_BINARY_DIR}/include/cc-${CMK_COMPILER}.sh\n")
910914
endif()
911915

@@ -950,7 +954,7 @@ foreach(l CMK_AMPI_WITH_ROMIO CMK_OPTIMIZE CMK_AMPI_ONLY CMK_POST_EXE CMK_SHARED
950954
file(APPEND ${optfile_h} "#define ${l} ${${l}}\n")
951955
endforeach(l)
952956

953-
if(NOT ${NETWORK} STREQUAL "mpi" AND NOT ${NETWORK} MATCHES "gni-" AND NOT ${NETWORK} MATCHES "-crayx")
957+
if(NOT ${NETWORK} STREQUAL "mpi" AND NOT ${NETWORK} MATCHES "gni-" AND NOT ${NETWORK} MATCHES "-cray")
954958
file(APPEND ${optfile_h} "#include \"cc-${CMK_COMPILER}.h\"\n")
955959
endif()
956960

buildcmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ if [[ $opt_ampi_only -eq 1 ]]; then
493493
fi
494494

495495
# Special handling for gni-crayxc, gni-crayxe, mpi-crayxc, mpi-crayxe
496-
if [[ $actual_triplet == gni-* || $actual_triplet == *-crayx? ]]; then
496+
if [[ $actual_triplet == gni-* || $actual_triplet == *-cray* ]]; then
497497
opt_network=$actual_triplet
498498
# Need to use Cray's compiler frontends on Cray systems
499499
opt_CC=cc

src/arch/common/conv-mach-craype.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ CMK_CPP_C_FLAGS="-E"
1616

1717
CMK_LINK_BINARY='-dynamic'
1818

19-
CMK_CRAY_LIBS="$CRAY_PMI_POST_LINK_OPTS $CRAY_UGNI_POST_LINK_OPTS -lugni -lpmi $CRAY_RCA_POST_LINK_OPTS"
19+
if test -v CMK_CRAY_NOGNI
20+
then
21+
CMK_CRAY_LIBS="$CRAY_PMI_POST_LINK_OPTS -lpmi $CRAY_RCA_POST_LINK_OPTS"
22+
else
23+
CMK_CRAY_LIBS="$CRAY_PMI_POST_LINK_OPTS $CRAY_UGNI_POST_LINK_OPTS -lugni -lpmi $CRAY_RCA_POST_LINK_OPTS"
24+
fi
2025
CMK_LIBS="-lckqt $CMK_CRAY_LIBS"
2126

2227
CMK_LD_LIBRARY_PATH="-Wl,-rpath,$CHARMLIBSO/"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#define CMK_SMP 1
2+
3+
4+
#undef CMK_SHARED_VARS_UNAVAILABLE
5+
#undef CMK_SHARED_VARS_POSIX_THREADS_SMP
6+
#define CMK_SHARED_VARS_UNAVAILABLE 0
7+
#define CMK_SHARED_VARS_POSIX_THREADS_SMP 1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CMK_DEFS="$CMK_DEFS -D_REENTRANT"
2+
CMK_LIBS="-lpthread $CMK_LIBS "
3+
CMK_SMP="1"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
#ifndef _CONV_MACH_H
3+
#define _CONV_MACH_H
4+
5+
#define CMK_CONVERSE_MPI 1
6+
7+
#define CMK_MEMORY_PREALLOCATE_HACK 0
8+
9+
#define CMK_DEFAULT_MAIN_USES_COMMON_CODE 1
10+
11+
#define CMK_MALLOC_USE_GNU_MALLOC 0
12+
#define CMK_MALLOC_USE_OS_BUILTIN 1
13+
14+
#define CMI_IO_BUFFER_EXPLICIT 1
15+
#define CMI_IO_FLUSH_USER 1
16+
17+
#define CMK_GETPAGESIZE_AVAILABLE 1
18+
#define CMK_MEMORY_PAGESIZE 4096
19+
#define CMK_MEMORY_PROTECTABLE 0
20+
21+
22+
#define CMK_SHARED_VARS_UNAVAILABLE 1
23+
24+
#define CMK_SIGNAL_NOT_NEEDED 0
25+
#define CMK_SIGNAL_USE_SIGACTION 0
26+
#define CMK_SIGNAL_USE_SIGACTION_WITH_RESTART 1
27+
28+
#define CMK_THREADS_USE_CONTEXT 0
29+
#define CMK_THREADS_USE_FCONTEXT 1
30+
#define CMK_THREADS_USE_JCONTEXT 0
31+
#define CMK_THREADS_USE_PTHREADS 0
32+
33+
#define CMK_TIMER_USE_GETRUSAGE 0
34+
#define CMK_TIMER_USE_SPECIAL 1
35+
#define CMK_TIMER_USE_TIMES 0
36+
37+
38+
#define CMK_WHEN_PROCESSOR_IDLE_BUSYWAIT 1
39+
#define CMK_WHEN_PROCESSOR_IDLE_USLEEP 0
40+
41+
#define CMK_64BIT 1
42+
#define CMK_AMD64 1
43+
44+
#define CMK_WEB_MODE 1
45+
#define CMK_DEBUG_MODE 0
46+
47+
#define CMK_LBDB_ON 1
48+
49+
#define CMK_DISABLE_SYNC 1
50+
51+
#endif
52+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Cray Shasta build. October 2021.
2+
# CRAY COMPILER (CCE) BUILD
3+
# ========================================
4+
# module load PrgEnv-cray # typically default
5+
#
6+
# INTEL BUILD
7+
# ================================
8+
# module swap PrgEnv-cray PrgEnv-intel
9+
#
10+
# GCC BUILD
11+
# ================================
12+
# module swap PrgEnv-cray PrgEnv-gnu
13+
#
14+
# # Build command is the same regardless of compiler environment:
15+
#
16+
# # MPI build
17+
# ./build charm++ mpi-crayshasta smp --with-production
18+
19+
CMK_BUILD_CRAY=1
20+
21+
CMK_CRAY_NOGNI=1
22+
23+
. $CHARMINC/conv-mach-craype.sh

0 commit comments

Comments
 (0)