/[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 1402 by ksteube, Thu Jan 31 00:17:49 2008 UTC revision 1628 by phornby, Fri Jul 11 13:12:46 2008 UTC
# Line 236  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 236  Finley_Mesh* Finley_Mesh_read_MPI(char*
236    
237    Paso_MPIInfo *mpi_info = Paso_MPIInfo_alloc( MPI_COMM_WORLD );    Paso_MPIInfo *mpi_info = Paso_MPIInfo_alloc( MPI_COMM_WORLD );
238    dim_t numNodes, numDim, numEle, i0, i1;    dim_t numNodes, numDim, numEle, i0, i1;
   index_t tag_key;  
239    Finley_Mesh *mesh_p=NULL;    Finley_Mesh *mesh_p=NULL;
240    char name[LenString_MAX],element_type[LenString_MAX],frm[20];    char name[LenString_MAX],element_type[LenString_MAX],frm[20];
241    char error_msg[LenErrorMsg_MAX];    char error_msg[LenErrorMsg_MAX];
242    double time0=Finley_timer();    double time0=Finley_timer();
243    FILE *fileHandle_p = NULL;    FILE *fileHandle_p = NULL;
244    ElementTypeId typeID, faceTypeID, contactTypeID, pointTypeID;    ElementTypeId typeID;
245    
246      /* these are in unimplemented code below */
247    #if 0
248      index_t tag_key;
249      ElementTypeId faceTypeID, contactTypeID, pointTypeID;
250    #endif
251    
252    Finley_resetError();    Finley_resetError();
253    
# Line 289  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 294  Finley_Mesh* Finley_Mesh_read_MPI(char*
294       /* allocate mesh */       /* allocate mesh */
295       mesh_p = Finley_Mesh_alloc(name,numDim,order,reduced_order,mpi_info);       mesh_p = Finley_Mesh_alloc(name,numDim,order,reduced_order,mpi_info);
296       if (Finley_noError()) {       if (Finley_noError()) {
297      int chunkSize = numNodes / mpi_info->size + 1, totalNodes=0, chunkNodes=0, chunkEle=0, nextCPU=1, mpi_error;      int chunkSize = numNodes / mpi_info->size + 1, totalNodes=0, chunkNodes=0, chunkEle=0, nextCPU=1;
298    #ifdef PASO_MPI
299        int mpi_error;
300    #endif
301      int *tempInts = TMPMEMALLOC(numNodes*3+1, index_t);      int *tempInts = TMPMEMALLOC(numNodes*3+1, index_t);
302      double *tempCoords = TMPMEMALLOC(numNodes*numDim, double);      double *tempCoords = TMPMEMALLOC(numNodes*numDim, double);
303    
# Line 427  Finley_Mesh* Finley_Mesh_read_MPI(char* Line 435  Finley_Mesh* Finley_Mesh_read_MPI(char*
435    
436        if (Finley_noError()) {        if (Finley_noError()) {
437      int *tempInts = TMPMEMALLOC(numEle*(2+numNodes)+1, index_t); /* Store Id + Tag + node list (+ one int at end for chunkEle) */      int *tempInts = TMPMEMALLOC(numEle*(2+numNodes)+1, index_t); /* Store Id + Tag + node list (+ one int at end for chunkEle) */
438      int chunkSize = numEle / mpi_info->size, totalEle=0, nextCPU=1, mpi_error;      int chunkSize = numEle / mpi_info->size, totalEle=0, nextCPU=1;
439    #ifdef PASO_MPI
440        int mpi_error;
441    #endif
442      if (numEle % mpi_info->size != 0) chunkSize++; /* Remainder from numEle / mpi_info->size will be spread out one-per-CPU */      if (numEle % mpi_info->size != 0) chunkSize++; /* Remainder from numEle / mpi_info->size will be spread out one-per-CPU */
443      if (mpi_info->rank == 0) {  /* Master */      if (mpi_info->rank == 0) {  /* Master */
444        for (;;) {            /* Infinite loop */        for (;;) {            /* Infinite loop */

Legend:
Removed from v.1402  
changed lines
  Added in v.1628

  ViewVC Help
Powered by ViewVC 1.1.26