Ignore:
Timestamp:
03/09/17 12:19:33 (7 years ago)
Author:
yushan
Message:

minor modification for using intelmpi

Location:
XIOS/dev/branch_yushan/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan/src/client.cpp

    r1067 r1068  
    230230      MPI_Comm_rank(intraComm,&rank) ; 
    231231       
    232       printf("CClient::finalize called isServer = %d\n", CXios::isServer); 
     232      //printf("CClient::finalize called isServer = %d\n", CXios::isServer); 
    233233  
    234234      if (!CXios::isServer) 
     
    238238        { 
    239239          MPI_Send(&msg,1,MPI_INT,0,0,interComm) ; 
    240           printf(" CClient : send finalize sign to server 0\n"); 
     240          //printf(" CClient : send finalize sign to server 0\n"); 
    241241        } 
    242242      } 
  • XIOS/dev/branch_yushan/src/cxios.cpp

    r1060 r1068  
    7777    MPI_Info info; 
    7878    MPI_Comm *ep_comm; 
    79     MPI_Comm_create_endpoints(MPI_COMM_WORLD, num_ep, info, ep_comm);  // servers should reach here too. 
    80        
    81     globalComm = ep_comm[0]; 
     79    if(omp_get_thread_num()==0) 
     80    { 
     81      MPI_Comm_create_endpoints(MPI_COMM_WORLD, num_ep, info, ep_comm);  // servers should reach here too. 
     82      passage = ep_comm;   
     83    } 
     84     
     85    #pragma omp barrier 
     86       
     87    globalComm = passage[omp_get_thread_num()]; 
    8288     
    8389    int tmp_size; 
  • XIOS/dev/branch_yushan/src/interface/c/icdata.cpp

    r1067 r1068  
    6464      MPI_Initialized(&initialized); 
    6565 
     66      #ifdef _usingEP 
    6667      if (initialized) local_comm = ep_lib::EP_Comm_f2c(static_cast< int >(*f_local_comm)); 
    6768      else local_comm = MPI_COMM_NULL; 
    68        
     69      #else 
     70      if (initialized) local_comm=MPI_Comm_f2c(*f_local_comm); 
     71      else local_comm = MPI_COMM_NULL; 
     72      #endif 
    6973      
    7074 
    7175      CXios::initClientSide(str, local_comm, return_comm); 
    7276 
     77      #ifdef _usingEP 
    7378      *f_return_comm = ep_lib::EP_Comm_c2f(return_comm); 
    74  
    75       //printf("in icdata.cpp, f_return_comm = %d\n", *f_return_comm); 
     79      #else 
     80      *f_return_comm = MPI_Comm_c2f(return_comm); 
     81      #endif 
    7682 
    7783      CTimer::get("XIOS init").suspend(); 
     
    8995     comm = ep_lib::EP_Comm_f2c(static_cast< int >(*f_comm)); 
    9096 
    91      //ep_lib::MPI_Comm ctx_comm; 
    92      //ep_lib::MPI_Comm_dup(comm, &ctx_comm); 
    9397     
    9498     CClient::registerContext(str,comm); 
    9599      
    96      printf("icdata.cpp: client register context %s : %p\n", context_id, &comm); 
     100     //printf("icdata.cpp: client register context %s : %p\n", context_id, &comm); 
    97101      
    98102     CTimer::get("XIOS init context").suspend(); 
  • XIOS/dev/branch_yushan/src/interface/c/oasis_cinterface.cpp

    r1053 r1068  
    2626     
    2727    fxios_oasis_get_localcomm(&f_comm) ; 
    28     //comm=MPI_Comm_f2c(f_comm) ; 
     28    #ifdef _usingEP 
     29    comm=EP_Comm_f2c(f_comm.mpi_fint) ; 
     30    #else 
     31    comm=MPI_Comm_f2c(f_comm) ; 
     32    #endif 
    2933  } 
    3034  
     
    3438     
    3539    fxios_oasis_get_intracomm(&f_comm,server_id.data(),server_id.size()) ; 
    36     //comm_client_server=MPI_Comm_f2c(f_comm) ; 
     40    #ifdef _usingEP 
     41    comm_client_server=EP_Comm_f2c(f_comm.mpi_fint) ; 
     42    #else 
     43    comm_client_server=MPI_Comm_f2c(f_comm) ; 
     44    #endif 
    3745  } 
    3846  
     
    4250     
    4351    fxios_oasis_get_intercomm(&f_comm,server_id.data(),server_id.size()) ; 
    44     //comm_client_server=MPI_Comm_f2c(f_comm) ; 
     52    #ifdef _usingEP 
     53    comm_client_server=EP_Comm_f2c(f_comm.mpi_fint) ; 
     54    #else 
     55    comm_client_server=MPI_Comm_f2c(f_comm) ; 
     56    #endif 
    4557  } 
    4658} 
  • XIOS/dev/branch_yushan/src/io/onetcdf4.cpp

    r1063 r1068  
    4747         wmpi = comm && !multifile; 
    4848          
    49          ep_lib::MPI_Info info_null; 
     49         //ep_lib::MPI_Info info_null; 
    5050 
    5151         if (wmpi) 
     
    5757            if (wmpi) 
    5858            { 
    59                CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), static_cast<MPI_Info>(info_null.mpi_info), this->ncidp); 
    60                printf("creating file with createPar\n"); 
     59               // printf("start creating file with createPar\n"); 
     60               //CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), static_cast<MPI_Info>(info_null.mpi_info), this->ncidp); 
     61               CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp); 
     62               // printf("creating file with createPar\n"); 
    6163            } 
    6264            else 
     
    7476            if (wmpi) 
    7577            { 
    76                CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), static_cast<MPI_Info>(info_null.mpi_info), this->ncidp); 
    77                printf("opening file with openPar\n"); 
     78//               printf("start opening file with openPar\n"); 
     79               // CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), static_cast<MPI_Info>(info_null.mpi_info), this->ncidp); 
     80               CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), MPI_INFO_NULL_STD, this->ncidp); 
     81//               printf("opening file with openPar\n"); 
    7882            } 
    7983            else 
Note: See TracChangeset for help on using the changeset viewer.