7 static int dsdpprintlevel=0;
8 static int dsdpprintlevel2=0;
11 #define __FUNCT__ "DSDPPrintStats"
12 int DSDPPrintStatsFile(
DSDP dsdp,
void *dummy){
14 double ppobj,ddobj,pstp,dstp,mu,res,pinfeas,pnorm;
16 int printlevel=dsdpprintlevel2;
19 if(printlevel<=0)
return(0);
20 if(!dsdpoutputfile)
return(0);
23 info =
DSDPGetIts(dsdp,&iter);DSDPCHKERR(info);
28 info =
DSDPGetR(dsdp,&res); DSDPCHKERR(info);
36 fprintf(dsdpoutputfile,
"Iter PP Objective DD Objective PInfeas DInfeas Mu StepLength Pnrm\n");
37 fprintf(dsdpoutputfile,
"--------------------------------------------------------------------------------------\n");
39 fprintf(dsdpoutputfile,
"%-3d %16.8e %16.8e %9.1e %9.1e %9.1e",iter,ppobj,ddobj,pinfeas,res,mu);
40 fprintf(dsdpoutputfile,
" %4.2f %4.2f",pstp,dstp);
42 fprintf(dsdpoutputfile,
" %1.0e \n",pnorm);
44 fprintf(dsdpoutputfile,
" %5.2f \n",pnorm);
52 #define __FUNCT__ "DSDPSetStandardMonitor"
53 int DSDPSetFileMonitor(
DSDP dsdp,
int printlevel){
55 dsdpprintlevel2=printlevel;
70 #define __FUNCT__ "DSDPPrintStats"
73 double ppobj,ddobj,pstp,dstp,mu,res,pinfeas,pnorm;
75 int printlevel=dsdpprintlevel;
78 if(printlevel<=0)
return(0);
81 info =
DSDPGetIts(dsdp,&iter);DSDPCHKERR(info);
86 info =
DSDPGetR(dsdp,&res); DSDPCHKERR(info);
94 printf(
"Iter PP Objective DD Objective PInfeas DInfeas Nu StepLength Pnrm\n")
96 printf(
"---------------------------------------------------------------------------------------\n")
99 printf(
"%-3d %16.8e %16.8e %9.1e %9.1e %9.1e",iter,ppobj,ddobj,pinfeas,res,mu);
100 printf(
" %4.2f %4.2f",pstp,dstp);
102 printf(
" %1.0e \n",pnorm);
104 printf(
" %5.2f \n",pnorm);
152 #define __FUNCT__ "DSDPSetStandardMonitor"