Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature dune v1.1 develop #11

Merged
merged 85 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
796fe1e
Whilst everything builds correctly, the probabilities return by githb…
dbarrow257 May 22, 2023
8b38bd8
Include CUDAProb3 macro
dbarrow257 May 22, 2023
896cc0b
First commit for atm.
pgranger23 Aug 2, 2023
457365c
Improving llh
pgranger23 Aug 2, 2023
78e2f6e
Update. Working on dunegpvm
Aug 3, 2023
81c7bb3
Current dunegpvm version
Sep 7, 2023
48a1cbb
Change TH1 to TGraph
pgranger23 Sep 11, 2023
21dc6f4
Saving graphs for both samples
pgranger23 Sep 11, 2023
aaee555
Update the yaml output declaration
Sep 29, 2023
13e3717
Update with systs
Oct 17, 2023
3f2b2d6
Moving to 1D LLH scan for osc params
Oct 24, 2023
d80f938
Fixing chain restart
Oct 24, 2023
2570860
Adding nubar and real subsample splines
Oct 24, 2023
dbc60c7
Save config files on dunegpvm
Oct 24, 2023
8d0b5ca
Addapting Atmchain.yaml to new config setup
Oct 27, 2023
6f92c46
Update to the new MaCh3 core
pgranger23 Oct 31, 2023
4e7ac83
Update
pgranger23 Jan 9, 2024
04abb3c
Runs without crashing
pgranger23 Jan 10, 2024
e34d987
Fixing the TKey corruption issue
pgranger23 Jan 10, 2024
1b296c8
Works with multiple samples/subsamples
pgranger23 Jan 10, 2024
6081ca5
Updating configs
pgranger23 Jan 10, 2024
e6592ae
Adding xml2yaml.py
pgranger23 Jan 11, 2024
8d5b334
Fix chain restarting
Jan 12, 2024
953303f
Upgrade to right mach3-core branch
Jan 12, 2024
1f414e2
Add TrueCosZ cuts and flux systs
pgranger23 Jan 16, 2024
8416573
Merge branch 'atmospherics' of https://github.com/DUNE/MaCh3_DUNE int…
pgranger23 Jan 16, 2024
4d0e439
Commit from dunegpvm
Jan 16, 2024
ab5df56
Merge remote-tracking branch 'refs/remotes/origin/atmospherics' into …
Jan 16, 2024
66b0c89
Trying to make the build.sh a bit more universal
Jan 16, 2024
f210feb
Compiling version of DUNE Atmospherics against Core develop
dbarrow257 Aug 12, 2024
4a3cb99
Compiling version of DUNE Atmospherics against Core develop - all fil…
dbarrow257 Aug 12, 2024
c984d5e
Compiling instance of DUNE MaCh3 with ND+FD and atmospherics, against…
dbarrow257 Aug 12, 2024
160eb3b
Merged dunendmc_obj and dunemc_obj objects, and moved to header
dbarrow257 Aug 13, 2024
a6de113
Due to issues in core-develop, calcXsecFuncWeight still exists and is…
dbarrow257 Aug 13, 2024
78e75c3
More cleanup of DUNE samplePDF objects
dbarrow257 Aug 13, 2024
021d01d
Update to lastest core requirements of capitalised letters and two ve…
dbarrow257 Aug 13, 2024
e05b4ea
Compiling with NDGar samples included as well
dbarrow257 Aug 13, 2024
dafc2ed
Added NDGar to samplePDF objects which are compiling
dbarrow257 Aug 13, 2024
5c07bd4
Move the selection cut information grabbing to core
dbarrow257 Aug 14, 2024
87a2b1c
Cleared out a LOT of old code from the samplePDFDUNE objects
dbarrow257 Aug 14, 2024
c458d51
Remove debug couts from splineDUNEBase
dbarrow257 Aug 14, 2024
9ba1f43
Push latest changes to DUNE-MaCh3 using latest refactor
dbarrow257 Sep 12, 2024
71f859a
various changes to the constructor of the samplePDF classes, removal …
EdAtkin Oct 7, 2024
ee62d02
random other small changes
EdAtkin Oct 7, 2024
a90961d
forgot to remove binning option from ND class
EdAtkin Oct 7, 2024
0695bc5
adding in a very simple factory method, this needs to be expanded to …
EdAtkin Oct 7, 2024
de84cde
Abstract samplePDF type behind config check in Factory so any sampleP…
dbarrow257 Oct 7, 2024
cb59a56
Commit where each DUNE samplePDF object compiles and contains all ove…
dbarrow257 Oct 7, 2024
9d967c9
adding slightly updated configs
EdAtkin Oct 7, 2024
7223c2b
adding in the systematics yaml files
EdAtkin Oct 7, 2024
e544b44
First attempt at including universal factory so any samplePDFDUNE obj…
dbarrow257 Oct 7, 2024
bcd3efb
Add new atmospheric sample using new CAFs
dbarrow257 Oct 8, 2024
34549bf
changes to how the kinematic variables are handled, these now live in…
EdAtkin Oct 9, 2024
cdc7ddc
Merged with feature_UniversalFactory
dbarrow257 Oct 9, 2024
3c56bf4
Changes to DUNE_MaCh3 after merge with latest core develop
dbarrow257 Oct 9, 2024
37540b3
Add in the OscCov yaml
dbarrow257 Oct 9, 2024
411db14
Compiling commit against NuOscillator core branch
dbarrow257 Oct 9, 2024
f3ecab6
Add CUDAProb3Linear NuOscillator config file
dbarrow257 Oct 9, 2024
bb2378c
Mainly small tidy ups of the factory and getting histograms out of Ev…
EdAtkin Oct 10, 2024
ab9f2e7
All changes made to be able to use NuOscillator for both beam and atm…
dbarrow257 Oct 10, 2024
31de373
Move KinematicTypes to individual samplePDFDUNE object to avoid a sin…
dbarrow257 Oct 10, 2024
f6caf84
Check whether iselike exists
EdAtkin Oct 10, 2024
67f1261
fixing small merge conflicts
EdAtkin Oct 10, 2024
e989381
minor changes to get NuOscillator working
EdAtkin Oct 10, 2024
c3fe6ca
Moved DUNE branch inline with latest core
dbarrow257 Oct 11, 2024
907ec69
Remove unneeded lines from yaml configs
dbarrow257 Oct 11, 2024
7db2acb
Reorder the configs/inputs directories, such that anything configurab…
dbarrow257 Oct 11, 2024
8e6806b
minor changes but mainly playing with EventRates script
EdAtkin Oct 11, 2024
ae860c1
adding in POT to the sample configs and into the derived samplePDF cl…
EdAtkin Oct 11, 2024
66dcb21
Merge with develop
dbarrow257 Oct 15, 2024
fa18f19
Remove old executables
dbarrow257 Oct 15, 2024
4613d31
Removing base from the names of samplePDF class which are not actuall…
EdAtkin Oct 15, 2024
14327d7
Merge branch 'feature_DUNE_v1.1_develop' of github.com:DUNE/MaCh3_DUN…
EdAtkin Oct 15, 2024
8616fb1
messed up with the renaming of the files, removed Base from a lot of …
EdAtkin Oct 15, 2024
28cdf88
Add example atmospheric binning
dbarrow257 Oct 16, 2024
499f00b
Use MACH3LOG throughout DUNE specific code
dbarrow257 Oct 16, 2024
ee09636
Ignore symlinked inputs
dbarrow257 Oct 16, 2024
54e0d0a
Address many comments left on the open PR
dbarrow257 Oct 17, 2024
7f84756
Move step scale setting to factory
dbarrow257 Oct 17, 2024
a242b8e
Remove setup.sh as this is not needed anymore
dbarrow257 Oct 17, 2024
dc6cad2
Now pull develop
dbarrow257 Oct 17, 2024
e502dd4
tidying up after changes to core
EdAtkin Oct 17, 2024
c2a1a87
fixing minor merge conflicts
EdAtkin Oct 17, 2024
dfe5d14
Update branch to be inline with core develop
dbarrow257 Oct 17, 2024
b66500f
getting things up to date with core develop and fixing some minor things
EdAtkin Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build/
*.root
*.tbz2
*.tgz
logs/
jupyter_env
.history
Doc
inputs/Atmospherics/CAFs/
185 changes: 157 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
set(CMAKE_VERBOSE_MAKEFILE ON)

