Changeset 1605
- Timestamp:
- 11/21/18 10:21:44 (6 years ago)
- Location:
- XIOS/dev/dev_trunk_omp
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/bld.cfg
r1510 r1605 41 41 src::netcdf $PWD/extern/netcdf4 42 42 src::remap $PWD/extern/remap/src 43 src::src_ep_dev $PWD/extern/src_ep_dev 43 44 bld::lib xios 44 45 bld::target libxios.a 45 46 #bld::target generate_fortran_interface.exe 46 47 #bld::target test_remap.exe 47 bld::target xios_server.exe48 #bld::target xios_server.exe 48 49 #bld::target test_regular.exe 49 50 #bld::target test_xios2_cmip6.exe … … 51 52 #bld::target test_remap.exe 52 53 #bld::target test_complete.exe 54 bld::target test_complete_omp.exe 53 55 #bld::target test_client.exe 56 bld::target test_omp.exe 54 57 #bld::target test_unstruct_complete.exe 55 58 #bld::target test_unstructured.exe … … 80 83 bld::excl_dep use::netcdf 81 84 bld::excl_dep inc::mpif.h 85 bld::excl_dep use::omp_lib -
XIOS/dev/dev_trunk_omp/extern/ep_dev/ep_create.cpp
r1604 r1605 124 124 for(int j=0; j<recv_num_ep[i]; j++) 125 125 { 126 out_comm_hdls[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(ind, j, i)); 126 //out_comm_hdls[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(ind, j, i)); 127 (*(out_comm_hdls[0]->ep_rank_map))[ind] = std::make_pair(j, i); 127 128 ind++; 128 129 } -
XIOS/dev/dev_trunk_omp/extern/ep_dev/ep_split.cpp
r1604 r1605 286 286 for(int i=0; i<new_ep_size; i++) 287 287 { 288 (*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(my_triple_vector_recv[3*i], my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2])); 288 //(*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(my_triple_vector_recv[3*i], my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2])); 289 (*((*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map))[my_triple_vector_recv[3*i]] = std::make_pair( my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2]); 289 290 } 290 291 -
XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_create.cpp
r1603 r1605 124 124 for(int j=0; j<recv_num_ep[i]; j++) 125 125 { 126 out_comm_hdls[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(ind, j, i)); 126 //out_comm_hdls[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(ind, j, i)); 127 (*(out_comm_hdls[0]->ep_rank_map))[ind] = std::make_pair(j,i);//->insert(std::pair< int, std::pair<int,int> >(ind, j, i)); 127 128 ind++; 128 129 } -
XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_fortran.cpp
r1603 r1605 8 8 9 9 10 namespace ep_lib11 {10 //namespace ep_lib 11 //{ 12 12 13 void* EP_Comm_c2f( MPI_Comm comm)13 void* EP_Comm_c2f(ep_lib::MPI_Comm comm) 14 14 { 15 15 Debug("MPI_Comm_c2f"); 16 void* fint = new ::MPI_Fint;16 void* fint = new MPI_Fint; 17 17 #ifdef _intelmpi 18 18 *static_cast< ::MPI_Fint*>(fint) = (::MPI_Fint)(to_mpi_comm(comm->mpi_comm)); 19 19 #elif _openmpi 20 *static_cast< ::MPI_Fint*>(fint) = MPI_Comm_c2f(to_mpi_comm(comm->mpi_comm));20 *static_cast< MPI_Fint*>(fint) = MPI_Comm_c2f(to_mpi_comm(comm->mpi_comm)); 21 21 #endif 22 22 23 std::map<std::pair< ::MPI_Fint, int>,MPI_Comm > ::iterator it;23 std::map<std::pair< MPI_Fint, int>, ep_lib::MPI_Comm > ::iterator it; 24 24 25 25 #pragma omp critical (fc_comm_map) 26 26 { 27 it = fc_comm_map.find(std::make_pair(*static_cast< ::MPI_Fint*>(fint), omp_get_thread_num()));28 if(it == fc_comm_map.end())27 it = ep_lib::fc_comm_map.find(std::make_pair(*static_cast< MPI_Fint*>(fint), omp_get_thread_num())); 28 if(it == ep_lib::fc_comm_map.end()) 29 29 { 30 fc_comm_map.insert(std::make_pair( std::make_pair( *static_cast< ::MPI_Fint*>(fint), omp_get_thread_num()) , comm));31 printf("EP_Comm_c2f : MAP %p insert: %d, %d, %p\n", & fc_comm_map, *static_cast< ::MPI_Fint*>(fint), omp_get_thread_num(), comm->ep_comm_ptr);30 ep_lib::fc_comm_map.insert(std::make_pair( std::make_pair( *static_cast< MPI_Fint*>(fint), omp_get_thread_num()) , comm)); 31 printf("EP_Comm_c2f : MAP %p insert: %d, %d, %p\n", &(ep_lib::fc_comm_map), *static_cast< MPI_Fint*>(fint), omp_get_thread_num(), comm->ep_comm_ptr); 32 32 } 33 33 } … … 38 38 } 39 39 40 MPI_Comm EP_Comm_f2c(void* comm)40 ep_lib::MPI_Comm EP_Comm_f2c(void* comm) 41 41 { 42 42 Debug("MPI_Comm_f2c"); 43 43 44 44 45 std::map<std::pair< ::MPI_Fint, int>,MPI_Comm > ::iterator it;45 std::map<std::pair< MPI_Fint, int>, ep_lib::MPI_Comm > ::iterator it; 46 46 47 47 #pragma omp critical (fc_comm_map) 48 it = fc_comm_map.find(std::make_pair(*static_cast< ::MPI_Fint*>(comm), omp_get_thread_num()));48 it = ep_lib::fc_comm_map.find(std::make_pair(*static_cast< MPI_Fint*>(comm), omp_get_thread_num())); 49 49 50 if(it != fc_comm_map.end())50 if(it != ep_lib::fc_comm_map.end()) 51 51 { 52 MPI_Comm comm_ptr;52 ep_lib::MPI_Comm comm_ptr; 53 53 comm_ptr = it->second; 54 printf("EP_Comm_f2c : MAP %p find: %d, %d, %p\n", & fc_comm_map, it->first.first, it->first.second, comm_ptr->ep_comm_ptr);54 printf("EP_Comm_f2c : MAP %p find: %d, %d, %p\n", &(ep_lib::fc_comm_map), it->first.first, it->first.second, comm_ptr->ep_comm_ptr); 55 55 return comm_ptr; 56 56 } … … 58 58 59 59 60 MPI_Comm *base_comm = new MPI_Comm; 60 61 #ifdef _intelmpi 61 ::MPI_Comm *base_comm = new ::MPI_Comm; 62 *base_comm = (::MPI_Comm)(*static_cast< ::MPI_Fint*>(comm)); 62 *base_comm = (MPI_Comm)(*static_cast< MPI_Fint*>(comm)); 63 63 #elif _openmpi 64 ::MPI_Comm *base_comm = ::MPI_Comm_f2c(*static_cast< ::MPI_Fint*>(comm));64 *base_comm = MPI_Comm_f2c(*static_cast< MPI_Fint*>(comm)); 65 65 #endif 66 66 … … 70 70 { 71 71 int num_ep = omp_get_num_threads(); 72 MPI_Comm *new_comm;73 MPI_Info info;74 MPI_Comm_create_endpoints(base_comm, num_ep, info, new_comm);75 passage = new_comm;72 ep_lib::MPI_Comm *new_comm; 73 ep_lib::MPI_Info info; 74 ep_lib::MPI_Comm_create_endpoints(base_comm, num_ep, info, new_comm); 75 ep_lib::passage = new_comm; 76 76 } 77 77 #pragma omp barrier 78 78 79 MPI_Comm return_comm =passage[omp_get_thread_num()];79 ep_lib::MPI_Comm return_comm = ep_lib::passage[omp_get_thread_num()]; 80 80 return return_comm; 81 81 … … 85 85 } 86 86 87 }87 //} 88 88 89 89 -
XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_lib_fortran.hpp
r1603 r1605 4 4 #include "ep_type.hpp" 5 5 6 namespace ep_lib7 {6 //namespace ep_lib 7 //{ 8 8 9 void* EP_Comm_c2f( MPI_Comm comm);10 MPI_Comm EP_Comm_f2c(void* comm);11 }9 void* EP_Comm_c2f(ep_lib::MPI_Comm comm); 10 ep_lib::MPI_Comm EP_Comm_f2c(void* comm); 11 //} 12 12 13 13 -
XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_split.cpp
r1603 r1605 286 286 for(int i=0; i<new_ep_size; i++) 287 287 { 288 (*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(my_triple_vector_recv[3*i], my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2])); 288 //(*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(my_triple_vector_recv[3*i], my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2])); 289 (*((*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map)) [ my_triple_vector_recv[3*i] ] = std::make_pair(my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2]); 289 290 } 290 291 -
XIOS/dev/dev_trunk_omp/src/interface/c/icdata.cpp
r1601 r1605 67 67 #elif _usingEP 68 68 ep_lib::fc_comm_map.clear(); 69 if (initialized) local_comm= ep_lib::EP_Comm_f2c((f_local_comm));69 if (initialized) local_comm=EP_Comm_f2c((f_local_comm)); 70 70 else local_comm=MPI_COMM_NULL; 71 71 #endif … … 77 77 *f_return_comm=MPI_Comm_c2f(return_comm); 78 78 #elif _usingEP 79 *f_return_comm=*static_cast<MPI_Fint*>( ep_lib::EP_Comm_c2f(return_comm));79 *f_return_comm=*static_cast<MPI_Fint*>(EP_Comm_c2f(return_comm)); 80 80 #endif 81 81 CTimer::get("XIOS init").suspend(); … … 94 94 comm=MPI_Comm_f2c(*f_comm); 95 95 #elif _usingEP 96 comm = ep_lib::EP_Comm_f2c(f_comm);96 comm = EP_Comm_f2c(f_comm); 97 97 #endif 98 98 CClient::registerContext(str, comm);
Note: See TracChangeset
for help on using the changeset viewer.