0
我需要使用MPICH2編寫應用程序(64位,如果您想知道)。 GUI是完全可選的,但當然會是一個巨大的優勢。請問mpiexec運行託管VC++代碼有什麼困難?在編譯/鏈接(調用約定等)時是否會遇到其他任何問題?帶有VC++ GUI的MPI程序?
只給你一個想法,方案的總體結構是這樣的:
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;
}