# CMake version check
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

SET(MaCh3_DUNE_VERSION 0.0.1)
SET(MaCh3DUNE_VERSION 0.0.0)
dbarrow257 marked this conversation as resolved.
Show resolved Hide resolved

# Create project (todo: set configurable CUDA)
if(${CPU_ONLY})
project(MaCh3_DUNE VERSION ${MaCh3_DUNE_VERSION} LANGUAGES CXX)
else()
project(MaCh3_DUNE VERSION ${MaCh3_DUNE_VERSION} LANGUAGES CXX CUDA)
endif()

set(CMAKE_CXX_STANDARD 17)
project(MaCh3DUNE VERSION ${MaCh3DUNE_VERSION} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# Changes default install path to be a subdirectory of the build dir.
# Can set build dir at configure time with -DCMAKE_INSTALL_PREFIX=/install/path
Expand All @@ -29,38 +24,172 @@ find_program(CMAKE_CXX_COMPILER NAMES $ENV{CXX} g++ PATHS ENV PATH NO_DEFAULT_PA

LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)

message("CMAKE SOURCE_DIR IS ${CMAKE_SOURCE_DIR}")
################################################################################
# Check Dependencies
################################################################################
LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules)
include(CPM)

#Go get the core MAch3, this will be public one day....
#This is over-riden with -DCPM_MaCh3_SOURCE=/path/to/MaCh3/folder
CPMFindPackage(
NAME MaCh3
GIT_TAG "DUNECore2024"
GITHUB_REPOSITORY mach3-software/MaCh3
)
NAME CMakeModules
GIT_TAG v0.0.11
dbarrow257 marked this conversation as resolved.
Show resolved Hide resolved
GITHUB_REPOSITORY NuHepMC/CMakeModules
DOWNLOAD_ONLY
)
include(${CMakeModules_SOURCE_DIR}/NuHepMCModules.cmake)

