SAF_LibProps *
saf_createProps_lib(void)
{
SAF_ENTER_NOINIT(saf_createProps_lib, NULL);
SAF_LibProps *p = NULL;
#ifdef HAVE_PARALLEL
{ int result;
/* confirm MPI is initialized */
if ((MPI_Initialized(&result) != MPI_SUCCESS) || !result)
{
_SAF_GLOBALS.p.DoAbort = false; /* we have to turn off call to abort here */
SAF_ERROR(NULL, _saf_errmsg("MPI is not running"));
}
}
#endif
/* allocate a property packet */
p = calloc(1, sizeof *p);
if (p == NULL)
SAF_ERROR(NULL, _saf_errmsg("out of memory--unable to allocate properties object"));
{ char *s=0;
SAF_GETENV_WORLD(s,"SAF_ERROR_REPORTING");
_saf_set_error_logging(s, p);
if(s) free(s);/*cannot use _saf_free until lib is initialized*/
}
/* set api tracing (this call MUST COME AFTER call to setup error logging) */
_saf_set_tracing("SAF_TRACING", p);
/* some properties used primarily in testing and installation */
p->DoAbort = true; /* always do the abort by default */
/* parallel mpi communicator */
p->LibComm = SS_COMM_WORLD;
/* string pool size */
p->StrPoolSize = 4096;
SAF_LEAVE(p);
}