@@ -50,8 +50,13 @@ broadcast_plasma_grid (const int n_start, const int n_stop, const int n_cells_ra
5050
5151 d_xsignal (files .root , "%-20s Begin communicating plasma grid\n" , "NOK" );
5252 const int n_cells_max = get_max_cells_per_rank (NPLASMA );
53+ //OLD const int comm_buffer_size = calculate_comm_buffer_size (1 + n_cells_max * (1 + 20 + nphot_total + nions + NXBANDS + 2 * N_PHOT_PROC),
54+ //OLD n_cells_max * (71 + 11 * nions + nlte_levels + 2 * nphot_total + n_inner_tot +
55+ //OLD 11 * NXBANDS + NBINS_IN_CELL_SPEC + 6 * NFLUX_ANGLES +
56+ //OLD N_DMO_DT_DIRECTIONS + 12 * NFORCE_DIRECTIONS));
57+
5358 const int comm_buffer_size = calculate_comm_buffer_size (1 + n_cells_max * (1 + 20 + nphot_total + nions + NXBANDS + 2 * N_PHOT_PROC ),
54- n_cells_max * (71 + 11 * nions + nlte_levels + 2 * nphot_total + n_inner_tot +
59+ n_cells_max * (73 + 11 * nions + nlte_levels + 2 * nphot_total + n_inner_tot +
5560 11 * NXBANDS + NBINS_IN_CELL_SPEC + 6 * NFLUX_ANGLES +
5661 N_DMO_DT_DIRECTIONS + 12 * NFORCE_DIRECTIONS ));
5762 char * comm_buffer = malloc (comm_buffer_size );
@@ -117,6 +122,8 @@ broadcast_plasma_grid (const int n_start, const int n_stop, const int n_cells_ra
117122 MPI_Pack (& cell -> ntot_agn , 1 , MPI_INT , comm_buffer , comm_buffer_size , & position , MPI_COMM_WORLD );
118123 MPI_Pack (& cell -> nscat_es , 1 , MPI_INT , comm_buffer , comm_buffer_size , & position , MPI_COMM_WORLD );
119124 MPI_Pack (& cell -> nscat_res , 1 , MPI_INT , comm_buffer , comm_buffer_size , & position , MPI_COMM_WORLD );
125+ MPI_Pack (& cell -> nscat_bf , 1 , MPI_INT , comm_buffer , comm_buffer_size , & position , MPI_COMM_WORLD );
126+ MPI_Pack (& cell -> nscat_ff , 1 , MPI_INT , comm_buffer , comm_buffer_size , & position , MPI_COMM_WORLD );
120127 MPI_Pack (& cell -> mean_ds , 1 , MPI_DOUBLE , comm_buffer , comm_buffer_size , & position , MPI_COMM_WORLD );
121128 MPI_Pack (& cell -> n_ds , 1 , MPI_INT , comm_buffer , comm_buffer_size , & position , MPI_COMM_WORLD );
122129 MPI_Pack (& cell -> nrad , 1 , MPI_INT , comm_buffer , comm_buffer_size , & position , MPI_COMM_WORLD );
@@ -272,6 +279,8 @@ broadcast_plasma_grid (const int n_start, const int n_stop, const int n_cells_ra
272279 MPI_Unpack (comm_buffer , comm_buffer_size , & position , & cell -> ntot_agn , 1 , MPI_INT , MPI_COMM_WORLD );
273280 MPI_Unpack (comm_buffer , comm_buffer_size , & position , & cell -> nscat_es , 1 , MPI_INT , MPI_COMM_WORLD );
274281 MPI_Unpack (comm_buffer , comm_buffer_size , & position , & cell -> nscat_res , 1 , MPI_INT , MPI_COMM_WORLD );
282+ MPI_Unpack (comm_buffer , comm_buffer_size , & position , & cell -> nscat_bf , 1 , MPI_INT , MPI_COMM_WORLD );
283+ MPI_Unpack (comm_buffer , comm_buffer_size , & position , & cell -> nscat_ff , 1 , MPI_INT , MPI_COMM_WORLD );
275284 MPI_Unpack (comm_buffer , comm_buffer_size , & position , & cell -> mean_ds , 1 , MPI_DOUBLE , MPI_COMM_WORLD );
276285 MPI_Unpack (comm_buffer , comm_buffer_size , & position , & cell -> n_ds , 1 , MPI_INT , MPI_COMM_WORLD );
277286 MPI_Unpack (comm_buffer , comm_buffer_size , & position , & cell -> nrad , 1 , MPI_INT , MPI_COMM_WORLD );
@@ -593,10 +602,12 @@ broadcast_updated_plasma_properties (const int n_start_rank, const int n_stop_ra
593602
594603 d_xsignal (files .root , "%-20s Begin communicating updated plasma properties\n" , "NOK" );
595604 const int n_cells_max = get_max_cells_per_rank (NPLASMA );
596- const int num_ints = 1 + n_cells_max * (20 + nphot_total + 2 * NXBANDS + 2 * N_PHOT_PROC + nions );
605+ //OLD const int num_ints = 1 + n_cells_max * (20 + nphot_total + 2 * NXBANDS + 2 * N_PHOT_PROC + nions);
606+ const int num_ints = 1 + n_cells_max * (22 + nphot_total + 2 * NXBANDS + 2 * N_PHOT_PROC + nions );
597607 const int num_doubles =
598608 n_cells_max * (71 + 1 * 3 + 9 * 4 + 6 * NFLUX_ANGLES + 3 * NFORCE_DIRECTIONS + 9 * nions + 1 * nlte_levels + 3 * nphot_total +
599609 1 * n_inner_tot + 9 * NXBANDS + 1 * NBINS_IN_CELL_SPEC );
610+
600611 const int size_of_comm_buffer = calculate_comm_buffer_size (num_ints , num_doubles );
601612 char * const comm_buffer = malloc (size_of_comm_buffer );
602613 if (comm_buffer == NULL )
@@ -662,6 +673,8 @@ broadcast_updated_plasma_properties (const int n_start_rank, const int n_stop_ra
662673 MPI_Pack (& plasmamain [n_plasma ].ntot_wind , 1 , MPI_INT , comm_buffer , size_of_comm_buffer , & position , MPI_COMM_WORLD );
663674 MPI_Pack (& plasmamain [n_plasma ].ntot_agn , 1 , MPI_INT , comm_buffer , size_of_comm_buffer , & position , MPI_COMM_WORLD );
664675 MPI_Pack (& plasmamain [n_plasma ].nscat_es , 1 , MPI_INT , comm_buffer , size_of_comm_buffer , & position , MPI_COMM_WORLD );
676+ MPI_Pack (& plasmamain [n_plasma ].nscat_bf , 1 , MPI_INT , comm_buffer , size_of_comm_buffer , & position , MPI_COMM_WORLD );
677+ MPI_Pack (& plasmamain [n_plasma ].nscat_ff , 1 , MPI_INT , comm_buffer , size_of_comm_buffer , & position , MPI_COMM_WORLD );
665678 MPI_Pack (& plasmamain [n_plasma ].mean_ds , 1 , MPI_DOUBLE , comm_buffer , size_of_comm_buffer , & position , MPI_COMM_WORLD );
666679 MPI_Pack (& plasmamain [n_plasma ].n_ds , 1 , MPI_INT , comm_buffer , size_of_comm_buffer , & position , MPI_COMM_WORLD );
667680 MPI_Pack (& plasmamain [n_plasma ].nrad , 1 , MPI_INT , comm_buffer , size_of_comm_buffer , & position , MPI_COMM_WORLD );
@@ -830,6 +843,8 @@ broadcast_updated_plasma_properties (const int n_start_rank, const int n_stop_ra
830843 MPI_Unpack (comm_buffer , size_of_comm_buffer , & position , & plasmamain [n_plasma ].ntot_wind , 1 , MPI_INT , MPI_COMM_WORLD );
831844 MPI_Unpack (comm_buffer , size_of_comm_buffer , & position , & plasmamain [n_plasma ].ntot_agn , 1 , MPI_INT , MPI_COMM_WORLD );
832845 MPI_Unpack (comm_buffer , size_of_comm_buffer , & position , & plasmamain [n_plasma ].nscat_es , 1 , MPI_INT , MPI_COMM_WORLD );
846+ MPI_Unpack (comm_buffer , size_of_comm_buffer , & position , & plasmamain [n_plasma ].nscat_bf , 1 , MPI_INT , MPI_COMM_WORLD );
847+ MPI_Unpack (comm_buffer , size_of_comm_buffer , & position , & plasmamain [n_plasma ].nscat_ff , 1 , MPI_INT , MPI_COMM_WORLD );
833848 MPI_Unpack (comm_buffer , size_of_comm_buffer , & position , & plasmamain [n_plasma ].mean_ds , 1 , MPI_DOUBLE , MPI_COMM_WORLD );
834849 MPI_Unpack (comm_buffer , size_of_comm_buffer , & position , & plasmamain [n_plasma ].n_ds , 1 , MPI_INT , MPI_COMM_WORLD );
835850 MPI_Unpack (comm_buffer , size_of_comm_buffer , & position , & plasmamain [n_plasma ].nrad , 1 , MPI_INT , MPI_COMM_WORLD );
0 commit comments