User forums > Help

C programming with MPI.H

<< < (2/2)

Jenna:
Just a wild guess: it might be a name mangling problem.

stahta01:

--- Quote from: jens on February 26, 2013, 03:34:46 pm ---Just a wild guess: it might be a name mangling problem.

--- End quote ---

Very good theory; but, I just changed it to C code. Note: This is NOT enough to rule out "name mangling" as the cause.
But, it reduces it as a possibility.

Edit3: I am using gcc version 4.7.1 (tdm-1) with SJLJ exceptions; I believe this is the version shipped with CB-mingw version 12.11.


--- Code: ---#include <stdio.h>
#include "mpi.h"
#include <string.h>

int main(int argc, char *argv[])
{
    int my_rank;
    int size;
    MPI_Init(&argc, &argv); /*START MPI */
    /*DETERMINE RANK OF THIS PROCESSOR*/
    MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
    /*DETERMINE TOTAL NUMBER OF PROCESSORS*/
    MPI_Comm_size(MPI_COMM_WORLD, &size);
    printf("Hello world! I'm rank (processor number) %d of %d processor \n", my_rank, size);
    MPI_Finalize(); /* EXIT MPI */
    return 0;
}

--- End code ---

And it still built OK.

--- Code: ---mingw32-gcc.exe  -O2  -Wmissing-include-dirs   -I"C:\Program Files\MPICH2\include"  -c V:\SourceCode\Projects\testmpi\main.c -o obj\Release\main.o
mingw32-g++.exe  -o bin\Release\testmpi.exe obj\Release\main.o   -s  "C:\Program Files\MPICH2\lib\mpi.lib"
Output size is 9.00 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)

--- End code ---

Tim S.

jarod42:
maybe a 32/64 bit issue ?

Navigation

[0] Message Index

[*] Previous page

Go to full version