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
اختيار وحدة GPUGPU 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

٣٠‏/٠٧‏/٢٠٢٦52917 مشاهدة

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العودة إلى الدليل