本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
(選用) 測試 EFA
您可以執行包含在 EFA 軟體安裝中的fi_pingpong
程式,在運算節點群組中的兩個節點之間示範已啟用 EFA 的通訊。如果此測試成功,可能是已正確設定 EFA。
若要開始,您需要在運算節點群組中執行兩個執行個體。如果您的運算節點群組使用靜態容量,則應該已有可用的執行個體。對於使用動態容量的運算節點群組,您可以使用 salloc
命令啟動兩個節點。以下是來自叢集的範例,該叢集具有名為 的動態節點群組,該群組與名為 的佇列hpc7g
相關聯all
。
% salloc --nodes 2 -p all salloc: Granted job allocation 6 salloc: Waiting for resource configuration ... a few minutes pass ... salloc: Nodes hpc7g-[1-2] are ready for job
使用 找出兩個配置節點的 IP 地址scontrol
。在下列範例中,地址10.3.140.69
適用於 hpc7g-1
,而10.3.132.211
適用於 hpc7g-2
。
% scontrol show nodes hpc7g-[1-2] NodeName=hpc7g-1 Arch=aarch64 CoresPerSocket=1 CPUAlloc=0 CPUEfctv=64 CPUTot=64 CPULoad=0.00 AvailableFeatures=hpc7g ActiveFeatures=hpc7g Gres=(null) NodeAddr=10.3.140.69 NodeHostName=ip-10-3-140-69 Version=24.11.5 OS=Linux 5.10.218-208.862.amzn2.aarch64 #1 SMP Tue Jun 4 16:52:10 UTC 2024 RealMemory=124518 AllocMem=0 FreeMem=110763 Sockets=64 Boards=1 State=IDLE+CLOUD ThreadsPerCore=1 TmpDisk=0 Weight=1 Owner=N/A MCS_label=N/A Partitions=efa BootTime=2024-07-02T19:00:09 SlurmdStartTime=2024-07-08T19:33:25 LastBusyTime=2024-07-08T19:33:25 ResumeAfterTime=None CfgTRES=cpu=64,mem=124518M,billing=64 AllocTRES= CapWatts=n/a CurrentWatts=0 AveWatts=0 ExtSensorsJoules=n/a ExtSensorsWatts=0 ExtSensorsTemp=n/a Reason=Maintain Minimum Number Of Instances [root@2024-07-02T18:59:00] InstanceId=i-04927897a9ce3c143 InstanceType=hpc7g.16xlarge NodeName=hpc7g-2 Arch=aarch64 CoresPerSocket=1 CPUAlloc=0 CPUEfctv=64 CPUTot=64 CPULoad=0.00 AvailableFeatures=hpc7g ActiveFeatures=hpc7g Gres=(null) NodeAddr=10.3.132.211 NodeHostName=ip-10-3-132-211 Version=24.11.5 OS=Linux 5.10.218-208.862.amzn2.aarch64 #1 SMP Tue Jun 4 16:52:10 UTC 2024 RealMemory=124518 AllocMem=0 FreeMem=110759 Sockets=64 Boards=1 State=IDLE+CLOUD ThreadsPerCore=1 TmpDisk=0 Weight=1 Owner=N/A MCS_label=N/A Partitions=efa BootTime=2024-07-02T19:00:09 SlurmdStartTime=2024-07-08T19:33:25 LastBusyTime=2024-07-08T19:33:25 ResumeAfterTime=None CfgTRES=cpu=64,mem=124518M,billing=64 AllocTRES= CapWatts=n/a CurrentWatts=0 AveWatts=0 ExtSensorsJoules=n/a ExtSensorsWatts=0 ExtSensorsTemp=n/a Reason=Maintain Minimum Number Of Instances [root@2024-07-02T18:59:00] InstanceId=i-0a2c82623cb1393a7 InstanceType=hpc7g.16xlarge
使用 SSH (或 SSMhpc7g-1
) 連線到其中一個節點 (在此範例中為 )。請注意,這是內部 IP 地址,因此如果您使用 SSH,您可能需要從其中一個登入節點進行連線。另請注意,執行個體需要透過運算節點群組啟動範本來設定 SSH 金鑰。
% ssh ec2-user@10.3.140.69
現在,fi_pingpong
以伺服器模式啟動。
/opt/amazon/efa/bin/fi_pingpong -p efa
連線至第二個執行個體 (hpc7g-2
)。
% ssh ec2-user@10.3.132.211
fi_pingpong
在用戶端模式下執行,連線至 上的伺服器hpc7g-1
。您應該會看到類似以下範例的輸出。
% /opt/amazon/efa/bin/fi_pingpong -p efa 10.3.140.69 bytes #sent #ack total time MB/sec usec/xfer Mxfers/sec 64 10 =10 1.2k 0.00s 3.08 20.75 0.05 256 10 =10 5k 0.00s 21.24 12.05 0.08 1k 10 =10 20k 0.00s 82.91 12.35 0.08 4k 10 =10 80k 0.00s 311.48 13.15 0.08 [error] util/pingpong.c:1876: fi_close (-22) fid 0