1315 Commits

Author SHA1 Message Date
20891d9531 Merge branch 'optimize_mpi_exchange' 2014-12-19 12:57:58 -02:00
bd913cb04d BOUNDARIES: Rewrite MPI part in boundaries_face_prolong().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 19:42:06 -02:00
a9349d967b BOUNDARIES: Rewrite MPI part in boundaries_face_restrict().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 19:36:00 -02:00
233fe1d520 BOUNDARIES: Rewrite MPI part in boundaries_face_copy().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 19:31:09 -02:00
d4f43f2ebe BOUNDARIES: Rewrite MPI part in boundaries_corner_prolong().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 19:21:37 -02:00
d71c749353 BOUNDARIES: Rewrite MPI part in boundaries_corner_restrict().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 19:16:15 -02:00
594564899a BOUNDARIES: Rewrite MPI part in boundaries_corner_copy().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 19:06:14 -02:00
7d0969a280 BOUNDARIES: Add pmeta initialization in boundaries_edge_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 18:48:53 -02:00
bdecf83502 BOUNDARIES: Rewrite MPI part in boundaries_edge_prolong().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 18:30:54 -02:00
33375fce41 BOUNDARIES: Rewrite MPI part in boundaries_edge_restrict().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 18:25:04 -02:00
dd3ee8c57d BOUNDARIES: Rewrite MPI part in boundaries_edge_copy().
We use exchange_real_arrays() now.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 18:16:36 -02:00
ac3b2ce520 BOUNDARIES: Rewrite MPI part in boundary_fluxes().
Now, instead of separate calls to receive or send data, we process pairs
and exchange data between them directly using exchage_read_arrays().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 14:49:07 -02:00
fc80be02d4 MPITOOLS: npairs represents the exact number of processes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 13:23:16 -02:00
7fa2f4ecae BLOCKS: Remove unused fields of block_info structure.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 13:08:49 -02:00
852ee2d1a4 BOUNDARIES: Use new exchange arrays in boundary_corner_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 13:06:07 -02:00
69e206731d BOUNDARIES: Use new exchange arrays in boundary_corner_restrict().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 13:04:10 -02:00
7eef97ae6b BOUNDARIES: Use new exchange arrays in boundary_corner_copy().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 13:01:44 -02:00
25daf4165a BOUNDARIES: Use new exchange arrays in boundary_edge_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 12:46:20 -02:00
c6bd741707 BOUNDARIES: Use new exchange arrays in boundary_edge_restrict().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 12:42:20 -02:00
738ef159f8 BOUNDARIES: Use new exchange arrays in boundary_edge_copy().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 12:39:22 -02:00
8243edb33d BOUNDARIES: Use new exchange arrays in boundary_face_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 12:32:50 -02:00
969accd19f BOUNDARIES: Use new exchange arrays in boundary_face_restrict().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 12:32:07 -02:00
3f97569869 BOUNDARIES: Use new exchange arrays in boundary_face_copy().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 12:25:50 -02:00
25d6251dba BOUNDARIES: Use new exchange arrays in boundary_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 12:19:21 -02:00
51497fe60d BOUNDARIES: Add subroutine to handle exchange block arrays.
Two new arrays barray and bcount are allocated during the module
initialization and deallocated during the module finalization.

Those two arrays are used to store information about neighbors which
lay on different processes and need some boundary data to exchange.

Subroutines prepare_exchange_array() and release_exchange_array() are
responsinble for initialization of barray and bcount and for
deallocation all array elements, respectively.

Subroutine append_exchange_block() helps to append a new block pairs to
the exchange array.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-11 12:14:08 -02:00
3f537aa93f MPITOOLS: Add exchange_real_arrays().
The new subroutine exchanges two buffers between two processes at the
same time.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-03 21:47:41 -02:00
1248fe62fa BOUNDARIES: Compare neighbor processes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-01 09:06:08 -02:00
53719482ed BOUNDARIES: Fix memory leaking in boundary_fluxes().
When blocks belong to the same process which is not the current one, the
block exchange structure is unnecessary allocated, and is not
deallocated after the block exchange.

