Here's the program:
Code:
#include <stdio.h>
#include <mpi.h>
main(int argc, char **argv)
{
int node;
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD, &node);
printf("Hello World from Node %d\n",node);
MPI_Finalize();
}
Here's how I compile it
Code:
mpiCC -o simple simple.cpp -lstdc++
Here's how I run it:
Code:
mpirun -np 2 simple
Here's the error I get:
Code:
[macbook:24160] *** Process received signal ***
[macbook:24160] Signal: Segmentation fault (11)
[macbook:24160] Signal code: Address not mapped (1)
[macbook:24160] Failing at address: 0x440000b0
[macbook:24160] [ 0] 2 libSystem.B.dylib 0x00007fff871371ba _sigtramp + 26
[macbook:24160] [ 1] 3 libSystem.B.dylib 0x00007fff70c545e0 __stack_chk_guard + 0
[macbook:24160] [ 2] 4 simple 0x0000000100000eb6 main + 42
[macbook:24160] [ 3] 5 simple 0x0000000100000e84 start + 52
[macbook:24160] *** End of error message ***
[macbook:24161] *** Process received signal ***
[macbook:24161] Signal: Segmentation fault (11)
[macbook:24161] Signal code: Address not mapped (1)
[macbook:24161] Failing at address: 0x440000b0
[macbook:24161] [ 0] 2 libSystem.B.dylib 0x00007fff871371ba _sigtramp + 26
[macbook:24161] [ 1] 3 libSystem.B.dylib 0x00007fff70c545e0 __stack_chk_guard + 0
[macbook:24161] [ 2] 4 simple 0x0000000100000eb6 main + 42
[-macbook:24161] [ 3] 5 simple 0x0000000100000e84 start + 52
[macbook:24161] *** End of error message ***
mpirun noticed that job rank 0 with PID 24160 on node macbook.local exited on signal 11 (Segmentation fault).
1 additional process aborted (not shown)
Anyone have ANY suggestions? I honestly have no idea.