Commit Graph

74 Commits

Author SHA1 Message Date
Miikka Vaisala
11eddabbd6 Merge branch 'master' into alt_bcond_2020_09 2020-11-23 15:47:46 +08:00
Miikka Vaisala
4add619e2f Calling boundconds compiles again. 2020-11-20 16:22:47 +08:00
Miikka Vaisala
f87d65408c Added acBoundcondStepGBC() for flexible boundary conditions. 2020-11-20 15:42:54 +08:00
Miikka Vaisala
8732480cd9 Added acIntegrateGBC() 2020-11-20 15:37:37 +08:00
Miikka Vaisala
efd3cc40cd Compiles without the API funtion call. 2020-11-20 14:11:14 +08:00
Miikka Vaisala
cb15668f2d Figuring out compilations. 2020-11-20 11:58:15 +08:00
jpekkila
349093768d Added acMeshRandomize to astaroth.h to keep core and utils separate 2020-11-02 17:14:26 +02:00
jpekkila
ae0d4de23c The root host mesh is no longer allocated during benchmarking as this caused out-of-memory errors in weak scaling tests 2020-10-29 16:33:41 +02:00
Miikka Vaisala
d060e67bec Includes also 2020-10-06 18:16:24 +08:00
Miikka Vaisala
66662c1603 Defines for new diagnostics. 2020-09-11 16:52:12 +08:00
jpekkila
8199ff914f Added acGridLoadScalarUniform and acGridLoadVectorUniform functions for loading specific device constants with MPI 2020-08-24 17:19:02 +03:00
jpekkila
d966afe830 Added VERBOSE CMake option and made various prints optional to clean the output. VERBOSE is by off by default, pass cmake -DVERBOSE=ON to re-enable various non-critical warning and status prints (important warnings are still visible regardless of the flag). 2020-08-21 21:19:42 +03:00
jpekkila
8c28aacf96 Reduction types are now generated in a same fashion as vertexbuffer handles and others 2020-08-21 19:05:01 +03:00
jpekkila
56273433fe Fixed inconsistency in the acGridLoad parameter order 2020-08-21 14:40:11 +03:00
jpekkila
3afab77533 Removed astaroth_utils from astaroth_core dependencies 2020-07-29 19:58:21 +03:00
jpekkila
d0ca1f8195 Reduction types are now generated with acc instead of being explicitly declared in astaroth.h 2020-06-28 18:16:19 +03:00
jpekkila
39c7fc6c6f Streams are now generated with acc 2020-06-25 20:40:02 +03:00
jpekkila
fbb8d7c7c6 Added a minimal Fortran interface to Astaroth 2020-06-25 06:34:16 +03:00
jpekkila
226de32651 Added model solution for reductions and functions for automated testing 2020-06-03 13:37:00 +03:00
jpekkila
ed7cf3f540 Added a production-ready interface for doing multi-node runs with Astaroth with MPI 2020-03-26 15:02:37 +02:00
jpekkila
17c935ce19 Added padding to param name buffers to make them have NUM_*_PARAMS+1 elements. This should satisfy some strict compilation checks. 2020-01-28 18:53:09 +02:00
jpekkila
0ccd4e3dbc Major improvement: uniforms can now be set to default values. The syntax is the same as for setting any other values, f.ex. 'uniform Scalar a = 1; uniform Scalar b = 0.5 * a;'. Undefined uniforms are still allowed, but in this case the user should load a proper value into it during runtime. Default uniform values can be overwritten by calling any of the uniform loader funcions (like acDeviceLoadScalarUniform). Improved also error checking. Now there are explicit warnings if the user tries to load an invalid value into a device constant. 2020-01-28 18:17:31 +02:00
jpekkila
7215e842fc Simplified the include directory. Everything is now in only two headers: astaroth.h and astaroth_utils.h. Removed old and unused stuff. user.h is unused in standalone but might be used with Pencil Code, so left that intact. 2020-01-23 19:59:44 +02:00
jpekkila
5e1500fe97 Happy new year! :) 2020-01-13 21:38:07 +02:00
jpekkila
794e4393c3 Added a new function for the legacy Astaroth layer: acGetNode(). This functions returns a Node, which can be used to access acNode layer functions 2020-01-13 11:33:15 +02:00
jpekkila
0865f0499b Various improvements to the MPI-GPU implementation, but linking MPI libraries with both the host C-project and the core library seems to be a major pain. Currently the communication is done via gpu->cpu->cpu->gpu. 2019-10-15 19:32:16 +03:00
jpekkila
b5daf22c26 Added interface function acSynchronizeMesh 2019-08-12 10:25:05 +03:00
jpekkila
5397495496 Added acLoadWithOffset 2019-08-08 20:43:01 +03:00
jpekkila
e79e1207f2 Added a function for checking whether CUDA-capable devices are available 2019-08-08 20:35:02 +03:00
jpekkila
8a9099d75e Added missing functions to fix backwards compatibility with the version interfaced with Pencil Code 2019-08-08 19:49:57 +03:00
jpekkila
322cdce52c Added some new comments + some helpful old comments from a time before the interface revision 2019-08-07 20:05:54 +03:00
jpekkila
5232d987c1 Added acStoreWithOffset to the revised interface 2019-08-05 16:18:22 +03:00
jpekkila
567ad61465 Multinode MPI implementation should be done later in its own branch. The focus of this branch is to revise the node and device layers. Commented out references to the Grid layer. 2019-08-02 13:54:54 +03:00
jpekkila
2b6bf10ae6 Dummy implementation of the Grid interface 2019-08-01 18:37:36 +03:00
jpekkila
efd9d54fef Stashing WIP changes (interface revision) s.t. I can continue work on a different machine 2019-07-30 14:34:44 +03:00
jpekkila
b65454d523 Stashed some testing files used to make sure that the library can also be used from pure C projects (better compatibility). These changes will never go to master as-is. 2019-07-23 18:24:47 +03:00
jpekkila
0282f45077 Forgot extern C 2019-07-23 16:11:17 +03:00
jpekkila
e5172e2a9a Moved more stuff out of astaroth.h to astaroth_defines.h. I'm not particularly sure what's the best way to arrange the include files. These changes are just for readability so it's very safe to move things around though. 2019-07-23 16:06:54 +03:00
jpekkila
c98e730397 Added extern C to the include headers 2019-07-23 15:02:54 +03:00
jpekkila
c0774bc3b8 Added overloads for getting and setting various parameters. However, the compiler mangles the names which is not good for a cross-platform library so the functions are commented out for now. Sadly _Generic, which would solve everything, from C11 is not available in C++. 2019-07-23 14:56:41 +03:00
jpekkila
27f4d1e4ff Added actual functions for getting size of the vertex buffers etc. The previously used macros are now deprecated. Type safety is the major benefit of using functions instead of definitions. 2019-07-23 13:44:43 +03:00
jpekkila
f74df5339f Cleaned up the include directory: removed all unnecessary stuff and moved common definitions to a separate file 2019-07-22 19:46:45 +03:00
jpekkila
78aba6428e Updated the copyright years throughout the project 2019-07-16 14:28:32 +03:00
jpekkila
93fc121f5c Introduced versions of the asynchronous functions which take a stream as a parameter 2019-07-10 15:49:21 +03:00
jpekkila
866ec8a192 Removed some old hack I used for benchmarking a while back 2019-07-10 14:34:05 +03:00
jpekkila
0bda016e17 Reviewed the Astaroth interface. Now there's a clear distinction between synchronous and asynchronous functions. For basic usage, we provide a set of functions that are always safe to call (acIntegrate, acLoad, etc), but because of this, must be quite restricted in the sense that f.ex. the whole mesh must be loaded at once and computations cannot be executed concurrently on multiple GPUs. For more advanced users we provide asynchronous functions (such as acLoadWithOffset). Since we cannot know how the asynchronous functions are called (for example, when the integration step has been fully completed and the halos of neighboring subgrids can be safely communicated between GPUs), the responsibility of synchronization must be left to the user. In the existing implementations we currently use only the basic "safe" set of functions (except in renderer.cc), so the existing functionality has not been changed with these latests commits. Autotests also pass. 2019-07-09 18:42:00 +03:00
jpekkila
10a98b01a9 Experimental change: now the integration function is automatically optimized during acInit 2019-07-09 14:46:24 +03:00
jpekkila
0884c4bf38 Moved the definition of acForcingVec to host_forcing.cc since it depends on user parameters that may not be defined in all projects 2019-07-04 15:28:18 +03:00
jpekkila
7abb959828 Overhaul to the user-defined parameters done: All logical switches, parameters and vertex buffer handles are now defined in a single header file (the default location is acc/mhd_solver/stencil_defines.h). This header is used when preprocessing the DSL sources and is linked to the include/ directory when calling scripts/compile_acc.sh. astaroth.h is now used for configuring internal stuff only and should not be modified by users 2019-07-03 19:01:16 +03:00
jpekkila
acc53e1c2b Merged master to acc_parameter_overhaul 2019-07-03 17:37:37 +03:00