- Timestamp:
- 06/29/18 17:16:31 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/transformation/domain_algorithm_interpolate.cpp
r1545 r1555 807 807 808 808 int my_rank_loc = client->intraComm->ep_comm_ptr->size_rank_info[1].first; 809 810 cout<<"begin write weight info"<< endl; 809 int my_rank = client->intraComm->ep_comm_ptr->size_rank_info[0].first; 810 811 811 812 812 813 WriteNetCdf *netCdfWriter; 813 814 814 815 815 MPI_Barrier_local(client->intraComm); 816 816 817 if(my_rank_loc==0) 817 818 { 818 819 info(100)<<"rank "<< my_rank <<" create weight info file"<< std::endl; 820 819 821 WriteNetCdf my_writer(filename, client->intraComm); 822 info(100)<<"rank "<< my_rank <<" file created"<< std::endl; 820 823 netCdfWriter = &my_writer; 821 824 … … 824 827 netCdfWriter->addDimensionWrite("n_dst", n_dst); 825 828 netCdfWriter->addDimensionWrite("n_weight", globalNbWeight); 829 info(100)<<"rank "<< my_rank <<" addDimensionWrite : n_src, n_dst, n_weight"<< std::endl; 826 830 827 831 std::vector<StdString> dims(1,"n_weight"); … … 831 835 netCdfWriter->addVariableWrite("dst_idx", NC_INT, dims); 832 836 netCdfWriter->addVariableWrite("weight", NC_DOUBLE, dims); 837 838 info(100)<<"rank "<< my_rank <<" addVariableWrite : src_idx, dst_idx, weight"<< std::endl; 833 839 834 840 // End of definition 835 841 netCdfWriter->endDefinition(); 842 info(100)<<"rank "<< my_rank <<" endDefinition"<< std::endl; 836 843 837 844 netCdfWriter->closeFile(); 838 }839 840 845 info(100)<<"rank "<< my_rank <<" file closed"<< std::endl; 846 } 847 841 848 MPI_Barrier_local(client->intraComm); 842 849 … … 844 851 { 845 852 // open file 853 info(100)<<"rank "<< my_rank <<" writing in weight info file"<< std::endl; 854 846 855 WriteNetCdf my_writer(filename, true, client->intraComm); 856 info(100)<<"rank "<< my_rank <<" file opened"<< std::endl; 847 857 netCdfWriter = &my_writer; 848 858 … … 853 863 netCdfWriter->writeDataIndex(dst_idx, "dst_idx", false, 0, &start, &count); 854 864 netCdfWriter->writeDataIndex(weights, "weight", false, 0, &start, &count); 855 } 865 866 info(100)<<"rank "<< my_rank <<" WriteDataIndex : src_idx, dst_idx, weight"<< std::endl; 867 } 868 869 netCdfWriter->closeFile(); 870 info(100)<<"rank "<< my_rank <<" file closed"<< std::endl; 871 856 872 } 857 873
Note: See TracChangeset
for help on using the changeset viewer.