WebCal
Ctrl K

मार्गदर्शिका

MPI

मार्गदर्शिकाएकीकरणसामान्य प्रश्नसहायता
मूल्यब्लॉग
त्वरित प्रारंभTop-Up and BillingAccelerating Access to Academic ResourcesQuick StartIntroductionMaintenance and TroubleshootingNetwork
प्लेटफ़ॉर्मJetBrain ProjectorTmpWebCal Scholars Program @2026Introduction to the Public Beta/Suqian Zone AAbout UsCopying Data Between InstancesAnalysis of Server Performance MetricsTidal Computing PowerLoad Balancing
घरेलू चिप्सUsing Huawei MindIEHuawei Ascend NPUMooreThread GPU
परिवेश सेटअपCUDA/cuDNNMinicondaPython3.XInstalling DependenciesOverviewImages
एंटरप्राइज़ सुविधाएँFlexible DeploymentElastic Deployment Release NotesBest Practices for Elastic DeploymentPerformance Metrics Monitoring
कंटेनर इंस्टेंसJupyterLabRemote SSH ConnectionSave the imageScaling ConfigurationMulti-machine, multi-GPU parallel processingDaemonOverviewChange the billing methodMigration Example (Same Region)Migration ExamplesRemote DesktopReset the system
GPU चुननाGPU SelectionPerformance Testing
डेटाUpload DataDownload DataPublic DataPublic Cloud Storage (Highly Recommended)Compression / DecompressionFile StorageLocal data diskOverview
सर्वोत्तम अभ्यासFileZillaGitGromacsHuggingFaceKataGoLinux BasicsMPIOpenCLPyCharm Remote DevelopmentR (RStudio) InstallationSSH TunnelTensorBoardRemote Development with VSCodeVisdomVulkanXShellOpen PortsWeChat MessagesPerformanceExpose multiple servicesMoney-Saving TipsComputation Precision IssuesSoftware Sources

सर्वोत्तम अभ्यास

MPI

30/07/202652911 व्यू

Note: Testing has shown that the system runs normally on Ubuntu 20.04, but may hang on Ubuntu 22.04. Please select the Ubuntu 20.04 image. The cause is unknown; if you know the reason, please let us know. Thank you very much!

Installation

# 注意不要安装和使用openmpi包,该包存在问题
apt update && apt-get install mpich

Verification

Simple test:

# 使用mpi执行ls命令,看是否可以输出目录和文件
mpirun -n 2 ls

Compilation and testing:

# 编写test.c文件,内容为:
#include <stdio.h>
#include <mpi.h>
int main (int argc, char** argv) {

        int size, rank;
        MPI_Init(&argc, &argv);

        MPI_Comm_rank(MPI_COMM_WORLD, &rank);
        MPI_Comm_size(MPI_COMM_WORLD, &size);
        printf("size = %d rank = %d\n", size, rank);
        MPI_Finalize();
}

# 编译,将输出a.out可执行文件
mpicc test.c

# 执行,注意使用绝对路径,因为a.out不在PATH环境变量中,这里测试目录是/root
mpirun -n 1 /root/a.out
अगला लेखLocal data disk
Compute Rental दस्तावेज़मार्गदर्शिका पर वापस जाएं