14#define DSDP_MAX_PATH_LEN 200
21typedef void* DSDPObject;
25static FILE *dsdp_history=0;
34static int DSDPLogPrintInfo = 0;
35static int DSDPLogPrintInfoNull = 0;
36static FILE *DSDPLogInfoFile = DSDP_NULL;
39void DSDPSetRank(
int rrank){
45#define __FUNCT__ "DSDPLogInfoAllow"
67int DSDPLogInfoAllow(
int flag,
char *filename)
69 char fname[DSDP_MAX_PATH_LEN], tname[5];
74 if (flag && filename) {
75 sprintf(tname,
".%d", prank);
76 ierr = strcat(fname, tname);
78 DSDPLogInfoFile = stdout;
80 DSDPLogPrintInfo = flag;
81 DSDPLogPrintInfoNull = flag;
82 DSDPFunctionReturn(0);
86#define __FUNCT__ "DSDPLogInfo"
112void DSDPLogFInfo(
void *vobj,
int outlevel,
const char message[], ...)
120 DSDPLogInfoFile = stdout;
121 if (DSDPLogPrintInfo < outlevel)
return;
122 if ((DSDPLogPrintInfoNull < outlevel) && !vobj)
return;
127 va_start(Argp, message);
128 sprintf(
string,
"[%d][%2d] DSDP: ", rank,outlevel);
129 len = strlen(
string);
130#if defined(DSDP_HAVE_VPRINTF_CHAR)
131 vsprintf(
string+len, message, (
char *) Argp);
133 vsprintf(
string+len, message, Argp);
135 fprintf(DSDPLogInfoFile,
"%s",
string);
136 fflush(DSDPLogInfoFile);
138#if defined(DSDP_HAVE_VPRINTF_CHAR)
139 vfprintf(dsdp_history, message, (
char *) Argp);
141 vfprintf(dsdp_history, message, Argp);
Solver, solution types, termination codes,.
Error handling, printing, and profiling.