Ignore:
Timestamp:
10/11/12 00:03:06 (12 years ago)
Author:
Eric.Larour
Message:

CHG: switched my_rank2 to my_rank and num_procs2 to num_procs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp

    r13609 r13612  
    1818void OutputResultsx(Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){
    1919
    20         int         my_rank2;
     20        int         my_rank;
    2121        FILE       *fid                     = NULL;
    2222        char       *outputfilename          = NULL;
     
    3030        parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum);
    3131       
    32         /*recover my_rank2:*/
    33         my_rank2=IssmComm::GetRank();
     32        /*recover my_rank:*/
     33        my_rank=IssmComm::GetRank();
    3434
    3535        if(dakota_analysis){
     
    4545        /*Results do not include the type of solution being run . In parallel, we output results to a filename,
    4646         *therefore, we need to include the solutiontype into the filename: */
    47         if(my_rank2==0){
     47        if(my_rank==0){
    4848                parameters->FindParam(&solutiontype,SolutionTypeEnum);
    4949                EnumToStringx(&solutiontypestring,solutiontype);
     
    6363                if(io_gather){
    6464                        /*Just open the file for output on cpu 0. We are gathering the data on cpu 0 from all other cpus: */
    65                         if(my_rank2==0) fid=pfopen(outputfilename ,"wb");
     65                        if(my_rank==0) fid=pfopen(outputfilename ,"wb");
    6666                }
    6767                else{
    6868                        /*We are opening different  files for output on all cpus. Append the  rank to the filename, and open: */
    6969                        parameters->FindParam(&fid,OutputFilePointerEnum);
    70                         sprintf(cpu_outputfilename,"%s.%i",outputfilename,my_rank2);
     70                        sprintf(cpu_outputfilename,"%s.%i",outputfilename,my_rank);
    7171                        fid=pfopen(cpu_outputfilename ,"wb");
    7272                }
     
    8787          if((step==1) && (time==0)){
    8888          if(io_gather){
    89           if(my_rank2==0) pfclose(fid,outputfilename);
     89          if(my_rank==0) pfclose(fid,outputfilename);
    9090          }
    9191          else pfclose(fid,cpu_outputfilename);
Note: See TracChangeset for help on using the changeset viewer.