Changeset 1072 for XIOS/dev/branch_yushan/extern
- Timestamp:
- 03/14/17 19:12:25 (7 years ago)
- Location:
- XIOS/dev/branch_yushan/extern
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/extern/remap/src/clipper.cpp
r919 r1072 52 52 53 53 static double const pi = 3.141592653589793238; 54 #pragma omp threadprivate(pi) 55 54 56 static double const two_pi = pi *2; 57 #pragma omp threadprivate(two_pi) 58 55 59 static double const def_arc_tolerance = 0.25; 60 #pragma omp threadprivate(def_arc_tolerance) 56 61 57 62 enum Direction { dRightToLeft, dLeftToRight }; 58 63 59 64 static int const Unassigned = -1; //edge not currently 'owning' a solution 65 #pragma omp threadprivate(Unassigned) 66 60 67 static int const Skip = -2; //edge that would otherwise close a path 68 #pragma omp threadprivate(Skip) 61 69 62 70 #define HORIZONTAL (-1.0E+40) -
XIOS/dev/branch_yushan/extern/remap/src/clipper.hpp
r688 r1072 73 73 typedef int cInt; 74 74 static cInt const loRange = 0x7FFF; 75 #pragma omp threadprivate(loRange) 76 75 77 static cInt const hiRange = 0x7FFF; 78 #pragma omp threadprivate(hiRange) 79 76 80 #else 77 81 typedef signed long long cInt; 78 82 static cInt const loRange = 0x3FFFFFFF; 83 #pragma omp threadprivate(loRange) 84 79 85 static cInt const hiRange = 0x3FFFFFFFFFFFFFFFLL; 86 #pragma omp threadprivate(hiRange) 87 80 88 typedef signed long long long64; //used by Int128 class 81 89 typedef unsigned long long ulong64; -
XIOS/dev/branch_yushan/extern/remap/src/inside.cpp
r688 r1072 11 11 12 12 static const double SNAP = 1e-11; 13 #pragma omp threadprivate(SNAP) 13 14 14 15 using namespace std; -
XIOS/dev/branch_yushan/extern/remap/src/parallel_tree.cpp
r923 r1072 16 16 17 17 static const int assignLevel = 2; 18 #pragma omp threadprivate(assignLevel) 18 19 19 20 // only the circle is packed, rest of node will be initialized on unpacking -
XIOS/dev/branch_yushan/extern/remap/src/timerRemap.hpp
r694 r1072 27 27 void print(void); 28 28 static map<string,CTimer*> allTimer; 29 //#pragma omp threadprivate(allTimer) 30 29 31 static double getTime(void); 30 32 static CTimer& get(string name); -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_fortran.cpp
r1069 r1072 19 19 fint = ::MPI_Comm_c2f(static_cast< ::MPI_Comm>(comm.mpi_comm)); 20 20 #endif 21 21 22 std::map<std::pair<int, int>, MPI_Comm > ::iterator it; 22 23 … … 50 51 else 51 52 { 52 MPI_Comm return_comm; 53 if(omp_get_thread_num() == 0) 53 54 #ifdef _openmpi 55 ::MPI_Comm base_comm = ::MPI_Comm_f2c(comm); 56 #elif _intelmpi 57 ::MPI_Comm base_comm = (::MPI_Comm)(comm); 58 #endif 59 60 if(base_comm != MPI_COMM_NULL_STD) 54 61 { 55 #ifdef _openmpi 56 ::MPI_Comm base_comm = ::MPI_Comm_f2c(comm); 57 #elif _intelmpi 58 ::MPI_Comm base_comm = (::MPI_Comm)(comm); 59 #endif 60 61 if(base_comm != MPI_COMM_NULL_STD) 62 if(omp_get_thread_num() == 0) 62 63 { 63 64 int num_ep = omp_get_num_threads(); … … 65 66 MPI_Info info; 66 67 MPI_Comm_create_endpoints(base_comm, num_ep, info, new_comm); 67 return_comm = new_comm[omp_get_thread_num()];68 passage = new_comm; 68 69 } 69 return MPI_COMM_NULL; 70 #pragma omp barrier 71 72 MPI_Comm return_comm = passage[omp_get_thread_num()]; 73 return return_comm; 74 70 75 } 76 return MPI_COMM_NULL; 71 77 72 73 return return_comm;74 78 } 75 79 } -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_intercomm_kernel.cpp
r1068 r1072 420 420 *newintercomm = iter->second[my_position]; 421 421 found = true; 422 tag_list.erase(iter);423 422 break; 424 423 } … … 428 427 429 428 MPI_Barrier_local(local_comm); 430 //if(is_proc_master)431 //{432 //for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++)433 //{434 //if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1])))435 //{436 //tag_list.erase(iter);437 //break;438 //}439 //}440 //}429 if(is_proc_master) 430 { 431 for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 432 { 433 if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 434 { 435 tag_list.erase(iter); 436 break; 437 } 438 } 439 } 441 440 442 441 int intercomm_ep_rank, intercomm_ep_rank_loc, intercomm_mpi_rank; … … 687 686 *newintercomm = iter->second[my_position]; 688 687 found = true; 688 // tag_list.erase(iter); 689 break; 690 } 691 } 692 } 693 } 694 695 MPI_Barrier_local(local_comm); 696 697 if(leader_rank_in_peer[0] < leader_rank_in_peer[1]) 698 { 699 for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 700 { 701 if((*iter).first == make_pair(tag_label[0], tag_label[1])) 702 { 689 703 tag_list.erase(iter); 690 704 break; 691 705 } 692 706 } 693 } 694 } 695 696 // if(leader_rank_in_peer[0] < leader_rank_in_peer[1]) 697 // { 698 // for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 699 // { 700 // if((*iter).first == make_pair(tag_label[0], tag_label[1])) 701 // { 702 // tag_list.erase(iter); 703 // } 704 // } 705 // } 707 } 706 708 707 709 -
XIOS/dev/branch_yushan/extern/src_ep_dev/ep_intercomm_world.cpp
r1067 r1072 417 417 418 418 found = true; 419 tag_list.erase(iter);419 //tag_list.erase(iter); 420 420 break; 421 421 } … … 426 426 MPI_Barrier_local(local_comm); 427 427 428 // if(is_proc_master) 429 // { 430 // for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 431 // { 432 // if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 433 // { 434 // tag_list.erase(iter); 435 // } 436 // } 437 // } 428 if(is_proc_master) 429 { 430 for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 431 { 432 if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 433 { 434 tag_list.erase(iter); 435 break; 436 } 437 } 438 } 438 439 439 440 … … 934 935 935 936 found = true; 936 tag_list.erase(iter);937 //tag_list.erase(iter); 937 938 break; 938 939 } … … 943 944 MPI_Barrier_local(local_comm); 944 945 945 // if(is_proc_master) 946 // { 947 // for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 948 // { 949 // if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 950 // { 951 // tag_list.erase(iter); 952 // } 953 // } 954 // } 946 if(is_proc_master) 947 { 948 for(std::list<std::pair < std::pair<int,int>, MPI_Comm* > >::iterator iter = tag_list.begin(); iter!=tag_list.end(); iter++) 949 { 950 if((*iter).first == make_pair(tag, min(leader_info[0], leader_info[1]))) 951 { 952 tag_list.erase(iter); 953 break; 954 } 955 } 956 } 955 957 956 958 int intercomm_ep_rank, intercomm_ep_rank_loc, intercomm_mpi_rank;
Note: See TracChangeset
for help on using the changeset viewer.