- Timestamp:
- 10/11/12 00:03:06 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp
r13609 r13612 18 18 void OutputResultsx(Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){ 19 19 20 int my_rank 2;20 int my_rank; 21 21 FILE *fid = NULL; 22 22 char *outputfilename = NULL; … … 30 30 parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum); 31 31 32 /*recover my_rank 2:*/33 my_rank 2=IssmComm::GetRank();32 /*recover my_rank:*/ 33 my_rank=IssmComm::GetRank(); 34 34 35 35 if(dakota_analysis){ … … 45 45 /*Results do not include the type of solution being run . In parallel, we output results to a filename, 46 46 *therefore, we need to include the solutiontype into the filename: */ 47 if(my_rank 2==0){47 if(my_rank==0){ 48 48 parameters->FindParam(&solutiontype,SolutionTypeEnum); 49 49 EnumToStringx(&solutiontypestring,solutiontype); … … 63 63 if(io_gather){ 64 64 /*Just open the file for output on cpu 0. We are gathering the data on cpu 0 from all other cpus: */ 65 if(my_rank 2==0) fid=pfopen(outputfilename ,"wb");65 if(my_rank==0) fid=pfopen(outputfilename ,"wb"); 66 66 } 67 67 else{ 68 68 /*We are opening different files for output on all cpus. Append the rank to the filename, and open: */ 69 69 parameters->FindParam(&fid,OutputFilePointerEnum); 70 sprintf(cpu_outputfilename,"%s.%i",outputfilename,my_rank 2);70 sprintf(cpu_outputfilename,"%s.%i",outputfilename,my_rank); 71 71 fid=pfopen(cpu_outputfilename ,"wb"); 72 72 } … … 87 87 if((step==1) && (time==0)){ 88 88 if(io_gather){ 89 if(my_rank 2==0) pfclose(fid,outputfilename);89 if(my_rank==0) pfclose(fid,outputfilename); 90 90 } 91 91 else pfclose(fid,cpu_outputfilename);
Note:
See TracChangeset
for help on using the changeset viewer.