2422 Commits

Author SHA1 Message Date
2ac66d3d37 FORCING: Reset work_in_use in inject_fmodes_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-15 17:22:52 -03:00
d1e9884503 WORKSPACE: Make nwork private.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-15 11:31:36 -03:00
11559f1070 FORCING: Use resize_workspace() in inject_fmodes_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 21:43:07 -03:00
7c08dc2229 INTEGRALS: Use resize_workspace() in store_integrals().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 21:39:40 -03:00
1b1e3ab034 SOURCES: Use resize_workspace() in update_sources().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 20:38:27 -03:00
43e32a755f MESH: Use resize_workspace() in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 20:35:37 -03:00
2f9db104d5 EVOLUTION: Use resize_workspace() in update_increment().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 20:33:02 -03:00
5d3df2c71d REFINEMENT: Use resize_workspace() in vorticity_magnitude().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 20:29:08 -03:00
be02a97d11 REFINEMENT: Warn if workspace is used in current_density_magnitude().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 20:26:34 -03:00
f346f9b3b3 REFINEMENT: Use resize_workspace() in current_density_magnitude().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 19:46:08 -03:00
f6784d8861 WORKSPACE: Add subroutine to resize the workspace.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-13 19:44:06 -03:00
28de30a8d5 INTEGRALS: Use workspace for local arrays.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 23:01:23 -03:00
8ddb4a3681 REFINEMENT: Use workspace in vorticity & current density criterions.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 22:42:53 -03:00
a381fc0cce MESH: Remove workspace from this module.
Use everywhere the workspace provided by module WORKSPACE.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 22:35:05 -03:00
79b137a355 WORKSPACE: Add module to handle workspace explicitely.
Perform its initialization and finalization in the driver.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 22:26:50 -03:00
7b4a54f71a FORCING: Use workspace in inject_fmodes_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 14:10:53 -03:00
14dd5039ab Revert "SOURCES: Use workspace in refinement criterion calculation."
This reverts commit 1860fe97b093cb825171d495ab075bee0a51bc03.

This comming introduced a circular dependency.
2021-11-12 14:08:04 -03:00
1860fe97b0 SOURCES: Use workspace in refinement criterion calculation.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 13:55:29 -03:00
86ed6e9fac Merge pull request 'Memory usage reduction.' (#15) from memory_usage_reduction into master
Reviewed-on: https://hydra-each.nsupdate.info:3001/gkowal/amun-code/pulls/15
2021-11-12 13:16:17 -03:00
d5a5c612e0 MESH: Increase the workspace default size.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 12:56:16 -03:00
0c1dab5a95 SCHEMES: Eliminate local arrays from update_flux().
However, the arrays which are used to store the reconstructed primitive
variables at Riemann states are passed now from update_increment() in
module EAVOLUTION. These arrays use the common workspace.

The array used for 4-vector velocity reconstruction is removed by
utilizing the output array for fluxes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 12:43:40 -03:00
d4e442ead3 SOURCES: Use workspace in update_sources().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 11:53:43 -03:00
812bd1b2f9 MESH: Quit, if workspace cannot be increased in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 10:08:49 -03:00
f045189b8d EVOLUTION: Use workspace in update_increment().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 10:05:43 -03:00
9acf0bdb0d Revert "EVOLUTION: Use workspace in initialize_time_step()."
This reverts commit 4bb02028df6bc4dd9fa21e7689131592c6466d86.

We need to use workspace in update_increment().

Subroutine initialize_time_step() is called only once at the beginning,
so it is fine to use allocated arrays here.
2021-11-12 09:35:17 -03:00
4bb02028df EVOLUTION: Use workspace in initialize_time_step().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 09:15:15 -03:00
e01285e903 MESH: Export nwork too.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 09:10:54 -03:00
f28803350b MESH: Use workspace in prolong_block().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 08:57:53 -03:00
024fd4b82f MESH: Add a common workspace to be used in various modules.
This workspace removes the necessity of allocating the local subroutine
arrays. It is allocated once in initialize_mesh() and can be used in any
place of the code. By default, the size of this workspace is controlled
by the block dimensions, the number of variables, and the simulation
dimension, but it can be controlled by a parameter 'workspace_size'.

Additionally, there is a logical flag 'work_in_use' exported from this
module to permit the verification if the workspace is currently in use.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-12 08:07:59 -03:00
58605eb177 FORCING: Use %dU instead of local arrays for acceleration.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 20:35:25 -03:00
2dc4d3ca17 EVOLUTION: Make the arrays allocatable in initialize_time_step().
Two arrays used in the initial time step estimation, sc and df, are
allocated only if the integration methods support the estimation of
error.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 18:09:30 -03:00
8e7369388f REFINEMENT: Use data block's %du for the refinement criterion.
Each data block has a field %du which is used only during the
integration step (module EVOLUTION). Therefore, it can be used as a
temporary array to store the vorticity and the current density in case
these refinement criterions are used.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 17:54:54 -03:00
d8e0f2954d MESH: Rewrite redistribute_blocks().
This rewrite removes large buffers used by the MPI exchange of data
block arrays between processes.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 17:31:50 -03:00
1f7906271a MESH: Rewrite prepare_sibling_derefinement().
This removes the use of extra buffer for MPI block exchange. The
exchange is now a zero-copy operation.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 17:08:12 -03:00
52ca353fe4 MESH: Allocate the prolongation array in prolong_block().
The prolongation is not expected to be done very frequently, comparing
to the number of leafs. Therefore, allocate the prolongation array only
when it is required.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 16:39:43 -03:00
c0c549453d MESH: Rewrite prolong_block() in order to reduce its memory usage.
Instead of using a temporary array for all variables, we now reuse the
same array for the prolongation of each variable.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 16:11:10 -03:00
28d2dd061b CI/CD: Use specific image in .drone.yml.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 15:51:51 -03:00
7684c04941 CI/CD: Use the customized image in .drone.xml.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 15:39:44 -03:00
56407675e0 CI/CD: Remove pipelines for Bitbucket.
We already have self-hosted Drone CI/CD, and free GitLab CI/CD. Besides
bitbucket offers only 52 minutes monthly.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-11 10:12:46 -03:00
731d4e1c32 INTEGRALS: Do not store errors if the integration is not embedded.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 22:45:57 -03:00
0ae9ce1e8a Add build status to README.md
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 16:56:52 -03:00
714a66ba14 Add reconnection to Drone CI/CD tested branches.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 16:46:06 -03:00
93ad9bab23 Use concurrent compilation in Dron CI/CD script.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 16:31:22 -03:00
88ad0691cd Rename Drone CI/CD steps.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 16:26:56 -03:00
4da36d9bb3 Add NVIDIA HPC to supported compilers.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 16:19:56 -03:00
6a6bbdcf79 Add script for Drone CI/CD.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 16:12:28 -03:00
7578206f83 EVOLUTION: Treat any unphysical state properly in RK4.10 method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 10:01:34 -03:00
1d22adb2fa EVOLUTION: Treat any unphysical state properly in RK3.5 method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 09:51:06 -03:00
c42310b3cb EVOLUTION: Treat any unphysical state properly in RK3.4 method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 09:37:21 -03:00
9d3123eeed EVOLUTION: Treat any unphysical state properly in RK3 method.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-10 09:31:30 -03:00