Geant4 Collaboration Meeting 2011, SLAC P. Mato/CERN.

Slides:



Advertisements
Similar presentations
Jean-Christophe Fillion-Robin & Julien Finet Kitware Inc. June 20 th 2011.
Advertisements

Configuration management
05/11/2001 CPT week Natalia Ratnikova, FNAL 1 Software Distribution in CMS Distribution unitFormContent Version of SCRAM managed project.
Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
P. Mato/CERN.  Work done in the context of Geant4 ◦ Presented at last Collaboration meeting  Facilitate testing and packaging using the tools (CTest.
Installing geant4 v9.5 using Windows Daniel Brandt, 06 April 2012 Installing Geant4 v9.5 for Windows A step-by-step guide for Windows XP/Vista/7 using.
Software Installation The full set of lecture notes of this Geant4 Course is available at
Julie McEnery1 Installing the ScienceTools The release manager automatically compiles each release of the Science Tools, it creates a set of wrapper scripts.
#RefreshCache CI - Daily Builds w/Jenkins – an Open Source Continuous Integration Server Nick Airdo Community Developer Advocate Central Christian Church.
NA-MIC, 2008 June Workshop, IHK Akademie Westerham Engineering Methodology Sebastien BARRE, Ph.D. - Kitware, Inc.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Benefits of Automated CAD QA Brian Watt – Tribal Technology (UK)
Linux Operations and Administration
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
Cloud computing is the use of computing resources (hardware and software) that are delivered as a service over the Internet. Cloud is the metaphor for.
SCRAM Software Configuration, Release And Management Background SCRAM has been developed to enable large, geographically dispersed and autonomous groups.
Unit tests, Integration tests Physics tests Andrea Dotti, Gunter Folger, Pere Mato CERN – PH/SFT Geant4 workshop 2012.
Metadata Creation with the Earth System Modeling Framework Ryan O’Kuinghttons – NESII/CIRES/NOAA Kathy Saint – NESII/CSG July 22, 2014.
Software Tools and Processes Training and Discussion October 16, :00-4:30 p.m. Jim Willenbring.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
CSnake C++ build automation based on CMake and Python Maarten Nieber, 2009.
Page 1 Trilinos Usage of CMake/CTest/CDash Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Sandia.
 To explain the importance of software configuration management (CM)  To describe key CM activities namely CM planning, change management, version management.
Makefiles. makefiles Problem: You are working on one part of a large programming project (e. g., MS Word).  It consists of hundreds of individual.cpp.
Connect communicate collaborate perfSONAR MDM updates: New interface, new possibilities Domenico Vicinanza perfSONAR MDM Product Manager
Configuration Management (CM)
INFSOM-RI Juelich, 10 June 2008 ETICS - Maven From competition, to collaboration.
EGEE is a project funded by the European Union under contract IST Testing processes Leanne Guy Testing activity manager JRA1 All hands meeting,
Scalable Game Development William Roberts Senior Game Engineer
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
FairRoot Build and Test System
CMake For Trilinos Developers
WINDOWS XP PROFESSIONAL AUTOMATING THE WINDOWS XP INSTALLATION Bilal Munir Mughal Chapter-2 1.
Introduction to the Adapter Server Rob Mace June, 2008.
Progress with migration to SVN Part3: How to work with g4svn and geant4tags tools. Geant4.
NA-MIC National Alliance for Medical Image Computing Core 1b – Engineering Software Process Stephen R. Aylward Kitware, Inc.
August 2003 At A Glance VMOC-CE is an application framework that facilitates real- time, remote cooperative work among geographically dispersed mission.
CMake refactoring P. Hristov 19/03/2014. History I  Recursive makefiles (F.Carminati):  Problems in dependencies  Slow  "Recursive Makefiles.
1 / 22 AliRoot and AliEn Build Integration and Testing System.
Ant & Jar Ant – Java-based build tool Jar – pkzip archive, that contains metadata (a manifest file) that the JRE understands.
Feedback from the POOL Project User Feedback from the POOL Project Dirk Düllmann, LCG-POOL LCG Application Area Internal Review October 2003.
B. Hegner, P. Mato, P. Mendez CERN, PH-SFT Group 1 ST FORUM CERN 28-SEP-2015 THE QUALITY AND TESTING INFRASTRUCTURE OF PH-SFT.
GLite build and integration system Building and Packaging Robert HARAKALY
J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby.
Chapter 1 Introducing Ant. What is ant? Ant is a build tool  Automate the tasks of compiling code, running test, and packaging the results for redistribution.
 Programming - the process of creating computer programs.
More Unix Naomi Altman. Directories Directory = folder mkdir - makes a new directory rmdir - removes an empty directory cd mydirectory - moves you into.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
NA-MIC, 2008 June Workshop, IHK Akademie Westerham Engineering Methodology Sebastien BARRE - Kitware, Inc.
Build Tools 1. Building a program for a large project is usually managed by a build tool that controls the various steps involved. These steps may include:
Microsoft ® Official Course Module 6 Managing Software Distribution and Deployment by Using Packages and Programs.
Software testing techniques Software testing techniques REGRESSION TESTING Presentation on the seminar Kaunas University of Technology.
GLite build and integration system Building and Packaging Robert HARAKALY
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
CONTROL-M Training At Global Online Trainings IND: Skype: Global.onlinetrainings USA:
Patrick Gartung LArSoft Usability Meeting 22 June 2016 Build system explorations: Spack.
CMake - Cross-Platform Make R. Douglas Barbieri Made to Order Software Corporation.
Introduction to CMake, v. 2
The Distributed Application Debugger (DAD)
Build and Test system for FairRoot
Web Interface for Formatter
4th Forum How to easily offer your application as a self-service template by using OpenShift and GitLab-CI 4th Forum Alberto.
GLAST Release Manager Automated code compilation via the Release Manager Navid Golpayegani, GSFC/SSAI Overview The Release Manager is a program responsible.
Releases and developments
Advanced Integration and Deployment Techniques
User Feedback from SEAL
Software Installation
Presentation transcript:

Geant4 Collaboration Meeting 2011, SLAC P. Mato/CERN

 Facilitate testing and packaging using the tools (CTest and CPack) developed by Kitware and distributed as part of CMake. ◦ No need to reinvent the wheel ◦ Perfect integration to CMake build system  Testing is absolutely essential for any “agile” software development activity ◦ All Geant4 functionality should be thoroughly tested  Developers should participate to testing activity ◦ Adding, running, surveying tests should be extremely easy and effortless P. Mato/CERN 2

3

4

 End User ◦ Examples and/or tests are build against the installation area of Geant4.This is done by configuring a user build area pointing to a source area and pointing Geant4_DIR to the G4 installation area. The installation area can be anywhere: official read-only installation, user installation area, etc.  Developer ◦ Examples and/or tests are build against a build area of Geant4 managed by the developer. This is done by configuring a user build area pointing to a source area and pointing Geant4_DIR to the build area of a previously built G4. It is the developer responsibility to remember to re-issue a build of G4 every time a change is done in the original G4 source tree.  Tester/Developer ◦ Examples and/or tests are build together and as part of the Geant4 build. This is done by connecting the example/test into the global CMake tree (add_subdirectory). There is only a single build area. Dependencies are fully checked by CMake and any change will trigger a re-build of the dependent parts. P. Mato/CERN 5

 Added one CMakeLists.txt file in each test or example ◦ Written as a top-level project CMakeLists.txt file ◦ Using directly the standard CMake commands to increase portability  Added two new ‘options’ ◦ GEANT4_BUILD_EXAMPLES: Build the examples of the project ◦ GEANT4_ENABLE_TESTING: Enable and define all the tests of the project P. Mato/CERN 6

cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(N01) find_package(Geant4 REQUIRED) include(${Geant4_USE_FILE}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${Geant4_INCLUDE_DIR}) file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc) add_executable(exampleN01 EXCLUDE_FROM_ALL exampleN01.cc ${sources}) target_link_libraries(exampleN01 ${Geant4_LIBRARIES}) cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(N01) find_package(Geant4 REQUIRED) include(${Geant4_USE_FILE}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${Geant4_INCLUDE_DIR}) file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc) add_executable(exampleN01 EXCLUDE_FROM_ALL exampleN01.cc ${sources}) target_link_libraries(exampleN01 ${Geant4_LIBRARIES}) Standalone CMake project Locate Geant4 and use it Define executable Add dependent libraries

