Changeset 3142


Ignore:
Timestamp:
02/27/10 10:34:44 (15 years ago)
Author:
Eric.Larour
Message:

Only open on rank=0!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/io/pfopen.cpp

    r472 r3142  
    1818
    1919        FILE* fid=NULL;
     20        extern int my_rank;
    2021       
    2122        /*Open handle to data on disk: */
    22         fid=fopen(filename,format);
    23         if(fid==NULL) throw ErrorException(__FUNCT__,exprintf("%s%s%s","could not open file ",filename," for binary reading or writing"));
     23        if(my_rank==0){
     24                fid=fopen(filename,format);
     25                if(fid==NULL) throw ErrorException(__FUNCT__,exprintf("%s%s%s","could not open file ",filename," for binary reading or writing"));
     26        }
    2427
    2528        return fid;
Note: See TracChangeset for help on using the changeset viewer.