jpekkila
aa45ce04de
Made the linear algebra functions used in forcing.cc static to avoid collisions with the functions defined in math_utils.h
2019-08-15 11:09:40 +03:00
jpekkila
36fea70560
Moved basic built-in functions for vector operations to math_utils.h from integration.cuh so that they are shared with the CPU and GPU
2019-08-15 11:04:22 +03:00
jpekkila
168cdc9109
Fixed a float/long double conversion that some complainers... um compilers complain about
2019-08-08 18:12:24 +03:00
jpekkila
2b3f9d75af
Ensured that acBoundcondStep is called everywhere in the program before acStore
2019-08-07 19:20:40 +03:00
jpekkila
d8eb2723b4
Added an acBoundconds() call before acStore in autotest.cc
2019-08-07 19:10:04 +03:00
jpekkila
1525e0603f
Added some preliminary pragma omps and verified that acIntegrate works as it should.
2019-08-07 19:08:52 +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
0bb568642f
Still one bug
2019-08-07 19:10:39 +08:00
Miikka Vaisala
738b2abaf3
Supposedly working autotest for upwinding.
2019-08-07 18:57:53 +08:00
Miikka Vaisala
065f20819f
Merge branch 'master' into bugfix/upwind_autotest_20190807
2019-08-07 18:23:03 +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
jpekkila
cf6b75f82a
Merged in cmakelist_rewrite_and_C_API_conformity_07-26 (pull request #1 )
2019-08-07 06:53:17 +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
d7e26e8f21
Added forcing from stencil_process.sps to autotests. 3 Tests fail.
2019-08-06 19:15:28 +03:00
jpekkila
0e0ace3970
Pure hydro now works with autotests
2019-08-06 18:07:29 +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
abf4815174
Merge branch 'master' into cmakelist_rewrite_and_C_API_conformity_07-26
2019-08-06 17:53:53 +03:00
jpekkila
e4d9898f35
Added improvements to autotest.cc
2019-08-06 17:40:27 +03:00
jpekkila
812b5e170e
Added some error checking to rendering
2019-08-06 16:32:36 +03:00
jpekkila
e4b981fc62
Removed the O2 flag since cmake still defines the O3 flag in CMAKE_CXX_FLAGS_RELEASE and it's confusing which one gcc chooses if both O3 and O2 are passed during compilation. If the issue was the march=native flag then this should also work on Tiara
2019-08-06 14:59:41 +03:00
jpekkila
5f4246fb42
Standalone now uses O2 optimization level instead of O3. Also removed -march=native since this causes issues if the program is compiled on a different architecture than it is run on. Since we do not do heavy arithmetic on the host side and the host code is not performance-critical part of the code, -march-native is not very useful anyways
2019-08-06 14:46:13 +03:00
jpekkila
92376588ba
Merge branch 'master' into cmakelist_rewrite_and_C_API_conformity_07-26
2019-07-31 20:12:22 +03:00
jpekkila
69deef66fe
Added sum reduction. NOTE: Scalar sum does not pass the automated test but vector sum does. I couldn't see anything wrong with the code itself and I strongly suspect that the failures are caused by loss of precision due to summing a huge amount of numbers of different magnitudes. However I'm not yet completely sure. Something like the Kahan summation algorithm might be useful if the errors are really caused by fp arithmetic.
2019-07-30 14:28:18 +03:00
jpekkila
a3359b0d04
CONFIG_PATH is now supplied by ac_mkbuilddir. While using would be a bit more idiomatic, ASTAROTH_CONF_PATH is probably safer since ac_mkbuilddir.sh does the copying and knows for sure what the correct path is.
2019-07-29 15:55:27 +03:00
jpekkila
c9fafe41e5
Tidied the CMakeLists, moved stuff to more logical places and added comments. Also tested that ALTER_CONF=ON still works
2019-07-26 15:12:55 +03:00
jpekkila
5044228967
The text editor I use to edit stuff remotely is a complete piece of &^$%$, does not synchronize the files correctly. This commit fixes the issues introduced in the last commit
2019-07-26 14:22:22 +03:00
jpekkila
b90d261e89
Removed an unnecessary include from the root CMakeLists.txt
2019-07-26 14:18:11 +03:00
jpekkila
26316a4d15
The standalone library is now compiled in parallel with the core library. Slightly faster.
2019-07-23 21:26:58 +03:00
jpekkila
f322bc8b37
Rewrote all CMakeLists. Now much cleaner and there's a clear separation during compilation between the core and standalone modules.
2019-07-23 20:50:37 +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
074eae0bae
Added definitions of AC_GEN_STR and AC_GEN_ID to host_memory.h and .cc since they are no longer available from astaroth.h
2019-07-22 19:49:29 +03:00
jpekkila
84af939e5d
The default benchmark is now more suitable for timing multi-GPU performance
2019-07-22 13:08:33 +03:00
Miikka Vaisala
074fb26df9
Added TODO_SINK comments.
...
The comments were written to map out what essential part are needed for
resolving a system with graviating sink particles. No changes to the code
itself.
2019-07-17 14:05:48 +08:00
jpekkila
78aba6428e
Updated the copyright years throughout the project
2019-07-16 14:28:32 +03:00
jpekkila
e14e19774d
Added a synchronization to benchmark.cc that is now required when calling acIntegrateStep
2019-07-09 19:03:45 +03:00
jpekkila
8cc9281045
Double versions of some sqrt, cos and sin were used in model_rk3.cc instead of the long double versions, fixed.
2019-07-09 19:03:15 +03:00
jpekkila
e6c770cbee
Added a synchronization after acLoadDeviceConstant since it is now stated to be asynchronous
2019-07-09 19:00:08 +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
eda2f6543b
Created a new ForcingParams structure and some functions for generating and transferring the forcing parameters to the host/device
2019-07-08 15:43:37 +03:00
Miikka Vaisala
f9be905703
Corrected an unit coversion issue from forcing.
...
Now noticing these because of switching to gcc 8.
2019-07-08 16:43:37 +08:00
jpekkila
c71711ec36
Disabled real-time visualization by default. SDL2 is no longer a dependency when building with the default flags.
2019-07-04 22:30:26 +03:00
jpekkila
ad7a497eef
Added a comment about timestepping and autoformat
2019-07-04 17:25:54 +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
698d04c57d
Removed a deprecated code block
2019-07-04 15:08:42 +03:00
jpekkila
556cb77dbb
Removed weird unused functions from model_rk3.cc. I have no idea where these came from. Probably remnants from the time I was pulling all-nighters to finish my thesis.
2019-07-03 18:06:40 +03:00