include(ROOT)

if(NOT TARGET ROOT::ROOT)
cmessage(FATAL_ERROR "MaCh3 Expected dependency target: ROOT::ROOT")
endif()

if(DEFINED ROOT_CXX_STANDARD AND ROOT_CXX_STANDARD GREATER CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD ${ROOT_CXX_STANDARD})
endif()

############################ DUNEAnaObj ####################################

#Compile and link options (Should be in experiment project but copied in case CORE is built alone)
add_compile_options(-g -O3 -Wextra -fopenmp)
add_link_options(-fopenmp)
find_package(duneanaobj)

if(NOT duneanaobj_FOUND)
CPMFindPackage(
NAME duneanaobj
GIT_TAG "patch-1"
GITHUB_REPOSITORY dbarrow257/duneanaobj
dbarrow257 marked this conversation as resolved.
Show resolved Hide resolved
OPTIONS
"STANDALONE_BUILD ON"
)
endif()

#If Single thread is chosen MultiThread flags are omitted
if(NOT ${SINGLE_THREAD_ONLY})
add_compile_options(-DMULTITHREAD)
add_link_options(-DMULTITHREAD)
if(NOT TARGET duneanaobj::All)
cmessage(FATAL_ERROR "MaCh3 DUNE Expected dependency target: duneanaobj::All")
endif()

if(${CPU_ONLY})
add_compile_options(-DCPU_ONLY)
################################## MaCh3 ######################################
#If MaCh3 was sourced find it, otherwise use CPM
find_package(MaCh3)

