Skip to content
Snippets Groups Projects
Commit 668146fb authored by Soeren Peters's avatar Soeren Peters
Browse files

Add gpu options to root cmake. Add the cmake option for passing the path to...

Add gpu options to root cmake. Add the cmake option for passing the path to the numerial tests. Add git clone test to the CI.
parent 4b17c2f2
No related branches found
No related tags found
1 merge request!3Add manual numerical gpu test and enable the sonar-scanner again.
......@@ -244,6 +244,8 @@ gpu_numerical_tests:
- linux
before_script:
- mkdir /testdata && cd /testdata
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@git.rz.tu-bs.de/iRMB/VirtualFluids_dev.git
- export CCACHE_BASEDIR=$CI_PROJECT_DIR
- export CCACHE_DIR=$CI_PROJECT_DIR/cache
- ccache -s
......@@ -253,7 +255,7 @@ gpu_numerical_tests:
- cmake ..
-DBUILD_VF_CPU=ON
-DBUILD_VF_GPU=ON
-DVF.BUILD_NUMERIC_TESTS=ON
-BUILD_NUMERIC_TESTS=ON
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache
......
......@@ -38,6 +38,13 @@ set (VF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
option(BUILD_VF_CPU "Build VirtualFluids cpu variant" OFF)
option(BUILD_VF_GPU "Build VirtualFluids gpu variant" OFF)
# vf gpu
option(BUILD_VF_GPU "Build VirtualFluids GPU" ON )
option(BUILD_VF_GKS "Build VirtualFluids GKS" OFF )
option(BUILD_VF_TRAFFIC "Build VirtualFluids Traffic" OFF)
option(BUILD_JSONCPP "Builds json cpp " OFF)
option(BUILD_NUMERIC_TESTS "Build numeric tests" OFF)
option(BUILD_VF_UNIT_TESTS "Build VirtualFluids unit tests" OFF)
option(BUILD_VF_CLANG_TIDY "Add the clang tidy checks to the targets" OFF)
option(BUILD_VF_INCLUDE_WHAT_YOU_USE "Add IWYU to the targets" OFF)
......@@ -99,5 +106,7 @@ endif()
# 3rd Party Libraries
#################################################################################
if(BUILD_VF_UNIT_TESTS)
add_subdirectory(${VF_THIRD_DIR}/googletest)
if(NOT BUILD_NUMERIC_TESTS) # in this case googletest is already included.
add_subdirectory(${VF_THIRD_DIR}/googletest)
endif()
endif()
......@@ -23,9 +23,9 @@ ConfigFileReader::ConfigFileReader(const std::string aFilePath) : myFilePath(aFi
// If PATH_NUMERICAL_TESTS is not defined, the grid definitions for the tests needs to be placed in the project root
// directories.
#ifdef PATH_NUMERICAL_TESTS
pathNumericalTests = TOSTRING(PATH_NUMERICAL_TESTS);
pathNumericalTests = TOSTRING(PATH_NUMERICAL_TESTS) + std::string("/");
#else
pathNumericalTests = "./";
pathNumericalTests = TOSTRING(SOURCE_ROOT) + std::string("/");
#endif
std::cout << pathNumericalTests << "\n";
}
......@@ -413,21 +413,21 @@ int ConfigFileReader::calcNumberOfSimulations(std::shared_ptr<input::Input> inpu
int counter = 0;
int tgvCounterU0 = calcNumberOfSimulationGroup(input, "TaylorGreenVortexUx");
tgvCounterU0 *= StringUtil::toDoubleVector(input->getValue("ux_TGV_Ux")).size();
tgvCounterU0 *= int(StringUtil::toDoubleVector(input->getValue("ux_TGV_Ux")).size());
counter += tgvCounterU0;
int tgvCounterV0 = calcNumberOfSimulationGroup(input, "TaylorGreenVortexUz");
;
tgvCounterV0 *= StringUtil::toDoubleVector(input->getValue("uz_TGV_Uz")).size();
tgvCounterV0 *= int(StringUtil::toDoubleVector(input->getValue("uz_TGV_Uz")).size());
counter += tgvCounterV0;
int swCounter = calcNumberOfSimulationGroup(input, "ShearWave");
;
swCounter *= StringUtil::toDoubleVector(input->getValue("u0_SW")).size();
swCounter *= int(StringUtil::toDoubleVector(input->getValue("u0_SW")).size());
counter += swCounter;
counter *= StringUtil::toDoubleVector(input->getValue("Viscosity")).size();
counter *= configData->kernelsToTest.size();
counter *= int(StringUtil::toDoubleVector(input->getValue("Viscosity")).size());
counter *= int(configData->kernelsToTest.size());
return counter;
}
......
##################################################
# GPU Mapping #
##################################################
Devices="1"
Devices="0"
##################################################
# Basic Simulation Parameter #
......
......@@ -7,14 +7,6 @@
#SET(CUDA_CUT_INCLUDE_DIR "/cluster/cuda/9.0/include;/cluster/cuda/9.0/samples/common/inc" CACHE PATH "CUDA_CUT_INCLUDE_DIR")
#SET(CUDA_SAMPLE_INCLUDE_DIR "/cluster/cuda/9.0/samples/common/inc" CACHE PATH "CUDA_CUT_INCLUDE_DIR")
#############################################################
### OPTIONS ###
#############################################################
option(VF.BUILD_VF_GPU "Build VirtualFluids GPU" ON )
option(VF.BUILD_VF_GKS "Build VirtualFluids GKS" OFF )
option(VF.BUILD_VF_TRAFFIC "Build VirtualFluids Traffic" OFF)
option(VF.BUILD_JSONCPP "Builds json cpp " OFF)
option(VF.BUILD_NUMERIC_TESTS "Build numeric tests" OFF)
#############################################################
......@@ -135,6 +127,12 @@ ENDIF()
#############################################################
if(VF.BUILD_NUMERIC_TESTS)
# PATH_NUMERICAL_TESTS can be passed to cmake e.g. cmake .. -DPATH_NUMERICAL_TESTS=/data/
if(PATH_NUMERICAL_TESTS)
LIST(APPEND VF_COMPILER_DEFINITION "PATH_NUMERICAL_TESTS=${PATH_NUMERICAL_TESTS}")
endif()
add_subdirectory(3rdParty/fftw/fftw-3.3.7)
add_subdirectory(3rdParty/googletest)
add_subdirectory(apps/gpu/tests/NumericalTests)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment