'C:MPIHelloinDebug' 不被识别为内部或外部命令、可操作程序或批处理文件

本文关键字:外部 命令 可操作 批处理文件 程序 内部 识别 MPIHello inDebug | 更新日期: 2023-09-27 18:35:36

using System;
using MPI;
class MPIHello
{
    static void Main(string[] args)
    {
        using (new MPI.Environment(ref args))
        {
            Intracommunicator comm = Communicator.world;
            if (comm.Rank == 0)
            {
                //Send its rank to the next neighbor
                comm.Send(comm.Rank, 1, 0);
                //Receive message 
                int msg = comm.Receive<int>(comm.Size, 0);
                Console.WriteLine("I am MPI process " + comm.Rank + " of " + comm.Size    + ", on my left is " + msg);
            }
            else
            {
                //Receive message
                int msg = comm.Receive<int>(comm.Rank - 1, 0);
                Console.WriteLine("I am MPI process " + comm.Rank + " of " + comm.Size + ", on my left is " + msg);
                //Send message to next neighbor
                comm.Send(comm.Rank, (comm.Rank + 1) % comm.Size, 0);
            }
        }
    }
}

这是我完成的 C# 编码,但是当我想在命令提示符下运行它时,出现此错误"C:''MPIHello''bin''Debug"未被识别为内部或外部命令、可操作程序或批处理文件...我可以知道问题出在哪里吗?

'C:MPIHelloinDebug' 不被识别为内部或外部命令、可操作程序或批处理文件

是的,它是一个目录。通常,程序位于此目录中。你能提供更多信息吗?