26bbfa089dBetter multi-node communication: fire and forget.
jpekkila
2019-10-17 18:17:37 +03:00
3d852e5082Added timing to the MPI benchmark
jpekkila
2019-10-17 17:43:54 +03:00
e0a631d81aAdded the hires timer to utils
jpekkila
2019-10-17 17:43:34 +03:00
588a94c772Added more MPI stuff. Now multi-node GPU-GPU communication with GPUDirect RDMA should work. Also device memory is now allocated in unified memory by default as this makes MPI communication simpler if RDMA is not supported. This does not affect Astaroth any other way since different devices use different portions of the memory space and we continue managing memory transfers manually.
jpekkila
2019-10-17 16:09:05 +03:00
0e88d6c339Marked some internal functions static
jpekkila
2019-10-17 14:41:44 +03:00
7390d53f79Added missing extern Cs to verification.h
jpekkila
2019-10-17 14:41:13 +03:00
f1e988ba6aAdded stuff for the device layer for testing GPU-GPU MPI. This is a quick and dirty solution which is primarily meant for benchmarking/verification. Figuring out what the MPI interface should look like is more challenging and is not the priority right now
jpekkila
2019-10-17 14:40:53 +03:00
bb9e65a741AC_DEFAULT_CONFIG now propagated to projects that link to astaroth utils
jpekkila
2019-10-17 13:05:17 +03:00
859195eda4exampleproject no longer compiled with astaroth utils
jpekkila
2019-10-17 13:04:39 +03:00
65a2d47ef7Made grid.cu (multi-node) to compile without errors. Not used though.
jpekkila
2019-10-17 13:03:42 +03:00
ef94ab5b96A small update to ctest
jpekkila
2019-10-17 13:02:41 +03:00
0865f0499bVarious improvements to the MPI-GPU implementation, but linking MPI libraries with both the host C-project and the core library seems to be a major pain. Currently the communication is done via gpu->cpu->cpu->gpu.
jpekkila
2019-10-15 19:32:16 +03:00
113be456d6Undeprecated the wrong function in commit b693c8a
jpekkila
2019-10-15 18:11:07 +03:00
1ca089c163New cmake option: MPI_ENABLED. Enables MPI functions on the device layer
jpekkila
2019-10-15 17:57:53 +03:00
0d02faa5f5Working base for gathering, distributing and communicating halos with MPI
jpekkila
2019-10-15 17:39:26 +03:00
b11ef143ebMoved a debug print further to reduce clutter
jpekkila
2019-10-15 17:38:29 +03:00
fd9dc7ca98Added periodic boundconds to utils
jpekkila
2019-10-15 17:37:57 +03:00
ff1ad37047Some small improvements to the utils library
jpekkila
2019-10-15 17:00:58 +03:00
46ad9da8c8Pulled some stuff from the mpi branch
jpekkila
2019-10-15 17:00:44 +03:00
4ae9c74d9dAdded a function for randomizing vertex buffers (useful for testing)
jpekkila
2019-10-15 16:13:11 +03:00
b693c8adb4Undeprecated acDeviceLoadMesh and acDeviceStoreMesh, these are actually very nice to have
jpekkila
2019-10-15 16:12:31 +03:00
8d86ac6f9eStarted preparing the MPI version for benchmarks and added a solve-independent version of the verification functions to the utils library
jpekkila
2019-10-15 15:54:15 +03:00
08188f3f5bis_valid is now consistently overloaded (parameter passed as a reference). Older CUDA compilers complained about this.
jpekkila
2019-10-14 21:18:21 +03:00
b667735906Removed debug prints from the preprocessing script
jpekkila
2019-10-08 00:31:15 +03:00
44a86f5e80acc: Removed debug prints, old code. Also the scope of the declarations made inside a for statement is now properly tracked
jpekkila
2019-10-08 00:20:57 +03:00
08f155cbecFinetuning some error checks
jpekkila
2019-10-07 20:40:32 +03:00
ea4438f331Adapted the old example of helical forcing with profiles to conform with the revised syntax
jpekkila
2019-10-07 19:43:25 +03:00
0cc5bdaa08Added support for ScalarArrays back
jpekkila
2019-10-07 19:42:24 +03:00
5d4f47c3d2Added overloads for vector in-place addition and subtraction
jpekkila
2019-10-07 19:40:54 +03:00
9c575f8059Merge branch 'master' into acc_rewrite_20191002
jpekkila
2019-10-07 18:28:33 +03:00
ff12332f06Clarified 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.
jpekkila
2019-10-07 18:24:32 +03:00
ffb139883fAPI_specification_and_user_manual.md edited online with Bitbucket
jpekkila
2019-10-07 15:22:26 +00:00
aa6c2b23d9Built-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
jpekkila
2019-10-07 17:39:27 +03:00
3fe7b62d3eRemoved the old accrevision directory
jpekkila
2019-10-07 17:37:09 +03:00
6560be7056Moved the old mhd solver to mhd_solver_DEPRECATED and replaced it with the new stencil_kernel.ac file
jpekkila
2019-10-07 17:36:23 +03:00
8c1e603a98On second thought, let's revert the changes in mhd_solver and use the file I already modified instead of doing the same changes twice
jpekkila
2019-10-07 17:29:53 +03:00
c8e0586b60Renamed the old .sas and .sdh files to regular headers and added #pragma once.
jpekkila
2019-10-07 17:17:26 +03:00
ee4ff730f6Deprecated inv_dsx and friends from utils/config_loader.c since those are not defined in the case where the user does not include stdderiv.h
jpekkila
2019-10-07 17:01:21 +03:00
48c6174319Added error checks to stdderiv.h
jpekkila
2019-10-07 16:59:58 +03:00
7afab65806Fixed the compilation script to use the correct name for the preprocessed file
jpekkila
2019-10-07 16:39:49 +03:00
0e1d1b9fb4Some optimizations for DSL compilation. Also a new feature: Inplace addition and subtraction += and -= are now allowed
jpekkila
2019-10-07 16:33:24 +03:00
f7c079be2aRemoved everything unnecessary from integration.cuh. Now all derivatives etc are available in a standard library header (acc/stdlib/stdderiv.h)
jpekkila
2019-10-07 15:47:33 +03:00
cd09a7d9e8Update the module compilation script with the new syntax. Now the Astaroth DSL compiler creates the files instead of having to pipe stdout to some file with a bash script
jpekkila
2019-10-07 15:46:05 +03:00
6ed3b7978dUpdated the name of the generated header
jpekkila
2019-10-07 15:44:21 +03:00
d8d0032972Updated CMakeLists.txt with the correct dependencies
jpekkila
2019-10-07 15:43:46 +03:00
d97f5b59baRewrote the Astaroth DSL compiler. More information and cleanup in the next commits.
jpekkila
2019-10-07 15:43:20 +03:00
a02fa349ceCommented out a grammar rule that was ambiguous
jpekkila
2019-10-03 01:52:56 +03:00
b0162bdea0Added DSL versions of the basic derivative operations (placeholder)
jpekkila
2019-10-02 21:09:36 +03:00
cc3c2eb926Added 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.
jpekkila
2019-10-02 21:03:59 +03:00
f8e82d41afCan now set the endtime for simulation, instead of step number.
Miikka Vaisala
2019-10-02 15:09:26 +08:00
79fe634a84Tested and works. Now it is possible to continue the simulatiom with a specific file number.
Miikka Vaisala
2019-10-02 14:30:13 +08:00
0dbbcd22d5Tested and works. We can now continue simulation from the chose snapshot number.
Miikka Vaisala
2019-10-02 14:09:47 +08:00
1b0e9803b0Compiles and runs again.
Miikka Vaisala
2019-10-02 13:52:38 +08:00
54d89f7a46In principle should read a specifield old run.
Miikka Vaisala
2019-10-02 11:37:51 +08:00
d5b6f3b48eDrafted read_mesh() to read existing binary data with at a specific step number.
Miikka Vaisala
2019-10-02 11:16:30 +08:00
cbbfd941f8Merge branch 'master' into io_improvement_20190924
Miikka Vaisala
2019-10-02 10:47:51 +08:00
7d76250f70Updated stencil_process.sps with the revised syntax for real literals
jpekkila
2019-10-01 21:20:28 +03:00
a0037d1a44Modified 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
jpekkila
2019-10-01 21:14:33 +03:00
b4a6ddb074Preprocessing 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.
jpekkila
2019-10-01 21:08:38 +03:00
d4eaee7d47First pass of the Astaroth API specification complete
jpekkila
2019-10-01 18:27:37 +03:00
9a16c79ce6Renamed all references to uniforms to f.ex. loadScalarConstant -> loadScalarUniform (for consistency with the DSL)
jpekkila
2019-10-01 17:12:20 +03:00
20c2069231Made the utility library more consistent with the core library
jpekkila
2019-10-01 15:45:56 +03:00
19b16eecc8Added 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)
jpekkila
2019-10-01 15:33:26 +03:00
5a45fe11a8Added the utility library itself (linked with target astaroth_utils)
jpekkila
2019-10-01 15:23:39 +03:00
adee6b0097Added the new utility library as a build option
jpekkila
2019-10-01 15:22:25 +03:00
2c8c49ee24Removed or updated some old .gitignore files
jpekkila
2019-09-24 17:50:41 +03:00
e4eea7db83Added support for Volta GPUs
jpekkila
2019-09-24 17:19:45 +03:00
62fa95ca0dThe 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
jpekkila
2019-09-24 17:19:19 +03:00
72af2cf31dacc 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)
jpekkila
2019-09-24 16:57:19 +03:00
a91da8388cBetter code style in some of the acc source files
jpekkila
2019-09-24 15:50:20 +03:00
d7bd92ed1bData read and written now with respect to actual AcReal properties. This will save space in the future.
Miikka Vaisala
2019-09-24 16:54:04 +08:00
24f46324e0Deprecated the old style of selecting a config file (was a compile-time parameter). The config file is now a runtime parameter and can be changed without recompilation. Usage: ./ac_run -s <path/to/config/file/relative/to/ac_run/path>. config/astaroth.conf is selected by default if the custom path is not supplied to ac_run.
jpekkila
2019-09-18 19:22:15 +03:00
3bb6ca1712The 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.
jpekkila
2019-09-18 17:28:29 +03:00
bce3e4de03Made warnings about unused device functions go away
jpekkila
2019-09-18 16:58:04 +03:00
eefd60983a3rd party dependencies do not have to be fetched manually any more, cmake make will do that automatically if needed
jpekkila
2019-09-18 09:06:03 +03:00