29 <<
"HOST=" << QHostInfo::localHostName();
33 MPI_Barrier( MPI_COMM_WORLD );
54 DbgLv(1) <<
"Final-my_rank" <<
my_rank <<
" msecs=" <<
startTime.msecsTo(QDateTime::currentDateTime());
66 long int maxrssma = 0L;
84 msg = analysisDate.toAscii();
124 DbgLv(1) <<
"SUPER: wait on iter done/udp";
136 master = status.MPI_SOURCE;
137 tag = status.MPI_TAG;
139 DbgLv(1) <<
"SUPER: wait recv'd iwork" << iwork <<
"master tag" << master << tag;
147 DbgLv(1) <<
"SUPER: wait on UDPmsg - master" << master;
148 MPI_Recv( msg.data(),
156 DbgLv(1) <<
"SUPER: UDPmsg:" << QString(msg);
164 DbgLv(1) <<
"SUPER: DONELAST";
169 DbgLv(1) <<
"SUPER: DONEITER islast" << islast <<
"ittest currds cntds"
174 DbgLv(0) <<
"Unknown message type in supervisor" << tag;
178 if ( udpmsg )
continue;
190 master = status.MPI_SOURCE;
192 int mgroup = mstates.indexOf(
READY );
194 int jgroup = ( mgroup < 0 ) ? kgroup : mgroup;
195 mstates[ kgroup ] =
READY;
196 int nileft = mstates.count(
WORKING );
197 DbgLv(1) <<
"SUPER: mgr kgr jgr" << mgroup << kgroup << jgroup
199 int kdset = ( current_dataset /
mgroup_count ) * mgroup_count;
203 mstates[ kgroup ] =
INIT;
204 maxrssma += (long)( iwork );
205 DbgLv(1) <<
"SUPER: (A)maxrssma" << maxrssma <<
"iwork" << iwork;
224 master = ( jgroup == 0 ) ? 1 : ( jgroup *
gcores_count );
227 <<
"gr ma tg" << jgroup << master << tag;
228 MPI_Send( ¤t_dataset,
246 QDateTime endTime = QDateTime::currentDateTime();
250 DbgLv(1) <<
"SUPER: maxrss maxrssma" <<
maxrss << maxrssma;
253 int walltime = qRound(
255 int cputime = qRound(
256 startTime .msecsTo( endTime ) / 1000.0 );
257 int maxrssmb = qRound( (
double)
maxrss / 1024.0 );
267 int wt_hr = walltime / 3600;
268 int wt_min = ( walltime - wt_hr * 3600 ) / 60;
269 int wt_sec = walltime - wt_hr * 3600 - wt_min * 60;
270 int ct_hr = cputime / 3600;
271 int ct_min = ( cputime - ct_hr * 3600 ) / 60;
272 int ct_sec = cputime - ct_hr * 3600 - ct_min * 60;
273 printf(
"Us_Mpi_Analysis has finished successfully"
274 " (Wall=%d:%02d:%02d Cpu=%d:%02d:%02d).\n"
275 , wt_hr, wt_min, wt_sec, ct_hr, ct_min, ct_sec );
280 send_udp(
"Finished: maxrss " + QString::number( maxrssmb )
281 +
" MB, total run seconds " + QString::number( cputime )
282 +
" (Reduced Datasets Count)" );
283 DbgLv(0) <<
"Finished: maxrss " << maxrssmb
284 <<
"MB, total run seconds " << cputime
285 <<
" (Reduced Datasets Count)";
290 send_udp(
"Finished: maxrss " + QString::number( maxrssmb )
291 +
" MB, total run seconds " + QString::number( cputime ) );
292 DbgLv(0) <<
"Finished: maxrss " << maxrssmb
293 <<
"MB, total run seconds " << cputime;
304 DbgLv(1) <<
" MASTER Recv from super. my_rank" <<
my_rank
316 DbgLv(1) <<
" MASTER: wait recv'd isize" << isize;
320 MPI_Recv( msg.data(),
329 DbgLv(1) <<
" MASTER: Recv'd from super. (g r m)" << my_group <<
group_rank
333 if ( analysis_type.startsWith(
"2DSA" ) )
338 else if ( analysis_type.startsWith(
"GA" ) )
343 else if ( analysis_type.startsWith(
"DMGA" ) )
348 else if ( analysis_type.startsWith(
"PCSA" ) )
389 QDateTime currTime = QDateTime::currentDateTime();
391 int mins_so_far = (
startTime.secsTo( currTime ) + 59 ) / 60;
393 int ds_iters_left = ( mins_left_allow * curr_iter ) / mins_so_far;
395 int ds_iters_estim = curr_iter + ds_iters_left;
405 QString msg = tr(
"Dataset count reduced from %1 to %2, "
406 "due to max. time restrictions." )
411 DbgLv(0) <<
" Number of minutes used so far: " << mins_so_far;
412 DbgLv(0) <<
" Allowed minutes remaining: " << mins_left_allow;
413 DbgLv(0) <<
" Dataset processed so far: " << curr_iter;
414 DbgLv(0) <<
" Estimated allowed datasets left: " << ds_iters_left;
415 DbgLv(0) <<
" Actual adjusted datasets left: " << ac_iters_left;
416 DbgLv(0) <<
"Datasets reduced from" << old_dsiters <<
"to"
452 int tag = status.MPI_TAG;
460 double dat_str = edata->
radius( 0 );
462 if ( men_end >= dat_str )
464 men_end = dat_str - men_inc / 2.0;
501 "Iteration: " + QString::number(
iterations ) +
506 progress +=
"; MonteCarlo: "
509 else if ( menisc_size > 1 )
510 progress +=
"; Meniscus: "
516 progress +=
"; RMSD: "
525 qDebug() <<
" == Refinement Iterations for Dataset"
528 qDebug() <<
"Iterations:" <<
iterations <<
" Variance:"
595 <<
" : Intermediate archive was created.";
605 <<
"(" << tripleID <<
")"
606 <<
" : model was output.";
611 <<
"(" << tripleID <<
")"
612 <<
" : model/noise(s) were output.";
628 tag = status.MPI_TAG;
629 DbgLv(1) <<
"CJ_MAST Recv tag" << tag <<
"iter" << iter;
636 DbgLv(0) <<
"Unexpected tag in PMG 2DSA Master" << tag;
651 double dat_str = edata->
radius( 0 );
653 if ( men_end >= dat_str )
655 men_end = dat_str - men_inc / 2.0;
691 worker = status.MPI_SOURCE;
696 switch( status.MPI_TAG )
708 QString msg =
"Master 2DSA: Received invalid status " +
709 QString::number( status.MPI_TAG );
747 empty_fitness.
index = i;
751 QDateTime time = QDateTime::currentDateTime();
769 int tag = status.MPI_TAG;
770 DbgLv(1) <<
" MASTER: iter" << iter <<
"gr" <<
my_group <<
"tag" << tag;
781 DbgLv(0) <<
"Unknown message to PMG Master" << tag;
795 <<
"buck size" <<
buckets.size();
800 DbgLv(1) <<
"GaMast: calc_resids return";
814 bool have_s = ( attrxs.indexOf(
ATTR_S ) >= 0 );
815 bool have_k = ( attrxs.indexOf(
ATTR_K ) >= 0 );
816 bool have_w = ( attrxs.indexOf(
ATTR_W ) >= 0 );
817 bool have_d = ( attrxs.indexOf(
ATTR_D ) >= 0 );
818 bool have_f = ( attrxs.indexOf(
ATTR_F ) >= 0 );
819 bool vary_v = ( attr_z !=
ATTR_V );
825 mcomp.
s = have_s ? solu->
s : 0.0;
826 mcomp.
f_f0 = have_k ? solu->
k : 0.0;
827 mcomp.
mw = have_w ? solu->
d : 0.0;
828 mcomp.
vbar20 = vary_v ? solu->
v : vbar20;
829 mcomp.
D = have_d ? solu->
d : 0.0;
830 mcomp.
f = have_f ? solu->
d : 0.0;
835 solu->
k = mcomp.
f_f0;
875 DbgLv(1) <<
"GaMast: iter done: maxrss" << iter <<
"tag" << tag <<
DONELAST;
904 for (
int worker = 1; worker <=
my_workers; worker++ )
940 int ntscan =
data_sets[ 0 ]->run_data.scanCount();
941 for (
int ii = 1; ii <
data_sets.size(); ii++ )
942 ntscan +=
data_sets[ ii ]->run_data.scanCount();
953 QString cmfname =
"../" +
parameters[
"DC_model" ];
974 empty_fitness.
index = ii;
978 QDateTime time = QDateTime::currentDateTime();
996 int tag = status.MPI_TAG;
997 DbgLv(1) <<
" MASTER: iter" << iter <<
"gr" <<
my_group <<
"tag" << tag;
1008 DbgLv(0) <<
"Unknown message to PMG Master" << tag;
1063 DbgLv(1) <<
"GaMast: iter done: maxrss" << iter <<
"tag" << tag <<
DONELAST;
1092 for (
int worker = 1; worker <=
my_workers; worker++ )
1129 int tag = status.MPI_TAG;
1173 "Iteration: " + QString::number(
iterations );
1176 progress +=
"; Datasets: "
1179 progress +=
"; Dataset: "
1181 +
" (" + tripleID +
") of "
1185 progress +=
"; MonteCarlo: "
1189 progress +=
"; RMSD: "
1190 + QString::number(
mrecs[ 0 ].rmsd );
1201 qDebug() <<
" == Grid-Fit Iterations for Dataset"
1206 qDebug() <<
" == Grid-Fit Iterations for Datasets 1 to"
1212 <<
" Variance:" <<
mrecs[ 0 ].variance
1213 <<
"RMSD:" <<
mrecs[ 0 ].rmsd;
1265 <<
" : Intermediate archive was created.";
1275 <<
"(" << tripleID <<
")"
1276 <<
" : model was output.";
1281 <<
"(" << tripleID <<
")"
1282 <<
" : model/noise(s) were output.";
1298 tag = status.MPI_TAG;
1299 DbgLv(1) <<
"CJ_MAST Recv tag" << tag <<
"iter" << iter;
1306 DbgLv(0) <<
"Unexpected tag in PMG 2DSA Master" << tag;
1342 worker = status.MPI_SOURCE;
1345 DbgLv(1) <<
my_rank <<
": PMG master loop-BOTTOM: status TAG" << status.MPI_TAG
1347 switch( status.MPI_TAG )
1359 QString msg =
"Master 2DSA: Received invalid status " +
1360 QString::number( status.MPI_TAG );