Changeset 17660
- Timestamp:
- 04/07/14 13:14:53 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/IoModel.cpp
r17627 r17660 445 445 /*Ok, we have reached the end of the file. break: */ 446 446 record_code=0; //0 means bailout 447 ISSM_MPI_Bcast <int>(&record_code,1,0,IssmComm::GetComm()); /*tell others cpus we are bailing: */447 ISSM_MPI_Bcast(&record_code,1,ISSM_MPI_INT,0,IssmComm::GetComm()); /*tell others cpus we are bailing: */ 448 448 break; 449 449 } … … 653 653 if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_("could not read boolean "); 654 654 } 655 ISSM_MPI_Bcast <int>(&booleanint,1,0,IssmComm::GetComm());655 ISSM_MPI_Bcast(&booleanint,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 656 656 657 657 /*cast to bool: */ … … 683 683 } 684 684 685 ISSM_MPI_Bcast <int>(&integer,1,0,IssmComm::GetComm());685 ISSM_MPI_Bcast(&integer,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 686 686 687 687 /*Assign output pointers: */ … … 710 710 if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error_("could not read scalar "); 711 711 } 712 ISSM_MPI_Bcast <IssmPDouble>(&scalar,1,0,IssmComm::GetComm());712 ISSM_MPI_Bcast(&scalar,1,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm()); 713 713 714 714 /*Assign output pointers: */ … … 742 742 } 743 743 744 ISSM_MPI_Bcast <int>(&string_size,1,0,IssmComm::GetComm());744 ISSM_MPI_Bcast(&string_size,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 745 745 746 746 /*Now allocate string: */ … … 753 753 if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string "); 754 754 } 755 ISSM_MPI_Bcast <char>(string,string_size,0,IssmComm::GetComm());755 ISSM_MPI_Bcast(string,string_size,ISSM_MPI_CHAR,0,IssmComm::GetComm()); 756 756 } 757 757 else{ … … 792 792 } 793 793 794 ISSM_MPI_Bcast <int>(&M,1,0,IssmComm::GetComm());794 ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 795 795 796 796 if(my_rank==0){ 797 797 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 798 798 } 799 ISSM_MPI_Bcast <int>(&N,1,0,IssmComm::GetComm());799 ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 800 800 801 801 /*Now allocate matrix: */ … … 808 808 } 809 809 810 ISSM_MPI_Bcast <IssmPDouble>(matrix,M*N,0,IssmComm::GetComm());810 ISSM_MPI_Bcast(matrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm()); 811 811 } 812 812 … … 857 857 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix "); 858 858 } 859 ISSM_MPI_Bcast <int>(&M,1,0,IssmComm::GetComm());859 ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 860 860 861 861 if(my_rank==0){ 862 862 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 863 863 } 864 ISSM_MPI_Bcast <int>(&N,1,0,IssmComm::GetComm());864 ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 865 865 866 866 /*Now allocate matrix: */ … … 872 872 if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix "); 873 873 } 874 ISSM_MPI_Bcast <IssmPDouble>(matrix,M*N,0,IssmComm::GetComm());874 ISSM_MPI_Bcast(matrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm()); 875 875 876 876 _assert_(this->independents); … … 921 921 if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_("could not read length of string array"); 922 922 } 923 ISSM_MPI_Bcast <int>(&numstrings,1,0,IssmComm::GetComm());923 ISSM_MPI_Bcast(&numstrings,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 924 924 925 925 /*Now allocate string array: */ … … 934 934 if(fread(&string_size,sizeof(int),1,fid)!=1) _error_("could not read length of string "); 935 935 } 936 ISSM_MPI_Bcast <int>(&string_size,1,0,IssmComm::GetComm());936 ISSM_MPI_Bcast(&string_size,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 937 937 if(string_size){ 938 938 string=xNew<char>((string_size+1)); … … 943 943 if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string "); 944 944 } 945 ISSM_MPI_Bcast <char>(string,string_size,0,IssmComm::GetComm());945 ISSM_MPI_Bcast(string,string_size,ISSM_MPI_CHAR,0,IssmComm::GetComm()); 946 946 } 947 947 else{ … … 988 988 if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array "); 989 989 } 990 ISSM_MPI_Bcast <int>(&numrecords,1,0,IssmComm::GetComm());990 ISSM_MPI_Bcast(&numrecords,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 991 991 992 992 if(numrecords){ … … 1009 1009 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows in " << i << "th matrix of matrix array"); 1010 1010 } 1011 ISSM_MPI_Bcast <int>(&M,1,0,IssmComm::GetComm());1011 ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1012 1012 1013 1013 if(my_rank==0){ 1014 1014 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns in " << i << "th matrix of matrix array"); 1015 1015 } 1016 ISSM_MPI_Bcast <int>(&N,1,0,IssmComm::GetComm());1016 ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1017 1017 1018 1018 /*Now allocate matrix: */ … … 1025 1025 } 1026 1026 1027 ISSM_MPI_Bcast <IssmPDouble>(matrix,M*N,0,IssmComm::GetComm());1027 ISSM_MPI_Bcast(matrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm()); 1028 1028 matrices[i]=xNew<IssmDouble>(M*N); 1029 1029 for (int j=0;j<M*N;++j) {matrices[i][j]=matrix[j];} … … 1169 1169 } 1170 1170 1171 ISSM_MPI_Bcast <int>(&string_size,1,0,IssmComm::GetComm());1171 ISSM_MPI_Bcast(&string_size,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1172 1172 1173 1173 /*Now allocate string: */ … … 1180 1180 if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string "); 1181 1181 } 1182 ISSM_MPI_Bcast <char>(string,string_size,0,IssmComm::GetComm());1182 ISSM_MPI_Bcast(string,string_size,ISSM_MPI_CHAR,0,IssmComm::GetComm()); 1183 1183 } 1184 1184 else{ … … 1236 1236 } 1237 1237 } 1238 ISSM_MPI_Bcast <int>(&integer,1,0,IssmComm::GetComm());1238 ISSM_MPI_Bcast(&integer,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1239 1239 1240 1240 /*Assign: */ … … 1295 1295 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix "); 1296 1296 } 1297 ISSM_MPI_Bcast <int>(&M,1,0,IssmComm::GetComm());1297 ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1298 1298 1299 1299 if(my_rank==0){ 1300 1300 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 1301 1301 } 1302 ISSM_MPI_Bcast <int>(&N,1,0,IssmComm::GetComm());1302 ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1303 1303 1304 1304 … … 1311 1311 if(fread(pmatrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix "); 1312 1312 } 1313 ISSM_MPI_Bcast <IssmPDouble>(pmatrix,M*N,0,IssmComm::GetComm());1313 ISSM_MPI_Bcast(pmatrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm()); 1314 1314 1315 1315 _assert_(this->independents); … … 1401 1401 if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix "); 1402 1402 } 1403 ISSM_MPI_Bcast <int>(&M,1,0,IssmComm::GetComm());1403 ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1404 1404 1405 1405 if(my_rank==0){ 1406 1406 if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix "); 1407 1407 } 1408 ISSM_MPI_Bcast <int>(&N,1,0,IssmComm::GetComm());1408 ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1409 1409 1410 1410 … … 1418 1418 if(fread(pmatrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix "); 1419 1419 } 1420 ISSM_MPI_Bcast <IssmPDouble>(pmatrix,M*N,0,IssmComm::GetComm());1420 ISSM_MPI_Bcast(pmatrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm()); 1421 1421 1422 1422 _assert_(this->independents); … … 1594 1594 } 1595 1595 /*Broadcast code and vector type: */ 1596 ISSM_MPI_Bcast <int>(&lastindex,1,0,IssmComm::GetComm());1596 ISSM_MPI_Bcast(&lastindex,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1597 1597 1598 1598 /*Assign output pointers:*/ … … 1650 1650 } 1651 1651 } 1652 ISSM_MPI_Bcast <int>(&found,1,0,IssmComm::GetComm());1652 ISSM_MPI_Bcast(&found,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1653 1653 if(!found)_error_("could not find data with name " << EnumToStringx(data_enum) << " in binary file"); 1654 1654 1655 1655 /*Broadcast code and vector type: */ 1656 ISSM_MPI_Bcast <int>(&record_code,1,0,IssmComm::GetComm());1657 ISSM_MPI_Bcast <int>(&vector_type,1,0,IssmComm::GetComm());1656 ISSM_MPI_Bcast(&record_code,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1657 ISSM_MPI_Bcast(&vector_type,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1658 1658 1659 1659 /*Assign output pointers:*/ … … 1754 1754 1755 1755 /*Broadcast data: */ 1756 ISSM_MPI_Bcast <int>(&num_instances,1,0,IssmComm::GetComm());1756 ISSM_MPI_Bcast(&num_instances,1,ISSM_MPI_INT,0,IssmComm::GetComm()); 1757 1757 1758 1758 /*Assign output pointers:*/
Note:
See TracChangeset
for help on using the changeset viewer.