jpekkila
|
9e57aba9b7
|
New feature: ScalarArray. ScalarArrays are read-only 1D arrays containing max(mx, max(my, mz)) elements. ScalarArray is a new type of uniform and can be used for storing f.ex. forcing profiles. The DSL now also supports complex numbers and some basic arithmetic (exp, multiplication)
|
2019-09-02 21:26:57 +03:00 |
|
jpekkila
|
6ea02fa28e
|
DSL now 'feature complete' with respect to what I had in mind before the summer. Users can now create multiple kernels and the library functions are generated automatically for them. The generated library functions are of the form acDeviceKernel_<name> and acNodeKernel_<name>. More features are needed though. The next features to be added at some point are 1D and 2D device constant arrays in order to support profiles for f.ex. forcing.
|
2019-08-27 18:19:20 +03:00 |
|
jpekkila
|
20138263f4
|
The previous attempt (dsl_feature_completeness_2019-08-23) to enable arbitrary kernel functions was a failure: we get significant performance loss (25-100%) if step_number is not passed as a template parameter to the integration kernel. Apparently the CUDA compiler cannot perform some optimizations if there is a if/else construct in a performance-critical part which cannot be evaluated at compile time. This branch keeps step_number as a template parameter but takes rest of the user parameters as uniforms (dt is no longer passed as a function parameter but as an uniform with the DSL instead).
|
2019-08-27 17:36:33 +03:00 |
|
jpekkila
|
5d2b658fb0
|
Autoformatted the DSL files
|
2019-08-20 18:41:26 +03:00 |
|
jpekkila
|
5b7408eb55
|
User config param overhaul complete, works. If I haven't missed anything, all fields and user parameters, and everything related to simulation can now be declared with the DSL. The only thing that you need to do is to fill the declared symbols with data, like with OpenGL and GLSL.
|
2019-08-19 18:43:16 +03:00 |
|
jpekkila
|
51cf1f1068
|
The C header is now generated from the DSL, stashing the changes just to be sure since I might overwrite something when updating the compilation scripts to work with this new scheme
|
2019-08-19 18:19:28 +03:00 |
|
jpekkila
|
bcdd827a4f
|
Added a proper declarations for all user-specified uniform. Note: built-in uniforms are not correctly translated into CUDA
|
2019-08-19 17:05:56 +03:00 |
|
jpekkila
|
0208d55e4e
|
Moved STENCIL_ORDER and NGHOST out of user-defined parameter as these are actually internal defines used to configure the built-in functions. Additionally, renamed all explicitly declared uniforms from dsx -> AC_dsx in the DSL in preparation for having clear connection between DSL uniforms and the library parameter handles created by the user (AcRealParam etc)
|
2019-08-19 16:40:47 +03:00 |
|
jpekkila
|
c98b74563c
|
Added a comment
|
2019-08-19 16:18:24 +03:00 |
|
jpekkila
|
b316e51267
|
Added preliminary code for generating C headers with the DSL
|
2019-08-19 16:16:26 +03:00 |
|
jpekkila
|
a7a7b535d6
|
The code generator now generates more efficient CUDA: built-in parameters are passed as const references without copying
|
2019-08-08 21:35:07 +03:00 |
|
jpekkila
|
a172abeb1f
|
Modified the other sps files to use the new syntax. Though does not compile since there are some old/very old changes in the DSL that have not been updated to these files (f.ex. RK macro does not exist anymore, it's currently rk3)
|
2019-08-08 21:25:45 +03:00 |
|
jpekkila
|
67358fa75f
|
Removed acc/samples as unmaintained
|
2019-08-08 21:22:34 +03:00 |
|
jpekkila
|
b53cabbc44
|
Made the DSL syntax less confusing: Input and output arrays are now ScalarField and VectorFields instead of scalars and vectors. C++ initializers are now also possible, removing the need to declare Fields as int or int3 which was very confusing, like "what, you assing an int value to a real, what the &^%@?"
|
2019-08-08 21:07:36 +03:00 |
|
jpekkila
|
fd94b6321d
|
Renamed globalGrid.n to globalGridN
|
2019-08-07 18:16:34 +03:00 |
|
jpekkila
|
10200e4dd5
|
Merge branch 'master' into node_device_interface_revision_07-23
|
2019-08-07 16:25:33 +03:00 |
|
jpekkila
|
e2f5cced1e
|
Renamed dox -> dot
|
2019-08-07 16:08:03 +03:00 |
|
jpekkila
|
b61617ee0f
|
Enabled upwinding by default and updated the model helical forcing with the hotfixed changes from earlier commits. Autotests kinda pass (we get 1 failure but this is likely due to inaccuracies of the trigonometric functions used in helical forcing. The error is very close to the acceptable error bound).
|
2019-08-07 15:53:38 +03:00 |
|
Miikka Vaisala
|
7fdbd76aa2
|
The default stencil_defines.h setting for merge.
|
2019-08-07 19:05:14 +08:00 |
|
Miikka Vaisala
|
065f20819f
|
Merge branch 'master' into bugfix/upwind_autotest_20190807
|
2019-08-07 18:23:03 +08:00 |
|
Miikka Vaisala
|
7e6361a92a
|
Forcing hotfix.
Will need more investigation before scientific runs. Now just something to correct the obvious bug.
|
2019-08-07 16:04:48 +08:00 |
|
Miikka Vaisala
|
7cc524b78b
|
Adapting for autotest but i, j, k indexing is confusing.
|
2019-08-07 14:57:51 +08:00 |
|
jpekkila
|
a930864f42
|
Merge branch 'master' into node_device_interface_revision_07-23
|
2019-08-07 07:43:28 +03:00 |
|
Miikka Vaisala
|
9af5ba2156
|
Copied elements in the DSL form.
Needs to be adapted at the next stage.
|
2019-08-07 11:11:27 +08:00 |
|
jpekkila
|
a6fca069a7
|
Added a comment about helical forcing
|
2019-08-06 19:47:03 +03:00 |
|
jpekkila
|
d7e26e8f21
|
Added forcing from stencil_process.sps to autotests. 3 Tests fail.
|
2019-08-06 19:15:28 +03:00 |
|
jpekkila
|
daee456660
|
Merge branch 'cmakelist_rewrite_and_C_API_conformity_07-26' into node_device_interface_revision_07-23
|
2019-08-06 17:57:30 +03:00 |
|
jpekkila
|
614a0a1198
|
Added an autotesting script which tests for hydro, magnetic and mhd. Currently hydro and magnetic fail but full mhd works. This indicates that the equations in the hydro and magnetic conditionals have been changed but the autotests have not been updated to correspondingly
|
2019-08-06 17:40:02 +03:00 |
|
jpekkila
|
3726847683
|
Made globalGridN and d_multigpu_offsets built-in parameters. Note the renaming from globalGrid.n to globalGridN.
|
2019-08-06 16:39:15 +03:00 |
|
jpekkila
|
f3de2fa03c
|
Made globalVertexIdx available during preprocessing. NOTE: potentially dangerous. globalVertexIdx should never be used for reading data from the vertex buffers.
|
2019-08-05 15:03:02 +03:00 |
|
jpekkila
|
323d4e3b31
|
Replaced all calls to AC_VTXBUF_IDX to acVertexBufferIdx etc in all files
|
2019-07-23 14:37:28 +03:00 |
|
jpekkila
|
85883dbc38
|
NUM_INT_PARAM_TYPES is now NUM_INT_PARAMS etc, replaced these throughout the project
|
2019-07-22 19:53:45 +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
|
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 |
|
jpekkila
|
81a09501b8
|
Removed deprecated LNT0 and LNRHO0 defines, now the actual configuration parameters are used (AC_lnrho0 and AC_lnT0). Also accidental autoformatting again, there seems to be stray spaces before linebreaks in some files which get automatically removed by my text editor
|
2019-07-03 17:23:37 +03:00 |
|
Miikka Vaisala
|
98713ff9d2
|
A possible bug note added. Will look into late.
|
2019-07-03 14:49:10 +08:00 |
|
Miikka Vaisala
|
334ff868d9
|
Forcing disabled from autotest and from defaults.
It is not suitable function of the autotest tool. If there in really a
mandatory need to add it. I will need special help from Johannes.
|
2019-07-02 18:46:04 +08:00 |
|
Miikka Vaisala
|
4766441ffb
|
Tryin to prepare autotest for forcing.
|
2019-07-02 18:24:41 +08:00 |
|
Miikka Vaisala
|
03689709df
|
Merge branch 'master' into forcing
|
2019-07-02 16:43:10 +08:00 |
|
jpekkila
|
d9b07a59b5
|
Tested with hydro, hydro + magnetic, hydro + magnetic + entropy and hydro + magnetic + entropy + forcing. Autotests passed in all cases.
|
2019-07-01 19:01:42 +03:00 |
|
jpekkila
|
1e6740f999
|
Added the equations for hydro only for both CPU and GPU. NOTE: NOT RIGOROUSLY CHECKED FOR CORRECTNESS. I just took the equations used with entropy and removed the terms which included entropy and magnetic fields
|
2019-07-01 18:56:13 +03:00 |
|
jpekkila
|
21e9fc943b
|
Removed all defines from the stencil assembly and processing files and moved them to the new stencil_defines header. There were spaces after some linebreaks which were removed when I autoformatted the code and that's why there seems to be more changes that there actually is.
|
2019-07-01 18:40:13 +03:00 |
|
jpekkila
|
b8869bb848
|
Linked the defines used by the DSL and astaroth.h. Now f.ex. LENTROPY has to be set only once in acc/mhd_solver/stencil_defines.h and it is propagated throughout the whole project. The name for stencil_defines.h is not final and may change if I come up with a better name. In any case, there is now a standard header associated with each DSL solver where the user can set defines, and declare arrays (VTXBUF_LNRHO) and device constants (uniforms).
|
2019-07-01 18:37:56 +03:00 |
|
jpekkila
|
d9be66f65f
|
NOTE: Renamed LINDUCTION to LMAGNETIC throughout the project.
|
2019-07-01 13:40:24 +03:00 |
|
Miikka Vaisala
|
0600790f41
|
Corrected a bug in the timestep and some scaling problems.
Now I can reach a saturated stated in forcing without crashing the code.
|
2019-07-01 14:19:56 +08:00 |
|
Miikka Vaisala
|
9f0be0d9ff
|
Solved the forcing function boundary problem.
|
2019-07-01 11:06:42 +08:00 |
|
Miikka Vaisala
|
f04ef8e64c
|
Forcing function issue not yet fully resolved.
Now brain hurs. No more today. Break needed.
|
2019-06-28 19:23:18 +08:00 |
|
Miikka Vaisala
|
94a25383a9
|
Trying to calculate the forcing scaling.
Causes nans very quickly. Will need to look closer tomorrow again.
|
2019-06-27 19:20:18 +08:00 |
|