Changeset 9561
- Timestamp:
- 09/01/11 10:30:21 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/shared/Numerics/PetscOptionsFromAnalysis.cpp
r9320 r9561 81 81 82 82 83 /*Free ressources :{{{1*/83 /*Free ressources*/ 84 84 xfree((void**)&analyses); 85 85 for(i=0;i<numanalyses;i++){ … … 88 88 } 89 89 xfree((void**)&strings); 90 /*}}}*/91 90 92 91 } -
issm/trunk/src/c/solutions/issm.cpp
r8926 r9561 5 5 #include "./issm.h" 6 6 7 int main(int argc,char **argv){7 int main(int argc,char **argv){ 8 8 9 9 /*MPI: */ … … 14 14 FILE *output_fid = NULL; 15 15 FILE *petscoptionsfid = NULL; 16 char *lockname = NULL;17 16 bool qmu_analysis = false; 18 17 bool control_analysis = false; … … 27 26 int numanalyses; 28 27 int solution_type; 28 29 /*File names*/ 30 char *modelname = NULL; 31 char *lockfilename = NULL; 32 char *binfilename = NULL; 33 char *outbinfilename = NULL; 34 char *petscfilename = NULL; 29 35 30 36 /*time*/ … … 48 54 MPI_Comm_size(MPI_COMM_WORLD,&num_procs); 49 55 50 /*First check number ofinputs*/56 /*First process inputs*/ 51 57 _printf_(true,"Launching solution sequence\n"); 52 58 if(argc<2)_error_("Usage error: no solution requested"); 53 59 solution_type=StringToEnumx(argv[1]); 54 lockname=argv[6]; 60 if(argc<3)_error_("Usage error: missing model name"); 61 modelname=argv[3]; 62 binfilename = (char*)xmalloc((strlen(modelname)+strlen(".bin") +1)*sizeof(char)); sprintf(binfilename, "%s%s",modelname,".bin"); 63 outbinfilename = (char*)xmalloc((strlen(modelname)+strlen(".outbin")+1)*sizeof(char)); sprintf(outbinfilename,"%s%s",modelname,".outbin"); 64 petscfilename = (char*)xmalloc((strlen(modelname)+strlen(".petsc") +1)*sizeof(char)); sprintf(petscfilename, "%s%s",modelname,".petsc"); 65 lockfilename = (char*)xmalloc((strlen(modelname)+strlen(".lock") +1)*sizeof(char)); sprintf(lockfilename, "%s%s",modelname,".lock"); 55 66 56 67 MPI_Barrier(MPI_COMM_WORLD); start_init=MPI_Wtime(); … … 61 72 62 73 /*Create femmodel, using input file: */ 63 femmodel=new FemModel( argv[3] /*input*/,argv[5] /*output*/,solution_type,analyses,numanalyses);74 femmodel=new FemModel(binfilename,outbinfilename,solution_type,analyses,numanalyses); 64 75 65 76 /*Open output file once for all*/ 66 output_fid=pfopen( argv[5],"wb");77 output_fid=pfopen(outbinfilename,"wb"); 67 78 femmodel->parameters->SetParam(output_fid,OutputFilePointerEnum); 68 79 69 80 /*add petsc options to parameters: */ 70 petscoptionsfid=pfopen( argv[4],"r");81 petscoptionsfid=pfopen(petscfilename,"r"); 71 82 ParsePetscOptionsx(femmodel->parameters,petscoptionsfid); 72 pfclose(petscoptionsfid, argv[4]);83 pfclose(petscoptionsfid,petscfilename); 73 84 74 85 /*get parameters: */ … … 114 125 115 126 /*Close output and petsc options file and write lock file if requested*/ 116 pfclose(output_fid, argv[5]);127 pfclose(output_fid,lockfilename); 117 128 if (waitonlock>0){ 118 129 _printf_(true,"write lock file:\n"); 119 WriteLockFile(lock name);130 WriteLockFile(lockfilename); 120 131 } 121 132 122 133 /*Free ressources */ 123 134 xfree((void**)&analyses); 135 xfree((void**)&lockfilename); 136 xfree((void**)&binfilename); 137 xfree((void**)&outbinfilename); 138 xfree((void**)&petscfilename); 124 139 delete femmodel; 125 140 -
issm/trunk/src/m/classes/clusters/castor.m
r8587 r9561 78 78 fprintf(fid,'cd $PBS_O_WORKDIR\n'); 79 79 fprintf(fid,'export OMP_NUM_THREADS=1\n'); 80 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s .bin %s.petsc %s.outbin %s.lock',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname,modelname);80 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname); 81 81 82 82 %close file -
issm/trunk/src/m/classes/clusters/cosmos.m
r8587 r9561 77 77 fprintf(fid,'ulimit -s unlimited\n'); 78 78 fprintf(fid,'ulimit -c 0\n'); 79 fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpiexec -np %i %s/issm.exe %s %s %s .bin %s.petsc %s.outbin %s.lock',cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname,modelname);79 fprintf(fid,'/opt/mpich/gm/intel10.1/bin/mpiexec -np %i %s/issm.exe %s %s %s',cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname); 80 80 81 81 %close file -
issm/trunk/src/m/classes/clusters/gemini.m
r8587 r9561 78 78 fprintf(fid,'cd $PBS_O_WORKDIR\n'); 79 79 fprintf(fid,'export OMP_NUM_THREADS=1\n'); 80 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s .bin %s.petsc %s.outbin %s.lock',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname,modelname);80 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname); 81 81 82 82 %close file -
issm/trunk/src/m/classes/clusters/generic.m
r8587 r9561 83 83 if mem_debug==0, 84 84 if cluster.interactive 85 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s .bin %s.petsc %s.outbin %s.lock',...86 cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname ,modelname,modelname,modelname);85 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s ',... 86 cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname); 87 87 else 88 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s .bin %s.petsc %s.outbin %s.lock2> %s.errlog >%s.outlog ',...89 cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname ,modelname,modelname,modelname);88 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',... 89 cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname); 90 90 end 91 91 else 92 %fprintf(fid,'LD_PRELOAD=%s mpiexec -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s .bin %s.petsc %s.outbin %s.lock 2> %s.errlog >%s.outlog ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname,modelname,modelname,modelname);93 fprintf(fid,'LD_PRELOAD=%s mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s .bin %s.petsc %s.outbin %s.lock2> %s.errlog >%s.outlog ',...94 cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup, cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname ,modelname,modelname,modelname);92 %fprintf(fid,'LD_PRELOAD=%s mpiexec -np %i %s --leak-check=full --gen-suppressions=all --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname); 93 fprintf(fid,'LD_PRELOAD=%s mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',... 94 cluster.valgrindlib,cluster.np,cluster.valgrind,cluster.valgrindsup, cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname); 95 95 end 96 96 -
issm/trunk/src/m/classes/clusters/pfe.m
r9104 r9561 138 138 fprintf(fid,'cd $PBS_O_WORKDIR\n\n'); 139 139 140 fprintf(fid,'mpiexec -verbose -np %i %s/issm.exe %s $PBS_O_WORKDIR %s .bin %s.petsc %s.outbin %s.lock\n',cluster.np,cluster.codepath,EnumToString(solution_type),modelname,modelname,modelname,modelname);140 fprintf(fid,'mpiexec -verbose -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution_type),modelname); 141 141 142 142 if ~md.io_gather, … … 147 147 %close file 148 148 fclose(fid); 149 150 149 151 150 %in interactive mode, create a run file, and errlog and outlog file … … 153 152 fid=fopen([modelname '.run'],'w'); 154 153 if ~mem_debug, 155 fprintf(fid,'mpiexec -verbose -np %i %s/issm.exe %s $PBS_O_WORKDIR %s .bin %s.petsc %s.outbin %s.lock\n',cluster.np,cluster.codepath,EnumToString(solution_type),modelname,modelname,modelname,modelname);156 else 157 fprintf(fid,'mpiexec -verbose -np %i valgrind --leak-check=full %s/issm.exe %s $PBS_O_WORKDIR %s .bin %s.petsc %s.outbin %s.lock\n',cluster.np,cluster.codepath,EnumToString(solution_type),modelname,modelname,modelname,modelname);154 fprintf(fid,'mpiexec -verbose -np %i %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution_type),modelname); 155 else 156 fprintf(fid,'mpiexec -verbose -np %i valgrind --leak-check=full %s/issm.exe %s $PBS_O_WORKDIR %s\n',cluster.np,cluster.codepath,EnumToString(solution_type),modelname); 158 157 end 159 158 -
issm/trunk/src/m/classes/clusters/pollux.m
r8587 r9561 78 78 fprintf(fid,'cd $PBS_O_WORKDIR\n'); 79 79 fprintf(fid,'export OMP_NUM_THREADS=1\n'); 80 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s .bin %s.petsc %s.outbin %s.lock',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname,modelname,modelname,modelname);80 fprintf(fid,'dplace -s1 -c0-%i mpiexec -np %i %s/issm.exe %s %s %s',cluster.np-1,cluster.np,cluster.codepath,EnumToString(solution_type),cluster.executionpath,modelname); 81 81 82 82 %close file -
issm/trunk/src/m/classes/model/model.m
r9558 r9561 204 204 output_frequency = modelfield('default',0,'marshall',true,'format','Integer'); 205 205 results_on_vertices = modelfield('default',0,'marshall',true,'format','Boolean'); 206 outputfilename = modelfield('default','','marshall',true,'format','String');207 206 results = modelfield('default',struct(),'marshall',false); 208 207 vx = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1); -
issm/trunk/src/m/model/presolve.m
r9558 r9561 4 4 % Usage: 5 5 % md=presolve(md) 6 7 %deal with outputfilename and inputfilename8 md.outputfilename=[md.name '.outbin'];9 6 10 7 %deal with rifts. -
issm/trunk/src/m/model/solve.m
r9556 r9561 60 60 marshall(md); 61 61 62 63 62 %write a template file for issm to use, in parallel 64 63 PetscOptions2PetscFile(md.petscoptions,[md.name '.petsc']);
Note:
See TracChangeset
for help on using the changeset viewer.