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
jpekkila
eb589def71
Added some additional warning flags for gcc. Disabled them by default until I get the new warnings fixed.
2019-07-18 08:34:52 +03: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
24f49ce461
Host 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.
2019-07-04 16:01:02 +03:00
jpekkila
317df4c025
Re-enabled the check for implicit float-double-float conversions with gcc
2019-07-04 13:45:09 +03:00
jpekkila
edafe5a563
Made the gcc version check more lenient
2019-07-04 13:43:49 +03:00
Miikka Vaisala
ce54499351
Removed an accidental '\'
2019-07-04 14:11:26 +08:00
Miikka Vaisala
2c4d129216
-Werror-all disabled from Intel compiler flags
...
Because produces cryptical messages preventing compilation. The messages do not
tell anything about the problem and are also at odds with some gcc specific
pragma commands. If we can resolve these issues, we can turn it back.
2019-07-04 11:25:04 +08:00
jpekkila
e8a5579b50
Made the gcc error flags more lenient temporarily since there are so many float-double-float conversion errors in host_forcing.cc
2019-07-03 17:25:26 +03:00
jpekkila
25d4b9a0cd
Added compilation warning flags for the Intel compiler.
2019-07-03 16:54:51 +03:00
jpekkila
d4968d0583
Made the gcc warning flags stricter
2019-07-03 16:38:31 +03:00
jpekkila
6bfc5f04f7
Added tighter bounds for gcc and nvcc versions. There was a bit of an chicken-and-egg issue: we need gcc 6.0 in order to get bug 48891 (see gcc bugzilla) fixed, but cuda < 9 supports gcc only up to 5.3. This is not a perfect solution, f.ex. ubuntu 16.04 ships with gcc 5.4 but with the fix backported from later versions so in practice that would also work but is not accepted anymore.
2019-06-26 13:33:03 +03:00
jpekkila
4ee772cf5d
Set the minimum gcc version required in CMakeLists.txt
2019-06-19 16:57:47 +03:00