Ignore:
Timestamp:
05/24/17 16:59:40 (7 years ago)
Author:
yushan
Message:

save modif

Location:
XIOS/dev/branch_yushan_merged/extern
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/extern/remap/src/clipper.cpp

    r919 r1146  
    10471047 
    10481048  //create a new edge array ... 
    1049   TEdge *edges = new TEdge [highI +1]; 
     1049  TEdge *edges = new TEdge[highI+1]; 
    10501050 
    10511051  bool IsFlat = true; 
     
    42744274{ 
    42754275  //The equation of a line in general form (Ax + By + C = 0) 
    4276   //given 2 points (x¹,y¹) & (x²,y²) is ... 
    4277   //(y¹ - y²)x + (x² - x¹)y + (y² - y¹)x¹ - (x² - x¹)y¹ = 0 
    4278   //A = (y¹ - y²); B = (x² - x¹); C = (y² - y¹)x¹ - (x² - x¹)y¹ 
    4279   //perpendicular distance of point (x³,y³) = (Ax³ + By³ + C)/Sqrt(A² + B²) 
     4276  //given 2 points (x,y) & (x,y) is ... 
     4277  //(y - y)x + (x - x)y + (y - y)x - (x - x)y = 0 
     4278  //A = (y - y); B = (x - x); C = (y - y)x - (x - x)y 
     4279  //perpendicular distance of point (x,y) = (Ax + By + C)/Sqrt(A + B) 
    42804280  //see http://en.wikipedia.org/wiki/Perpendicular_distance 
    42814281  double A = double(ln1.Y - ln2.Y); 
  • XIOS/dev/branch_yushan_merged/extern/remap/src/mapper.cpp

    r1141 r1146  
    548548    } 
    549549 
     550    MPI_Waitall(nbSendRequest, sendRequest, status); 
    550551    MPI_Waitall(nbRecvRequest, recvRequest, status); 
    551     MPI_Waitall(nbSendRequest, sendRequest, status); 
    552552 
    553553    for (int rank = 0; rank < mpiSize; rank++) 
     
    620620    } 
    621621 
     622    MPI_Waitall(nbSendRequest, sendRequest, status); 
    622623    MPI_Waitall(nbRecvRequest, recvRequest, status); 
    623     MPI_Waitall(nbSendRequest, sendRequest, status); 
    624  
     624  
    625625    int nbNeighbourNodes = 0; 
    626626    for (int rank = 0; rank < mpiSize; rank++) 
     
    803803        } 
    804804    } 
    805  
     805  
     806    MPI_Waitall(nbSendRequest, sendRequest, status); 
    806807    MPI_Waitall(nbRecvRequest, recvRequest, status); 
    807     MPI_Waitall(nbSendRequest, sendRequest, status); 
     808     
    808809    char **sendBuffer2 = new char*[mpiSize]; 
    809810    char **recvBuffer2 = new char*[mpiSize]; 
     
    886887        } 
    887888    } 
    888  
     889     
     890    MPI_Waitall(nbSendRequest, sendRequest, status); 
    889891    MPI_Waitall(nbRecvRequest, recvRequest, status); 
    890     MPI_Waitall(nbSendRequest, sendRequest, status); 
     892    
    891893 
    892894    delete [] sendRequest; 
  • XIOS/dev/branch_yushan_merged/extern/remap/src/timerRemap.cpp

    r694 r1146  
    99using namespace std; 
    1010 
    11 map<string,CTimer*> CTimer::allTimer; 
     11map<string,CTimer*> *CTimer::allTimer = 0; 
    1212 
    1313CTimer::CTimer(const string& name_) : name(name_) 
     
    5555CTimer& CTimer::get(const string name) 
    5656{ 
     57        if(allTimer == 0) allTimer = new map<string,CTimer*>; 
    5758        map<string,CTimer*>::iterator it; 
    58         it=allTimer.find(name); 
    59         if (it==allTimer.end()) it=allTimer.insert(pair<string,CTimer*>(name,new CTimer(name))).first; 
     59        it=(*allTimer).find(name); 
     60        if (it==(*allTimer).end()) it=(*allTimer).insert(pair<string,CTimer*>(name,new CTimer(name))).first; 
    6061        return *(it->second); 
    6162} 
  • XIOS/dev/branch_yushan_merged/extern/remap/src/timerRemap.hpp

    r694 r1146  
    2626    double getCumulatedTime(void); 
    2727    void print(void); 
    28     static map<string,CTimer*> allTimer; 
     28    //static map<string,CTimer*> allTimer; 
     29    static map<string,CTimer*> *allTimer; 
     30    #pragma omp threadprivate(allTimer) 
     31     
    2932    static double getTime(void); 
    3033    static CTimer& get(string name); 
  • XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_alltoall.cpp

    r1134 r1146  
    1010  int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) 
    1111  { 
     12    assert(static_cast< ::MPI_Datatype>(sendtype) == static_cast< ::MPI_Datatype>(recvtype)); 
    1213    ::MPI_Aint typesize, llb; 
    1314    ::MPI_Type_get_extent(static_cast< ::MPI_Datatype>(sendtype), &llb, &typesize); 
     15     
     16    int ep_size; 
     17    MPI_Comm_size(comm, &ep_size); 
    1418 
    15     for(int i=0; i<comm.ep_comm_ptr->size_rank_info[0].second; i++) 
     19    for(int i=0; i<ep_size; i++) 
    1620    { 
    17       MPI_Gather((char*)sendbuf+i*sendcount*typesize, sendcount, sendtype, recvbuf, recvcount, recvtype, i, comm); 
     21      MPI_Gather(sendbuf+i*sendcount*typesize, sendcount, sendtype, recvbuf, recvcount, recvtype, i, comm); 
    1822    } 
    1923 
  • XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_wait.cpp

    r1138 r1146  
    8686 
    8787        int finished = 0; 
    88         bool finished_index[count]; 
     88        int finished_index[count]; 
    8989 
    9090        for(int i=0; i<count; i++) 
     
    9797            for(int i=0; i<count; i++) 
    9898            { 
     99                //MPI_Test(&array_of_requests[i], &finished_index[i], &array_of_statuses[i]); 
    99100                if(finished_index[i] == false) // this request has not been tested. 
    100101                { 
     
    102103                    {       
    103104                        MPI_Wait(&array_of_requests[i], &array_of_statuses[i]); 
    104                         if(array_of_requests[i].type == 3) 
    105                         { 
    106                             //int check_count; 
    107                             //MPI_Get_count(&array_of_statuses[i], array_of_requests[i].ep_datatype, &check_count); 
    108                             //check_sum_recv(array_of_requests[i].buf, count, array_of_requests[i].ep_datatype, array_of_requests[i].ep_src, array_of_requests[i].ep_tag, array_of_requests[i].comm, 2); 
    109                         } 
    110105                        finished++; 
    111106                        finished_index[i] = true; 
Note: See TracChangeset for help on using the changeset viewer.