<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBannerjt6hs2d { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButtonjt6hs2d:hover, .pfptPrimaryButtonjt6hs2d:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButtonjt6hs2d:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
Hi Joachim, Thanks for this suggestion! I used stream to test the single-core memory bandwidth. I am running on a Xeon E5-2699A v4, which has 55MB last level cache. So, I ran with 30 million elements per the instructions. It appears that I am</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBannerjt6hs2d" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
<div id="pfptBannerjt6hs2d" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBannerjt6hs2d" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
This Message Is From an External Sender
</div>
<div id="pfptBannerjt6hs2d" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
</div>
</div>
<div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
</div>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="ltr">Hi Joachim,<div><br></div><div>Thanks for this suggestion! I used stream to test the single-core memory bandwidth. I am running on a Xeon E5-2699A v4, which has 55MB last level cache. So, I ran with 30 million elements per the instructions. It appears that I am seeing about 10 GB/s if I'm reading that right? If so, I am still not sure why I am only seeing ~3.5 GB/s on shared memory performance with MPICH.</div><div><br></div><div>-------------------------------------------------------------<br>STREAM version $Revision: 5.10 $<br>-------------------------------------------------------------<br>This system uses 8 bytes per array element.<br>-------------------------------------------------------------<br>Array size = 30000000 (elements), Offset = 0 (elements)<br>Memory per array = 228.9 MiB (= 0.2 GiB).<br>Total memory required = 686.6 MiB (= 0.7 GiB).<br>Each kernel will be executed 10 times.<br> The *best* time for each kernel (excluding the first iteration)<br> will be used to compute the reported bandwidth.<br>-------------------------------------------------------------<br>Your clock granularity/precision appears to be 1 microseconds.<br>Each test below will take on the order of 30276 microseconds.<br> (= 30276 clock ticks)<br>Increase the size of the arrays if this shows that<br>you are not getting at least 20 clock ticks per test.<br>-------------------------------------------------------------<br>WARNING -- The above is only a rough guideline.<br>For best results, please be sure you know the<br>precision of your system timer.<br>-------------------------------------------------------------<br>Function Best Rate MB/s Avg time Min time Max time<br>Copy: 10038.1 0.048342 0.047818 0.050004<br>Scale: 10342.2 0.048738 0.046412 0.056605<br>Add: 10580.3 0.068542 0.068051 0.069805<br>Triad: 10703.0 0.067615 0.067271 0.068143<br>-------------------------------------------------------------<br>Solution Validates: avg error less than 1.000000e-13 on all three arrays<br>-------------------------------------------------------------<br></div><div><br></div><div>Thanks,</div><div>Sam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 13, 2025 at 5:26 PM Jenke, Joachim <<a href="mailto:jenke@itc.rwth-aachen.de" target="_blank">jenke@itc.rwth-aachen.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div>
<div>
<div dir="auto">Hi Sam,
<div dir="auto"><br>
<div dir="auto">Can you try out stream to understand the single-core memory bandwidth of the system?</div>
<div dir="auto"><br>
</div>
<div dir="auto"><a href="https://urldefense.us/v3/__https://www.cs.virginia.edu/stream/ref.html__;!!G_uCfscf7eWS!dAE55XU_CwGFqjAQVBQfgqk4xKzby0oyqjIYPJK0zC_EuqRf1MH6qwE3Pt6pIUAC-Z4sF_Ryf9ReVZTycsuO$" target="_blank">https://www.cs.virginia.edu/stream/ref.html</a></div>
<div dir="auto"><br>
</div>
<div dir="auto">Copy bandwidth for large junks (exceeding cache sizes) should provide you an upper bound for shm communication bandwidth.</div>
<div dir="auto"><br>
</div>
<div dir="auto">Best</div>
<div dir="auto">Joachim</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">Am 13.08.2025 22:04 schrieb Sam Austin via discuss <<a href="mailto:discuss@mpich.org" target="_blank">discuss@mpich.org</a>>:<br type="attribution">
</div>
</div>
<div>
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;height:0px;max-height:0px;overflow:hidden;display:none">
Hi all, I am working to configure MPICH and run a few examples on my standalone server (single node). Here are the system specs: Server: Dell PowerEdge C4130 CPUs: 2x Xeon E5-2699A v4 GPUs: 4x Tesla V100s connected with NVLink, tied to motherboard</div>
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;max-height:0px;overflow:hidden;display:none">
ZjQcmQRYFpfptBannerStart</div>
<div dir="ltr" id="m_-6136418873478620422m_-1072145269643698187pfptBanner4r2cjbn" style="display:block;text-align:left;margin:16px 0px;padding:8px 16px;border-radius:4px;min-width:200px;background-color:rgb(208,216,220);border-top-width:4px;border-top-style:solid;border-top-color:rgb(144,164,174)">
<div id="m_-6136418873478620422m_-1072145269643698187pfptBanner4r2cjbn" style="float:left;display:block;margin:0px 0px 1px;max-width:600px">
<div id="m_-6136418873478620422m_-1072145269643698187pfptBanner4r2cjbn" style="display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-weight:bold;font-size:14px;line-height:18px">
This Message Is From an External Sender </div>
<div id="m_-6136418873478620422m_-1072145269643698187pfptBanner4r2cjbn" style="font-weight:normal;display:block;background-color:rgb(208,216,220);color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:12px;line-height:18px;margin-top:2px">
This message came from outside your organization. </div>
</div>
<div style="height:0px;clear:both;display:block;line-height:0;font-size:0.01px">
</div>
</div>
<div style="font-size:1px;color:rgb(255,255,255);line-height:1px;max-height:0px;overflow:hidden;display:none">
ZjQcmQRYFpfptBannerEnd</div>
<div dir="ltr">Hi all,<br>
<br>
I am working to configure MPICH and run a few examples on my standalone server (single node). Here are the system specs:<br>
Server: Dell PowerEdge C4130<br>
CPUs: 2x Xeon E5-2699A v4<br>
GPUs: 4x Tesla V100s connected with NVLink, tied to motherboard with PCIe gen 3<br>
OS: Ubuntu 24.04 LTS<br>
I intend to use this system to develop multi-process programs for eventual execution in a large, distributed HPC environment. I ran a few tests with and without CUDA support; here is my mpichversion output:<br>
<br>
MPICH Version: 4.3.1<br>
MPICH Release date: Fri Jun 20 09:24:41 AM CDT 2025<br>
MPICH ABI: 17:1:5<br>
MPICH Device: ch4:ofi<br>
MPICH configure: --prefix=/opt/mpich/4.2.1-cpu --without-cuda<br>
MPICH CC: gcc -O2<br>
MPICH CXX: g++ -O2<br>
MPICH F77: gfortran -O2<br>
MPICH FC: gfortran -O2<br>
MPICH features: threadcomm<br>
<br>
The first example that I ran was a bandwidth test for CPU-CPU and GPU-GPU communication. This simple program sends small packets back and forth between processes to test the bandwidth over the various intra-node networks.<br>
<br>
The GPU-GPU bandwidth test showed that the GPU interconnect was saturating at ~45 GB/s, which is nominal for the NVLink interconnect topology present on the node (this was run with a CUDA-aware build of MPICH). The problem appears during the CPU-CPU IPC test.
In theory, this test is pretty vanilla, as it is communicating between processes using shared memory, and does not involve traversing any of the intra-node networks (PCIe or NVLink). My understanding is that the bandwidth observed on the CPU-CPU IPC test should
be quite high, at least higher than 10 GB/s.<br>
<br>
However, the intra-node IPC bandwidth appears to be very low, around 3.5 GB/s, when running this test. I tried the following fixes in an attempt to force MPICH to use shared memory, but to no avail:<br>
Passing the option to explicitly specify `nemesis` during the build configuration: "--with-device=ch3:nemesis --with-cuda"<br>
Passing the option to explicitly specify shared memory with ch4 to the configuration: "--with-ch4-shmmods=posix --with-cuda"<br>
Rebuilding MPICH without GPU support: "--without-cuda"<br>
Switching to Open MPI and running the same test<br>
These results, especially the last one in which I saw the same issues when running with Open MPI, makes me think it might be an issue with my system configuration. The question is: why is the IPC bandwidth so low despite supposedly using the SHM protocol? I'm
wondering if anyone has encountered this issue before or might be able to lend some advice here. Any help would be greatly appreciated!<br>
<br>
Some interesting observations from the output below: when I run with "mpiexec -np 2 -genv FI_PROVIDER=shm ...", the log file reports "Opened fabric: shm". However, when I run without "-genv FI_PROVIDER=shm", the log file reports "Opened fabric:
<a href="https://urldefense.us/v3/__http://10.133.0.0/21__;!!G_uCfscf7eWS!ZaUD7Nw-pSrvdcr4vb0JBtm7m5HhtE6d7G1wb5HakwqLQQenlo0WTl1tkzV3CrJnLwCQ7cVvC-kgoP1Dp-C6$" target="_blank">
10.133.0.0/21</a>", which I believe means that MPICH is falling back on the TCP socket protocol. In this case, my key point of confusion is that the observed bandwidth is essentially the same between the SHM and TCP protocols. Perhaps my test script isn't set
up properly?<br>
<br>
Thanks,<br>
Sam<br>
<br>
The following is attached below:<br>
Bandwidth test program<br>
Run script for the program<br>
Output of the script on my machine<br>
----------------------------------------------------------------------------------------------------------------<br>
In case the attachment doesn't go through, here are the contents of my test program, "shmem_check.cpp":<br>
<br>
// shmem_check.cpp<br>
//<br>
// This is a minimal benchmark to test the raw bandwidth of MPI communication<br>
// between two processes on the same node, using only host (CPU) memory.<br>
// It completely removes CUDA to isolate the performance of the MPI library's<br>
// on-node communication mechanism (e.g., shared memory vs. TCP loopback).<br>
//<br>
// Compile/run:<br>
// /opt/mpich/4.2.1-cpu/bin/mpicxx -std=c++17 -I/opt/mpich/4.2.1-cpu/include shmem_check.cpp -o shmem_check<br>
// /opt/mpich/4.2.1-cpu/bin/mpiexec -np 2 ./shmem_check<br>
<br>
#include <iostream><br>
#include <vector><br>
#include <numeric><br>
#include <mpi.h><br>
<br>
int main(int argc, char* argv[]) {<br>
MPI_Init(&argc, &argv);<br>
<br>
int rank, size;<br>
MPI_Comm_rank(MPI_COMM_WORLD, &rank);<br>
MPI_Comm_size(MPI_COMM_WORLD, &size);<br>
<br>
if (size != 2) {<br>
if (rank == 0) {<br>
std::cerr << "Error: This program must be run with exactly 2 MPI processes." << std::endl;<br>
}<br>
MPI_Finalize();<br>
return 1;<br>
}<br>
<br>
const int num_samples = 100;<br>
const long long packet_size = 1LL << 28; // 256 MB<br>
<br>
// Allocate standard host memory. 'new' is sufficient.<br>
char* buffer = new char[packet_size];<br>
<br>
if (rank == 0) {<br>
std::cout << "--- Starting Host-to-Host MPI Bandwidth Test ---" << std::endl;<br>
std::cout << "Packet Size: " << (packet_size / (1024*1024)) << " MB" << std::endl;<br>
}<br>
<br>
std::vector<double> timings;<br>
for (int i = 0; i < num_samples; ++i) {<br>
MPI_Barrier(MPI_COMM_WORLD);<br>
double start_time = MPI_Wtime();<br>
<br>
if (rank == 0) {<br>
MPI_Send(buffer, packet_size, MPI_CHAR, 1, 0, MPI_COMM_WORLD);<br>
MPI_Recv(buffer, 1, MPI_CHAR, 1, 1, MPI_COMM_WORLD, MPI_STATUS_IGNORE); // Wait for confirmation<br>
} else { // rank == 1<br>
MPI_Recv(buffer, packet_size, MPI_CHAR, 0, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE);<br>
MPI_Send(buffer, 1, MPI_CHAR, 0, 1, MPI_COMM_WORLD); // Send confirmation<br>
}<br>
<br>
double end_time = MPI_Wtime();<br>
if (i >= 10) { // Discard warmup runs<br>
timings.push_back(end_time - start_time);<br>
}<br>
}<br>
<br>
if (rank == 0) {<br>
double total_time = std::accumulate(timings.begin(), timings.end(), 0.0);<br>
double avg_time = total_time / timings.size();<br>
double bandwidth = (static_cast<double>(packet_size) / (1024.0 * 1024.0 * 1024.0)) / avg_time;<br>
<br>
std::cout << "------------------------------------------------" << std::endl;<br>
std::cout << "Average Host-to-Host Bandwidth: " << bandwidth << " GB/s" << std::endl;<br>
std::cout << "------------------------------------------------" << std::endl;<br>
}<br>
<br>
// Clean up host memory<br>
delete[] buffer;<br>
<br>
MPI_Finalize();<br>
return 0;<br>
}<br>
<br>
----------------------------------------------------------------------------------------------------------------<br>
Here is the script to run the test with verbose compilation and the `shm` layer forced and unforced:<br>
<br>
#!/usr/bin/zsh<br>
source ~/.zshrc<br>
<br>
# Compile<br>
/opt/mpich/4.2.1-cpu/bin/mpicxx -std=c++17 -I/opt/mpich/4.2.1-cpu/include shmem_check.cpp -o shmem_check<br>
<br>
# Run with shm forced<br>
/opt/mpich/4.2.1-cpu/bin/mpiexec -np 2 -genv FI_PROVIDER=shm -genv FI_LOG_LEVEL=debug ./shmem_check 2> output_shm.txt<br>
<br>
# Run without shm forced<br>
/opt/mpich/4.2.1-cpu/bin/mpiexec -np 2 -genv FI_LOG_LEVEL=debug ./shmem_check 2> output_no_shm.txt<br>
<br>
echo "Output of script with SHM forced: "<br>
grep -i "opened fabric" output_shm.txt<br>
<br>
echo "Output of script with SHM not forced: "<br>
grep -i "opened fabric" output_no_shm.txt<br>
<br>
----------------------------------------------------------------------------------------------------------------<br>
Here is the output :<br>
<br>
--- Starting Host-to-Host MPI Bandwidth Test ---<br>
Packet Size: 256 MB<br>
------------------------------------------------<br>
Average Host-to-Host Bandwidth: 3.35709 GB/s<br>
------------------------------------------------<br>
--- Starting Host-to-Host MPI Bandwidth Test ---<br>
Packet Size: 256 MB<br>
------------------------------------------------<br>
Average Host-to-Host Bandwidth: 3.54924 GB/s<br>
------------------------------------------------<br>
Output of script with SHM forced:<br>
libfabric:3174297:1755114546::core:core:fi_fabric_():1503<info> Opened fabric: shm<br>
libfabric:3174298:1755114546::core:core:fi_fabric_():1503<info> Opened fabric: shm<br>
Output of script with SHM not forced:<br>
libfabric:3174351:1755114554::core:core:fi_fabric_():1503<info> Opened fabric: <a href="https://urldefense.us/v3/__http://10.133.0.0/21__;!!G_uCfscf7eWS!ZaUD7Nw-pSrvdcr4vb0JBtm7m5HhtE6d7G1wb5HakwqLQQenlo0WTl1tkzV3CrJnLwCQ7cVvC-kgoP1Dp-C6$" target="_blank">
10.133.0.0/21</a><br>
libfabric:3174350:1755114554::core:core:fi_fabric_():1503<info> Opened fabric: <a href="https://urldefense.us/v3/__http://10.133.0.0/21__;!!G_uCfscf7eWS!ZaUD7Nw-pSrvdcr4vb0JBtm7m5HhtE6d7G1wb5HakwqLQQenlo0WTl1tkzV3CrJnLwCQ7cVvC-kgoP1Dp-C6$" target="_blank">
10.133.0.0/21</a><br>
</div>
</div>
</div>
</div></blockquote></div>