Commit Graph

78 Commits

Author SHA1 Message Date
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
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
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
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
jpekkila
b4eea4b6b6 Changed #if 0 to #if LFORCING instead to get the code to compile if forcing is used (even though autotesting does not support it yet). Also more autoformatting. Maybe I should disable it or then everyone should start using it to avoid cluttering commits with these superficial changes 2019-07-03 17:49:34 +03:00
jpekkila
609cfaea14 Commenting the unused variables in simulation.cc a few commits back was the wrong move since the variables are needed if LFORCING it set. 2019-07-03 17:46:50 +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
jpekkila
d7228f0647 Added an explicit cast from double to AcReal to avoid a narrowing conversion error 2019-07-03 17:11:26 +03:00
jpekkila
919d446222 Commented out unused variables in simulation.cc 2019-07-03 17:10:40 +03:00
jpekkila
945751e585 Autoformatted host_forcing.cc 2019-07-03 17:06:57 +03:00
jpekkila
af3a1e211e Suppressed unused variable and function warnings in model_rk3.cc 2019-07-03 17:03:26 +03:00
jpekkila
59ac264743 simulation.cc autoformatting 2019-07-03 16:57:57 +03:00
Miikka Vaisala
f0d2be831e host_forcing now committed. Sorry. 2019-07-03 09:55:23 +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
Miikka Vaisala
d0eb308f17 Better interface to forcing. 2019-07-02 16:35:14 +08:00