<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBanner4r2cjbn { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButton4r2cjbn:hover, .pfptPrimaryButton4r2cjbn:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButton4r2cjbn: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 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>
<!-- 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="pfptBanner4r2cjbn" 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="pfptBanner4r2cjbn" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBanner4r2cjbn" 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="pfptBanner4r2cjbn" 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 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$">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$">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$">10.133.0.0/21</a><br></div>