Changeset 25350
- Timestamp:
- 08/05/20 13:34:10 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/branches/trunk-larour-SLPS2020/src/c/main/issm_post.cpp
r25349 r25350 7 7 int main(int argc,char **argv){ 8 8 9 char* dakota_input_file=NULL;9 char* method=NULL; 10 10 11 /*Initialize MPI:*/12 ISSM_MPI_ Init(&argc, &argv); // initialize MPI11 /*Initialize environment (MPI, PETSC, MUMPS, etc ...)*/ 12 ISSM_MPI_Comm comm_init=EnvironmentInit(argc,argv); 13 13 14 /*Recover file name for dakota input file:*/ 15 dakota_input_file=xNew<char>((strlen(argv[2])+strlen(argv[3])+strlen(".qmu.in")+2)); 16 sprintf(dakota_input_file,"%s/%s%s",argv[2],argv[3],".qmu.in"); 14 /*First things first, store the communicator, and set it as a global variable: */ 15 IssmComm::SetComm(comm_init); 17 16 18 xDelete<char>(dakota_input_file); 17 /*Get rank:*/ 18 int my_rank=IssmComm::GetRank(); 19 20 /*Initialize parameters:*/ 21 Parameters *parameters = new Parameters(); 22 23 /*Method:*/ 24 method=argv[1]; 25 parameters->AddObject(new StringParam(SolutionTypeEnum,argv[1])); 26 27 /*Directory:*/ 28 parameters->AddObject(new StringParam(DirectoryEnum,argv[2])); 29 30 /*Model name:*/ 31 parameters->AddObject(new StringParam(InputFileNameEnum,argv[3])); 32 33 /*Key off method:*/ 34 if(strcmp(model,"MeanVariance")==0) 35 if 36 switch(method){ 37 case 19 38 20 39 /*Finalize ISSM:*/
Note:
See TracChangeset
for help on using the changeset viewer.