31 xt_initialize(MPI_COMM_WORLD);
33 int comm_size, comm_rank;
35 MPI_Comm_size(MPI_COMM_WORLD, &comm_size);
36 MPI_Comm_rank(MPI_COMM_WORLD, &comm_rank);
38 if ((comm_size != 4) && (comm_rank == 0)) {
39 fputs(
"wrong number of processes (has to be four)\n", stderr);
44 char const filename[] =
"test_read_exodus_parallel_grid.nc";
45 size_t num_lon = 271, num_lat = 181;
46 double lon_range[] = {-135.0, 135.0}, lat_range[] = {-90.0, 90.0};
48 utest_write_dummy_exodus_grid_file(
49 filename, num_lon, num_lat, lon_range, lat_range);
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};
80 utest_write_dummy_exodus_grid_file(
81 filename, num_lon, num_lat, lon_range, lat_range);
84 MPI_Barrier(MPI_COMM_WORLD);
90 filename,
"exodus", use_ll_edges, MPI_COMM_WORLD);
95 if (local_size != ((num_lon - 1) * (num_lat - 1)) / 4)
96 PUT_ERR(
"ERROR in yac_read_exodus_basic_grid_parallel");
102 MPI_Barrier(MPI_COMM_WORLD);
104 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)
struct yac_basic_grid * yac_read_exodus_basic_grid_parallel(char const *filename, char const *gridname, int use_ll_edges, MPI_Comm comm)