deebe570daMerge branch 'master' into multigpu_optimization_2019-07-05
jpekkila
2019-07-08 16:11:24 +03:00
eda2f6543bCreated a new ForcingParams structure and some functions for generating and transferring the forcing parameters to the host/device
jpekkila
2019-07-08 15:43:37 +03:00
f9be905703Corrected an unit coversion issue from forcing.
Miikka Vaisala
2019-07-08 16:43:37 +08:00
df1ba6264aUpdate to readme.
Miikka Vaisala
2019-07-08 11:08:45 +08:00
6ba15c3a7cprops.totalConstMem and props.sharedMemPerBlock cause assembler error
Miikka Vaisala
2019-07-08 11:00:12 +08:00
5fdfdeca9eMulti-GPU optimizations: removed some unnecessary synchronization and divided the calculation of boundary conditions to local and global steps.
jpekkila
2019-07-05 18:21:44 +03:00
f1066a2c11Added preliminary pragmas for dispatching commands simultaneously to multiple GPUs (commented out)
jpekkila
2019-07-05 17:16:12 +03:00
2092adc0f6Preparations for multi-GPU optimizations
jpekkila
2019-07-05 15:44:30 +03:00
ce8fe53f91Moved explanations and comments to the beginning of astaroth.cu. No code changes.
jpekkila
2019-07-05 15:39:52 +03:00
d87eb36f5aFormatting: brackets around a for loop for consistency
jpekkila
2019-07-05 15:26:19 +03:00
224b91b83aAdded more control for synchronizing streams and halos among the GPUs
jpekkila
2019-07-05 15:17:20 +03:00
332f1a4f40Reordered some of the functions in astaroth.cu and introduced acExchangeHalos() for synchronizing the part of the grid that is independent from the chosen boundary conditions between subgrids.
jpekkila
2019-07-05 15:01:51 +03:00
c71711ec36Disabled real-time visualization by default. SDL2 is no longer a dependency when building with the default flags.
jpekkila
2019-07-04 22:30:26 +03:00
ad7a497eefAdded a comment about timestepping and autoformat
jpekkila
2019-07-04 17:25:54 +03:00
d1a93b7d4eacIntegrateStepWithOffset corrected and confirmed to work on 1-4 GPUs
jpekkila
2019-07-04 16:58:24 +03:00
91f119e8ddDeprecated the old implementation of acIntegrateStep. acIntegrateStep now calls acIntegrateStepWithOffset instead of device.cuh functions.
jpekkila
2019-07-04 16:37:55 +03:00
a53e0a170dOverloaded max/min for int3 and removed old comments
jpekkila
2019-07-04 16:24:08 +03:00
e1d545b0ebCode readability and cleanup (remembered that int3 has + and - operators defined in math_utils.h)
jpekkila
2019-07-04 16:16:49 +03:00
30254d9abbRemoved a redundant and old gridIdxx function which I though I already removed a long time ago.
jpekkila
2019-07-04 16:10:29 +03:00
b3a0b10a86Removed old comments
jpekkila
2019-07-04 16:02:13 +03:00
24f49ce461Host code now compiled according to the C++11 standard. The device code has used C++11 for a while now and it's good to use a single standard consistently throughout the project. Old Intel compilers (~14.0) do not seem to support C++11 but the code should still compile since the flag is ignored in that case.
jpekkila
2019-07-04 16:01:02 +03:00
0884c4bf38Moved the definition of acForcingVec to host_forcing.cc since it depends on user parameters that may not be defined in all projects
jpekkila
2019-07-04 15:28:18 +03:00
698d04c57dRemoved a deprecated code block
jpekkila
2019-07-04 15:08:42 +03:00
317df4c025Re-enabled the check for implicit float-double-float conversions with gcc
jpekkila
2019-07-04 13:45:09 +03:00
edafe5a563Made the gcc version check more lenient
jpekkila
2019-07-04 13:43:49 +03:00
b65a0750ccUpdated CUDA version on README
Miikka Vaisala
2019-07-04 14:14:24 +08:00
ce54499351Removed an accidental '\'
Miikka Vaisala
2019-07-04 14:11:26 +08:00
0a030742f9Added support for calling compile_acc.sh with custom headers
jpekkila
2019-07-03 19:06:39 +03:00
7abb959828Overhaul 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
jpekkila
2019-07-03 19:01:16 +03:00
6907d74ea3Suppressed an unused variable warning for globalVertexIdx
jpekkila
2019-07-03 18:46:17 +03:00
7d6255ba14Suppressed unused variable warnings in kernels.cuh
jpekkila
2019-07-03 18:12:48 +03:00
556cb77dbbRemoved 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.
jpekkila
2019-07-03 18:06:40 +03:00
b4eea4b6b6Changed #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
jpekkila
2019-07-03 17:49:34 +03:00
609cfaea14Commenting the unused variables in simulation.cc a few commits back was the wrong move since the variables are needed if LFORCING it set.
jpekkila
2019-07-03 17:46:50 +03:00
acc53e1c2bMerged master to acc_parameter_overhaul
jpekkila
2019-07-03 17:37:37 +03:00
e8a5579b50Made the gcc error flags more lenient temporarily since there are so many float-double-float conversion errors in host_forcing.cc
jpekkila
2019-07-03 17:25:26 +03:00
81a09501b8Removed 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
jpekkila
2019-07-03 17:23:37 +03:00
8ed947ce98Removed deprecated sinusoidal forcing from kernels.cuh
jpekkila
2019-07-03 17:13:45 +03:00
d7228f0647Added an explicit cast from double to AcReal to avoid a narrowing conversion error
jpekkila
2019-07-03 17:11:26 +03:00
919d446222Commented out unused variables in simulation.cc
jpekkila
2019-07-03 17:10:40 +03:00
d54ccc1da8Deprecated a block of old code that was used a long time ago for testing forcing
jpekkila
2019-07-03 17:10:01 +03:00
25d4b9a0cdAdded compilation warning flags for the Intel compiler.
jpekkila
2019-07-03 16:54:51 +03:00
d4968d0583Made the gcc warning flags stricter
jpekkila
2019-07-03 16:38:31 +03:00
08e9a32cb1Added a comment about acForcingVec
jpekkila
2019-07-03 16:37:16 +03:00
d4d2680f40Added a new generic function to the interface (astaroth.h) for loading arbitrary device constants. Also (unintended) autoformatting.
jpekkila
2019-07-03 16:19:25 +03:00
46a2ef4847Commit demonstration for student.
Miikka Vaisala
2019-07-03 15:13:01 +08:00
98713ff9d2A possible bug note added. Will look into late.
Miikka Vaisala
2019-07-03 14:49:10 +08:00
f0d2be831ehost_forcing now committed. Sorry.
Miikka Vaisala
2019-07-03 09:55:23 +08:00
334ff868d9Forcing disabled from autotest and from defaults.
Miikka Vaisala
2019-07-02 18:46:04 +08:00
4766441ffbTryin to prepare autotest for forcing.
Miikka Vaisala
2019-07-02 18:24:41 +08:00
03689709dfMerge branch 'master' into forcing
Miikka Vaisala
2019-07-02 16:43:10 +08:00
d0eb308f17Better interface to forcing.
Miikka Vaisala
2019-07-02 16:35:14 +08:00
d9b07a59b5Tested with hydro, hydro + magnetic, hydro + magnetic + entropy and hydro + magnetic + entropy + forcing. Autotests passed in all cases.
jpekkila
2019-07-01 19:01:33 +03:00
1e6740f999Added 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
jpekkila
2019-07-01 18:56:13 +03:00
75f74526f4Fixed incorrect logic with ifdefs: LMAGNETIC etc are toggle switches and are always defined
jpekkila
2019-07-01 18:43:04 +03:00
21e9fc943bRemoved 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.
jpekkila
2019-07-01 18:40:13 +03:00
b8869bb848Linked 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).
jpekkila
2019-07-01 18:37:56 +03:00
9a87053f26README.md edited online with Bitbucket
jpekkila
2019-07-01 14:08:59 +00:00
7dc5161056Added guidelines for contributing to the project.
jpekkila
2019-07-01 13:44:55 +00:00
2d91df19dcAdded a flowchart on how to commit to Astaroth
jpekkila
2019-07-01 16:06:15 +03:00
11ceca4cb1Second test commit (feature branches)
jpekkila
2019-07-01 14:54:55 +03:00
30b7cda35cTesting the git commands for creating feature branches and merging them back to master
jpekkila
2019-07-01 14:42:36 +03:00
a3ca6cf132Added skeletons for packing parts of the ghost zones into buffers to speed up data transfers
jpekkila
2019-07-01 13:56:05 +03:00
d9be66f65fNOTE: Renamed LINDUCTION to LMAGNETIC throughout the project.
jpekkila
2019-07-01 13:40:24 +03:00
0600790f41Corrected a bug in the timestep and some scaling problems.
Miikka Vaisala
2019-07-01 14:19:56 +08:00
9f0be0d9ffSolved the forcing function boundary problem.
Miikka Vaisala
2019-07-01 11:06:42 +08:00
0c63d55fd7Worked around a compiler bug in CUDA 9.1, which caused an "Internal Compiler Error (codegen): "there was an error in verifying the lgenfe output!". Apparently the compiler got confused by overloaded is_valid() if the input parameter was not passed as a reference in both cases.
jpekkila
2019-06-29 10:49:15 +03:00
f04ef8e64cForcing function issue not yet fully resolved.
Miikka Vaisala
2019-06-28 19:23:18 +08:00
9b45716186Modified user.h such that astaroth compiles with Pencil Code. Note that this is a temporary fix: we should ultimately set the default parameters for all the logical switches in astaroth.h and let the user redefine them at will, either with the DSL or with user.h
jpekkila
2019-06-27 18:12:14 +03:00
b694702cf8Removed an old comment
jpekkila
2019-06-27 17:11:21 +03:00
94a25383a9Trying to calculate the forcing scaling.
Miikka Vaisala
2019-06-27 19:20:18 +08:00
30c21ff420Formatting: defines stay indented if clang-format is turned off temporarily
jpekkila
2019-06-27 13:31:50 +03:00
8ca09668c1Added an advance notice about LINDUCTION to be renamed to LMAGNETIC in the near future throughout the project. LMAGNETIC would be better name since he define is used to enable the magnetic field.
jpekkila
2019-06-27 13:28:52 +03:00
fc96283c37Reordered logical flags in a more logical order, density -> hydro -> induction -> entropy -> others
jpekkila
2019-06-27 13:22:14 +03:00
75fb756ad4Autoformatted with clang-format. Clang-format does not support indented defines as far as I know, so this will have to do. The alternative would be not to use autoformatting at all (or some other tool).
jpekkila
2019-06-27 13:16:41 +03:00
ee075e6741Set the default number of devices to 0 (this is updated at acInit()
jpekkila
2019-06-26 19:42:49 +03:00
65c8a39cb9Removed old comments and renamed USER_PROVIDED to USER_PROVIDED_DEFINES to be more explicit
jpekkila
2019-06-26 18:56:40 +03:00
cda17c9b08VERBOSE_PRINTING flag is now globally used in the whole program and should be used to suppress development/debugging-related printing. Also added comments to the new interface function acCheckDeviceAvailability and made it free from side effects.
jpekkila
2019-06-26 18:50:15 +03:00
0bc8b7e827MR: VTXBUF_DENSITY -> VTXBUF_LNRHO, minor
Matthias Rheinhardt
2019-06-25 23:50:57 +03:00