32 xt_initialize(MPI_COMM_WORLD);
34 int comm_size, comm_rank;
36 MPI_Comm_size(MPI_COMM_WORLD, &comm_size);
37 MPI_Comm_rank(MPI_COMM_WORLD, &comm_rank);
39 if ((comm_size != 4) && (comm_rank == 0)) {
40 fputs(
"wrong number of processes (has to be four)\n", stderr);
45 char const filename[] =
"test_read_exodus_parallel_grid.nc";
46 size_t num_lon = 271, num_lat = 181;
47 double lon_range[] = {-135.0, 135.0}, lat_range[] = {-90.0, 90.0};
52 MPI_Barrier(MPI_COMM_WORLD);
58 filename,
"exodus", use_ll_edges, MPI_COMM_WORLD);
63 if (local_size != ((num_lon - 1) * (num_lat - 1)) / 4)
64 PUT_ERR(
"ERROR in yac_read_exodus_basic_grid_parallel");
70 MPI_Barrier(MPI_COMM_WORLD);
72 if (comm_rank == 0) unlink(filename);
76 char const filename[] =
"test_read_exodus_parallel_grid.nc";
77 size_t num_lon = 271, num_lat = 181;
78 double lon_range[] = {0.0, 10.0}, lat_range[] = {80.0, 90.0};
83 MPI_Barrier(MPI_COMM_WORLD);
89 filename,
"exodus", use_ll_edges, MPI_COMM_WORLD);
94 if (local_size != ((num_lon - 1) * (num_lat - 1)) / 4)
95 PUT_ERR(
"ERROR in yac_read_exodus_basic_grid_parallel");
101 MPI_Barrier(MPI_COMM_WORLD);
103 if (comm_rank == 0) unlink(filename);
size_t yac_basic_grid_get_data_size(struct yac_basic_grid *grid, enum yac_location location)
void yac_basic_grid_delete(struct yac_basic_grid *grid)
void write_dummy_exodus_grid_file(char const *grid_filename, size_t num_lon, size_t num_lat, double lon_range[2], double lat_range[2])
struct yac_basic_grid * yac_read_exodus_basic_grid_parallel(char const *filename, char const *gridname, int use_ll_edges, MPI_Comm comm)