Skip to content
Snippets Groups Projects
Commit 9fb56f5f authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Complete `send_snapshot` and `recv_snapshot`

Pass argument copy to `read_snapshot` rather than arguments periodic
and `dist_lim`. Motivation: do not recompute copy at each call of
`read_snapshot`. `read_snapshot` is going to be called many times in
overlap program, with always the same value of copy. And we do not
need the values of periodic and `dist_lim` separately in
`read_snapshot`.

Complete `send_snapshot` and `recv_snapshot` by sending and receiving
an entire snapshot. So we need nlon, nlat and copy in `recv_snapshot`
to allocate `extr_map`. It is better to pass arguments nlon, nlat and
copy than sending and receiving the shape of `extr_map` with MPI, of
course, since the shape is the same for all snapshots. In program
`test_send_recv`, write the entire received snaphot.

Bug fix in `Tests/CMakeLists.txt`: several targets missed
`${netcdff_INCLUDE_DIR}`.

Create procedure `write_snapshot` from code in main program
`test_read_snapshot`, because we need to do this also in program
`test_send_recv`. Note the dissymmetry with `read_snapshot`, which
does not include the opening and closing of the shapefiles. That is
because we anticipate calling `read_snapshot` several times with the
same shapefiles in program overlap.

Change order of dummy arguments of procedure `write_extr_map`. More
convenient for calling it with keywords from `write_snapshot`.
parent 4ca261bb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment