C#为MPI运行相同的程序副本

时间:2013-11-26 17:38:43

标签: c# mpi

我可以使用visual studio 2013 ultimate编译相同的副本吗?

例如;有一个ring.exe和cmd命令将是" mpiexec -np 4 ring.exe"运行4次以获得不同的排名数。

我是否可以在Visual Studio中进行操作而无需插入cmd?

说:

if(comm.Size< 2)

            // Our ring needs at least two processes
            System.Console.WriteLine("The Ring example must be run with at least two processes.
            System.Console.WriteLine("Try: mpiexec -np 4 ring.exe"

如何添加comman line参数 - > mpiexec -np 4 currentproject.exe

已解决:在调试中:启动外部程序:Microsoft HPC Pack 2008 SDK \ Bin \ mpiexec.exe

comman line arguments -np 4 ConsoleApplication2.exe

工作目录:\ Visual Studio 2013 \ Projects \ ConsoleApplication2 \ ConsoleApplication2 \ bin \ Debug \

1 个答案:

答案 0 :(得分:0)

你的问题实际上没有意义,但我想我知道你想说什么。

首先澄清:

  1. 使用Visual Studio构建1个二进制文件(exe)。 Visual Studio的编译工作已完成。

  2. 然后运行运行此exe四次的外部程序,将“4份”作为4个进程,而不是制作exe的实际副本。

  3. 如果要在按“F5”或任何有“调试”按钮的情况下运行外部程序,则需要转到project settings -> Debug -> Start action -> Start external program