if(NOT MaCh3_FOUND)
CPMFindPackage(
NAME MaCh3
GIT_TAG "feature_OscClassMagic"
dbarrow257 marked this conversation as resolved.
Show resolved Hide resolved
GITHUB_REPOSITORY mach3-software/MaCh3
)
else()
add_compile_options(-I${CUDA_SAMPLES}/common/inc)
add_compile_options(-I$ENV{CUDAPATH}/targets/x86_64-linux/include)
##KS: This ensure that all executables that are in core will be moved
FILE(GLOB MaCh3Exe $ENV{MaCh3_ROOT}/Diagnostics/*)
FILE(COPY ${MaCh3Exe} DESTINATION ${CMAKE_BINARY_DIR}/Diagnostics/)
endif()

if(NOT TARGET MaCh3::All)
cmessage(FATAL_ERROR "MaCh3 DUNE Expected dependency target: MaCh3::All, did you source setup.MaCh3.sh")
endif()

############################ C++ Compiler ####################################
if (NOT DEFINED CMAKE_CXX_STANDARD OR "${CMAKE_CXX_STANDARD} " STREQUAL " ")
SET(CMAKE_CXX_STANDARD 11)
endif()

if(${USE_PROB3})
add_compile_options(-DUSE_PROB3)
if(DEFINED ROOT_CXX_STANDARD AND ROOT_CXX_STANDARD GREATER CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD ${ROOT_CXX_STANDARD})
endif()
cmessage(STATUS "CMAKE CXX Standard: ${CMAKE_CXX_STANDARD}")


################################# Features ##################################

LIST(APPEND ALL_FEATURES
)
cmessage(STATUS "MaCh3DUNE Features: ")
foreach(f ${ALL_FEATURES})
cmessage(STATUS " ${f}: ${MaCh3DUNE_${f}_ENABLED}")
endforeach()

#KS: Options to print dependency graph
if(NOT DEFINED MaCh3DUNE_DependancyGraph)
set(MaCh3DUNE_DependancyGraph FALSE)
endif()

if(MaCh3DUNE_DependancyGraph)
add_custom_target(graphviz ALL
COMMAND ${CMAKE_COMMAND} "--graphviz=foo.dot" .
COMMAND dot -Tpng foo.dot -o foo.png
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
)
endif()

################################# Build MaCh3 ##################################
add_library(MaCh3DUNECompilerOptions INTERFACE)
set_target_properties(MaCh3DUNECompilerOptions PROPERTIES EXPORT_NAME CompilerOptions)
if(PSYCHE_FOUND)
target_compile_definitions(MaCh3DUNECompilerOptions INTERFACE PSYCHESETUP)
endif()
target_include_directories(MaCh3DUNECompilerOptions
INTERFACE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
$<INSTALL_INTERFACE:include>)

install(TARGETS MaCh3DUNECompilerOptions
EXPORT mach3dune-targets
LIBRARY DESTINATION lib/)

add_subdirectory(splines)
add_subdirectory(samplePDFDUNE)
add_subdirectory(src)

add_library(MaCh3DUNEAll INTERFACE)
set_target_properties(MaCh3DUNEAll PROPERTIES EXPORT_NAME All)
target_link_libraries(MaCh3DUNEAll INTERFACE splinesDUNE SamplePDFDUNE MaCh3DUNECompilerOptions)
add_library(MaCh3DUNE::All ALIAS MaCh3DUNEAll)

install(TARGETS MaCh3DUNEAll
EXPORT mach3dune-targets
LIBRARY DESTINATION lib/)

configure_file(cmake/Templates/setup.MaCh3DUNE.sh.in
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/setup.MaCh3DUNE.sh" @ONLY)
install(FILES
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/setup.MaCh3DUNE.sh" DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/output)

############################ Install ####################################
install(DIRECTORY inputs DESTINATION ${CMAKE_BINARY_DIR})
install(DIRECTORY configs DESTINATION ${CMAKE_BINARY_DIR})
install(DIRECTORY utils DESTINATION ${CMAKE_BINARY_DIR})

set(export_destinations
${CMAKE_INSTALL_PREFIX}/lib/cmake/
${CMAKE_INSTALL_PREFIX}/
)

foreach(dest ${export_destinations})
install(EXPORT mach3dune-targets
FILE MaCh3DUNETargets.cmake
NAMESPACE MaCh3DUNE::
DESTINATION ${dest}
)
endforeach()

include(CMakePackageConfigHelpers)
configure_package_config_file(
${CMAKE_CURRENT_LIST_DIR}/cmake/Templates/MaCh3DUNEConfig.cmake.in ${CMAKE_BINARY_DIR}/MaCh3DUNEConfig.cmake
INSTALL_DESTINATION
/this/is/ignored/for/some/reason/thanks/kitware
NO_SET_AND_CHECK_MACRO
NO_CHECK_REQUIRED_COMPONENTS_MACRO)


write_basic_package_version_file(${CMAKE_BINARY_DIR}/MaCh3DUNEConfigVersion.cmake
VERSION ${MaCh3DUNE_VERSION}
COMPATIBILITY AnyNewerVersion)

install(FILES
${CMAKE_BINARY_DIR}/MaCh3DUNEConfig.cmake
${CMAKE_BINARY_DIR}/MaCh3DUNEConfigVersion.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/MaCh3DUNE)

include(mach3dune-config)
120 changes: 0 additions & 120 deletions ICGPU_local_threads.sh

This file was deleted.

Loading