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
jpekkila
72af2cf31d
acc is now built with cmake instead of the old build script. This was mainly done to fix compilation on Puhti where I had problems linking flex even though it is available. As an added bonus the code is now safer to build since all dependencies are now rigorously tracked by cmake and make, and f.ex. change in the compiler now forces also the whole library to be rebuilt (which is the behaviour we want)
2019-09-24 16:57:19 +03:00
jpekkila
a91da8388c
Better code style in some of the acc source files
2019-09-24 15:50:20 +03:00
jpekkila
3bb6ca1712
The Astaroth Code Compiler (acc) is now built with cmake. Additionally, make is now used to generate the CUDA headers from DSL sources. The headers are also properly regenerated whenever a DSL file has been changed. With this commit, the DSL is now seamlessly integrated to the library and we no longer need complicated scripts to figure out the correct files. The current workflow for using custom DSL sources is to pass the DSL module directory to cmake, f.ex. cmake -DDSL_MODULE_DIR=/acc/mhd_solver. Note that the path must be absolute or then given relative to the CMakeLists.txt directory. f.ex cd build && cmake -DDSL_MODULE_DIR=../acc/mhd_solver does not work. CMake then takes all DSL files in that directory and handles the rest.
2019-09-18 17:28:29 +03:00
Miikka Vaisala
f5733e5144
Turnin LSINK off by default to prepare for merge to master.
2019-09-16 11:15:44 +08:00
Miikka Vaisala
42f92c7d49
Merge branch 'master' into sink_20190723
2019-09-16 10:57:15 +08:00
Miikka Vaisala
bd55c42fe5
Hann-windowing for the sink
2019-09-03 16:38:16 +08:00
Miikka Vaisala
dac509241f
Cleanup, comments and a new template.
2019-09-03 15:24:58 +08:00
Miikka Vaisala
b3ed0937fe
Changes according to JP's comments in the Issue #8 .
2019-09-03 10:19:22 +08:00