/[escript]/trunk/finley/src/Mesh_read.c
ViewVC logotype

Diff of /trunk/finley/src/Mesh_read.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1744 by ksteube, Tue Sep 2 07:39:18 2008 UTC revision 1745 by ksteube, Wed Sep 3 00:41:24 2008 UTC
# Line 791  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 791  Finley_Mesh* Finley_Mesh_read_MPI(char*
791        } /* end of Read the nodal element data */        } /* end of Read the nodal element data */
792    
793        /* get the name tags */        /* get the name tags */
794        if (Finley_noError()) {        if (Finley_noError() && ! feof(fileHandle_p)) {
795          char remainder[100000], *ptr;          char remainder[100000], *ptr;
796          int tag_key, num_read, len, error_code;          int tag_key, len, error_code;
797          if (mpi_info->rank == 0) {  /* Master */          if (mpi_info->rank == 0) {  /* Master */
798        /* Read the word 'Tag' */        /* Read the word 'Tag' */
799            fscanf(fileHandle_p, "%s\n", name);            fscanf(fileHandle_p, "%s\n", name);
800        /* Read rest of file in one chunk */        /* Read rest of file in one chunk */
801            num_read = fread(remainder, 100000, sizeof(char), fileHandle_p);        strcpy(remainder, "");
802          if (! feof(fileHandle_p)) fread(remainder, 100000, sizeof(char), fileHandle_p);
803            ptr = strrchr(remainder, '\n');            ptr = strrchr(remainder, '\n');
804            *ptr = '\0';            if (ptr != NULL) *ptr = '\0';
805          }          }
806      len = strlen(remainder);      len = strlen(remainder);
807  #ifdef PASO_MPI  #ifdef PASO_MPI

Legend:
Removed from v.1744  
changed lines
  Added in v.1745

  ViewVC Help
Powered by ViewVC 1.1.26