Commit Graph

63 Commits

Author SHA1 Message Date
jpekkila
46cfa9cd37 Now using MPI C bindings instead of the (deprecated?) C++ bindings due to compilation issues on some machines (error: cast between incompatible function types, ompi_mpi_cxx_op_intercept) 2020-08-19 15:50:16 +03:00
jpekkila
043237f677 Now samples build even if MPI is not available 2020-08-19 13:50:26 +03:00
jpekkila
a5d6fb4303 Host flags were not propagated to the CUDA compiler, fixed 2020-07-29 19:34:28 +03:00
jpekkila
8fb271bbf3 Upped CMake version to 3.18 and cleaned up CUDA architecture selection 2020-07-29 18:45:10 +03:00
jpekkila
fbb8d7c7c6 Added a minimal Fortran interface to Astaroth 2020-06-25 06:34:16 +03:00
jpekkila
70ecacee7c Reverted the default build options to what they were before merging (again) 2020-06-24 17:04:35 +03:00
jpekkila
c0c337610b Added mpi_reduce_bench to samples 2020-06-24 16:42:39 +03:00
jpekkila
3c3b2a1885 Reverted the default settings to what they were before merge. Note: LFORCING (1) is potentially not tested properly, TODO recheck. 2020-06-24 15:35:19 +03:00
jpekkila
17a4f31451 Added the latest setup used for benchmarks 2020-06-04 20:47:03 +03:00
jpekkila
0d80834619 Disabled forcing and upwinding for performance tests. Set default grid size to 512^3. Set default cmake params s.t. benchmarks can be reproduced out-of-the-box. 2020-06-02 14:09:00 +03:00
jpekkila
a753ca92f2 Made cmake handle MPI linking. Potentially a bad idea (usually better to use mpicc and mpicxx wrappers) 2020-05-30 22:02:39 +03:00
jpekkila
b719306266 Upped the required CMake version. This may be an issue on older machines. Instead of making the user to compile CMake themselves in this case, we could maybe add CMake as a submodule. In any case supporting older CMake versions is not really an option because CUDA support with those is so bad and requires adding dirty hacks to the clean cmakefiles we have now. 2020-05-30 19:36:32 +03:00
jpekkila
555bf8b252 Reverted the default settings to same as on master for easier merge 2020-05-30 19:06:21 +03:00
jpekkila
ed8a0bf7e6 Added bwtest and benchmarkscript to CMakeLists 2020-04-07 18:35:12 +03:00
jpekkila
9065381b2a Added the configuration used for benchmarking (not to be merged to master) 2020-03-30 18:01:35 +03:00
jpekkila
af531c1f96 Added a sample for benchmarking 2020-03-30 17:22:41 +03:00
jpekkila
fbd4b9a385 Made the MPI flag global instead of just core 2020-03-26 14:57:22 +02:00
jpekkila
daa895d2fc Fixed an issue that prevented Ninja being used as an alternative build system to Make. There's no signifant performance benefit to using Ninja though. Build times: 29-32 s (Make) and 27-28 s (Ninja) 2020-02-10 14:37:48 +02:00
jpekkila
6dfe3ed4d6 Added out-of-the-box support for MPI (though not enabled by default). Previously the user had to pass mpicxx explicitly as the cmake compiler in order to compile MPI code, but this was bad practice and it's better to let cmake handle the include and compilation flags. 2020-01-28 15:59:20 +02:00
jpekkila
85d4de24e3 Recompilation is now properly triggered when acc sources or the ac standard library are modified 2020-01-28 14:12:25 +02:00
jpekkila
5444c84cff Formatting 2020-01-27 18:24:46 +02:00
jpekkila
4c9523675c Might as well enable the C11 standard (separate from CXX11) 2020-01-27 18:16:02 +02:00
jpekkila
8464c1207d Set host compiler CXX standard explicitly to 11 2020-01-27 18:14:29 +02:00
jpekkila
fcd61180c8 Added more information to MULTIGPU_ENABLED cmake flag 2020-01-27 17:19:19 +02:00
jpekkila
9e7e67819f Turned MULTIGPU_ENABLED=ON to be equivalent with the master branch 2020-01-27 17:05:29 +02:00
jpekkila
e27be3bdc8 CMakeLists.txt edited online with Bitbucket 2020-01-24 05:15:49 +00:00
jpekkila
f8cd571323 Now CMake and compilation flags are functionally equivalent with the current master branch, not taking into account the deprecated flags. Also various small improvements to building.
Deprecated flags:
        * BUILD_DEBUG. This was redundant since CMake also has such flag. The build type can now be switched by passing -DCMAKE_BUILD_TYPE=<Release|Debug|RelWithDebugInfo|...> to cmake. See CMake documentation on CMAKE_BUILD_TYPE on all av
        * BUILD_UTILS. The utility library is now always built along the core library. We can reintroduce this flag if needed when the library grows larger. Currently MPI functions depend on Utils and without the flag we don't have to worr
        * BUILD_RT_VISUALIZATION. RT visualization has been dormant for a while and I'm not even sure if it works any more. Eventually the RT library should be generalized and moved to Utils at some point. Disabled the build flag for the t
