39 for( i=0; i <
LIMPAR; i++ )
45 strcpy(
optimize.chVarFmt[i],
"error - no optimizer line image was set" );
49 prt.lgFaintOn =
false;
69 for( i=0; i <
LIMPAR; i++ )
80 unsigned long nObsQuant =
optimize.xLineInt_Obs.size() +
optimize.ContNFnu.size() +
86 if( nObsQuant == 0 && !
grid.lgGrid )
88 fprintf(
ioQQQ,
" The input stream has vary commands, but\n" );
89 fprintf(
ioQQQ,
" no observed quantities were entered. Whats up?\n" );
90 fprintf(
ioQQQ,
" Use the NO VARY command if you intended to disable optimization.\n" );
97 fprintf(
ioQQQ,
" No parameters to vary were entered. Whats up?\n" );
103 fprintf(
ioQQQ,
" PROBLEM - More parameters are varied then there are observables.\n" );
104 fprintf(
ioQQQ,
" PROBLEM - This run may not converge as a result.\n" );
105 fprintf(
ioQQQ,
" PROBLEM - Please reduce the number of free parameters,"
106 " or add more observables.\n" );
111 fprintf(
ioQQQ,
" Every parameter with a VARY option must have a GRID specified,\n" );
112 fprintf(
ioQQQ,
" and the GRID must be specified after the VARY option.\n" );
113 fprintf(
ioQQQ,
" These requirements were not satisfied for %ld parameter(s).\n",
144 sprintf( chLine,
optimize.chVarFmt[i],
151 sprintf( chLine,
optimize.chVarFmt[i],
159 sprintf( chLine,
optimize.chVarFmt[i],
166 fprintf(
ioQQQ,
"The number of variable options on this line makes no sense to me1\n");
171 fprintf(
ioQQQ,
"%s\n", chLine );
176 if( strcmp(
optimize.chOptRtn,
"XSPE") == 0 )
177 fprintf(
ioQQQ,
"%58cGrid Driver\n",
' ' );
179 fprintf(
ioQQQ,
"%54cOptimization Driver\n",
' ' );
182 fprintf(
ioQQQ,
"%23c**************************************%7.7s**************************************\n",
184 fprintf(
ioQQQ,
"%23c*%81c*\n",
' ',
' ' );
188 for( i=0; i <=
input.nSave; i++ )
191 strcpy( chNote,
" " );
199 strcpy( chNote,
"VARY>>>" );
203 fprintf(
ioQQQ,
"%22.7s * %-80s*\n", chNote,
input.chCardSav[i] );
205 fprintf(
ioQQQ,
"%23c*%81c*\n",
' ',
' ' );
206 fprintf(
ioQQQ,
"%23c***********************************************************************************\n\n\n",
' ' );
214 fprintf(
ioQQQ,
" trace:%80.80s\n",
input.chCardSav[i]);
216 fprintf(
ioQQQ,
" number of variables on line:%4ld\n",
218 fprintf(
ioQQQ,
" Values:" );
219 for( ii=1; ii <=
optimize.nvarxt[j]; ii++ )
223 fprintf(
ioQQQ,
"\n" );
227 if( strcmp(
optimize.chOptRtn,
"PHYM") == 0 )
229 fprintf(
ioQQQ,
" Up to %ld iterations will be performed,\n",
231 fprintf(
ioQQQ,
" and the final version of the input file will be written to the file %s\n",
234 fprintf(
ioQQQ,
" The Phymir method will be used" );
237 if(
cpu.i().lgMPI() )
238 fprintf(
ioQQQ,
" in MPI mode.\n" );
240 fprintf(
ioQQQ,
" in parallel mode.\n" );
242 fprintf(
ioQQQ,
" The maximum no. of CPU's to be used is %ld.\n",
246 fprintf(
ioQQQ,
" in sequential mode.\n" );
249 else if( strcmp(
optimize.chOptRtn,
"SUBP") == 0 )
251 fprintf(
ioQQQ,
" Up to %ld iterations will be performed,\n",
253 fprintf(
ioQQQ,
" and the final version of the input file will be written to the file %s\n",
256 fprintf(
ioQQQ,
" The Subplex method will be used.\n" );
259 else if( strcmp(
optimize.chOptRtn,
"XSPE") == 0 )
261 fprintf(
ioQQQ,
" Producing grid output.\n" );
266 fprintf(
ioQQQ,
" I do not understand what method to use.\n" );
267 fprintf(
ioQQQ,
" Sorry.\n" );
271 fprintf(
ioQQQ,
"\n %ld parameter(s) will be varied. The first lines, and the increments are:\n",
297 sprintf( chLine,
optimize.chVarFmt[i],
304 sprintf( chLine,
optimize.chVarFmt[i],
312 sprintf( chLine,
optimize.chVarFmt[i],
319 fprintf(
ioQQQ,
"The number of variable options on this line makes no sense to me2\n");
323 fprintf(
ioQQQ,
"\n %s\n", chLine );
324 if( strcmp(
optimize.chOptRtn,
"XSPE") == 0 )
325 fprintf(
ioQQQ,
" %s increment is %.3g, the limits are %.3g to %.3g\n",
326 grid.lgLinearIncrements[i] ?
"Linear" :
"Log",
327 grid.paramIncrements[i],
grid.paramLimits[i][0],
grid.paramLimits[i][1] );
329 fprintf(
ioQQQ,
" Initial increment is %.3g, the limits are %.3g to %.3g\n",
334 if( strcmp(
optimize.chOptRtn,
"XSPE") == 0 )
338 if(
cpu.i().lgMPI() )
339 fprintf(
ioQQQ,
"\n Running in MPI grid mode on %ld CPUs. ",
cpu.i().nCPU() );
341 fprintf(
ioQQQ,
"\n Running in single-CPU grid mode. " );
342 fprintf(
ioQQQ,
"I will now start to write the input files.\n\n" );
346 ptem[j] =
grid.paramLimits[j][0];
350 grid.paramIncrements[j] = 0.f;
351 grid.lgLinearIncrements[j] =
false;
358 fprintf(
ioQQQ,
" **************************************************\n" );
359 fprintf(
ioQQQ,
" **************************************************\n" );
360 fprintf(
ioQQQ,
" **************************************************\n" );
361 fprintf(
ioQQQ,
"\n Writing input files has been completed.\n\n\n" );
368 called.lgTalkIsOK =
false;
const int INPUT_LINE_LENGTH
#define DEBUG_ENTRY(funcname)
static t_version & Inst()
void gridXspec(realnum *, long)
void InitDefaultsPreparse(void)
char chOptimFileName[INPUT_LINE_LENGTH]