Merge master with dorothea
work on cmake:
- compile sub-projects as libraries, link to main executable
- use target_include_directories to make include directories known to each sub-project
added checker directory containing the essential parts of the efficiency calculator by Manuel Schiller, still need to give proper input from cuda/velo output
why does code in x86/velo/clustering depend on the cuda code in cuda/velo/mask_clustering? Intuitively, that should not be the case (?)
Merge request reports
Activity
It doesn't depend on mask_clustering. It requires the file
#include "../../../../cuda/velo/common/include/ClusteringDefinitions.cuh"
, which includes the definitions forVeloRawEvent
,VeloRawBank
,VeloGeometry
,get_channel_id
andget_lhcb_id
.I agree
cuda/velo/common
may not be the best place to have common structures both to x86 and cuda. We could change that. Any suggestions?1 1 cmake_minimum_required(VERSION 2.8 FATAL_ERROR) 2 2 3 project(cu_hlt CXX) 3 project(cu_hlt CXX CUDA) 4 4 5 5 list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) # for find_package 6 6 7 7 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -std=c++11 -march=native") 8 8 9 find_package(CUDA REQUIRED) 9 find_package(Boost REQUIRED) changed this line in version 2 of the diff
added 1 commit
- 119fa192 - boost library not needed -> remove from cmake
About the cuda dependency of the x86 clustering: main/include/Common.h actually has cuda_runtime.h included. If I only include this when compiling with nvcc, I get errors from ClusteringDefinitions.cuh when called from x86/velo/clustering because constant memory is allocated ("__ contant __"). Is the x86/velo/clustering supposed to run on CPU only?
Edited by Dorothea Vom BruchYes, x86/velo/clustering is only supposed to run on CPU.
The reason for including
"cuda_runtime.h"
in Common.h is the need to definecudaCheck(stmt)
, which is used inmain
for things likecudaDeviceReset()
or allocating the host pinned datatypes. I have moved it tomain/include/CudaCommon.h
in this MR dcampora/search_by_triplet!2 (merged)What error do you get? I would think that the variables defined as
extern __constant__
are only required in the Stream constant initialization.I see. The problem is more fundamental: One could separate the class definitions from that header not to have the constant directive, but you would still have to solve the device and host directives, which are in the very class definitions we need (ie. VeloRawEvent).
I don’t see how to avoid this - I’m guessing there is some compile time variable we can check.
Similar to what I wrote to you on mattermost: we should probably decide whether it is actually necessary to have code in this project which should not depend on cuda. In the end, this is the repo for HLT to run on GPUs and the only reason to have code run on x86 architecture is probably to cross check results from a GPU, not to develop x86-only code.
So maybe my original comment can be dismissed.
mentioned in commit 15f8773b