18 #include "../include/RunDescriptor.h"
19 #include "../src_piny_physics_v1.0/friend_lib/proto_friend_lib_entry.h"
43 void Init(
int nk0_max_,
int nchareG_){
46 num_send =
new int[nchareG];
47 num_recv =
new int[nchareG];
48 for(
int i=0;i<nchareG;i++){num_send[i] = 0;}
49 for(
int i=0;i<nchareG;i++){num_recv[i] = 0;}
53 lst_send =
new int *[nchareG];
54 lst_recv =
new int *[nchareG];
55 for(
int i=0;i<nchareG;i++){
56 lst_send[i]=
new int[nk0_max];
57 lst_recv[i]=
new int[nk0_max];
59 for(
int i=0;i<nchareG;i++){
60 for(
int j=0;j<nk0_max;j++){
69 num_recv_tot = R->num_recv_tot;
70 num_send_tot = R->num_send_tot;
71 Init(nk0_max,nchareG);
72 for(
int i=0;i<nchareG;i++){
73 num_send[i]=R->num_send[i];
74 num_recv[i]=R->num_recv[i];
76 for(
int i=0;i<nchareG;i++){
77 for(
int j=0;j<num_send[i];j++){
78 lst_send[i][j]=R->lst_send[i][j];
80 for(
int j=0;j<num_recv[i];j++){
81 lst_recv[i][j]=R->lst_recv[i][j];
93 for(
int j=0;j<nchareG;j++){
95 delete [] lst_send[j];
97 delete [] lst_recv[j];
104 void pup(PUP::er &p){
105 p|nk0_max; p|nchareG;
106 if(p.isUnpacking()) {
107 Init(nk0_max,nchareG);
109 p|num_recv_tot; p|num_send_tot;
110 PUParray(p,num_send,nchareG);
111 PUParray(p,num_recv,nchareG);
112 for(
int i=0;i<nchareG;i++)
113 PUParray(p,lst_send[i],nk0_max);
114 for(
int i=0;i<nchareG;i++)
115 PUParray(p,lst_recv[i],nk0_max);
134 double vol,dt,tol_norb,tol_cp_min;
143 int kx_max,ky_max,kz_max;
144 int cp_norb_rot_kescal;
155 int cp_force_complex_psi;
156 int sizeX, sizeY, sizeZ;
160 int ngrid_nloc_a, ngrid_nloc_b, ngrid_nloc_c;
161 int ngrid_eext_a, ngrid_eext_b, ngrid_eext_c;
167 int ibinary_write_opt;
183 double *lines_per_chareG;
184 double *pts_per_chareG;
185 CkVec<RunDescriptor> *sortedRunDescriptors;
186 int *nlines_per_chareG;
187 int *npts_per_chareG;
188 int *index_output_off;
189 int **index_tran_upack;
190 int **index_tran_upackNL;
203 double *lines_per_chareRhoG;
204 double *pts_per_chareRhoG;
206 int *nlines_per_chareRhoG;
207 int *nlines_per_chareRhoGEext;
208 int *npts_per_chareRhoG;
209 int **index_tran_upack_rho;
210 int **index_tran_upack_eext;
212 int **nline_send_eext_y;
213 int **nline_send_rho_y;
214 int ***index_tran_upack_rho_y;
215 int ***index_tran_upack_eext_y;
216 int ***index_tran_upack_eext_ys;
217 int ***index_tran_pack_rho_y;
218 int ***index_tran_pack_eext_y;
219 int ***index_tran_pack_eext_ys;
226 CkVec<RunDescriptor> *RhosortedRunDescriptors;
234 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
235 CkPrintf(
"[%d] CPcharmParaInfo copy constructor\n",CkMyPe());
238 tol_norb = s.tol_norb;
239 tol_cp_min = s.tol_cp_min;
240 tol_cp_dyn = s.tol_cp_dyn;
244 pi_beads = s.pi_beads;
248 doublepack = s.doublepack;
253 cp_norb_rot_kescal = s.cp_norb_rot_kescal;
254 ndump_frq = s.ndump_frq;
255 istart_typ_cp= s.istart_typ_cp;
256 cp_grad_corr_on = s.cp_grad_corr_on;
260 cp_min_opt = s.cp_min_opt;
261 cp_min_update= s.cp_min_update;
262 cp_min_cg = s.cp_min_cg;
263 cp_min_std = s.cp_min_std;
264 cp_force_complex_psi = s.cp_force_complex_psi;
265 rhoRsubplanes= s.rhoRsubplanes;
270 ees_eext_on = s.ees_eext_on;
271 ees_nloc_on = s.ees_nloc_on;
272 ngrid_nloc_a = s.ngrid_nloc_a;
273 ngrid_nloc_b = s.ngrid_nloc_b;
274 ngrid_nloc_c = s.ngrid_nloc_c;
275 ngrid_eext_a = s.ngrid_eext_a;
276 ngrid_eext_b = s.ngrid_eext_b;
277 ngrid_eext_c = s.ngrid_eext_c;
279 gen_wave = s.gen_wave;
281 ibinary_opt = s.ibinary_opt;
282 ibinary_write_opt = s.ibinary_write_opt;
283 nplane_x = s.nplane_x;
285 nlines_tot = s.nlines_tot;
286 npts_tot = s.npts_tot;
287 nlines_max = s.nlines_max;
288 natm_tot = s.natm_tot;
289 natm_typ = s.natm_typ;
291 numSfGrps = s.numSfGrps;
292 natm_nl_grp_max = s.natm_nl_grp_max;
293 if(nplane_x==0 || nplane_x > sizeX){
294 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
295 CkPrintf(
"Error in CPcharmParaInfo constructor\n");
296 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
300 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
301 CkPrintf(
"Error in CPcharmParaInfo constructor\n");
302 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
305 nlines_tot_rho = s.nlines_tot_rho;
306 npts_tot_rho = s.npts_tot_rho;
307 nlines_max_rho = s.nlines_max_rho;
308 nlines_max_eext = s.nlines_max_eext;
309 nplane_rho_x = s.nplane_rho_x;
310 nchareRhoG = s.nchareRhoG;
311 nchareVdW = s.nchareVdW;
312 nchareRhoGEext = s.nchareRhoGEext;
313 npts_per_chareRhoG =
new int[nchareRhoG];
314 nlines_per_chareRhoG =
new int[nchareRhoG];
315 nlines_per_chareRhoGEext =
new int[nchareRhoGEext];
316 lines_per_chareRhoG =
new double[nchareRhoG];
317 pts_per_chareRhoG =
new double[nchareRhoG];
318 if(nplane_rho_x==0 || nplane_rho_x > sizeX){
319 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
320 CkPrintf(
"Error in CPcharmParaInfo constructor\n");
321 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
325 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
326 CkPrintf(
"Error in CPcharmParaInfo constructor\n");
327 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
330 for(
int i=0;i<nchareRhoG;i++){
331 nlines_per_chareRhoG[i] = s.nlines_per_chareRhoG[i];
332 lines_per_chareRhoG[i] = s.lines_per_chareRhoG[i];
333 pts_per_chareRhoG[i] = s.pts_per_chareRhoG[i];
334 npts_per_chareRhoG[i] = s.npts_per_chareRhoG[i];
336 index_tran_upack_rho = cmall_int_mat(0,nchareRhoG,0,nlines_max_rho,
337 "cpcharmparainfo.h");
338 for(
int i=0;i<nchareRhoG;i++){
339 for(
int j=0;j<nlines_per_chareRhoG[i];j++){
340 index_tran_upack_rho[i][j] = s.index_tran_upack_rho[i][j];
344 for(
int i=0;i<nchareRhoGEext;i++){
345 nlines_per_chareRhoGEext[i] = s.nlines_per_chareRhoGEext[i];
347 index_tran_upack_eext=cmall_int_mat(0,nchareRhoGEext,0,nlines_max_rho,
348 "cpcharmparainfo.h");
349 for(
int i=0;i<nchareRhoGEext;i++){
350 for(
int j=0;j<nlines_per_chareRhoGEext[i];j++){
351 index_tran_upack_eext[i][j] = s.index_tran_upack_eext[i][j];
355 sortedRunDescriptors =
new CkVec<RunDescriptor> [nchareG];
356 for(
int i=0;i<nchareG;i++){
357 for(
int j=0;j<s.sortedRunDescriptors[i].size();j++){
358 sortedRunDescriptors[i].push_back(s.sortedRunDescriptors[i][j]);
362 RhosortedRunDescriptors =
new CkVec<RunDescriptor> [nchareRhoG];
363 for(
int i=0;i<nchareRhoG;i++){
364 for(
int j=0;j<s.RhosortedRunDescriptors[i].size();j++){
365 RhosortedRunDescriptors[i].push_back(s.RhosortedRunDescriptors[i][j]);
368 npts_per_chareG =
new int[nchareG];
369 index_output_off =
new int[nchareG];
370 nlines_per_chareG =
new int[nchareG];
371 lines_per_chareG =
new double[nchareG];
372 pts_per_chareG =
new double[nchareG];
373 for(
int i=0;i<nchareG;i++){
374 nlines_per_chareG[i] = s.nlines_per_chareG[i];
375 lines_per_chareG[i] = s.lines_per_chareG[i];
376 pts_per_chareG[i] = s.pts_per_chareG[i];
377 npts_per_chareG[i] = s.npts_per_chareG[i];
378 index_output_off[i] = s.index_output_off[i];
380 index_tran_upack = cmall_int_mat(0,nchareG,0,nlines_max,
"cpcharmparainfo.h");
381 for(
int i=0;i<nchareG;i++){
382 for(
int j=0;j<nlines_per_chareG[i];j++){
383 index_tran_upack[i][j] = s.index_tran_upack[i][j];
387 index_tran_upackNL = cmall_int_mat(0,nchareG,0,nlines_max,
"cpcharmparainfo.h");
388 for(
int i=0;i<nchareG;i++){
389 for(
int j=0;j<nlines_per_chareG[i];j++){
390 index_tran_upackNL[i][j] = s.index_tran_upackNL[i][j];
395 for(
int i=0;i<nchareG;i++){RCommPkg[i].Init(&s.RCommPkg[i],i);}
398 ioff_zmat =
new int [nlIters];
399 nmem_zmat =
new int [nlIters];;
400 for(
int i =0;i<nlIters;i++){
401 ioff_zmat[i] = s.ioff_zmat[i];
402 nmem_zmat[i] = s.nmem_zmat[i];
406 index_tran_upack_rho_y = cmall_itens3(0,nchareRhoG,0,rhoRsubplanes,
407 0,nlines_max_rho,
"util.C");
408 index_tran_pack_rho_y = cmall_itens3(0,nchareRhoG,0,rhoRsubplanes,
409 0,nlines_max_rho,
"util.C");
410 nline_send_rho_y = cmall_int_mat(0,nchareRhoG,0,rhoRsubplanes,
"util.C");
411 index_tran_upack_eext_y = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
412 0,nlines_max_eext,
"util.C");
413 index_tran_upack_eext_ys= cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
414 0,nlines_max_eext,
"util.C");
415 index_tran_pack_eext_y = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
416 0,nlines_max_eext,
"util.C");
417 index_tran_pack_eext_ys = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
418 0,nlines_max_eext,
"util.C");
419 nline_send_eext_y = cmall_int_mat(0,nchareRhoGEext,0,rhoRsubplanes,
"util.C");
420 for(
int igrp=0;igrp<nchareRhoG;igrp++){
421 for(
int ic=0;ic<rhoRsubplanes;ic++){
422 nline_send_rho_y[igrp][ic] = s.nline_send_rho_y[igrp][ic];
423 for(
int jc=0;jc<nline_send_rho_y[igrp][ic];jc++){
424 index_tran_upack_rho_y[igrp][ic][jc] = s.index_tran_upack_rho_y[igrp][ic][jc];
425 index_tran_pack_rho_y[igrp][ic][jc] = s.index_tran_pack_rho_y[igrp][ic][jc];
429 for(
int igrp=0;igrp<nchareRhoGEext;igrp++){
430 for(
int ic=0;ic<rhoRsubplanes;ic++){
431 nline_send_eext_y[igrp][ic] = s.nline_send_eext_y[igrp][ic];
432 for(
int jc=0;jc<nline_send_eext_y[igrp][ic];jc++){
433 index_tran_upack_eext_y[igrp][ic][jc]= s.index_tran_upack_eext_y[igrp][ic][jc];
434 index_tran_upack_eext_ys[igrp][ic][jc]= s.index_tran_upack_eext_ys[igrp][ic][jc];
435 index_tran_pack_eext_y[igrp][ic][jc] = s.index_tran_pack_eext_y[igrp][ic][jc];
436 index_tran_pack_eext_ys[igrp][ic][jc] = s.index_tran_pack_eext_ys[igrp][ic][jc];
441 listSubFlag = s.listSubFlag;
442 ngxSubMax = s.ngxSubMax;
443 numSubGx =
new int [rhoRsubplanes];
444 listSubGx = cmall_int_mat(0,rhoRsubplanes,0,ngxSubMax,
"charmparainfo");
445 for(
int ic=0;ic<rhoRsubplanes;ic++){
446 numSubGx[ic] = s.numSubGx[ic];
447 for(
int jc=0;jc<numSubGx[ic];jc++){
448 listSubGx[ic][jc] = s.listSubGx[ic][jc];
454 LBTurnInstrumentOff();
461 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
462 CkPrintf(
"[%d] CPcharmParaInfo assign operator\n", CkMyPe());
465 tol_norb = s.tol_norb;
466 tol_cp_min = s.tol_cp_min;
467 tol_cp_dyn = s.tol_cp_dyn;
470 pi_beads = s.pi_beads;;
474 doublepack = s.doublepack;
479 cp_norb_rot_kescal = s.cp_norb_rot_kescal;
480 ndump_frq = s.ndump_frq;
481 istart_typ_cp= s.istart_typ_cp;
482 cp_grad_corr_on = s.cp_grad_corr_on;
486 cp_min_opt = s.cp_min_opt;
487 cp_min_update= s.cp_min_update;
488 cp_min_cg = s.cp_min_cg;
489 cp_min_std = s.cp_min_std;
490 cp_force_complex_psi = s.cp_force_complex_psi;
491 rhoRsubplanes= s.rhoRsubplanes;
496 ees_eext_on = s.ees_eext_on;
497 ees_nloc_on = s.ees_nloc_on;
498 ngrid_nloc_a = s.ngrid_nloc_a;
499 ngrid_nloc_b = s.ngrid_nloc_b;
500 ngrid_nloc_c = s.ngrid_nloc_c;
501 ngrid_eext_a = s.ngrid_eext_a;
502 ngrid_eext_b = s.ngrid_eext_b;
503 ngrid_eext_c = s.ngrid_eext_c;
505 gen_wave = s.gen_wave;
507 ibinary_opt = s.ibinary_opt;
508 ibinary_write_opt = s.ibinary_write_opt;
509 nplane_x = s.nplane_x;
511 nlines_tot = s.nlines_tot;
512 npts_tot = s.npts_tot;
513 nlines_max = s.nlines_max;
514 natm_tot = s.natm_tot;
515 natm_typ = s.natm_typ;
517 numSfGrps = s.numSfGrps;
518 natm_nl_grp_max = s.natm_nl_grp_max;
519 if(nplane_x==0 || nplane_x > sizeX){
520 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
521 CkPrintf(
"Error in CPcharmParaInfo constructor\n");
522 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
526 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
527 CkPrintf(
"Error in CPcharmParaInfo constructor\n");
528 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
531 nlines_tot_rho = s.nlines_tot_rho;
532 npts_tot_rho = s.npts_tot_rho;
533 nlines_max_rho = s.nlines_max_rho;
534 nlines_max_eext = s.nlines_max_eext;
535 nplane_rho_x = s.nplane_rho_x;
536 nchareRhoG = s.nchareRhoG;
537 nchareVdW = s.nchareVdW;
538 nchareRhoGEext = s.nchareRhoGEext;
539 npts_per_chareRhoG =
new int[nchareRhoG];
540 nlines_per_chareRhoG =
new int[nchareRhoG];
541 nlines_per_chareRhoGEext =
new int[nchareRhoGEext];
542 lines_per_chareRhoG =
new double[nchareRhoG];
543 pts_per_chareRhoG =
new double[nchareRhoG];
544 if(nplane_rho_x==0 || nplane_rho_x > sizeX){
545 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
546 CkPrintf(
"Error in CPcharmParaInfo constructor\n");
547 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
551 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
552 CkPrintf(
"Error in CPcharmParaInfo constructor\n");
553 CkPrintf(
"@@@@@@@@@@@@@@@@@@@@_error_@@@@@@@@@@@@@@@@@@@@\n");
556 for(
int i=0;i<nchareRhoG;i++){
557 nlines_per_chareRhoG[i] = s.nlines_per_chareRhoG[i];
558 lines_per_chareRhoG[i] = s.lines_per_chareRhoG[i];
559 pts_per_chareRhoG[i] = s.pts_per_chareRhoG[i];
560 npts_per_chareRhoG[i] = s.npts_per_chareRhoG[i];
562 index_tran_upack_rho = cmall_int_mat(0,nchareRhoG,0,nlines_max_rho,
563 "cpcharmparainfo.h");
564 for(
int i=0;i<nchareRhoG;i++){
565 for(
int j=0;j<nlines_per_chareRhoG[i];j++){
566 index_tran_upack_rho[i][j] = s.index_tran_upack_rho[i][j];
570 for(
int i=0;i<nchareRhoGEext;i++){
571 nlines_per_chareRhoGEext[i] = s.nlines_per_chareRhoGEext[i];
573 index_tran_upack_eext=cmall_int_mat(0,nchareRhoGEext,0,nlines_max_rho,
574 "cpcharmparainfo.h");
575 for(
int i=0;i<nchareRhoGEext;i++){
576 for(
int j=0;j<nlines_per_chareRhoGEext[i];j++){
577 index_tran_upack_eext[i][j] = s.index_tran_upack_eext[i][j];
581 sortedRunDescriptors =
new CkVec<RunDescriptor> [nchareG];
582 for(
int i=0;i<nchareG;i++){
583 for(
int j=0;j<s.sortedRunDescriptors[i].size();j++){
584 sortedRunDescriptors[i].push_back(s.sortedRunDescriptors[i][j]);
588 RhosortedRunDescriptors =
new CkVec<RunDescriptor> [nchareRhoG];
589 for(
int i=0;i<nchareRhoG;i++){
590 for(
int j=0;j<s.RhosortedRunDescriptors[i].size();j++){
591 RhosortedRunDescriptors[i].push_back(s.RhosortedRunDescriptors[i][j]);
594 npts_per_chareG =
new int[nchareG];
595 index_output_off =
new int[nchareG];
596 nlines_per_chareG =
new int[nchareG];
597 lines_per_chareG =
new double[nchareG];
598 pts_per_chareG =
new double[nchareG];
599 for(
int i=0;i<nchareG;i++){
600 nlines_per_chareG[i] = s.nlines_per_chareG[i];
601 lines_per_chareG[i] = s.lines_per_chareG[i];
602 pts_per_chareG[i] = s.pts_per_chareG[i];
603 npts_per_chareG[i] = s.npts_per_chareG[i];
604 index_output_off[i] = s.index_output_off[i];
606 index_tran_upack = cmall_int_mat(0,nchareG,0,nlines_max,
"cpcharmparainfo.h");
607 for(
int i=0;i<nchareG;i++){
608 for(
int j=0;j<nlines_per_chareG[i];j++){
609 index_tran_upack[i][j] = s.index_tran_upack[i][j];
613 index_tran_upackNL = cmall_int_mat(0,nchareG,0,nlines_max,
"cpcharmparainfo.h");
614 for(
int i=0;i<nchareG;i++){
615 for(
int j=0;j<nlines_per_chareG[i];j++){
616 index_tran_upackNL[i][j] = s.index_tran_upackNL[i][j];
621 for(
int i=0;i<nchareG;i++){RCommPkg[i].Init(&s.RCommPkg[i],i);}
624 ioff_zmat =
new int [nlIters];
625 nmem_zmat =
new int [nlIters];;
626 for(
int i =0;i<nlIters;i++){
627 ioff_zmat[i] = s.ioff_zmat[i];
628 nmem_zmat[i] = s.nmem_zmat[i];
632 index_tran_upack_rho_y = cmall_itens3(0,nchareRhoG,0,rhoRsubplanes,
633 0,nlines_max_rho,
"util.C");
634 index_tran_pack_rho_y = cmall_itens3(0,nchareRhoG,0,rhoRsubplanes,
635 0,nlines_max_rho,
"util.C");
636 nline_send_rho_y = cmall_int_mat(0,nchareRhoG,0,rhoRsubplanes,
"util.C");
637 index_tran_upack_eext_y = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
638 0,nlines_max_eext,
"util.C");
639 index_tran_upack_eext_ys= cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
640 0,nlines_max_eext,
"util.C");
641 index_tran_pack_eext_y = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
642 0,nlines_max_eext,
"util.C");
643 index_tran_pack_eext_ys = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
644 0,nlines_max_eext,
"util.C");
645 nline_send_eext_y = cmall_int_mat(0,nchareRhoGEext,0,rhoRsubplanes,
"util.C");
646 for(
int igrp=0;igrp<nchareRhoG;igrp++){
647 for(
int ic=0;ic<rhoRsubplanes;ic++){
648 nline_send_rho_y[igrp][ic] = s.nline_send_rho_y[igrp][ic];
649 for(
int jc=0;jc<nline_send_rho_y[igrp][ic];jc++){
650 index_tran_upack_rho_y[igrp][ic][jc] = s.index_tran_upack_rho_y[igrp][ic][jc];
651 index_tran_pack_rho_y[igrp][ic][jc] = s.index_tran_pack_rho_y[igrp][ic][jc];
655 for(
int igrp=0;igrp<nchareRhoGEext;igrp++){
656 for(
int ic=0;ic<rhoRsubplanes;ic++){
657 nline_send_eext_y[igrp][ic] = s.nline_send_eext_y[igrp][ic];
658 for(
int jc=0;jc<nline_send_eext_y[igrp][ic];jc++){
659 index_tran_upack_eext_y[igrp][ic][jc]= s.index_tran_upack_eext_y[igrp][ic][jc];
660 index_tran_upack_eext_ys[igrp][ic][jc]= s.index_tran_upack_eext_ys[igrp][ic][jc];
661 index_tran_pack_eext_y[igrp][ic][jc] = s.index_tran_pack_eext_y[igrp][ic][jc];
662 index_tran_pack_eext_ys[igrp][ic][jc] = s.index_tran_pack_eext_ys[igrp][ic][jc];
667 listSubFlag = s.listSubFlag;
668 ngxSubMax = s.ngxSubMax;
669 numSubGx =
new int [rhoRsubplanes];
670 listSubGx = cmall_int_mat(0,rhoRsubplanes,0,ngxSubMax,
"charmparainfo");
671 for(
int ic=0;ic<rhoRsubplanes;ic++){
672 numSubGx[ic] = s.numSubGx[ic];
673 for(
int jc=0;jc<numSubGx[ic];jc++){
674 listSubGx[ic][jc] = s.listSubGx[ic][jc];
688 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
689 CkPrintf(
"[%d] CPcharmParaInfo constructor\n", CkMyPe());
692 lines_per_chareG=NULL;
694 nlines_per_chareG=NULL;
695 npts_per_chareG=NULL;
696 index_output_off=NULL;
698 lines_per_chareRhoG=NULL;
699 pts_per_chareRhoG=NULL;
700 nlines_per_chareRhoG=NULL;
701 nlines_per_chareRhoGEext=NULL;
702 npts_per_chareRhoG=NULL;
708 index_tran_upack_rho_y = NULL;
709 index_tran_pack_rho_y = NULL;
710 nline_send_rho_y = NULL;
711 index_tran_upack_eext_y = NULL;
712 index_tran_upack_eext_ys = NULL;
713 index_tran_pack_eext_y = NULL;
714 index_tran_pack_eext_ys = NULL;
715 nline_send_eext_y = NULL;
726 delete [] lines_per_chareG; lines_per_chareG = NULL;
727 delete [] nlines_per_chareG; nlines_per_chareG = NULL;
728 delete [] pts_per_chareG; pts_per_chareG = NULL;
729 delete [] npts_per_chareG; npts_per_chareG = NULL;
730 delete [] index_output_off; index_output_off = NULL;
732 delete [] lines_per_chareRhoG; lines_per_chareRhoG = NULL;
733 delete [] nlines_per_chareRhoG; nlines_per_chareRhoG = NULL;
734 delete [] nlines_per_chareRhoGEext; nlines_per_chareRhoGEext = NULL;
735 delete [] pts_per_chareRhoG; pts_per_chareRhoG = NULL;
736 delete [] npts_per_chareRhoG; npts_per_chareRhoG = NULL;
737 delete [] RCommPkg; RCommPkg= NULL;
740 delete [] sortedRunDescriptors;
741 delete [] RhosortedRunDescriptors;
742 cfree_int_mat(index_tran_upack,0,nchareG,0,nlines_max);
743 cfree_int_mat(index_tran_upackNL,0,nchareG,0,nlines_max);
744 cfree_int_mat(index_tran_upack_rho,0,nchareRhoG,0,nlines_max_rho);
745 cfree_int_mat(index_tran_upack_eext,0,nchareRhoGEext,0,nlines_max_rho);
748 cfree_itens3(index_tran_upack_rho_y,0,nchareRhoG,0,rhoRsubplanes,0,nlines_max_rho);
749 cfree_itens3(index_tran_pack_rho_y,0,nchareRhoG,0,rhoRsubplanes,0,nlines_max_rho);
750 cfree_itens3(index_tran_upack_eext_y,0,nchareRhoGEext,0,rhoRsubplanes,
752 cfree_itens3(index_tran_upack_eext_ys,0,nchareRhoGEext,0,rhoRsubplanes,
754 cfree_itens3(index_tran_pack_eext_y,0,nchareRhoGEext,0,rhoRsubplanes,
756 cfree_itens3(index_tran_pack_eext_ys,0,nchareRhoGEext,0,rhoRsubplanes,
758 cfree_int_mat(nline_send_rho_y,0,nchareRhoG,0,rhoRsubplanes);
759 cfree_int_mat(nline_send_eext_y,0,nchareRhoGEext,0,rhoRsubplanes);
762 cfree_int_mat(listSubGx,0,rhoRsubplanes,0,ngxSubMax);
769 void pup(PUP::er &p){
771 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
772 CkPrintf(
"[%d] CPcharmParaInfo pup\n", CkMyPe());
774 p|vol; p|dt; p|tol_norb; p|tol_cp_min; p|tol_cp_dyn;
775 p|ntemper; p|pi_beads; p|nkpoint; p|nspin;
776 p|iperd; p|doublepack;
777 p|fftopt; p|kx_max; p|ky_max; p|kz_max; p|cp_norb_rot_kescal;
778 p|ndump_frq; p|istart_typ_cp; p|cp_grad_corr_on;
779 p|cp_opt; p|cp_std; p|cp_wave;
780 p|cp_min_opt; p|cp_min_update; p|cp_min_std; p|cp_force_complex_psi;
781 p|cp_min_cg; p|rhoRsubplanes;
782 p|sizeX; p|sizeY; p|sizeZ;
783 p|ees_eext_on; p|ees_nloc_on;
784 p|ngrid_nloc_a; p|ngrid_nloc_b; p|ngrid_nloc_c;
785 p|ngrid_eext_a; p|ngrid_eext_b; p|ngrid_eext_c;
786 p|nplane_x; p|nchareG; p|natm_tot; p|natm_nl;
787 p|nstates; p|ntime; p|gen_wave; p|ncoef;
788 p|ibinary_opt; p|ibinary_write_opt;
789 p|natm_typ; p|natm_nl; p|numSfGrps; p|nlIters;
790 p|nmem_zmat_tot; p|nmem_zmat_max;
791 p|natm_nl_grp_max; p|nlines_tot; p|npts_tot;
792 p|nlines_max; p|nlines_max_eext;
793 p|nplane_rho_x; p|nchareRhoG; p|nchareRhoGEext;
794 p|nlines_max_rho; p|nlines_tot_rho; p|npts_tot_rho;
798 if(p.isUnpacking()) {
799 lines_per_chareRhoG =
new double[nchareRhoG];
800 pts_per_chareRhoG =
new double[nchareRhoG];
801 nlines_per_chareRhoG =
new int[nchareRhoG];
802 nlines_per_chareRhoGEext =
new int[nchareRhoGEext];
803 npts_per_chareRhoG =
new int[nchareRhoG];
804 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
805 CkPrintf(
"nchareRhoG %d nlines_max_rho %d sizeX %d\n",
806 nchareRhoG, nlines_max_rho, sizeX);
808 index_tran_upack_rho = cmall_int_mat(0,nchareRhoG,0,nlines_max_rho,
809 "cpcharmparainfo.h");
810 index_tran_upack_eext= cmall_int_mat(0,nchareRhoGEext,0,nlines_max_rho,
811 "cpcharmparainfo.h");
812 RhosortedRunDescriptors =
new CkVec<RunDescriptor> [nchareRhoG];
814 index_tran_upack_rho_y = cmall_itens3(0,nchareRhoG,0,rhoRsubplanes,
815 0,nlines_max_rho,
"cpcharmparainfo.h");
816 index_tran_pack_rho_y = cmall_itens3(0,nchareRhoG,0,rhoRsubplanes,
817 0,nlines_max_rho,
"cpcharmparainfo.h");
818 nline_send_rho_y = cmall_int_mat(0,nchareRhoG,0,rhoRsubplanes,
819 "cpcharmparainfo.h");
820 index_tran_upack_eext_y = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
821 0,nlines_max_eext,
"cpcharmparainfo.h");
822 index_tran_upack_eext_ys= cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
823 0,nlines_max_eext,
"cpcharmparainfo.h");
824 index_tran_pack_eext_y = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
825 0,nlines_max_eext,
"cpcharmparainfo.h");
826 index_tran_pack_eext_ys = cmall_itens3(0,nchareRhoGEext,0,rhoRsubplanes,
827 0,nlines_max_eext,
"cpcharmparainfo.h");
828 nline_send_eext_y = cmall_int_mat(0,nchareRhoGEext,0,rhoRsubplanes,
829 "cpcharmparainfo.h");
830 numSubGx =
new int [rhoRsubplanes];
831 listSubGx = cmall_int_mat(0,rhoRsubplanes,0,ngxSubMax,
835 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
836 CkPrintf(
"CPcharmParaInfo pup 2 \n");
838 PUParray(p,lines_per_chareRhoG, nchareRhoG);
839 PUParray(p,nlines_per_chareRhoG, nchareRhoG);
840 PUParray(p,nlines_per_chareRhoGEext, nchareRhoGEext);
841 PUParray(p,pts_per_chareRhoG, nchareRhoG);
842 PUParray(p,npts_per_chareRhoG, nchareRhoG);
844 for(
int igrp=0;igrp<nchareRhoG;igrp++){
845 p|RhosortedRunDescriptors[igrp];
847 for(
int igrp=0;igrp<nchareRhoG;igrp++){
848 PUParray(p,index_tran_upack_rho[igrp],nlines_per_chareRhoG[igrp]);
850 for(
int igrp=0;igrp<nchareRhoGEext;igrp++){
851 PUParray(p,index_tran_upack_eext[igrp],nlines_per_chareRhoGEext[igrp]);
854 PUParray(p,numSubGx,rhoRsubplanes);
855 for(
int igrp=0;igrp<nchareRhoG;igrp++){
856 PUParray(p,nline_send_rho_y[igrp],rhoRsubplanes);
858 for(
int igrp=0;igrp<nchareRhoGEext;igrp++){
859 PUParray(p,nline_send_eext_y[igrp],rhoRsubplanes);
861 for(
int igrp=0;igrp<nchareRhoG;igrp++){
862 for(
int ic=0;ic<rhoRsubplanes;ic++){
863 PUParray(p,index_tran_pack_rho_y[igrp][ic],nline_send_rho_y[igrp][ic]);
864 PUParray(p,index_tran_upack_rho_y[igrp][ic],nline_send_rho_y[igrp][ic]);
867 for(
int igrp=0;igrp<nchareRhoGEext;igrp++){
868 for(
int ic=0;ic<rhoRsubplanes;ic++){
869 PUParray(p,index_tran_pack_eext_y[igrp][ic],nline_send_eext_y[igrp][ic]);
870 PUParray(p,index_tran_pack_eext_ys[igrp][ic],nline_send_eext_y[igrp][ic]);
871 PUParray(p,index_tran_upack_eext_y[igrp][ic],nline_send_eext_y[igrp][ic]);
872 PUParray(p,index_tran_upack_eext_ys[igrp][ic],nline_send_eext_y[igrp][ic]);
875 for(
int ic=0;ic<rhoRsubplanes;ic++){
876 PUParray(p,listSubGx[ic],numSubGx[ic]);
880 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
881 CkPrintf(
"CPcharmParaInfo pup 3 \n");
883 if(p.isUnpacking()) {
884 ioff_zmat =
new int [nlIters];
885 nmem_zmat =
new int [nlIters];;
886 lines_per_chareG =
new double[nchareG];
887 pts_per_chareG =
new double[nchareG];
888 nlines_per_chareG =
new int[nchareG];
889 npts_per_chareG =
new int[nchareG];
890 index_output_off =
new int[nchareG];
891 index_tran_upack = cmall_int_mat(0,nchareG,0,nlines_max,
"cpcharmparainfo.h");
892 index_tran_upackNL= cmall_int_mat(0,nchareG,0,nlines_max,
"cpcharmparainfo.h");
893 sortedRunDescriptors =
new CkVec<RunDescriptor> [nchareG];
895 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
896 CkPrintf(
"CPcharmParaInfo pup 4 \n");
898 p(ioff_zmat,nlIters);
899 p(nmem_zmat,nlIters);
900 p(lines_per_chareG,nchareG);
901 p(nlines_per_chareG,nchareG);
902 p(pts_per_chareG,nchareG);
903 p(npts_per_chareG,nchareG);
904 p(index_output_off,nchareG);
905 for(
int igrp=0;igrp<nchareG;igrp++){
906 p|sortedRunDescriptors[igrp];
908 for(
int igrp=0;igrp<nchareG;igrp++){
909 PUParray(p,index_tran_upack[igrp],nlines_per_chareG[igrp]);
911 for(
int igrp=0;igrp<nchareG;igrp++){
912 PUParray(p,index_tran_upackNL[igrp],nlines_per_chareG[igrp]);
914 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
915 CkPrintf(
"CPcharmParaInfo pup 5 \n");
918 if(sizeX<0|sizeY<0|sizeZ<0|RhosortedRunDescriptors[0].size()<=0){
919 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
921 CkPrintf(
"unpacked RhosortedRunDescriptors[0].size()=%d\n",
922 RhosortedRunDescriptors[0].size());
929 PUParray(p,RCommPkg,nchareG);
930 #ifdef _CP_DEBUG_PARAINFO_VERBOSE_
931 CkPrintf(
"end CPcharmParaInfo pup\n");