[MPICH] Behavour if MPI_File_Open fails on some nodes

James S Perrin james.s.perrin at manchester.ac.uk
Fri Aug 17 12:32:26 CDT 2007


Hi,

	The code below when run on a cluster where a filepath exists only on 
the head node locks up on 2 or more processes:

ssh node0 ls ~/node0/
dummyfile
ssh node1 ls ~/node0/
  No such file or directory
ssh node2 ls ~/node0/
  No such file or directory

mpiexec -l -n 2 ~/PST/testsrc/test_mpi_open_file ~/node0/dummyfile
1: Open file /home/mpedev/node0/dummyfile failed!

Am I makeing a mistake in my use of MPI_File_Open() should I be testing 
exists() before calling it?

Using 1.0.6 but have found this with 1.0.5 also.

Regards
James

rank 0 is callstack:
#0  0xffffe002 in ?? ()
#1  0x40097aef in MPIC_Wait () from 
/usr/local/mpich2-1.0.6rc1/lib/libmpich.so.1.1
#2  0x40097455 in MPIC_Recv () from 
/usr/local/mpich2-1.0.6rc1/lib/libmpich.so.1.1
#3  0x40057f31 in MPIR_Allreduce () from 
/usr/local/mpich2-1.0.6rc1/lib/libmpich.so.1.1
#4  0x40058af1 in PMPI_Allreduce () from 
/usr/local/mpich2-1.0.6rc1/lib/libmpich.so.1.1
#5  0x400806c8 in MPIR_Get_contextid () from 
/usr/local/mpich2-1.0.6rc1/lib/libmpich.so.1.1
#6  0x40080875 in MPIR_Comm_copy () from 
/usr/local/mpich2-1.0.6rc1/lib/libmpich.so.1.1
#7  0x4007bfa7 in PMPI_Comm_dup () from 
/usr/local/mpich2-1.0.6rc1/lib/libmpich.so.1.1
#8  0x400aacc6 in PMPI_File_open () from 
/usr/local/mpich2-1.0.6rc1/lib/libmpich.so.1.1
#9  0x08048629 in main (argc=2, argv=0xbfffeed4) at test_mpi_open_file.c:12


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

int main(int argc, char *argv[])
{
   MPI_File fp;
   MPI_Info info;

   MPI_Init(&argc, &argv);

   MPI_Name(

   if(MPI_File_open(MPI_COMM_WORLD, argv[1], MPI_MODE_RDONLY, 
MPI_INFO_NULL, &fp) == MPI_SUCCESS)
   {
     printf("Open file %s succeeded!\n", argv[1]); fflush(stdout);
     MPI_File_close(&fp);
   } else {
     printf("Open file %s failed!\n", argv[1]); fflush(stdout);
   }

   MPI_Finalize();

   return EXIT_SUCCESS;
}


-- 
------------------------------------------------------------------------
James S. Perrin,                  | email: james.perrin at manchester.ac.uk
Research Computing Services,      | web:   www.mc.manchester.ac.uk
Kilburn Building, The University, | tel:   +44 161 275 6945
Manchester, England. M13 9PL.     | fax:   +44 161 275 0637
------------------------------------------------------------------------
"The test of intellect is the refusal to belabour the obvious"
- Alfred Bester
------------------------------------------------------------------------




More information about the mpich-discuss mailing list