jpekkila
bcacc357d3
Now all host functions start with acHost to avoid confusion on whether the function operates on host or device memory
2020-11-24 21:32:43 +02:00
Miikka Vaisala
11eddabbd6
Merge branch 'master' into alt_bcond_2020_09
2020-11-23 15:47:46 +08:00
Miikka Vaisala
d4ee066b3c
Periodic boundary conditions work with switchable system.
...
Still some issue with the custom alternatives. Need to look into kernels again.
2020-11-20 17:00:48 +08:00
Miikka Vaisala
cb15668f2d
Figuring out compilations.
2020-11-20 11:58:15 +08:00
Miikka Vaisala
204f075343
AC_unit_magnetic in dsl
2020-11-19 15:14:28 +08:00
jpekkila
f61223c02b
The number of default streams is now 32
2020-11-11 13:18:29 +02:00
jpekkila
830b8ad179
Disabled LBFIELD by default as there are no autotests for it
2020-09-14 13:27:09 +03:00
Miikka Vaisala
66662c1603
Defines for new diagnostics.
2020-09-11 16:52:12 +08:00
Miikka Vaisala
b815b62aa7
Enhanced simulation cc. Now magnetic fields diagnostics invoked if needed.
...
Also more exit condition so that the simulation will terminate if nan happens or timestep becomes too short.
2020-09-11 14:59:32 +08:00
Miikka Vaisala
450526b8e1
B-field calculation to the DSL file.
...
Still needs corresponding things elsewhere...
2020-09-11 13:23:01 +08:00
Miikka Vaisala
7848dedfbe
Gauge correction to the induction equation for the sake of numerical stability.
...
Used in my dynamo work, but apparantly was not done to the main repo.
2020-09-11 11:58:09 +08:00
jpekkila
f21c6a8c0b
Disabled LFORCING and LUPWD temporarily until the new MPI standalone module is properly tested
2020-08-24 18:46:38 +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
003c202e8c
Pulled useful changes from the benchmark branch. GPUDirect RDMA (unpinned) is now the default for MPI communication.
2020-07-29 16:39:24 +03:00
jpekkila
6cab3586cf
The generated fortran header is now consistent with fortran conventions. Also cleaned up the C version of the header.
2020-06-29 01:06:30 +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
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
f8cd571323
Now CMake and compilation flags are functionally equivalent with the current master branch, not taking into account the deprecated flags. Also various small improvements to building.
...
Deprecated flags:
* BUILD_DEBUG. This was redundant since CMake also has such flag. The build type can now be switched by passing -DCMAKE_BUILD_TYPE=<Release|Debug|RelWithDebugInfo|...> to cmake. See CMake documentation on CMAKE_BUILD_TYPE on all av
* BUILD_UTILS. The utility library is now always built along the core library. We can reintroduce this flag if needed when the library grows larger. Currently MPI functions depend on Utils and without the flag we don't have to worr
* BUILD_RT_VISUALIZATION. RT visualization has been dormant for a while and I'm not even sure if it works any more. Eventually the RT library should be generalized and moved to Utils at some point. Disabled the build flag for the t
2020-01-24 07:00:49 +02:00
jpekkila
ba899211ff
Better code quality for ACC
2020-01-23 18:08:06 +02:00
jpekkila
74cbcf390e
Removed deprecated unused files
2020-01-14 21:56:00 +02:00
jpekkila
0676d27761
Moved compile_acc_module.sh from scripts to the acc directory
2020-01-14 21:44:27 +02:00
jpekkila
8dbeb9b654
Rewrote acc/README.md
2020-01-14 21:37:56 +02:00
Miikka Vaisala
185b33980f
Forcing function bug correction.
2020-01-14 13:58:11 +08:00
jpekkila
5e1500fe97
Happy new year! :)
2020-01-13 21:38:07 +02:00
jpekkila
d51d48071f
Updated documentation and made it work with Doxygen. Now the doc/doxygen/index.html generated with it looks quite good and contains lots of useful and up-to-date information about Astaroth
2020-01-13 21:11:04 +02:00
jpekkila
49581e8eaa
Added forward declaration for yyparse to avoid warnings with some compilers when compiling acc
2019-12-03 18:36:21 +02:00
jpekkila
ab539a98d6
Replaced old deprecated instances of DCONST_INT with DCONST
2019-11-27 13:48:42 +02:00
Johannes Pekkila
3d35897601
The structure holding an abstract syntax tree node (acc) was not properly initialized to 0, fixed
2019-11-27 09:16:32 +01:00
jpekkila
f3cb6e7049
Removed old unused tokens from the DSL grammar
2019-10-18 02:14:19 +03:00
jpekkila
7c79a98cdc
Added support for various binary operations (>=, <=, /= etc). Also bitwise operators | and & are now allowed
2019-10-18 01:52:14 +03:00
jpekkila
b667735906
Removed debug prints from the preprocessing script
2019-10-08 00:31:15 +03:00
jpekkila
44a86f5e80
acc: Removed debug prints, old code. Also the scope of the declarations made inside a for statement is now properly tracked
2019-10-08 00:20:57 +03:00
jpekkila
ea4438f331
Adapted the old example of helical forcing with profiles to conform with the revised syntax
2019-10-07 19:43:25 +03:00
jpekkila
0cc5bdaa08
Added support for ScalarArrays back
2019-10-07 19:42:24 +03:00
jpekkila
ff12332f06
Clarified the syntax for real number literals. 1.0 is the same precision as AcReal, 1.0f is an explicit float and 1.0d is an explicit double.
2019-10-07 18:24:32 +03:00
jpekkila
aa6c2b23d9
Built-in parameters are now added during compilation instead of defining them in CUDA sources. IMPORTANT: DCONST macro should no longer be used when accessing built-in variables. Now all uniforms are consistently accessed with the handle only
2019-10-07 17:39:27 +03:00
jpekkila
3fe7b62d3e
Removed the old accrevision directory
2019-10-07 17:37:09 +03:00
jpekkila
6560be7056
Moved the old mhd solver to mhd_solver_DEPRECATED and replaced it with the new stencil_kernel.ac file
2019-10-07 17:36:30 +03:00
jpekkila
8c1e603a98
On second thought, let's revert the changes in mhd_solver and use the file I already modified instead of doing the same changes twice
2019-10-07 17:29:53 +03:00
jpekkila
16c8b1e748
Autoformatting
2019-10-07 17:17:58 +03:00
jpekkila
c8e0586b60
Renamed the old .sas and .sdh files to regular headers and added #pragma once.
2019-10-07 17:17:26 +03:00
jpekkila
48c6174319
Added error checks to stdderiv.h
2019-10-07 16:59:58 +03:00
jpekkila
0e1d1b9fb4
Some optimizations for DSL compilation. Also a new feature: Inplace addition and subtraction += and -= are now allowed
2019-10-07 16:33:24 +03:00
jpekkila
d97f5b59ba
Rewrote the Astaroth DSL compiler. More information and cleanup in the next commits.
2019-10-07 15:43:20 +03:00
jpekkila
6665d30983
Merge branch 'acc_rewrite_20191002' of https://bitbucket.org/jpekkila/astaroth into acc_rewrite_20191002
2019-10-03 02:36:04 +03:00
jpekkila
a651420e8d
WIP changes
2019-10-03 02:35:48 +03:00
jpekkila
a02fa349ce
Commented out a grammar rule that was ambiguous
2019-10-03 01:52:56 +03:00
jpekkila
b0162bdea0
Added DSL versions of the basic derivative operations (placeholder)
2019-10-02 21:09:36 +03:00