OpenMPI I/O Not Working

Home » CentOS » OpenMPI I/O Not Working
CentOS 4 Comments

Looks like the attachment got stripped. Here’s the code:
$ cat test.c
#include
#include

int main(int argc, char** argv)
{
MPI_File handle;
MPI_Info mpi_info = MPI_INFO_NULL;
char fname[] = “/tmp/test.csv”;
int amode = MPI_MODE_CREATE|MPI_MODE_WRONLY|MPI_MODE_UNIQUE_OPEN;
int ierr;

MPI_Init(&argc, &argv);

ierr = MPI_File_open(MPI_COMM_WORLD, fname, amode, mpi_info, &handle);
if (ierr != MPI_SUCCESS)
{
char err[MPI_MAX_ERROR_STRING];
int errlen;
MPI_Error_string(ierr, err, &errlen);
printf(“%s\n”, err);
} else {
MPI_File_close(&handle);
}
MPI_Finalize();
return 0;
}
/* END */

Thanks, Cihan

4 thoughts on - OpenMPI I/O Not Working

LEAVE A COMMENT