YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
read_mpiom_grid.c
Go to the documentation of this file.
1// Copyright (c) 2024 The YAC Authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifdef HAVE_CONFIG_H
6#include "config.h"
7#endif
8
9#include <stdlib.h>
10#include <stdio.h>
11#include <stdint.h>
12
13#ifdef YAC_NETCDF_ENABLED
14#include <netcdf.h>
15#endif
16
17#include "read_mpiom_grid.h"
18#include "geometry.h"
19#include "utils_common.h"
20#include "io_utils.h"
21
22static void get_mpiom_vertices(int ncid,
23 double **vertex_lon, // longitude of vertex coordinates
24 double **vertex_lat, // latitude of vertex coordinates
25 size_t *nbr_vertices);
26
27static void get_mpiom_cell_center(int ncid,
28 double **cell_lon, // longitude of cell coordinates
29 double **cell_lat, // latitude of cell coordinates
30 size_t *nbr_cells);
31
32static void get_mpiom_cell_mask(int ncid,
33 int **cell_mask, // data for mask
34 size_t *nbr_cells );
35
36static void remove_duplicated_coords(double * temp_coords_lon,
37 double * temp_coords_lat,
38 int * temp_coords_mask,
39 size_t * temp_nbr_coords,
40 int * old_to_new_id);
41
42void yac_read_mpiom_grid_information(const char * filename, int * nbr_vertices,
43 int * nbr_cells, int ** num_vertices_per_cell,
44 int ** cell_to_vertex, double ** x_vertices,
45 double ** y_vertices, double ** x_cells,
46 double ** y_cells, int ** cell_mask) {
47
48#ifndef YAC_NETCDF_ENABLED
49
50 UNUSED(filename);
51 UNUSED(nbr_vertices);
52 UNUSED(nbr_cells);
53 UNUSED(num_vertices_per_cell);
54 UNUSED(cell_to_vertex);
55 UNUSED(x_vertices);
56 UNUSED(y_vertices);
57 UNUSED(x_cells);
58 UNUSED(y_cells);
59 UNUSED(cell_mask);
60 die(
61 "ERROR(yac_read_mpiom_grid_information): "
62 "YAC is built without the NetCDF support");
63#else
64
65 int ncid;
66
67 /* Open file */
68
69 yac_nc_open(filename, NC_NOWRITE, &ncid);
70
71 /* Get vertex longitudes and latitudes of cells and
72 relations between vertices and cells*/
73
74 {
75 double * temp_vertex_lon;
76 double * temp_vertex_lat;
77 size_t temp_nbr_vertices;
78
80 ncid, &temp_vertex_lon, &temp_vertex_lat, &temp_nbr_vertices);
81
82 *nbr_cells = (int)(temp_nbr_vertices / 4);
83
84 int * old_to_new_id = xmalloc(temp_nbr_vertices * sizeof(*old_to_new_id));
85
87 temp_vertex_lon, temp_vertex_lat, NULL,
88 &temp_nbr_vertices, old_to_new_id);
89
90 *nbr_vertices = temp_nbr_vertices;
91
92 *x_vertices =
93 xrealloc(temp_vertex_lon, temp_nbr_vertices * sizeof(*temp_vertex_lon));
94 *y_vertices =
95 xrealloc(temp_vertex_lat, temp_nbr_vertices * sizeof(*temp_vertex_lat));
96
97 for (size_t i = 0; i < temp_nbr_vertices; ++i) {
98 (*x_vertices)[i] *= YAC_RAD;
99 (*y_vertices)[i] *= YAC_RAD;
100 }
101
102 *num_vertices_per_cell = xmalloc(*nbr_cells * sizeof(**num_vertices_per_cell));
103 for (int i = 0; i < *nbr_cells; ++i) (*num_vertices_per_cell)[i] = 4;
104
105 *cell_to_vertex = xmalloc(*nbr_cells * 4 * sizeof(**cell_to_vertex));
106
107 // Unfortunately the data is only available in Fortran order
108 for (int i = 0; i < *nbr_cells; ++i)
109 for (int j = 0; j < 4; ++j)
110 (*cell_to_vertex)[4*i+j] = old_to_new_id[4*i+j];
111 free(old_to_new_id);
112 }
113
114 {
115 /* Get longitudes and latitudes of cell center points */
116
117 double * temp_cell_lon;
118 double * temp_cell_lat;
119 int * temp_cell_mask;
120
121 size_t temp_nbr_cells;
122 size_t temp_nbr_masks;
123
125 ncid, &temp_cell_lon, &temp_cell_lat, &temp_nbr_cells);
126
127 get_mpiom_cell_mask(ncid, &temp_cell_mask, &temp_nbr_masks);
128
130 temp_nbr_cells == temp_nbr_masks,
131 "ERROR(yac_read_mpiom_grid_information): "
132 "missmatch between cell count and mask value count")
133
134 int * old_to_new_id = xmalloc(temp_nbr_cells * sizeof(*old_to_new_id));
135
137 temp_cell_lon, temp_cell_lat, temp_cell_mask,
138 &temp_nbr_cells, old_to_new_id);
139
140 *nbr_cells = temp_nbr_cells;
141
142 *x_cells = xrealloc(temp_cell_lon, temp_nbr_cells * sizeof(**x_cells));
143 *y_cells = xrealloc(temp_cell_lat, temp_nbr_cells * sizeof(**y_cells));
144
145 for (size_t i = 0; i < temp_nbr_cells; ++i) {
146 (*x_cells)[i] *= YAC_RAD;
147 (*y_cells)[i] *= YAC_RAD;
148 }
149
150 *cell_mask = xrealloc(temp_cell_mask,temp_nbr_cells * sizeof(int));
151 for (size_t i = 0; i < temp_nbr_cells; ++i)
152 (*cell_mask)[i] = !(*cell_mask)[i];
153
154 free(old_to_new_id);
155 }
156 YAC_HANDLE_ERROR(nc_close(ncid));
157#endif
158}
159
161 const char * filename, int * num_vertices, int * num_cells,
162 int ** num_vertices_per_cell, int ** cell_to_vertex, double ** x_vertices,
163 double ** y_vertices, double ** x_cells,
164 double ** y_cells, int ** global_cell_id,
165 int ** cell_mask, int ** cell_core_mask,
166 int ** global_corner_id, int ** corner_core_mask, int rank, int size) {
167
168 // read the global grid
169 yac_read_mpiom_grid_information(filename, num_vertices, num_cells,
170 num_vertices_per_cell, cell_to_vertex,
171 x_vertices, y_vertices, x_cells, y_cells, cell_mask);
172
173 // determine local rank
174 int num_cells_per_process = (*num_cells + size - 1)/size;
175 int local_start = rank * num_cells_per_process;
176 int num_local_cells = MIN(num_cells_per_process,
177 *num_cells - local_start);
178
179 // mask for required vertices and cells
180 int * required_vertices = xcalloc(*num_vertices, sizeof(*required_vertices));
181 int * required_cells = xcalloc(*num_cells, sizeof(*required_cells));
182
183 int offset = 0;
184 for (int i = 0; i < local_start; ++i)
185 offset += (*num_vertices_per_cell)[i];
186
187 // mark all local cells and their vertices as required
188 for (int i = local_start; i < local_start + num_local_cells; ++i) {
189
190 required_cells[i] = 2;
191 for (int j = 0; j < (*num_vertices_per_cell)[i]; ++j)
192 required_vertices[(*cell_to_vertex)[offset+j]] = 2;
193
194 offset += (*num_vertices_per_cell)[i];
195 }
196
197 // mark all halo cells as required
198 offset = 0;
199 for (int i = 0; i < *num_cells; ++i) {
200
201 if (!required_cells[i]) {
202
203 for (int j = 0; j < (*num_vertices_per_cell)[i]; ++j) {
204
205 if (required_vertices[(*cell_to_vertex)[offset+j]]) {
206
207 required_cells[i] = 1;
208 break;
209 }
210 }
211 }
212 offset += (*num_vertices_per_cell)[i];
213 }
214
215 // mark all halo vertices as required
216 offset = 0;
217 for (int i = 0; i < *num_cells; ++i) {
218
219 if (required_cells[i] == 1) {
220
221 for (int j = 0; j < (*num_vertices_per_cell)[i]; ++j) {
222
223 if (!required_vertices[(*cell_to_vertex)[offset+j]]) {
224
225 required_vertices[(*cell_to_vertex)[offset+j]] = 1;
226 }
227 }
228 }
229
230 offset += (*num_vertices_per_cell)[i];
231 }
232
233 // count the number of cells and vertices
234 int part_num_vertices = 0;
235 int part_num_cells = 0;
236 for (int i = 0; i < *num_vertices; ++i)
237 if (required_vertices[i])
238 part_num_vertices++;
239 for (int i = 0; i < *num_cells; ++i)
240 if(required_cells[i])
241 part_num_cells++;
242
243 *global_cell_id = xmalloc(part_num_cells * sizeof(**global_cell_id));
244 *cell_core_mask = xmalloc(part_num_cells * sizeof(**cell_core_mask));
245 *global_corner_id = xmalloc(part_num_vertices * sizeof(**global_corner_id));
246 *corner_core_mask = xmalloc(part_num_vertices * sizeof(**corner_core_mask));
247
248 // generate final vertex data
249 part_num_vertices = 0;
250 int * global_to_local_vertex = xmalloc(*num_vertices * sizeof(*global_to_local_vertex));
251 for (int i = 0; i < *num_vertices; ++i) {
252
253 if (required_vertices[i]) {
254
255 (*global_corner_id)[part_num_vertices] = i;
256 (*corner_core_mask)[part_num_vertices] = required_vertices[i] == 2;
257 (*x_vertices)[part_num_vertices] = (*x_vertices)[i];
258 (*y_vertices)[part_num_vertices] = (*y_vertices)[i];
259 global_to_local_vertex[i] = part_num_vertices;
260 part_num_vertices++;
261 }
262 }
263
264 *x_vertices = xrealloc(*x_vertices, part_num_vertices * sizeof(**x_vertices));
265 *y_vertices = xrealloc(*y_vertices, part_num_vertices * sizeof(**y_vertices));
266 *num_vertices = part_num_vertices;
267 free(required_vertices);
268
269 // generate final cell data
270 int num_cell_vertex_dependencies = 0;
271 part_num_cells = 0;
272 offset = 0;
273 for (int i = 0; i < *num_cells; ++i) {
274
275 if (required_cells[i]) {
276
277 (*global_cell_id)[part_num_cells] = i;
278 (*cell_core_mask)[part_num_cells] = required_cells[i] == 2;
279 (*x_cells)[part_num_cells] = (*x_cells)[i];
280 (*y_cells)[part_num_cells] = (*y_cells)[i];
281 (*cell_mask)[part_num_cells] = (*cell_mask)[i];
282
283 for (int j = 0; j < (*num_vertices_per_cell)[i]; ++j)
284 (*cell_to_vertex)[num_cell_vertex_dependencies++] =
285 global_to_local_vertex[(*cell_to_vertex)[offset+j]];
286
287 (*num_vertices_per_cell)[part_num_cells] = (*num_vertices_per_cell)[i];
288
289 part_num_cells++;
290 }
291
292 offset += (*num_vertices_per_cell)[i];
293 }
294
295 *x_cells = xrealloc(*x_cells, part_num_cells * sizeof(**x_cells));
296 *y_cells = xrealloc(*y_cells, part_num_cells * sizeof(**y_cells));
297 *cell_mask = xrealloc(*cell_mask, part_num_cells * sizeof(**cell_mask));
298
299 *num_vertices_per_cell = xrealloc(*num_vertices_per_cell, part_num_cells *
300 sizeof(**num_vertices_per_cell));
301 *cell_to_vertex = xrealloc(*cell_to_vertex, num_cell_vertex_dependencies *
302 sizeof(**cell_to_vertex));
303 *num_cells = part_num_cells;
304 free(required_cells);
305 free(global_to_local_vertex);
306}
307
308
310 char const * filename) {
311
312 int nbr_vertices;
313 int nbr_cells;
314 int * num_vertices_per_cell = NULL;
315 int * cell_to_vertex = NULL;
316
317 int * cell_mask = NULL;
318
319 double * x_vertices = NULL;
320 double * y_vertices = NULL;
321 double * x_cells = NULL;
322 double * y_cells = NULL;
323
324 yac_read_mpiom_grid_information(filename, &nbr_vertices, &nbr_cells,
326 &x_vertices, &y_vertices,
327 &x_cells, &y_cells, &cell_mask);
328
329 struct yac_basic_grid_data grid =
331 (size_t)nbr_vertices, (size_t)nbr_cells, num_vertices_per_cell,
332 x_vertices, y_vertices, cell_to_vertex);
334 free(x_vertices);
335 free(y_vertices);
336 free(cell_to_vertex);
337 free(x_cells);
338 free(y_cells);
339 free(cell_mask);
340
341 return grid;
342}
343
345 char const * filename, char const * gridname) {
346
347 return
349 gridname, yac_read_mpiom_basic_grid_data(filename));
350}
351
352/* ---------------------------------------------------------------- */
353
354#ifdef YAC_NETCDF_ENABLED
356 int ncid, double ** vertex_lon, double ** vertex_lat,
357 size_t * nbr_vertices) {
358
359 int glon_id;
360 int glat_id;
361
362 // get variable ids
363 if (nc_inq_varid(ncid, "lon_bounds", &glon_id) != NC_NOERR)
364 yac_nc_inq_varid(ncid, "lon_bnds", &glon_id);
365
366 if (nc_inq_varid(ncid, "lat_bounds", &glat_id) != NC_NOERR)
367 yac_nc_inq_varid(ncid, "lat_bnds", &glat_id);
368
369 int glon_ndims;
370 int glat_ndims;
371
372 // get number of dimensions
373 YAC_HANDLE_ERROR(nc_inq_varndims(ncid, glon_id, &glon_ndims));
374 YAC_HANDLE_ERROR(nc_inq_varndims(ncid, glat_id, &glat_ndims));
376 (glon_ndims == 3) && (glat_ndims == 3),
377 "ERROR(get_mpiom_vertices): "
378 "number of dimensions for lon and lat does not match")
379
380 int glon_dimids[3];
381 int glat_dimids[3];
382
383 // get dimension ids
384 YAC_HANDLE_ERROR(nc_inq_vardimid(ncid, glon_id, glon_dimids));
385 YAC_HANDLE_ERROR(nc_inq_vardimid(ncid, glat_id, glat_dimids));
386
387 size_t dimlen_lat[3];
388 size_t dimlen_lon[3];
389
390 // get size of arrays
391 for (int i = 0; i < 3; ++i) {
392 YAC_HANDLE_ERROR(nc_inq_dimlen(ncid, glon_dimids[i], &dimlen_lon[i]));
393 YAC_HANDLE_ERROR(nc_inq_dimlen(ncid, glat_dimids[i], &dimlen_lat[i]));
395 dimlen_lon[i] == dimlen_lat[i],
396 "ERROR(get_mpiom_vertices): dimlen_lon[i] != dimlen_lat[i]")
397 }
399 dimlen_lon[2] == 4, "ERROR(get_mpiom_vertices): dimlen_lon[2] has to be 4")
400
401 *nbr_vertices = dimlen_lon[0] * dimlen_lon[1] * dimlen_lon[2];
402
403 *vertex_lon = xmalloc(*nbr_vertices * sizeof(**vertex_lon));
404 *vertex_lat = xmalloc(*nbr_vertices * sizeof(**vertex_lat));
405
406 YAC_HANDLE_ERROR(nc_get_var_double(ncid, glon_id, *vertex_lon));
407 YAC_HANDLE_ERROR(nc_get_var_double(ncid, glat_id, *vertex_lat));
408}
409
410/* ---------------------------------------------------------------- */
411
412static void get_mpiom_cell_center ( int ncid,
413 double **cell_lon,
414 double **cell_lat,
415 size_t *nbr_cells ) {
416
417 int glon_id;
418 int glat_id;
419
420 // get variable ids
421 yac_nc_inq_varid (ncid, "lon", &glon_id);
422 yac_nc_inq_varid (ncid, "lat", &glat_id);
423
424 int glon_ndims;
425 int glat_ndims;
426
427 // get number of dimensions
428 YAC_HANDLE_ERROR(nc_inq_varndims(ncid, glon_id, &glon_ndims));
429 YAC_HANDLE_ERROR(nc_inq_varndims(ncid, glat_id, &glat_ndims));
431 (glon_ndims == 2) && (glat_ndims == 2),
432 "ERROR(get_mpiom_cell_center): (glon_ndims != 2) || (glat_ndims != 2)")
433
434 int glon_dimids[2];
435 int glat_dimids[2];
436
437 // get dimension ids
438 YAC_HANDLE_ERROR(nc_inq_vardimid(ncid, glon_id, glon_dimids));
439 YAC_HANDLE_ERROR(nc_inq_vardimid(ncid, glat_id, glat_dimids));
440
441 size_t dimlen_lon[2];
442 size_t dimlen_lat[2];
443
444 // get size of arrays
445 for (int i = 0; i < 2; ++i) {
446 YAC_HANDLE_ERROR(nc_inq_dimlen(ncid, glon_dimids[i], &dimlen_lon[i]));
447 YAC_HANDLE_ERROR(nc_inq_dimlen(ncid, glat_dimids[i], &dimlen_lat[i]));
449 dimlen_lon[i] == dimlen_lat[i],
450 "ERROR(get_mpiom_cell_center): dimlen_lon[i] != dimlen_lat[i]")
451 }
452
453 *nbr_cells = dimlen_lon[0] * dimlen_lon[1];
454
455 *cell_lon = xmalloc(*nbr_cells * sizeof(**cell_lon));
456 *cell_lat = xmalloc(*nbr_cells * sizeof(**cell_lat));
457
458 YAC_HANDLE_ERROR(nc_get_var_double(ncid, glon_id, *cell_lon));
459 YAC_HANDLE_ERROR(nc_get_var_double(ncid, glat_id, *cell_lat));
460}
461
462/* ---------------------------------------------------------------- */
463
465 int ncid, int **cell_mask, size_t *nbr_cells ) {
466
467 int status;
468
469 // get variable id
470 int mask_id;
471 status = nc_inq_varid (ncid, "var1", &mask_id);
472 if (status != NC_NOERR) yac_nc_inq_varid(ncid, "zo", &mask_id);
473
474 // get number of mask dimensions
475 int mask_ndims;
476 YAC_HANDLE_ERROR(nc_inq_varndims(ncid, mask_id, &mask_ndims));
478 (mask_ndims == 3) || (mask_ndims == 4),
479 "ERROR(get_mpiom_cell_mask): invalid number of dimensions")
480
481 // get dimension ids
482 int mask_dimids[4];
483 YAC_HANDLE_ERROR(nc_inq_vardimid(ncid, mask_id, mask_dimids));
484
485 // get size of mask dimensions
486 size_t dimlen_mask[4] = {0, 0, 0, 0};
487 for (int i = 0; i < mask_ndims; ++i)
488 YAC_HANDLE_ERROR(nc_inq_dimlen(ncid, mask_dimids[i], &dimlen_mask[i]));
489
490 *nbr_cells = dimlen_mask[mask_ndims - 2] * dimlen_mask[mask_ndims - 1];
491
492 int * temp_cell_mask = xmalloc(*nbr_cells * sizeof(*temp_cell_mask));
493
494 YAC_HANDLE_ERROR(nc_get_var_int(ncid, mask_id, temp_cell_mask));
495
496 if (mask_ndims == 4)
497 for (size_t i = 0; i < *nbr_cells; ++i)
498 temp_cell_mask[i] = !(temp_cell_mask[i] == 1);
499
500 *cell_mask = temp_cell_mask;
501}
502#endif
503
504/* ---------------------------------------------------------------- */
505
506struct point_with_index {
507
508 int32_t lon, lat;
509 int64_t i;
510};
511
512static inline int compare_point_with_index(const void * a,const void * b) {
513
514 return ( (*(int64_t*)a < *(int64_t*)b) - (*(int64_t*)a > *(int64_t*)b) );
515}
516
518 double * temp_coords_lon, double * temp_coords_lat, int * temp_coords_mask,
519 size_t * temp_nbr_coords, int * old_to_new_id) {
520
521 struct point_with_index * sort_array =
522 xmalloc(*temp_nbr_coords * sizeof(*sort_array));
523
524 double const scale = (double)(2 << 20);
525 int32_t const periode = (int32_t)(360.0 * scale);
526
527 for (size_t i = 0; i < *temp_nbr_coords; ++i) {
528
529 int32_t curr_lon, curr_lat;
530
531 curr_lon = (int32_t)(temp_coords_lon[i] * scale);
532 curr_lat = (int32_t)(temp_coords_lat[i] * scale);
533
534 if (curr_lon <= 0)
535 curr_lon = curr_lon - (((curr_lon - periode) / periode) * periode);
536 else if (curr_lon > periode)
537 curr_lon = curr_lon - ((curr_lon / periode) * periode);
538
539 sort_array[i].lon = curr_lon;
540 sort_array[i].lat = curr_lat;
541
542 sort_array[i].i = i;
543 }
544
545 qsort(sort_array, *temp_nbr_coords, sizeof(*sort_array),
547
548 old_to_new_id[sort_array[0].i] = 1;
549
550 int last_unique_idx = (int)(sort_array[0].i);
551
552 for (size_t i = 1; i < *temp_nbr_coords; ++i) {
553
554 if (compare_point_with_index(sort_array + i - 1, sort_array + i)) {
555
556 old_to_new_id[sort_array[i].i] = 1;
557 last_unique_idx = (int)(sort_array[i].i);
558
559 } else {
560
561 old_to_new_id[sort_array[i].i] = -last_unique_idx;
562 }
563 }
564
565 free(sort_array);
566
567 size_t new_nbr_coords = 0;
568
569 for (size_t i = 0; i < *temp_nbr_coords; ++i) {
570
571 if (old_to_new_id[i] == 1) {
572
573 temp_coords_lon[new_nbr_coords] = temp_coords_lon[i];
574 temp_coords_lat[new_nbr_coords] = temp_coords_lat[i];
575
576 if (temp_coords_mask != NULL)
577 temp_coords_mask[new_nbr_coords] = temp_coords_mask[i];
578
579 old_to_new_id[i] = new_nbr_coords;
580
581 new_nbr_coords++;
582 }
583 }
584
585 for (size_t i = 0; i < *temp_nbr_coords; ++i)
586 if (old_to_new_id[i] <= 0)
587 old_to_new_id[i] = old_to_new_id[-old_to_new_id[i]];
588
589 *temp_nbr_coords = new_nbr_coords;
590}
struct yac_basic_grid * yac_basic_grid_new(char const *name, struct yac_basic_grid_data grid_data)
Definition basic_grid.c:45
struct yac_basic_grid_data yac_generate_basic_grid_data_unstruct(size_t nbr_vertices, size_t nbr_cells, int *num_vertices_per_cell, double *x_vertices, double *y_vertices, int *cell_to_vertex)
#define UNUSED(x)
Definition core.h:71
#define YAC_RAD
Definition geometry.h:30
void yac_nc_inq_varid(int ncid, char const *name, int *varidp)
Definition io_utils.c:403
void yac_nc_open(const char *path, int omode, int *ncidp)
Definition io_utils.c:344
#define YAC_HANDLE_ERROR(exp)
Definition io_utils.h:30
#define xrealloc(ptr, size)
Definition ppm_xfuncs.h:67
#define xcalloc(nmemb, size)
Definition ppm_xfuncs.h:64
#define xmalloc(size)
Definition ppm_xfuncs.h:66
void yac_read_mpiom_grid_information(const char *filename, int *nbr_vertices, int *nbr_cells, int **num_vertices_per_cell, int **cell_to_vertex, double **x_vertices, double **y_vertices, double **x_cells, double **y_cells, int **cell_mask)
static void get_mpiom_cell_center(int ncid, double **cell_lon, double **cell_lat, size_t *nbr_cells)
static int compare_point_with_index(const void *a, const void *b)
static void get_mpiom_cell_mask(int ncid, int **cell_mask, size_t *nbr_cells)
static void get_mpiom_vertices(int ncid, double **vertex_lon, double **vertex_lat, size_t *nbr_vertices)
struct yac_basic_grid * yac_read_mpiom_basic_grid(char const *filename, char const *gridname)
static void remove_duplicated_coords(double *temp_coords_lon, double *temp_coords_lat, int *temp_coords_mask, size_t *temp_nbr_coords, int *old_to_new_id)
void yac_read_part_mpiom_grid_information(const char *filename, int *num_vertices, int *num_cells, int **num_vertices_per_cell, int **cell_to_vertex, double **x_vertices, double **y_vertices, double **x_cells, double **y_cells, int **global_cell_id, int **cell_mask, int **cell_core_mask, int **global_corner_id, int **corner_core_mask, int rank, int size)
struct yac_basic_grid_data yac_read_mpiom_basic_grid_data(char const *filename)
#define MIN(a, b)
#define die(msg)
Definition yac_assert.h:12
#define YAC_ASSERT(exp, msg)
Definition yac_assert.h:15