locked
mpi sample pgm execution RRS feed

  • Question

  • i have successfully installed mpich2 ,and .net framework

    then i had also sucessfully executed pi.exe by just double clicking it

    ......................ok

    but

    i dont know how to execute programs by cmd prompt

    i have example program as,

     

    #include "mpi.h"

    #include <stdio.h>

    int main( int argc, char *argv[] )

    {

    MPI_Init( &argc, &argv );

    printf( "Hello World\n" );

    MPI_Finalize();

    return 0;

    }

    please can u guide me in successfully executing  the above program

    also i dont know no in what extension to save the above program


    farooq
    Wednesday, October 13, 2010 6:49 AM

Answers

  • Hello,

    You can save your program as normal C/C++ file.  

    If you have Visual studio installed, the following link has the detailed information about how to set, compile and execute a MPI program:

    http://blogs.msdn.com/b/risman/archive/2009/01/04/ms-mpi-with-visual-studio-2008.aspx

    Note that the tutorial is about the V2 HPC SDK, for V3 the MSMPI has its own msi installation package. And also note that the PATH to mpi.h and libs are changed too.

    Thanks,

    James

    • Marked as answer by Don Pattee Wednesday, January 12, 2011 3:00 AM
    Friday, October 15, 2010 4:22 AM