Commit Graph

179 Commits

Author SHA1 Message Date
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
jpekkila
cc3c2eb926 Added WIP stuff for the Astaroth DSL compiler rewrite. Once this branch is finished only a single source file will be needed (file ending .ac). This revision is needed to decouple absolutely all implementation-specific stuff (f.ex. AC_dsx) from the core library and make life easier for everyone. The plan is to provide a standard library header written in the DSL containing the derivative operations instead of hardcoding them in the CUDA implementation. 2019-10-02 21:03:59 +03:00
Miikka Vaisala
f8e82d41af Can now set the endtime for simulation, instead of step number. 2019-10-02 15:09:26 +08:00
Miikka Vaisala
1b0e9803b0 Compiles and runs again.
Now to actual testing. Can we read and cotinue from and old file?
2019-10-02 13:52:38 +08:00
jpekkila
7d76250f70 Updated stencil_process.sps with the revised syntax for real literals 2019-10-01 21:20:28 +03:00
jpekkila
a0037d1a44 Modified the syntax of writing real-valued literals with the DSL. Casts are not needed any more: f.ex. 1.0 is implicitly cast to AcReal. The syntax is now more consistent: reals must be explicitly written as a.b, where a and b are some integers. IMPORTANT: Previously the shorthands a. and .b were allowed, not anymore. Using those shorthands will result in a compilation error 2019-10-01 21:14:33 +03:00
jpekkila
b4a6ddb074 Preprocessing writes the intermediate output to *.preprocessed files. This makes debugging various DSL syntax errors much easier since the line number in the error corresponds to the line numbers in these files. 2019-10-01 21:08:38 +03:00
jpekkila
19b16eecc8 Added an example for creating arbitrary projects, see acc/test_solver and src/exampleproject. Note: make sure that dt is calculated adequately and that all parameters are defined properly (see src/exampleproject/simulation.cc) 2019-10-01 15:33:26 +03:00
jpekkila
2c8c49ee24 Removed or updated some old .gitignore files 2019-09-24 17:50:41 +03:00
jpekkila
62fa95ca0d The issue on Puhti was that it was missing a static flex library which would have provided the function yywrap. Fixed by removing the static library dependency and adding option noyywrap to the lexer generator file 2019-09-24 17:19:19 +03:00