Changeset 1507


Ignore:
Timestamp:
05/29/18 14:43:56 (3 years ago)
Author:
oabramkina
Message:

Bigfix for UGRID: conversion from int to MPI_unsigned_long wasn't working with certain mpi implementations (mpich).

Location:
XIOS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/mesh.cpp

    r1158 r1507  
    532532 
    533533      // For determining the global edge index 
    534       size_t nbEdgesOnProc = nbEdges_; 
    535       size_t nbEdgesAccum; 
     534      unsigned long nbEdgesOnProc = nbEdges_; 
     535      unsigned long nbEdgesAccum; 
    536536      MPI_Scan(&nbEdgesOnProc, &nbEdgesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    537537      nbEdgesAccum -= nbEdges_; 
     
    662662         // Maps modified in this step: 
    663663         // nodeIdx2Idx = <idx, idxGlo> 
    664          int nodeCount = nodeIdx2Idx.size(); 
    665          int nodeStart, nbNodes; 
     664         unsigned long nodeCount = nodeIdx2Idx.size(); 
     665         unsigned long nodeStart, nbNodes; 
    666666         MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    667667         int nNodes = nodeStart; 
     
    755755 
    756756      // For determining the global face index 
    757       size_t nbFacesOnProc = nbFaces_; 
    758       size_t nbFacesAccum; 
     757      unsigned long nbFacesOnProc = nbFaces_; 
     758      unsigned long nbFacesAccum; 
    759759      MPI_Scan(&nbFacesOnProc, &nbFacesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    760760      nbFacesAccum -= nbFaces_; 
     
    880880        } 
    881881 
    882         int edgeStart, nbEdges; 
     882        unsigned long edgeStart, nbEdges; 
    883883        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    884884        int nEdges = edgeStart; 
     
    11001100        } 
    11011101 
    1102         int edgeCount = edgeIdx2Idx.size(); 
    1103         int edgeStart, nbEdges; 
     1102        unsigned long edgeCount = edgeIdx2Idx.size(); 
     1103        unsigned long edgeStart, nbEdges; 
    11041104        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    11051105        int nEdges = edgeStart; 
     
    13701370        // Maps modified in this step: 
    13711371        // nodeIdx2Idx = <idx, idxGlo> 
    1372         int nodeCount = nodeIdx2Idx.size(); 
    1373         int nodeStart, nbNodes; 
     1372        unsigned long nodeCount = nodeIdx2Idx.size(); 
     1373        unsigned long nodeStart, nbNodes; 
    13741374        MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    13751375        int nNodes = nodeStart; 
     
    14901490        } 
    14911491 
    1492         int edgeCount = edgeIdx2Idx.size(); 
    1493         int edgeStart, nbEdges; 
     1492        unsigned long edgeCount = edgeIdx2Idx.size(); 
     1493        unsigned long edgeStart, nbEdges; 
    14941494        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    14951495        int nEdges = edgeStart; 
  • XIOS/trunk/src/node/mesh.cpp

    r1002 r1507  
    532532 
    533533      // For determining the global edge index 
    534       size_t nbEdgesOnProc = nbEdges_; 
    535       size_t nbEdgesAccum; 
     534      unsigned long nbEdgesOnProc = nbEdges_; 
     535      unsigned long nbEdgesAccum; 
    536536      MPI_Scan(&nbEdgesOnProc, &nbEdgesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    537537      nbEdgesAccum -= nbEdges_; 
     
    662662         // Maps modified in this step: 
    663663         // nodeIdx2Idx = <idx, idxGlo> 
    664          int nodeCount = nodeIdx2Idx.size(); 
    665          int nodeStart, nbNodes; 
     664         unsigned long nodeCount = nodeIdx2Idx.size(); 
     665         unsigned long nodeStart, nbNodes; 
    666666         MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    667667         int nNodes = nodeStart; 
     
    755755 
    756756      // For determining the global face index 
    757       size_t nbFacesOnProc = nbFaces_; 
    758       size_t nbFacesAccum; 
     757      unsigned long nbFacesOnProc = nbFaces_; 
     758      unsigned long nbFacesAccum; 
    759759      MPI_Scan(&nbFacesOnProc, &nbFacesAccum, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    760760      nbFacesAccum -= nbFaces_; 
     
    880880        } 
    881881 
    882         int edgeStart, nbEdges; 
     882        unsigned long edgeStart, nbEdges; 
    883883        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    884884        int nEdges = edgeStart; 
     
    11001100        } 
    11011101 
    1102         int edgeCount = edgeIdx2Idx.size(); 
    1103         int edgeStart, nbEdges; 
     1102        unsigned long edgeCount = edgeIdx2Idx.size(); 
     1103        unsigned long edgeStart, nbEdges; 
    11041104        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    11051105        int nEdges = edgeStart; 
     
    13701370        // Maps modified in this step: 
    13711371        // nodeIdx2Idx = <idx, idxGlo> 
    1372         int nodeCount = nodeIdx2Idx.size(); 
    1373         int nodeStart, nbNodes; 
     1372        unsigned long nodeCount = nodeIdx2Idx.size(); 
     1373        unsigned long nodeStart, nbNodes; 
    13741374        MPI_Scan(&nodeCount, &nodeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    13751375        int nNodes = nodeStart; 
     
    14901490        } 
    14911491 
    1492         int edgeCount = edgeIdx2Idx.size(); 
    1493         int edgeStart, nbEdges; 
     1492        unsigned long edgeCount = edgeIdx2Idx.size(); 
     1493        unsigned long edgeStart, nbEdges; 
    14941494        MPI_Scan(&edgeCount, &edgeStart, 1, MPI_UNSIGNED_LONG, MPI_SUM, comm); 
    14951495        int nEdges = edgeStart; 
Note: See TracChangeset for help on using the changeset viewer.