P. Mato/CERN 8 $ mkdir ; cd $ cmake -DGEANT4_BUILD_EXAMPLES=ON $ make exampleN01[/fast] $ mkdir ; cd $ cmake -DGEANT4_BUILD_EXAMPLES=ON $ make exampleN01[/fast]  End-User case: ◦ Using libraries from installation of Geant4 ◦ Will only build the example  Developer/tester case: ◦ Using own built G4 libraries ◦ Will build all the required libraries by exampleN01 $ mkdir ; cd $ cmake -DGeant4_DIR= /lib/Geant /examples/novice/N04 $ make exampleN01 $ mkdir ; cd $ cmake -DGeant4_DIR= /lib/Geant /examples/novice/N04 $ make exampleN01

P. Mato/CERN 9

 With CTest/CMake tests are defined using the add_test(...) command ◦ Developed a high-level function GEANT4_ADD_TEST(…) to encapsulate the Geant4 policies and an specialized command wrapper for the tests ◦ Test programs themselves can also be built as part of the test (BUILD option) P. Mato/CERN 10 # function GEANT4_ADD_TEST( COMMAND cmd [arg1... ] # [PRECMD cmd [arg1...]] [POSTCMD cmd [arg1...]] # [OUTPUT outfile] [ERROR errfile] # [ENVIRONMENT var1=val1 var2=val2...] # [DEPENDS test1...] # [TIMEOUT seconds] # [DEBUG] # [SOURCE_DIR dir] [BINARY_DIR dir] # [BUILD target] ) # function GEANT4_ADD_TEST( COMMAND cmd [arg1... ] # [PRECMD cmd [arg1...]] [POSTCMD cmd [arg1...]] # [OUTPUT outfile] [ERROR errfile] # [ENVIRONMENT var1=val1 var2=val2...] # [DEPENDS test1...] # [TIMEOUT seconds] # [DEBUG] # [SOURCE_DIR dir] [BINARY_DIR dir] # [BUILD target] )

