Defines MPI Datatypes for message passing. Six custom datatypes are defined and created:
56 MPI_Datatype mpi_types_el[6];
57 MPI_Datatype mpi_types_vec[4];
58 MPI_Datatype mpi_types_run[21];
59 MPI_Datatype mpi_types_geom[21];
60 MPI_Datatype mpi_types_sol[41];
61 MPI_Datatype mpi_types_ap[3];
62 MPI_Datatype mpi_types_dp[5];
64 int mpi_blocklen_el[6];
65 int mpi_blocklen_vec[4];
66 int mpi_blocklen_run[21];
67 int mpi_blocklen_geom[21];
68 int mpi_blocklen_sol[41];
69 int mpi_blocklen_ap[3];
70 int mpi_blocklen_dp[5];
72 MPI_Aint mpi_disp_el[6];
73 MPI_Aint mpi_disp_vec[4];
74 MPI_Aint mpi_disp_run[21];
75 MPI_Aint mpi_disp_geom[21];
76 MPI_Aint mpi_disp_sol[41];
77 MPI_Aint mpi_disp_ap[3];
78 MPI_Aint mpi_disp_dp[5];
96 mpi_blocklen_vec[0] = 1;
98 mpi_disp_vec[1] = (MPI_Aint) & v.y - (MPI_Aint) & v; mpi_types_vec[1] =
MPI_ACOUSTO_DOUBLE; mpi_blocklen_vec[2] = 1;
99 mpi_disp_vec[2] = (MPI_Aint) & v.z - (MPI_Aint) & v; mpi_types_vec[2] =
MPI_ACOUSTO_DOUBLE; mpi_blocklen_vec[3] = 1;
100 mpi_disp_vec[3] =
sizeof(v); mpi_types_vec[3] = MPI_UB;
101 MPI_Type_create_struct(4, mpi_blocklen_vec, mpi_disp_vec, mpi_types_vec, &
mpi_vector_type);
105 mpi_blocklen_el[0] = 4; mpi_disp_el[0] = 0; mpi_types_el[0] =
mpi_vector_type;
106 mpi_blocklen_el[1] = 1; mpi_disp_el[1] = (MPI_Aint) & element.n - (MPI_Aint) & element; mpi_types_el[1] =
mpi_vector_type;
107 mpi_blocklen_el[2] = 1; mpi_disp_el[2] = (MPI_Aint) & element.centre - (MPI_Aint) & element; mpi_types_el[2] =
mpi_vector_type;
108 mpi_blocklen_el[3] = 4; mpi_disp_el[3] = (MPI_Aint) & element.idx - (MPI_Aint) & element; mpi_types_el[3] = MPI_INT;
109 mpi_blocklen_el[4] = 1; mpi_disp_el[4] = (MPI_Aint) & element.nmod - (MPI_Aint) & element; mpi_types_el[4] =
MPI_ACOUSTO_DOUBLE;
110 mpi_blocklen_el[5] = 1; mpi_disp_el[5] =
sizeof(element); mpi_types_el[5] = MPI_UB;
111 MPI_Type_create_struct(6, mpi_blocklen_el, mpi_disp_el, mpi_types_el, &
mpi_element_type);
115 mpi_blocklen_run[0] = 1; mpi_disp_run[0] = 0; mpi_types_run[0] = MPI_INT;
116 mpi_blocklen_run[1] = 1; mpi_disp_run[1] = (MPI_Aint) & rinfo.ksymmi - (MPI_Aint) & rinfo; mpi_types_run[1] = MPI_INT;
117 mpi_blocklen_run[2] = 1; mpi_disp_run[2] = (MPI_Aint) & rinfo.ksymm - (MPI_Aint) & rinfo; mpi_types_run[2] = MPI_INT;
118 mpi_blocklen_run[3] = 1; mpi_disp_run[3] = (MPI_Aint) & rinfo.ksymmz - (MPI_Aint) & rinfo; mpi_types_run[3] = MPI_INT;
119 mpi_blocklen_run[4] = 1; mpi_disp_run[4] = (MPI_Aint) & rinfo.korder - (MPI_Aint) & rinfo; mpi_types_run[4] = MPI_INT;
120 mpi_blocklen_run[5] = 1; mpi_disp_run[5] = (MPI_Aint) & rinfo.knlin - (MPI_Aint) & rinfo; mpi_types_run[5] = MPI_INT;
121 mpi_blocklen_run[6] = 1; mpi_disp_run[6] = (MPI_Aint) & rinfo.nsymm - (MPI_Aint) & rinfo; mpi_types_run[6] = MPI_INT;
122 mpi_blocklen_run[7] = 1; mpi_disp_run[7] = (MPI_Aint) & rinfo.nsymmy - (MPI_Aint) & rinfo; mpi_types_run[7] = MPI_INT;
123 mpi_blocklen_run[8] = 1; mpi_disp_run[8] = (MPI_Aint) & rinfo.nsymmz - (MPI_Aint) & rinfo; mpi_types_run[8] = MPI_INT;
124 mpi_blocklen_run[9] = 1; mpi_disp_run[9] = (MPI_Aint) & rinfo.ndim - (MPI_Aint) & rinfo; mpi_types_run[9] = MPI_INT;
125 mpi_blocklen_run[10] = 1; mpi_disp_run[10] = (MPI_Aint) & rinfo.vsound - (MPI_Aint) & rinfo; mpi_types_run[10] =
MPI_ACOUSTO_DOUBLE;
126 mpi_blocklen_run[11] = 1; mpi_disp_run[11] = (MPI_Aint) & rinfo.krow - (MPI_Aint) & rinfo; mpi_types_run[11] = MPI_INT;
127 mpi_blocklen_run[12] = 1; mpi_disp_run[12] = (MPI_Aint) & rinfo.ctxt - (MPI_Aint) & rinfo; mpi_types_run[12] = MPI_INT;
128 mpi_blocklen_run[13] = 1; mpi_disp_run[13] = (MPI_Aint) & rinfo.nprows - (MPI_Aint) & rinfo; mpi_types_run[13] = MPI_INT;
129 mpi_blocklen_run[14] = 1; mpi_disp_run[14] = (MPI_Aint) & rinfo.npcols - (MPI_Aint) & rinfo; mpi_types_run[14] = MPI_INT;
130 mpi_blocklen_run[15] = 1; mpi_disp_run[15] = (MPI_Aint) & rinfo.myrow - (MPI_Aint) & rinfo; mpi_types_run[15] = MPI_INT;
131 mpi_blocklen_run[16] = 1; mpi_disp_run[16] = (MPI_Aint) & rinfo.mycol - (MPI_Aint) & rinfo; mpi_types_run[16] = MPI_INT;
132 mpi_blocklen_run[17] = 1; mpi_disp_run[17] = (MPI_Aint) & rinfo.row_block_size - (MPI_Aint) & rinfo; mpi_types_run[17] = MPI_INT;
133 mpi_blocklen_run[18] = 1; mpi_disp_run[18] = (MPI_Aint) & rinfo.col_block_size - (MPI_Aint) & rinfo; mpi_types_run[18] = MPI_INT;
134 mpi_blocklen_run[19] = 1; mpi_disp_run[19] = (MPI_Aint) & rinfo.mics_block_size - (MPI_Aint) & rinfo; mpi_types_run[19] = MPI_INT;
135 mpi_blocklen_run[20] = 1; mpi_disp_run[20] =
sizeof(rinfo) ; mpi_types_run[20] = MPI_UB;
136 MPI_Type_create_struct(21, mpi_blocklen_run, mpi_disp_run, mpi_types_run, &
mpi_runinfo_type);
140 mpi_blocklen_geom[0] = 1; mpi_disp_geom[0] = 0; mpi_types_geom[0] = MPI_INT;
141 mpi_blocklen_geom[1] = 1; mpi_disp_geom[1] = (MPI_Aint) & geominfo.outbody - (MPI_Aint) & geominfo; mpi_types_geom[1] = MPI_INT;
142 mpi_blocklen_geom[2] = 1; mpi_disp_geom[2] = (MPI_Aint) & geominfo.outcntr - (MPI_Aint) & geominfo; mpi_types_geom[2] = MPI_INT;
143 mpi_blocklen_geom[3] = 1; mpi_disp_geom[3] = (MPI_Aint) & geominfo.outnormal - (MPI_Aint) & geominfo; mpi_types_geom[3] = MPI_INT;
144 mpi_blocklen_geom[4] = 1; mpi_disp_geom[4] = (MPI_Aint) & geominfo.outmics - (MPI_Aint) & geominfo; mpi_types_geom[4] = MPI_INT;
145 mpi_blocklen_geom[5] = 1; mpi_disp_geom[5] = (MPI_Aint) & geominfo.kdupl - (MPI_Aint) & geominfo; mpi_types_geom[5] = MPI_INT;
146 mpi_blocklen_geom[6] = 1; mpi_disp_geom[6] = (MPI_Aint) & geominfo.kduplz - (MPI_Aint) & geominfo; mpi_types_geom[6] = MPI_INT;
147 mpi_blocklen_geom[7] = 1; mpi_disp_geom[7] = (MPI_Aint) & geominfo.ndupl - (MPI_Aint) & geominfo; mpi_types_geom[7] = MPI_INT;
148 mpi_blocklen_geom[8] = 1; mpi_disp_geom[8] = (MPI_Aint) & geominfo.nduply - (MPI_Aint) & geominfo; mpi_types_geom[8] = MPI_INT;
149 mpi_blocklen_geom[9] = 1; mpi_disp_geom[9] = (MPI_Aint) & geominfo.nduplz - (MPI_Aint) & geominfo; mpi_types_geom[9] = MPI_INT;
150 mpi_blocklen_geom[10] = 1; mpi_disp_geom[10] = (MPI_Aint) & geominfo.nnodb - (MPI_Aint) & geominfo; mpi_types_geom[10] = MPI_INT;
151 mpi_blocklen_geom[11] = 1; mpi_disp_geom[11] = (MPI_Aint) & geominfo.nelmb - (MPI_Aint) & geominfo; mpi_types_geom[11] = MPI_INT;
152 mpi_blocklen_geom[12] = 1; mpi_disp_geom[12] = (MPI_Aint) & geominfo.nvelb - (MPI_Aint) & geominfo; mpi_types_geom[12] = MPI_INT;
153 mpi_blocklen_geom[13] = 1; mpi_disp_geom[13] = (MPI_Aint) & geominfo.ncntr - (MPI_Aint) & geominfo; mpi_types_geom[13] = MPI_INT;
154 mpi_blocklen_geom[14] = 1; mpi_disp_geom[14] = (MPI_Aint) & geominfo.nchief - (MPI_Aint) & geominfo; mpi_types_geom[14] = MPI_INT;
155 mpi_blocklen_geom[15] = 1; mpi_disp_geom[15] = (MPI_Aint) & geominfo.nmics - (MPI_Aint) & geominfo; mpi_types_geom[15] = MPI_INT;
156 mpi_blocklen_geom[16] = 1; mpi_disp_geom[16] = (MPI_Aint) & geominfo.nemics - (MPI_Aint) & geominfo; mpi_types_geom[16] = MPI_INT;
157 mpi_blocklen_geom[17] = 1; mpi_disp_geom[17] = (MPI_Aint) & geominfo.translation - (MPI_Aint) & geominfo; mpi_types_geom[17] =
mpi_vector_type;
158 mpi_blocklen_geom[18] = 1; mpi_disp_geom[18] = (MPI_Aint) & geominfo.rotation - (MPI_Aint) & geominfo; mpi_types_geom[18] =
mpi_vector_type;
159 mpi_blocklen_geom[19] = 1; mpi_disp_geom[19] = (MPI_Aint) & geominfo.scale - (MPI_Aint) & geominfo; mpi_types_geom[19] =
mpi_vector_type;
160 mpi_blocklen_geom[20] = 1; mpi_disp_geom[20] =
sizeof(geominfo); mpi_types_geom[20] = MPI_UB;
161 MPI_Type_create_struct(21, mpi_blocklen_geom, mpi_disp_geom, mpi_types_geom, &
mpi_geominfo_type);
165 mpi_blocklen_sol[0] = 1; mpi_disp_sol[0] = 0; mpi_types_sol[0] = MPI_INT;
166 mpi_blocklen_sol[1] = 1; mpi_disp_sol[1] = (int) &solinfo.outymat - (
int) &solinfo; mpi_types_sol[1] = MPI_INT;
167 mpi_blocklen_sol[2] = 1; mpi_disp_sol[2] = (int) &solinfo.outrhs - (
int) &solinfo; mpi_types_sol[2] = MPI_INT;
168 mpi_blocklen_sol[3] = 1; mpi_disp_sol[3] = (int) &solinfo.outpsiu - (
int) &solinfo; mpi_types_sol[3] = MPI_INT;
169 mpi_blocklen_sol[4] = 1; mpi_disp_sol[4] = (int) &solinfo.outphiu - (
int) &solinfo; mpi_types_sol[4] = MPI_INT;
170 mpi_blocklen_sol[5] = 1; mpi_disp_sol[5] = (int) &solinfo.knw - (
int) &solinfo; mpi_types_sol[5] = MPI_INT;
171 mpi_blocklen_sol[6] = 1; mpi_disp_sol[6] = (int) &solinfo.nsourc - (
int) &solinfo; mpi_types_sol[6] = MPI_INT;
172 mpi_blocklen_sol[7] = 1; mpi_disp_sol[7] = (int) &solinfo.nimped - (
int) &solinfo; mpi_types_sol[7] = MPI_INT;
173 mpi_blocklen_sol[8] = 1; mpi_disp_sol[8] = (int) &solinfo.nradian - (
int) &solinfo; mpi_types_sol[8] = MPI_INT;
174 mpi_blocklen_sol[9] = 1; mpi_disp_sol[9] = (int) &solinfo.nplanw - (
int) &solinfo; mpi_types_sol[9] = MPI_INT;
175 mpi_blocklen_sol[10] = 1; mpi_disp_sol[10] = (int) &solinfo.nsig - (
int) &solinfo; mpi_types_sol[10] = MPI_INT;
176 mpi_blocklen_sol[11] = 1; mpi_disp_sol[11] = (int) &solinfo.nome - (
int) &solinfo; mpi_types_sol[11] = MPI_INT;
177 mpi_blocklen_sol[12] = 1; mpi_disp_sol[12] = (int) &solinfo.icnmon - (
int) &solinfo; mpi_types_sol[12] = MPI_INT;
178 mpi_blocklen_sol[13] = 1; mpi_disp_sol[13] = (int) &solinfo.iommon - (
int) &solinfo; mpi_types_sol[13] = MPI_INT;
179 mpi_blocklen_sol[14] = 1; mpi_disp_sol[14] = (int) &solinfo.imimon - (
int) &solinfo; mpi_types_sol[14] = MPI_INT;
180 mpi_blocklen_sol[15] = 1; mpi_disp_sol[15] = (int) &solinfo.maxome - (
int) &solinfo; mpi_types_sol[15] =
MPI_ACOUSTO_DOUBLE;
181 mpi_blocklen_sol[16] = 1; mpi_disp_sol[16] = (int) &solinfo.minome - (
int) &solinfo; mpi_types_sol[16] =
MPI_ACOUSTO_DOUBLE;
182 mpi_blocklen_sol[17] = 1; mpi_disp_sol[17] = (int) &solinfo.rho - (
int) &solinfo; mpi_types_sol[17] =
MPI_ACOUSTO_DOUBLE;
183 mpi_blocklen_sol[18] = 1; mpi_disp_sol[18] = (int) &solinfo.maxsig - (
int) &solinfo; mpi_types_sol[18] =
MPI_ACOUSTO_DOUBLE;
184 mpi_blocklen_sol[19] = 1; mpi_disp_sol[19] = (int) &solinfo.minsig - (
int) &solinfo; mpi_types_sol[19] =
MPI_ACOUSTO_DOUBLE;
185 mpi_blocklen_sol[20] = 1; mpi_disp_sol[20] = (int) &solinfo.printvtk - (
int) &solinfo; mpi_types_sol[20] = MPI_INT;
186 mpi_blocklen_sol[21] = 1; mpi_disp_sol[21] = (int) &solinfo.printmsh - (
int) &solinfo; mpi_types_sol[21] = MPI_INT;
187 mpi_blocklen_sol[22] = 1; mpi_disp_sol[22] = (int) &solinfo.printfresp - (
int) &solinfo; mpi_types_sol[22] = MPI_INT;
188 mpi_blocklen_sol[23] = 1; mpi_disp_sol[23] = (int) &solinfo.printwrl - (
int) &solinfo; mpi_types_sol[23] = MPI_INT;
189 mpi_blocklen_sol[24] = 1; mpi_disp_sol[24] = (int) &solinfo.printout - (
int) &solinfo; mpi_types_sol[24] = MPI_INT;
190 mpi_blocklen_sol[25] = 1; mpi_disp_sol[25] = (int) &solinfo.radiantbody - (
int) &solinfo; mpi_types_sol[25] = MPI_INT;
191 mpi_blocklen_sol[26] = 1; mpi_disp_sol[26] = (int) &solinfo.impedentbody - (
int) &solinfo; mpi_types_sol[26] = MPI_INT;
192 mpi_blocklen_sol[27] = 1; mpi_disp_sol[27] = (int) &solinfo.radiantfield - (
int) &solinfo; mpi_types_sol[27] =
MPI_ACOUSTO_COMPLEX;
193 mpi_blocklen_sol[28] = 1; mpi_disp_sol[28] = (int) &solinfo.impedance - (
int) &solinfo; mpi_types_sol[28] =
MPI_ACOUSTO_COMPLEX;
194 mpi_blocklen_sol[29] = 1; mpi_disp_sol[29] = (int) &solinfo.n_freqresp_cnt - (
int) &solinfo; mpi_types_sol[29] = MPI_INT;
195 mpi_blocklen_sol[30] = 1; mpi_disp_sol[30] = (int) &solinfo.n_freqresp_mic - (
int) &solinfo; mpi_types_sol[30] = MPI_INT;
196 mpi_blocklen_sol[31] = 1; mpi_disp_sol[31] = (int) &solinfo.ndipoles - (
int) &solinfo; mpi_types_sol[31] = MPI_INT;
197 mpi_blocklen_sol[32] = 1; mpi_disp_sol[32] = (int) &solinfo.solver - (
int) &solinfo; mpi_types_sol[32] = MPI_INT;
198 mpi_blocklen_sol[33] = 1; mpi_disp_sol[33] = (int) &solinfo.tolerance - (
int) &solinfo; mpi_types_sol[33] =
MPI_ACOUSTO_DOUBLE;
199 mpi_blocklen_sol[34] = 1; mpi_disp_sol[34] = (int) &solinfo.maxiterations - (
int) &solinfo; mpi_types_sol[34] = MPI_LONG;
200 mpi_blocklen_sol[35] = 1; mpi_disp_sol[35] = (int) &solinfo.restart - (
int) &solinfo; mpi_types_sol[35] = MPI_LONG;
201 mpi_blocklen_sol[36] = 1; mpi_disp_sol[36] = (int) &solinfo.pre_calculate_coefs - (
int) &solinfo; mpi_types_sol[36] = MPI_INT;
202 mpi_blocklen_sol[37] = 1; mpi_disp_sol[37] = (int) &solinfo.custombc - (
int) &solinfo; mpi_types_sol[37] = MPI_INT;
203 mpi_blocklen_sol[38] = 1; mpi_disp_sol[37] = (int) &solinfo.dirneu - (
int) &solinfo; mpi_types_sol[38] = MPI_INT;
204 mpi_blocklen_sol[39] = 1; mpi_disp_sol[38] = (int) &solinfo.onlyrep - (
int) &solinfo; mpi_types_sol[39] = MPI_INT;
205 mpi_blocklen_sol[40] = 1; mpi_disp_sol[39] =
sizeof(solinfo); mpi_types_sol[40] = MPI_UB;
206 MPI_Type_create_struct(41, mpi_blocklen_sol, mpi_disp_sol, mpi_types_sol, &
mpi_solinfo_type);
210 mpi_blocklen_ap[0] = 1; mpi_disp_ap[0] = 0; mpi_types_ap[0] =
mpi_vector_type;
211 mpi_blocklen_ap[1] = 1; mpi_disp_ap[1] = (int) &ap.amplitude - (
int) ≈ mpi_types_ap[1] =
MPI_ACOUSTO_COMPLEX;
212 mpi_blocklen_ap[2] = 1; mpi_disp_ap[2] =
sizeof(ap); mpi_types_ap[2] = MPI_UB;
217 mpi_blocklen_dp[0] = 1; mpi_disp_dp[0] = 0; mpi_types_dp[0] =
mpi_vector_type;
218 mpi_blocklen_dp[1] = 1; mpi_disp_dp[1] = (int) &dp.dir - (
int) &dp; mpi_types_dp[1] =
mpi_vector_type;
219 mpi_blocklen_dp[2] = 1; mpi_disp_dp[2] = (int) &dp.amplitude - (
int) &dp; mpi_types_dp[2] =
MPI_ACOUSTO_COMPLEX;
220 mpi_blocklen_dp[3] = 1; mpi_disp_dp[3] = (int) &dp.d - (
int) &dp; mpi_types_dp[3] =
MPI_ACOUSTO_DOUBLE;
221 mpi_blocklen_dp[4] = 1; mpi_disp_dp[4] =
sizeof(dp); mpi_types_dp[4] = MPI_UB;
222 MPI_Type_create_struct(5, mpi_blocklen_dp, mpi_disp_dp, mpi_types_dp, &
mpi_dipole_type);
MPI_Datatype mpi_solinfo_type
Definition: globals.h:118
MPI_Datatype mpi_complex
Definition: globals.h:93
Parameters and variables for the solution Module.
Definition: structs.h:436
#define MPI_ACOUSTO_COMPLEX
Definition: types.h:56
MPI_Datatype mpi_geominfo_type
Definition: globals.h:114
vector struct to hold triplets.
Definition: structs.h:29
Definition: structs.h:540
MPI_Op mpi_op_complex_sum
Definition: globals.h:124
#define MPI_ACOUSTO_DOUBLE
Definition: types.h:52
Definition of a quadrilateral panel.
Definition: structs.h:44
MPI_Datatype mpi_runinfo_type
Definition: globals.h:110
MPI_Datatype mpi_dipole_type
Definition: globals.h:129
MPI_Datatype mpi_vector_type
Definition: globals.h:97
MPI_Datatype mpi_element_type
Definition: globals.h:101
Structure containing information about the run.
Definition: structs.h:86
MPI_Datatype mpi_acoustic_point_type
Definition: globals.h:105
void mpi_cplx_sum(COMPLEX *in, COMPLEX *inout, int *len, MPI_Datatype *dptr)
Definition: mpiutils.c:28
Defines an acoustic point as its position and its amplitude.
Definition: structs.h:533
General information on geometry evaluation module.
Definition: structs.h:279