Changeset 1520 for XIOS/dev/branch_openmp/src
- Timestamp:
- 06/04/18 19:25:08 (6 years ago)
- Location:
- XIOS/dev/branch_openmp/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/buffer_client.cpp
r1460 r1520 15 15 size_t CClientBuffer::maxRequestSize = 0; 16 16 17 CClientBuffer::CClientBuffer(MPI_Comm in _interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents):18 //interComm(interComm)19 serverRank(serverRank)17 CClientBuffer::CClientBuffer(MPI_Comm interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents): 18 interComm(interComm) 19 , serverRank(serverRank) 20 20 , bufferSize(bufferSize) 21 21 , estimatedMaxEventSize(estimatedMaxEventSize) … … 27 27 , pending(false) 28 28 { 29 interComm = in_interComm;30 *(static_cast< ::MPI_Comm*>(interComm.mpi_comm)) = *(static_cast< ::MPI_Comm*>(in_interComm.mpi_comm));31 *(static_cast< ::MPI_Comm*>(interComm.ep_comm_ptr->intercomm->mpi_inter_comm)) = *(static_cast< ::MPI_Comm*>(in_interComm.ep_comm_ptr->intercomm->mpi_inter_comm));32 29 buffer[0] = new char[bufferSize]; // transform it with MPI_ALLOC_MEM later 33 30 buffer[1] = new char[bufferSize]; -
XIOS/dev/branch_openmp/src/context_client.cpp
r1482 r1520 28 28 intraComm = intraComm_; 29 29 interComm = interComm_; 30 *(static_cast< ::MPI_Comm* >(intraComm.mpi_comm)) = *(static_cast< ::MPI_Comm* >(intraComm_.mpi_comm));31 *(static_cast< ::MPI_Comm* >(interComm.mpi_comm)) = *(static_cast< ::MPI_Comm* >(interComm_.mpi_comm));32 *(static_cast< ::MPI_Comm* >(interComm.ep_comm_ptr->intercomm->mpi_inter_comm)) = *(static_cast< ::MPI_Comm* >(interComm_.ep_comm_ptr->intercomm->mpi_inter_comm));33 //MPI_Comm_dup(intraComm_, &intraComm);34 //MPI_Comm_dup(interComm_, &interComm);35 30 MPI_Comm_rank(intraComm, &clientRank); 36 31 MPI_Comm_size(intraComm, &clientSize); -
XIOS/dev/branch_openmp/src/context_server.cpp
r1460 r1520 126 126 { 127 127 StdSize buffSize = 0; 128 MPI_Recv(&buffSize, 1, MPI_LONG, rank, 20, interComm, &status); 128 MPI_Request request; 129 MPI_Irecv(&buffSize, 1, MPI_LONG, rank, 20, interComm, &request); 130 MPI_Wait(&request, &status); 131 //MPI_Recv(&buffSize, 1, MPI_LONG, rank, 20, interComm, &status); 129 132 mapBufferSize_.insert(std::make_pair(rank, buffSize)); 130 133 it=(buffers.insert(pair<int,CServerBuffer*>(rank,new CServerBuffer(buffSize)))).first; -
XIOS/dev/branch_openmp/src/cxios.cpp
r1460 r1520 106 106 { 107 107 MPI_Comm *ep_comm; 108 MPI_Comm_create_endpoints(MPI_COMM_WORLD .mpi_comm, num_ep, info, ep_comm); // servers should reach here too.108 MPI_Comm_create_endpoints(MPI_COMM_WORLD->mpi_comm, num_ep, info, ep_comm); // servers should reach here too. 109 109 passage = ep_comm; 110 110 } -
XIOS/dev/branch_openmp/src/event_scheduler.cpp
r1460 r1520 140 140 if (received) 141 141 { 142 printf("probed a message coming from parent\n"), 142 143 recvRequest=new SPendingRequest ; 143 144 MPI_Irecv(recvRequest->buffer, 3, MPI_UNSIGNED_LONG, -2, 1, communicator, &(recvRequest->request)) ; -
XIOS/dev/branch_openmp/src/io/inetcdf4.cpp
r1491 r1520 2 2 #include "netCdfInterface.hpp" 3 3 #include "netCdf_cf_constant.hpp" 4 4 #include "ep_mpi.hpp" 5 5 #include <boost/algorithm/string.hpp> 6 6 … … 26 26 // even if Parallel NetCDF ends up being used. 27 27 if (mpi) 28 CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp); 29 //CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 28 CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, to_mpi_comm((*comm)->mpi_comm), to_mpi_info(info_null), this->ncidp); 30 29 else 31 30 CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp); -
XIOS/dev/branch_openmp/src/io/netCdfInterface.cpp
r1460 r1520 10 10 #include "netCdfInterface.hpp" 11 11 #include "netCdfException.hpp" 12 12 #include "ep_mpi.hpp" 13 13 namespace xios 14 14 { … … 49 49 int CNetCdfInterface::createPar(const StdString& fileName, int cMode, MPI_Comm comm, MPI_Info info, int& ncId) 50 50 { 51 //int status = xios::nc_create_par(fileName.c_str(), cMode, comm, MPI_INFO_NULL.mpi_info, &ncId); 52 int status = xios::nc_create_par(fileName.c_str(), cMode, comm, *(static_cast< MPI_Info* >(MPI_INFO_NULL.mpi_info)), &ncId); 51 int status = xios::nc_create_par(fileName.c_str(), cMode, comm, to_mpi_info(MPI_INFO_NULL), &ncId); 53 52 if (NC_NOERR != status) 54 53 { … … 105 104 int status; 106 105 #pragma omp critical (_netcdf) 107 status = xios::nc_open_par(fileName.c_str(), oMode, comm, *(static_cast< MPI_Info* >(MPI_INFO_NULL.mpi_info)), &ncId);106 status = xios::nc_open_par(fileName.c_str(), oMode, comm, to_mpi_info(MPI_INFO_NULL), &ncId); 108 107 109 108 if (NC_NOERR != status) -
XIOS/dev/branch_openmp/src/io/onetcdf4.cpp
r1460 r1520 3 3 #include "onetcdf4.hpp" 4 4 #include "group_template.hpp" 5 //#include "mpi.hpp"5 #include "ep_mpi.hpp" 6 6 #include "netcdf.hpp" 7 7 #include "netCdfInterface.hpp" … … 59 59 CTimer::get("Files : create").resume(); 60 60 if (wmpi) 61 CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp); 62 //CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 61 CNetCdfInterface::createPar(filename, mode, to_mpi_comm((*comm)->mpi_comm), to_mpi_info(info_null), this->ncidp); 63 62 else 64 63 CNetCdfInterface::create(filename, mode, this->ncidp); … … 72 71 CTimer::get("Files : open").resume(); 73 72 if (wmpi) 74 CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), *(static_cast<MPI_Info*>(info_null.mpi_info)), this->ncidp); 75 //CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 73 CNetCdfInterface::openPar(filename, mode, to_mpi_comm((*comm)->mpi_comm), to_mpi_info(info_null), this->ncidp); 76 74 else 77 75 CNetCdfInterface::open(filename, mode, this->ncidp); -
XIOS/dev/branch_openmp/src/server.cpp
r1469 r1520 654 654 if (flag==true) 655 655 { 656 int my_count; 656 657 counts.push_back(0); 657 658 MPI_Get_count(&status,MPI_CHAR,&(counts.back())) ; -
XIOS/dev/branch_openmp/src/test/test_complete_omp.f90
r1176 r1520 248 248 !#################################################################################### 249 249 250 DO ts=1,24*2251 !DO ts=1,24250 !DO ts=1,24*2 251 DO ts=1,24 252 252 253 253 CALL xios_get_handle("atmosphere",ctx_hdl) -
XIOS/dev/branch_openmp/src/transformation/domain_algorithm_interpolate.cpp
r1482 r1520 406 406 CContext* context = CContext::getCurrent(); 407 407 CContextClient* client=context->client; 408 int mykey; 409 ep_lib::MPI_Comm_rank(client->intraComm, &mykey); 410 411 ep_lib::MPI_Comm poleComme; 412 //ep_lib::MPI_Comm_split(client->intraComm, interMapValuePole.empty() ? 0 : 1, 0, &poleComme); 413 ep_lib::MPI_Comm_split(client->intraComm, interMapValuePole.empty() ? 0 : 1, mykey, &poleComme); 414 if (!poleComme.is_null()) 408 //int mykey; 409 //ep_lib::MPI_Comm_rank(client->intraComm, &mykey); 410 411 ep_lib::MPI_Comm poleComme = MPI_COMM_NULL; 412 ep_lib::MPI_Comm_split(client->intraComm, interMapValuePole.empty() ? 0 : 1, 0, &poleComme); 413 //ep_lib::MPI_Comm_split(client->intraComm, interMapValuePole.empty() ? 0 : 1, mykey, &poleComme); 414 //if (!poleComme.is_null()) 415 if (poleComme!=MPI_COMM_NULL) 415 416 { 416 417 int nbClientPole;
Note: See TracChangeset
for help on using the changeset viewer.