locked
MPI Code RRS feed

  • Question

  • I will compile MPI code use VC++ 2008.

    #include <stdio.h>
    #include <stdlib.h>
    #include <mpi.h>
    int   nproc, myid;
    main ( argc, argv)
    int argc;
    char **argv;
    {
       MPI_Init(&argc, &argv);
       MPI_Comm_size (MPI_COMM_WORLD,  &nproc);
       MPI_Comm_rank (MPI_COMM_WORLD,  &myid);
       . . .
       . . . 
       MPI_Send ((void *)&data, icount, DATA_TYPE, idest, itag, MPI_COMM_WORLD);
       MPI_Recv ((void *)&data, icount, DATA_TYPE, isrc, itag, MPI_COMM_WORLD, istat);
       MPI_Finalize();
       return 0;
    }


    Use MPI_Send & MPI_Recv

    Can I send a program(.exe) and some parameter after program !?
    Monday, December 21, 2009 6:42 AM

Answers

  • Hi Yujin,

    do you mean that to use MPI_Send() to send your .exe program in 'data' variable? If so, it is doable if you can wrap *.exe into 'data' with proper data type

    liwei
    • Marked as answer by YuJinSu Tuesday, January 5, 2010 6:22 AM
    Monday, January 4, 2010 7:10 PM

All replies

  • Hi Yujin,

    do you mean that to use MPI_Send() to send your .exe program in 'data' variable? If so, it is doable if you can wrap *.exe into 'data' with proper data type

    liwei
    • Marked as answer by YuJinSu Tuesday, January 5, 2010 6:22 AM
    Monday, January 4, 2010 7:10 PM
  • Hi Yujin,

    do you mean that to use MPI_Send() to send your .exe program in 'data' variable? If so, it is doable if you can wrap *.exe into 'data' with proper data type

    liwei

    thank you!!

    I will try it.
    Tuesday, January 5, 2010 6:23 AM