Changeset 23237


Ignore:
Timestamp:
09/10/18 13:47:51 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added check to avoid crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/toolkits/issm/IssmToolkitUtils.cpp

    r16415 r23237  
    8686int IssmSolverTypeFromToolkitOptions(void){ /*{{{*/
    8787
    88         char* solver_type=NULL;
    8988        int   solver_type_enum;
    90         int   num_procs=0;
    9189        bool  isparallel=false;
    9290
    9391        /*first, figure out if we are running in parallel: */
    94         num_procs=IssmComm::GetSize();
     92        int num_procs=IssmComm::GetSize();
    9593        if(num_procs>1)isparallel=true;
    9694
    9795        /*retrieve solver type as a string, from the Toolkits Options database, similar to what Petsc does. Actually,
    9896         *we try and stick with the Petsc vector types: */
    99         solver_type=ToolkitOptions::GetToolkitOptionValue("solver_type");
     97        char* solver_type=ToolkitOptions::GetToolkitOptionValue("solver_type");
     98        if(!solver_type) _error_("Solver not set");
    10099
    101100        if (strcmp(solver_type,"mumps")==0){
Note: See TracChangeset for help on using the changeset viewer.