Skip to content

Commit 525822c

Browse files
committed
Merge branch 'feature/numa' into develop
2 parents 1027c45 + 5845ab6 commit 525822c

File tree

3 files changed

+49
-7
lines changed

3 files changed

+49
-7
lines changed

build/common.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,6 +1808,10 @@ endif
18081808
#-------------------------------------------------------------------------------
18091809
# NUMA
18101810
#-------------------------------------------------------------------------------
1811+
ifeq ($(ESMF_NUMA),OFF)
1812+
ESMF_NUMA=
1813+
endif
1814+
18111815
ifeq ($(ESMF_NUMA),ON)
18121816
ESMF_NUMA = standard
18131817
endif

src/Infrastructure/VM/src/ESMCI_VMKernel.C

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3134,6 +3134,8 @@ void VMK::log(std::string prefix, ESMC_LogMsgType_Flag msgType)const{
31343134

31353135

31363136
void VMK::logSystem(std::string prefix, ESMC_LogMsgType_Flag msgType){
3137+
#undef ESMC_METHOD
3138+
#define ESMC_METHOD "ESMCI::VMK::logSystem()"
31373139
std::stringstream msg;
31383140
msg << prefix << "--- VMK::logSystem() start -------------------------------";
31393141
ESMC_LogDefault.Write(msg.str(), msgType);
@@ -3245,17 +3247,18 @@ void VMK::logSystem(std::string prefix, ESMC_LogMsgType_Flag msgType){
32453247
descLen = sizeof(desc);
32463248
mpi_rc = MPI_T_cvar_get_info(i, name, &nameLen, &verbosity, &datatype,
32473249
&enumtype, desc, &descLen, &binding, &scope);
3248-
if (mpi_rc != MPI_SUCCESS){
3250+
if (mpi_rc == MPI_SUCCESS){
3251+
msg.str(""); // clear
3252+
msg << prefix << "index=" << std::setw(4) << i << std::setw(60) << name
3253+
<< " : " << desc;
3254+
ESMC_LogDefault.Write(msg.str(), msgType);
3255+
}else if (mpi_rc != MPI_T_ERR_INVALID_INDEX){
32493256
int localrc;
32503257
ESMC_LogDefault.MsgFoundError(ESMC_RC_INTNRL_BAD,
3251-
"MPI_T_cvar_get_info() did not return MPI_SUCCESS.",
3258+
"Call to MPI_T_cvar_get_info() failed in unsupported way.",
32523259
ESMC_CONTEXT, &localrc);
32533260
throw localrc; // bail out with exception
32543261
}
3255-
msg.str(""); // clear
3256-
msg << prefix << "index=" << std::setw(4) << i << std::setw(60) << name
3257-
<< " : " << desc;
3258-
ESMC_LogDefault.Write(msg.str(), msgType);
32593262
}
32603263
#if 0
32613264
// testing to change the MPICH EAGER limit for the shared memory channel

src/doc/ESMF_install.tex

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,41 @@ \subsubsection{MOAB}
606606

607607
\end{description}
608608

609+
\subsubsection{NUMA}
610+
\label{sec:NUMA}
611+
612+
The LibNUMA API for Non Uniform Memory Access
613+
(\htmladdnormallink{NUMA}{https://halobates.de/numaapi3.pdf})
614+
can be used to discover the NUMA architecture at run-time.
615+
616+
\begin{description}
617+
618+
\item[ESMF\_NUMA] Possible values: {\tt "ON"}, {\tt "standard"}, {\tt "OFF"} (default).
619+
620+
\begin{description}
621+
\item[{\tt "ON"}/{\tt "standard"}] The NUMA dependent code inside of ESMF will
622+
be enabled.
623+
The {\tt ESMF\_NUMA\_LIBS} environment variable will be set to
624+
{\tt "-lnuma"}.
625+
626+
\item[{\tt "OFF"} (default)] Disables NUMA dependent code.
627+
\end{description}
628+
629+
\item[ESMF\_NUMA\_INCLUDE] Typically not needed. (no default).
630+
631+
Specifies the path where the NUMA header files are located.
632+
633+
\item[ESMF\_NUMA\_LIBPATH] Typically not needed. (no default).
634+
635+
Specifies the path where the NUMA library file is located.
636+
637+
\item[ESMF\_NUMA\_LIBS] Typical value: {\tt "-lnuma"}.
638+
639+
Specifies the linker directives needed to link the NUMA library to
640+
the application.
641+
642+
\end{description}
643+
609644
\subsubsection{NVML}
610645
\label{sec:NVML}
611646

@@ -634,7 +669,7 @@ \subsubsection{NVML}
634669

635670
Specifies the path where the NVML library file is located.
636671

637-
\item[ESMF\_NVML\_LIBS] Typical value: {\tt "-lnvidia-ml"} (no default).
672+
\item[ESMF\_NVML\_LIBS] Typical value: {\tt "-lnvidia-ml"}.
638673

639674
Specifies the linker directives needed to link the NVML library to
640675
the application.

0 commit comments

Comments
 (0)