I compiled the next code:
#include <mpi.h>
#include <stdio.h>
int main(int argc, char* argv[]) {
int rank, size, len;
char host[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc, &argv);
MPI_Finalize();
return 0;
}
I did it this way:
mpic++ -o test test.cpp
and then i tried to run the file:
mpirun -np 2 test
but the error occured:
PMIx has detected a temporary directory name that results in a path that is too long for the Unix domain socket:
Temp dir: /var/folders/12/k2b2579s1yz2cfl8ppb1c6m80000gn/T/openmpi-sessions-501@MacBook-Air-Alexander-2_0/22793
Try setting your TMPDIR environmental variable to point to something shorter in length
So I did this:
export TMPDIR=/tmp
Tried to run again: mpirun -np 2 test
But another error occured:
Primary job terminated normally, but 1 process returned
a non-zero exit code Per user-direction, the job has been aborted
-------------------------------------------------------
mpirun detected that one or more processes exited with non-zero status, thus causing the job to be terminated. The first process to do so was:
Process name: [[22798,1],0]
Exit code: 1
Tell me please, what should I do to run this code?