2020-01-24 07:00:49 +02:00
jpekkila
c7c2a3eea4 Simplified/rewrote the root CMakeLists.txt s.t. compilation bugs are easier to pinpoint. WIP, not all functionality is yet enabled (primarily compilation options like MPI_ENABLED and others) 2020-01-23 20:07:59 +02:00
jpekkila
8f646e700e Updated README.md with the new BUILD_SAMPLES option 2020-01-15 17:02:47 +02:00
jpekkila
7a099a008e Removed build flags for old samples, replaced with BUILD_SAMPLES 2020-01-15 16:56:58 +02:00
jpekkila
a937546ffb Added a new CMake option: BUILD_SAMPLES. 2020-01-15 16:19:39 +02:00
Miikka Vaisala
604005ed37 Now compiles after compile_acc_module.sh moved to other place. 2020-01-15 13:58:19 +08:00
jpekkila
9d70a29ae0 Now the minimum cmake version is 3.9. This is required for proper CUDA & MPI support. Older versions of cmake are very buggy when compiling cuda and it's a pain in the neck to try and work around all the quirks. 2019-12-05 15:35:51 +02:00
jpekkila
6e63411170 Moved the definition of AC_DEFAULT_CONFIG to the root-level CMakeLists.txt. Now should be visible throughout the project. 2019-12-03 18:42:49 +02:00
jpekkila
859195eda4 exampleproject no longer compiled with astaroth utils 2019-10-17 13:04:39 +03:00
jpekkila
1ca089c163 New cmake option: MPI_ENABLED. Enables MPI functions on the device layer 2019-10-15 17:57:53 +03:00
jpekkila
d8d0032972 Updated CMakeLists.txt with the correct dependencies 2019-10-07 15:43:46 +03:00
jpekkila
adee6b0097 Added the new utility library as a build option 2019-10-01 15:22:25 +03:00
jpekkila
72af2cf31d acc 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) 2019-09-24 16:57:19 +03:00
jpekkila
24f46324e0 Deprecated 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. 2019-09-18 19:22:15 +03:00
jpekkila
3bb6ca1712 The 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. 2019-09-18 17:28:29 +03:00
jpekkila
eefd60983a 3rd party dependencies do not have to be fetched manually any more, cmake make will do that automatically if needed 2019-09-18 09:06:03 +03:00
jpekkila
4ce51ea60e Now the generated CUDA header files are completely local (placed in the build directory) instead of depending on some predefined directory structure. This allows users to swap between build directories without having to recompile. 2019-09-12 20:11:21 +03:00
jpekkila
da76fca0dc Added a test for building an MPI project. Building for the MPI and C API tests is now also disabled by default. 2019-08-05 18:30:48 +03:00
jpekkila
d614a03653 Made CMake to use the default compiler on system PATH. If the generic compiler names (cc, c++) point to some old version, then cmake would otherwise use those instead of the latest available compiler. 2019-07-29 16:07:31 +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
b90d261e89 Removed an unnecessary include from the root CMakeLists.txt 2019-07-26 14:18:11 +03:00
jpekkila
f0d1fba55c The pure C test works again. 2019-07-23 21:00:00 +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
b65454d523 Stashed some testing files used to make sure that the library can also be used from pure C projects (better compatibility). These changes will never go to master as-is. 2019-07-23 18:24:47 +03:00