Fix this by allocating block exchange structures only when the block and
its neighbor processes are different.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-12-01 09:01:18 -02:00
53abe5d5f3 BOUNDARIES: Fix line alignment in boundary_corner_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:48:45 -02:00
fde758acb0 BOUNDARIES: Fix line alignment in boundary_corner_restrict().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:46:11 -02:00
89dc597150 BOUNDARIES: Fix line alignment in boundary_corner_copy().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:44:04 -02:00
59540cc3bd BOUNDARIES: Fix line alignment in boundary_edge_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:41:37 -02:00
96c3cda82b BOUNDARIES: Fix line alignment in boundary_edge_restrict().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:38:16 -02:00
0dad5bcf1e BOUNDARIES: Fix line alignment in boundary_edge_copy().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:34:54 -02:00
654de23d14 BOUNDARIES: Fix line alignment in boundary_face_prolong().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:31:27 -02:00
1658ce5625 BOUNDARIES: Fix line alignment in boundary_face_restrict().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:28:14 -02:00
dace7d29b6 BOUNDARIES: Fix line alignment in boundary_face_copy().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:24:24 -02:00
d55ffb605f BOUNDARIES: Fix line alignment in boundary_fluxes().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:19:24 -02:00
0349f2aa0f BOUNDARIES: Utilize optimized process pairs to boundary exchange.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 18:08:27 -02:00
3919669b7f MPITOOLS: Generate pairs for cases when order is important.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 13:59:46 -02:00
fa1488dfc9 MPITOOLS: Generate processor pairs in round-robin order.
The list of processor pairs in round-robin order should guarantee the
optimal MPI exchange between processors, i.e. that all processors will
be involved in the data exchange in the same time.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-30 13:45:18 -02:00
70ad8c92e5 SOURCES: Use temporary array tmp(:,:,:,:,:) instead of jc(:,:,:,:).
In this way adday jc(:,:,:,:) can be removed.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-28 08:02:20 -02:00
d0808436b6 SOURCES: Rewrite resistive source terms.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-19 20:19:08 -02:00
e2fd3a6b2d Revert "SOURCES: Rewrite resistive source terms."
This reverts commit 34f2871b350b207bfc9a4c1cb872da7d85a47040.

The new implementation based on curl produces numerical oscillation at
small scales.
2014-11-19 19:14:24 -02:00
34f2871b35 SOURCES: Rewrite resistive source terms.
The resistive source terms are calculated without assumption about the
uniform resistivity coefficient.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-19 18:29:24 -02:00
ded726db79 SOURCES: Correct the energy term for viscous stress.
The energy term which corresponds to the viscous stress tensor was
incorrect. This patch implements the correct term.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-18 20:38:37 -02:00
cd0161515c SOURCES: Implement full viscous stress tensor.
The viscous source term can be expressed as the laplacian only in the
incompressible case (div V = 0) with uniform viscosity. If we have
compressibility or non-uniform viscosity, we need to use the full
viscous stress tensor.

This patch implements it.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-11-18 19:08:50 -02:00
e737ad8995 INTERPOLATIONS: Add timer to extrema clipping.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-10-23 08:49:58 -02:00
9bf6dc9bc9 IO: Detection and reading from the new restart file format.
These changes introduce if the restart files are using the old or new
data block format storing, and respectively restores data in the proper
way.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-10-22 09:25:58 -02:00
c66bfc1b0a IO: Format change for storing data blocks in restart files.
This format change is required to remove unnecessary allocation of large
arrays in order to store primitive and conservative variables in the
restart files. With this format change the memory limit of the half of
the available total memory is removed. However, in the case of use of
the data compression the sizes of restart files are typically large. The
compression ratio, however, can be improved by repacking the files using
the tools provided by the HDF5 libraries.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2014-10-22 08:51:12 -02:00