P. Mato/CERN 11 cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(test21) find_package(Geant4 REQUIRED) include(${Geant4_USE_FILE}) GEANT4_EXECUTABLE(test21 test21.cc src/*.cc) GEANT4_EXECUTABLE(test21_geninput test21_hadronic_exerciser.cc) #---Test definitions GEANT4_ADD_TEST(test21_geninput COMMAND test21_geninput OUTPUT test21.in BUILD test21_geninput ) GEANT4_ADD_TEST(test21 COMMAND test21 test21.in BUILD test21 ENVIRONMENT ${GEANT4_TEST_ENVIRONMENT} DEPENDS test21_geninput) cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(test21) find_package(Geant4 REQUIRED) include(${Geant4_USE_FILE}) GEANT4_EXECUTABLE(test21 test21.cc src/*.cc) GEANT4_EXECUTABLE(test21_geninput test21_hadronic_exerciser.cc) #---Test definitions GEANT4_ADD_TEST(test21_geninput COMMAND test21_geninput OUTPUT test21.in BUILD test21_geninput ) GEANT4_ADD_TEST(test21 COMMAND test21 test21.in BUILD test21 ENVIRONMENT ${GEANT4_TEST_ENVIRONMENT} DEPENDS test21_geninput) Used a macro to simplify writing

 Tests are also defined for each example ◦ GEANT4_ADD_TEST() specified outside the CMakeLists.txt of the example (tests/CMakeLists.txt) ◦ Full paths are required instead of relative ones P. Mato/CERN 12 GEANT4_ADD_TEST(example-nov-n01 COMMAND ${CMAKE_BINARY_DIR}/examples/novice/N01/exampleN01 ${CMAKE_SOURCE_DIR}/examples/novice/N01/exampleN01.in SOURCE_DIR ${CMAKE_SOURCE_DIR}/examples/novice/N01 BINARY_DIR ${CMAKE_BINARY_DIR}/examples/novice/N01 BUILD exampleN01) GEANT4_ADD_TEST(example-nov-n01 COMMAND ${CMAKE_BINARY_DIR}/examples/novice/N01/exampleN01 ${CMAKE_SOURCE_DIR}/examples/novice/N01/exampleN01.in SOURCE_DIR ${CMAKE_SOURCE_DIR}/examples/novice/N01 BINARY_DIR ${CMAKE_BINARY_DIR}/examples/novice/N01 BUILD exampleN01)

 The ctest executable is provided and distributed as part of CMake ◦ Many options available to select what tests to run, configuration, verbosity, etc. ◦ Used by developers and the continuous integration testing P. Mato/CERN 13 mato% ctest -R test10 Test project /Users/mato/Development/G4/make Start 90: test10 1/2 Test #90: test Passed sec Start 91: test10-largeN 2/2 Test #91: test10-largeN Passed sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = sec mato% ctest -R test10 Test project /Users/mato/Development/G4/make Start 90: test10 1/2 Test #90: test Passed sec Start 91: test10-largeN 2/2 Test #91: test10-largeN Passed sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = sec

 The results of running a Nightly or Continuous integration tests as well as developer initiated (Experimental) test runs can be very easily uploaded to CDash ◦ Customizable views with different level of details ◦ Command wrapper output ◦ notification  Currently squatting the Desy service for testing P. Mato/CERN 14 % ctest –j –D Experimental

P. Mato/CERN 15

 A pilot ‘continuous’ integration and testing has been setup (few times/day) P. Mato/CERN 16

 162 tests defined and working ◦ It includes building most of the tests ◦ ‘Benchmark’ tests are still missing ◦ Still few tests fails on Windows  Committed to SVN all the CMakeLists.txt files for the examples  Setup experimentally a ‘nightly’ tests using CDash ◦ Can it be a replacement for QMTest/LCGNightlies? ◦ Feedback is welcome  Documentation ◦ Need to write documentation P. Mato/CERN 17

P. Mato/CERN 18

 CPack (bundled with CMake) is able to create professional platform specific installed ◦ GZ and Self extract TGZ (STGZ), NullSoft Scriptable Install System (NSIS), OSX PackageMaker, RPM, Deb  For Geant4: ◦ Binary and Source installers (TGZ, NSIS, PackageMaker) ◦ User can select what components to install P. Mato/CERN 19

 To create the installers you need to enable a couple of CMake options to include the examples & data: ◦ GEANT4_INSTALL_DATA ◦ GEANT4_INSTALL_EXAMPLES  Make the 'package' target for the binary distribution and 'package_source' for the sources P. Mato/CERN 20

 Provided the definition, building and running of tests using CMake/CTest/CDash tools ◦ The main goal has been to make it easy for developers to define, run, automate and monitor tests ◦ Feedback is required at this moment in time  CDash could offer a competitive replacement to the LCG nightlies  CPack is a nice utility to provide ‘professional’ packaging with very little effort  It is time for all developers to move to CMake P. Mato/CERN 21