我需要使用 MPICH2(64 位,以防您想知道)编写一个应用程序。GUI 完全是可选的,但当然是一个巨大的优势。mpiexec 在运行托管 VC++ 代码时会遇到任何困难吗?在编译/链接(调用约定等)时我可能会遇到任何其他问题吗?
只是给你一个想法,程序的一般结构是这样的:
int main(array<System::String ^> ^args)
{
/* Get MPI rank */
if ( rank == 0 )
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
// Send/receive messages in Form1's code
Application::Run(gcnew Form1());
}
else
{
/* Send/receive messages to/from process #0 only */
}
return 0;
}