Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: [OMPI users] MPI_File_write hangs on NFS-mounted filesystem
From: Steven G Johnson (stevenj_at_[hidden])
Date: 2013-11-07 11:54:54

The simple C program attached below hangs on MPI_File_write when I am using an NFS-mounted filesystem. Is MPI-IO supported in OpenMPI for NFS filesystems?

I'm using OpenMPI 1.4.5 on Debian stable (wheezy), 64-bit Opteron CPU, Linux 3.2.51. I was surprised by this because the problems only started occurring recently when I upgraded my Debian system to wheezy; with OpenMPI in the previous Debian release, output to NFS-mounted filesystems worked fine.

Is there any easy way to get this working? Any tips are appreciated.

Steven G. Johnson

#include <stdio.h>
#include <string.h>
#include <mpi.h>

void perr(const char *label, int err)
    int len;
    MPI_Error_string(err, s, &len);
    printf("%s: %d = %s\n", label, err, s);

int main(int argc, char **argv)
    MPI_Init(&argc, &argv);

    MPI_File fh;
    int err;
    err = MPI_File_open(MPI_COMM_WORLD, "tstmpiio.dat", MPI_MODE_CREATE | MPI_MODE_WRONLY, MPI_INFO_NULL, &fh);
    perr("open", err);

    const char s[] = "Hello world!\n";
    MPI_Status status;
    err = MPI_File_write(fh, (void*) s, strlen(s), MPI_CHAR, &status);
    perr("write", err);

    err = MPI_File_close(&fh);
    perr("close", err);

    return 0;