Changeset 17660


Ignore:
Timestamp:
04/07/14 13:14:53 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: reverting to initial version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/IoModel.cpp

    r17627 r17660  
    445445                                /*Ok, we have reached the end of the file. break: */
    446446                                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: */
    448448                                break;
    449449                        }
     
    653653                if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_("could not read boolean ");
    654654        }
    655         ISSM_MPI_Bcast<int>(&booleanint,1,0,IssmComm::GetComm());
     655        ISSM_MPI_Bcast(&booleanint,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    656656
    657657        /*cast to bool: */
     
    683683        }
    684684
    685         ISSM_MPI_Bcast<int>(&integer,1,0,IssmComm::GetComm());
     685        ISSM_MPI_Bcast(&integer,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    686686
    687687        /*Assign output pointers: */
     
    710710                if(fread(&scalar,sizeof(IssmPDouble),1,fid)!=1)_error_("could not read scalar ");
    711711        }
    712         ISSM_MPI_Bcast<IssmPDouble>(&scalar,1,0,IssmComm::GetComm());
     712        ISSM_MPI_Bcast(&scalar,1,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm());
    713713
    714714        /*Assign output pointers: */
     
    742742        }
    743743
    744         ISSM_MPI_Bcast<int>(&string_size,1,0,IssmComm::GetComm());
     744        ISSM_MPI_Bcast(&string_size,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    745745
    746746        /*Now allocate string: */
     
    753753                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string ");
    754754                }
    755                 ISSM_MPI_Bcast<char>(string,string_size,0,IssmComm::GetComm());
     755                ISSM_MPI_Bcast(string,string_size,ISSM_MPI_CHAR,0,IssmComm::GetComm());
    756756        }
    757757        else{
     
    792792        }
    793793
    794         ISSM_MPI_Bcast<int>(&M,1,0,IssmComm::GetComm());
     794        ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    795795
    796796        if(my_rank==0){ 
    797797                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
    798798        }
    799         ISSM_MPI_Bcast<int>(&N,1,0,IssmComm::GetComm());
     799        ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    800800
    801801        /*Now allocate matrix: */
     
    808808                }
    809809
    810                 ISSM_MPI_Bcast<IssmPDouble>(matrix,M*N,0,IssmComm::GetComm());
     810                ISSM_MPI_Bcast(matrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm());
    811811        }
    812812
     
    857857                if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
    858858        }
    859         ISSM_MPI_Bcast<int>(&M,1,0,IssmComm::GetComm());
     859        ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    860860
    861861        if(my_rank==0){ 
    862862                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
    863863        }
    864         ISSM_MPI_Bcast<int>(&N,1,0,IssmComm::GetComm());
     864        ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    865865
    866866        /*Now allocate matrix: */
     
    872872                        if(fread(matrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
    873873                }
    874                 ISSM_MPI_Bcast<IssmPDouble>(matrix,M*N,0,IssmComm::GetComm());
     874                ISSM_MPI_Bcast(matrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm());
    875875
    876876                _assert_(this->independents);
     
    921921                if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_("could not read length of string array");
    922922        }
    923         ISSM_MPI_Bcast<int>(&numstrings,1,0,IssmComm::GetComm());
     923        ISSM_MPI_Bcast(&numstrings,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    924924
    925925        /*Now allocate string array: */
     
    934934                                if(fread(&string_size,sizeof(int),1,fid)!=1) _error_("could not read length of string ");
    935935                        }
    936                         ISSM_MPI_Bcast<int>(&string_size,1,0,IssmComm::GetComm());
     936                        ISSM_MPI_Bcast(&string_size,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    937937                        if(string_size){
    938938                                string=xNew<char>((string_size+1));
     
    943943                                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string ");
    944944                                }
    945                                 ISSM_MPI_Bcast<char>(string,string_size,0,IssmComm::GetComm());
     945                                ISSM_MPI_Bcast(string,string_size,ISSM_MPI_CHAR,0,IssmComm::GetComm());
    946946                        }
    947947                        else{
     
    988988                if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array ");
    989989        }
    990         ISSM_MPI_Bcast<int>(&numrecords,1,0,IssmComm::GetComm());
     990        ISSM_MPI_Bcast(&numrecords,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    991991
    992992        if(numrecords){
     
    10091009                                if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows in " << i << "th matrix of matrix array");
    10101010                        }
    1011                         ISSM_MPI_Bcast<int>(&M,1,0,IssmComm::GetComm());
     1011                        ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    10121012
    10131013                        if(my_rank==0){ 
    10141014                                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns in " << i << "th matrix of matrix array");
    10151015                        }
    1016                         ISSM_MPI_Bcast<int>(&N,1,0,IssmComm::GetComm());
     1016                        ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    10171017
    10181018                        /*Now allocate matrix: */
     
    10251025                                }
    10261026
    1027                                 ISSM_MPI_Bcast<IssmPDouble>(matrix,M*N,0,IssmComm::GetComm());
     1027                                ISSM_MPI_Bcast(matrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm());
    10281028                                matrices[i]=xNew<IssmDouble>(M*N);
    10291029                                for (int j=0;j<M*N;++j) {matrices[i][j]=matrix[j];}
     
    11691169                        }
    11701170
    1171                         ISSM_MPI_Bcast<int>(&string_size,1,0,IssmComm::GetComm());
     1171                        ISSM_MPI_Bcast(&string_size,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    11721172
    11731173                        /*Now allocate string: */
     
    11801180                                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string ");
    11811181                                }
    1182                                 ISSM_MPI_Bcast<char>(string,string_size,0,IssmComm::GetComm());
     1182                                ISSM_MPI_Bcast(string,string_size,ISSM_MPI_CHAR,0,IssmComm::GetComm());
    11831183                        }
    11841184                        else{
     
    12361236                                }
    12371237                        }
    1238                         ISSM_MPI_Bcast<int>(&integer,1,0,IssmComm::GetComm());
     1238                        ISSM_MPI_Bcast(&integer,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    12391239
    12401240                        /*Assign: */
     
    12951295                                if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
    12961296                        }
    1297                         ISSM_MPI_Bcast<int>(&M,1,0,IssmComm::GetComm());
     1297                        ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    12981298
    12991299                        if(my_rank==0){ 
    13001300                                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
    13011301                        }
    1302                         ISSM_MPI_Bcast<int>(&N,1,0,IssmComm::GetComm());
     1302                        ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    13031303
    13041304
     
    13111311                                        if(fread(pmatrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
    13121312                                }
    1313                                 ISSM_MPI_Bcast<IssmPDouble>(pmatrix,M*N,0,IssmComm::GetComm());
     1313                                ISSM_MPI_Bcast(pmatrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm());
    13141314
    13151315                                _assert_(this->independents);
     
    14011401                                if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
    14021402                        }
    1403                         ISSM_MPI_Bcast<int>(&M,1,0,IssmComm::GetComm());
     1403                        ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    14041404
    14051405                        if(my_rank==0){ 
    14061406                                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
    14071407                        }
    1408                         ISSM_MPI_Bcast<int>(&N,1,0,IssmComm::GetComm());
     1408                        ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    14091409
    14101410
     
    14181418                                        if(fread(pmatrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
    14191419                                }
    1420                                 ISSM_MPI_Bcast<IssmPDouble>(pmatrix,M*N,0,IssmComm::GetComm());
     1420                                ISSM_MPI_Bcast(pmatrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm());
    14211421
    14221422                                _assert_(this->independents);
     
    15941594        }
    15951595        /*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());
    15971597
    15981598        /*Assign output pointers:*/
     
    16501650                }
    16511651        }
    1652         ISSM_MPI_Bcast<int>(&found,1,0,IssmComm::GetComm());
     1652        ISSM_MPI_Bcast(&found,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    16531653        if(!found)_error_("could not find data with name " << EnumToStringx(data_enum) << " in binary file");
    16541654
    16551655        /*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());
    16581658
    16591659        /*Assign output pointers:*/
     
    17541754
    17551755        /*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());
    17571757
    17581758        /*Assign output pointers:*/
Note: See TracChangeset for help on using the changeset viewer.