Changeset 11923


Ignore:
Timestamp:
04/05/12 08:42:14 (13 years ago)
Author:
Mathieu Morlighem
Message:

Added check to avoid Segfault

File:
1 edited

Legend:

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

    r9336 r11923  
    102102        for(i=0;i<numanalyses;i++){
    103103                char* string=strings[i];
     104                if(my_rank==0){
     105                        if(string==NULL) _error_("PETSc options for analysis %s have been declared but were not found",EnumToStringx(analyses[i]));
     106                }
    104107                if(my_rank==0)stringlength=(strlen(string)+1)*sizeof(char);
    105108                MPI_Bcast(&stringlength,1,MPI_INT,0,MPI_COMM_WORLD);
Note: See TracChangeset for help on using the changeset viewer.