Commit b3614ad4 authored by Hamilton, Steven P's avatar Hamilton, Steven P
Browse files

Initial commit.

parents
##---------------------------------------------------------------------------##
## Profugus/CMakeLists.txt
##---------------------------------------------------------------------------##
## Copyright (C) 2011 Oak Ridge National Laboratory, UT-Battelle, LLC.
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
# A) Define your project name and set up major project options
##---------------------------------------------------------------------------##
INCLUDE(${CMAKE_SOURCE_DIR}/ProjectName.cmake)
# CMake requires that you declare the CMake project in the top-level file and
# not in an include file :-(
PROJECT(${PROJECT_NAME} NONE)
# Add support for extra repositories; everything handled by native above
SET(${PROJECT_NAME}_SUPPORT_EXTRA_REPOS FALSE)
# Disable Tribits generating HTML dependencies webpage and xml files
SET(${PROJECT_NAME}_DEPS_XML_OUTPUT_FILE OFF CACHE BOOL "" )
# Disable Tribits export system to save time configuring
SET(${PROJECT_NAME}_ENABLE_INSTALL_CMAKE_CONFIG_FILES OFF CACHE BOOL "")
# Disable Tribits export makefiles system to save time configuring
SET(${PROJECT_NAME}_ENABLE_EXPORT_MAKEFILES OFF CACHE BOOL "")
##---------------------------------------------------------------------------##
# B) Pull in the TriBITS system and execute
##---------------------------------------------------------------------------##
# Just use the TriBITS system in Trilinos
SET(${PROJECT_NAME}_TRIBITS_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/TriBITS/tribits" CACHE PATH "" )
MESSAGE("${PROJECT_NAME}_TRIBITS_DIR = '${${PROJECT_NAME}_TRIBITS_DIR}'")
INCLUDE(${${PROJECT_NAME}_TRIBITS_DIR}/TriBITS.cmake)
# CMake requires this be in the top file and not in an include file :-(
CMAKE_MINIMUM_REQUIRED(VERSION ${TRIBITS_CMAKE_MINIMUM_REQUIRED})
# Default to building shared libraries if user hasn't specified.
#
# Note that if you define BUILD_SHARED_LIBS using a configure option file
# with -D PROFUGUS_PROJECT_CONFIGURE_FILE:PATH=config.cmake,
# then you'll have to use the FORCE keyword in that file because it gets read
# during TRIBITS_PROJECT().
#
# SET(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
#
# (Alternatively, use 'cmake -C config.cmake' to read in BUILD_SHARED_LIBS
# *before* this point.)
IF(NOT DEFINED BUILD_SHARED_LIBS)
SET(BUILD_SHARED_LIBS_DEFAULT ON)
IF(DEFINED BUILD_SHARED)
SET(BUILD_SHARED_LIBS_DEFAULT ${BUILD_SHARED})
ENDIF()
SET(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_DEFAULT}
CACHE BOOL
"Build shared libraries.")
UNSET(BUILD_SHARED_LIBS_DEFAULT)
ENDIF()
# Do all of the processing for this Tribits project
TRIBITS_PROJECT()
# Add the final documentation
#add_subdirectory(doc)
##---------------------------------------------------------------------------##
## end of CMakeLists.txt
##---------------------------------------------------------------------------##
Copyright (c) 2014, Computational Engineering & Energy Sciences Group
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##---------------------------------------------------------------------------##
## Profugus/PackagesList.cmake
## Thomas M. Evans
## Monday December 2 21:24:6 2013
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
## PACKAGES PROVIDED
##---------------------------------------------------------------------------##
TRIBITS_REPOSITORY_DEFINE_PACKAGES(
Utils packages/Utils SS
CudaUtils packages/CudaUtils SS
Matprop packages/Matprop SS
SPn packages/SPn SS
MC packages/MC SS
Alea packages/Alea SS
)
##---------------------------------------------------------------------------##
## PLATFORM SUPPORT
##---------------------------------------------------------------------------##
TRIBITS_DISABLE_PACKAGE_ON_PLATFORMS(Profugus Windows)
##---------------------------------------------------------------------------##
## end of PackagesList.cmake
##---------------------------------------------------------------------------##
##---------------------------------------------------------------------------##
## Profugus/ProjectName.cmake
## Thomas M. Evans
## Tuesday August 7 16:1:14 2012
##---------------------------------------------------------------------------##
# Must set the project name as a varaible at very beginning before including
# anything else
SET(PROJECT_NAME Profugus)
##---------------------------------------------------------------------------##
## end of Profugus/ProjectName.cmake
##---------------------------------------------------------------------------##
Description
***********
Profugus is an open-source mini-application (mini-app) for radiation
transport and reactor applications. It contains the fundamental
computational kernels used in the Exnihilo code suite from Oak Ridge
National Laboratory. However, Exnihilo is production code with a
substantial user base. Furthermore, Exnihilo is export controlled.
This makes collaboration with computer scientists and computer
engineers difficult. Profugus is designed to bridge that gap. By
encapsulating the core numerical algorithms in an abbreviated code
base that is open-source, computer scientists can analyze the
algorithms and easily make code-architectural changes to test
performance without compromising the production code values of
Exnihilo.
Profugus is **not** meant to be production software with respect to
problem analysis. The computational kernels in Profugus are designed
to analyze *performance*, not *correctness*. Nonetheless, users of
Profugus can setup and run problems with enough *real-world* features
to be useful as proof-of-concept for actual production work.
Profugus is also used as a test-bed mini-app for the ASCR projects
XPRESS and MCREX.
Profugus Development Team
=========================
Profugus contains the computational kernels from the Exnihilo code
base. The core Exnihilo development team consists of the following
scientists (listed alphabetically)
* Kevin Clarno <clarnokt@ornl.gov>
* Greg Davidson <davidsongg@ornl.gov>
* Tom Evans <evanstm@ornl.gov>
* Steven Hamilton <hamiltonsr@ornl.gov>
* Seth Johnson <johnsonsr@ornl.gov>
* Tara Pandya <pandyatm@ornl.gov>
* Stuart Slattery <slatterysr@ornl.gov>
* Rachel Slaybaugh <slaybaugh@berkeley.edu>
Profugus is developed and maintained by the following team:
* Tom Evans <evanstm@ornl.gov>
* Steven Hamilton <hamiltonsr@ornl.gov>
* Stuart Slattery <slatterysr@ornl.gov>
Profugus Packages
=================
Profugus constains the following code mini-apps:
**SPn**
Mini-app of Simplified Spherical Harmonics ("SPn") computational
kernel.
**MC**
Mini-app of Monte Carlo computational kernel.
Documentation on the mini-apps (methods and execution) are given in
*Running The Mini-Applications*. There are several support packages
that are used by the mini-apps. These are:
**Utils**
Utilities and testing framework used by other packages.
**Matprop**
Data structures for storing material properties (cross-sections).
Profugus is designed to build and run with a minimum of dependencies.
However, there are some requirements. The third-party software (TPLs)
necessary to build Profugus is all open-source and freely available.
The TPLs for Profugus are listed in the following table:
+-----------------------+---------------+---------------------------------------+
| TPL | Required | Comments |
+=======================+===============+=======================================+
| TriBITS | Yes | TriBITS is the Trilinos build system |
+-----------------------+---------------+---------------------------------------+
| Trilinos | Yes | Trilinos is an open-source solvers |
+-----------------------+---------------+---------------------------------------+
| BLAS/LAPACK | Yes | Use vendor-specific implementation |
+-----------------------+---------------+---------------------------------------+
| MPI | No | OpenMPI and MPICH are suggested |
+-----------------------+---------------+---------------------------------------+
| HDF5 | No | Parallel HDF5 will allow output of |
+-----------------------+---------------+---------------------------------------+
Building The Code
*****************
The most straightforward method for building Profugus is to use the
scripts in `Profugus/install`. Profugus uses the `TriBITS` build
system. This system is a set of package-based extensions to standard
cmake. So, first you need to obtain *Trilinos* and *TriBITS* and put
them in your top-level Profugus directory::
> cd Profugus
> git clone https://github.com/TriBITSPub/TriBITS.git
> ln -s $PATH_TO_TRILINOS .
The preferred mechanism for using the build scripts is to make a
*target* directory where the build is to be performed::
> pwd
/home/me
> mkdir debug
> cd debug
> mkdir target
> cd target
> pwd
/home/me/debug/target
The `install` directory contains several example build scripts.
General options for all platforms (which can be overridden at
configure time) are specified in the `install/base.cmake`::
##---------------------------------------------------------------------------##
## CMAKE BASE FILE
##---------------------------------------------------------------------------##
# Default build all packages
SET(Profugus_ENABLE_Utils ON CACHE BOOL "")
SET(Profugus_ENABLE_Matprop ON CACHE BOOL "")
SET(Profugus_ENABLE_SPn ON CACHE BOOL "")
SET(Profugus_ENABLE_MC ON CACHE BOOL "")
# Turn on tests
SET(Profugus_ENABLE_TESTS ON CACHE BOOL "")
SET(Profugus_TEST_CATEGORIES "BASIC" CACHE STRING "")
# Turn on SS code and optional packages by default
SET(Profugus_ENABLE_ALL_FORWARD_DEP_PACKAGES OFF CACHE BOOL "")
SET(Profugus_ENABLE_ALL_OPTIONAL_PACKAGES ON CACHE BOOL "")
SET(Profugus_ENABLE_SECONDARY_STABLE_CODE ON CACHE BOOL "")
# Up the max num procs
SET(MPI_EXEC_MAX_NUMPROCS 8 CACHE STRING "")
# Turn off binutils
SET(Teuchos_ENABLE_BinUtils OFF CACHE BOOL "")
# Turn off Zoltan2
SET(Profugus_ENABLE_Zoltan2 OFF CACHE BOOL "")
# Compiler options
SET(BUILD_SHARED_LIBS ON CACHE BOOL "")
SET(CMAKE_CXX_FLAGS "-std=c++11 -Wno-deprecated-declarations" CACHE STRING "")
SET(Profugus_ENABLE_CXX11:BOOL=ON)
# TriBITS stuff
SET(Profugus_ENABLE_INSTALL_CMAKE_CONFIG_FILES OFF CACHE BOOL "")
SET(Profugus_DEPS_XML_OUTPUT_FILE "" CACHE FILEPATH "")
By default, all of the packages inside of Profugus are turned on.
Furthermore, *C++-11* is **required**. The default options specify
the appropriate compiler flags for gcc. The tests are also turned on
by default; to disable tests in any upstream package simply do not
explicitly *ENABLE* that package. For example, to build the *SPn*
package and all of its tests but only include required *source* from
upstream packages, the user would specify::
SET(Profugus_ENABLE_SPn ON CACHE BOOL "")
In this case, only the pieces of *Utils* needed to build *SPn* are
compiled. All tests can be turned off by setting
**Profugus_ENABLE_TESTS** to **OFF**.
The `install` directory contains several build scripts that are all
suffixed by the platform name. For example, to build on a Linux
*x86_64* system the "install/cmake_x86_64.sh" script can be used::
#!/bin/sh
##---------------------------------------------------------------------------##
## CMAKE FOR X86_64
##---------------------------------------------------------------------------##
# CLEANUP
rm -rf CMakeCache.txt
rm -rf CMakeFiles
# SOURCE AND INSTALL
SOURCE=<SET_SOURCE_DIR>
INSTALL=<SET_INSTALL_DIR>
# BUILD OPTIONS
BUILD="DEBUG"
MPI="ON"
# TPL PATHS
HDF5_PATH="/vendors/hdf5_parallel"
MPI_PATH="/opt/openmpi/gcc/current"
##---------------------------------------------------------------------------##
cmake \
-DCMAKE_BUILD_TYPE:STRING="$BUILD" \
-DTPL_ENABLE_MPI:BOOL=$MPI \
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL \
\
-DMPI_BASE_DIR:PATH=$MPI_PATH \
\
-DTPL_ENABLE_HDF5:BOOL=ON \
-DHDF5_INCLUDE_DIRS:PATH=$HDF5_PATH/include \
-DHDF5_LIBRARY_DIRS:PATH=$HDF5_PATH/lib \
\
-DBLAS_LIBRARY_DIRS:PATH=/vendors/gcc/atlas/lib \
-DLAPACK_LIBRARY_DIRS:PATH=/vendors/gcc/atlas/lib \
-DBLAS_LIBRARY_NAMES:STRING="f77blas;cblas;atlas" \
-DLAPACK_LIBRARY_NAMES:STRING="lapack" \
\
-DProfugus_CONFIGURE_OPTIONS_FILE:FILEPATH="${SOURCE}/install/base.cmake" \
-DProfugus_ASSERT_MISSING_PACKAGES:BOOL=OFF \
\
${SOURCE}
##---------------------------------------------------------------------------##
## end of cmake_x86_64.sh
##---------------------------------------------------------------------------##
The source and install locations must be set. Also, to enable a
optimized build set **BUILD** to **RELEASE**. Adjust the paths and
libraries for LAPACK to fit your platform. The example assumes that
the ATLAS LAPACK is available. Any standard LAPACK distribution will
work. HDF5 is **not** required, to build/run/test the applications;
however, problem output will be severely curtailed if a parallel HDF5
option is not provided. If HDF5 is not available, setting::
-DTPL_ENABLE_HDF5:BOOL=OFF \
will disable HDF5.
To complete the configuration, execute this script inside the *target*
directory and then make/test/install::
> pwd
/home/me/debug/target
> sh /home/me/Profugus/install/cmake_x86_64.sh
> make -j 8
> ctest -j 8
> make -j 8 install
##---------------------------------------------------------------------------##
## Profugus/TPLsList.cmake
## Thomas M. Evans
## Tuesday August 7 16:10:44 2012
##---------------------------------------------------------------------------##
#
# Extra add-on TPLs
#
# For a description of the fields, see:
#
# Trilinos/cmake/TrilinosTPLs.cmake
#
SET(Profugus_TPLS_FINDMODS_CLASSIFICATIONS
SILO "cmake/TPLs/" SS
HDF5 "cmake/TPLs/" SS
)
##---------------------------------------------------------------------------##
## end of TPLsList.cmake
##---------------------------------------------------------------------------##
################################################################################
# #
# TriBITS Project and Package CMakeLists.txt File #
# #
################################################################################
IF (NOT TRIBITS_PROCESSING_PACKAGE)
# This CMakeLists.txt file is being processed as the TriBITS projects's base
# CMakeLists.txt file! (See comments at bottom of this file.)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/ProjectName.cmake")
PROJECT(${PROJECT_NAME} NONE)
SET(${PROJECT_NAME}_TRIBITS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tribits" CACHE PATH "")
INCLUDE("${${PROJECT_NAME}_TRIBITS_DIR}/TriBITS.cmake")
SET(${PROJECT_NAME}_ENABLE_TESTS ON CACHE BOOL "Enable tests by default.")
TRIBITS_PROJECT_ENABLE_ALL()
ELSE()
# This CMakeLists.txt file is being processed as the TriBITS package file.
TRIBITS_PACKAGE(TriBITS)
TRIBITS_PACKAGE_POSTPROCESS()
ENDIF()
# NOTE: In order to allow the `TriBITS/` directory to be both a TriBITS
# package (for inclusion in other TriBITS projects) and to be a TriBITS
# project itself, you only have to put in a simple if statement in this
# top-level CMakeLists.txt file. That is all! In fact, this `TriBiTS/`
# directory shows how the same directory can be used for a TriBITS package, a
# TriBITS repository, and a TriBITS project!
tribits/Copyright.txt
\ No newline at end of file
TRIBITS_REPOSITORY_DEFINE_PACKAGES(
TriBITS . PT
)
SET(PROJECT_NAME TriBITS)
SET(${PROJECT_NAME}_USES_PYTHON TRUE)
TriBITS/ Directory Contents
+++++++++++++++++++++++++++
This base directory for TriBITS acts as a TriBITS Project, a TriBITS
Repository, and a TriBITS Package. As such, it contains the standard files
that are found in a TriBITS Project, Repository, and Package::
ProjectName.cmake # PROJECT_NAME=TriITS
CMakeLists.txt # PROJECT_NAME = PACKAGE_NAME = TriBITS
PackagesList.cmake # Lists just "TriBITS . PT"
TPLsList.cmake # Lists only MPI
cmake/ # Dependencies.cmake, etc.
The core functionality of TriBITS is provided in the directory:
**tribits/**: The part of TriBITS that CMake projects use to access TriBITS
functionality and assimilate the the TriBITS framework. It also contains
basic documentation and examples. Files and directories from here are what
get installed on the system or are snapshotted into
``<projectDir>/cmake/tribits/``. Each TriBITS Project decides what parts of
it wants to install or shapshot using the script
``tribits/snapshot_tribits.py`` (which takes arguments for what dirs to
snapshot, see below). This directory contains no tests at all. All of the
tests for TriBITS are in the ``test/`` directory (see below). The breakdown of
the contents of ``tribits/`` are described in the file
``tribits/README.DIRECTORY_CONTENTS.rst``.
The following directories are not snapshotted into
``<projectDir>/cmake/tribits/`` by the script ``tribits/snapshot_tribits.py``:
**test/**: Contains all of the automated tests for TriBITS as part of the
TriBITS "TriBITS" package. When doing development, these tests are critical.
**dev_testing/:** Contains scripts that support the development of the TriBITS
system itself in various contexts.
**common_tools/:** Contains misc utilities that are not central to the TriBITS
system but are very helpful to keep around and do not take up too much space.
**refactoring/:** Some scripts and other files that have aided in various
refactorings of TriBITS and are used to upgrade client TriBITS projects.
=================================================
TriBITS: Tribal Build, Integrate, and Test System
=================================================
The Tribal Build, Integrate, and Test System (TriBITS) is a framework designed
to handle large software development projects involving multiple independent
development teams and multiple source repositories which is built on top of
the open-source CMake set of tools. TriBITS also defines a complete software
development, testing, and deployment system supporting processes consistent
with modern agile software development best practices.
Documentation
=============
See `TriBITS Documentation on tribits.org <http://tribits.org>`_
----------------------------------------
Release Notes for TriBITS
----------------------------------------
2015/12/03:
(*) checkin-test.py: Added support for tracking branches for each repo
independently and not assume 'origin' and not assume that all of the repos
are on the same branch or will be pulling and pushing to the same remote
branch. This will make it easier to use the checkin-test.py script to set
up various integration scenarios. See TriBITS GitHub Issue #15 for
details.
2015/04/14:
(*) When configuring with ${PROJECT_NAME}_ENABLE_CXX11=ON, if C++11 support
cannot be verified, then the configure will fail hard right away. Before,
TriBITS would disable C++11 support and continue.
2014/11/22:
(*) TriBITS Core: Added ${PROJECT_NAME}_TRACE_ADD_TEST: Now you can a single
line print if a test got added (and its important properties if it did) or not
and if not then why the test did not get added.
2014/09/22:
(*) TriBITS Core: Changed minimum version of CMake from 2.7 to 2.8.11.
2014/09/21:
(*) TriBITS Dashboard Drivera: Added support for the env var
TRIBITS_TDD_USE_SYSTEM_CTEST so that if equal to 1, then the TriBITS Dashboard
Driver (TDD) system will use the CTest (and CMake) in the env will be used
instead of being downloaded using download-cmake.py. This not only speeds up
the auotmated builds, but it also ensures that the automated testing uses
exactly the install of CMake/CTest that is used by the developers on the
system. Also, it has been found that download-cmake.py will download and
install a 32bit version even on 64bit machines.
Trilinos 11.7:
--------------
(*) Switched from the terms Primary Stable (PS) and Secondary Stable (SS) code
to Primary Tested (PT) and Secondary Tested (ST) according to the plan in the
TriBITS Lifecycle model. Using 'PS' and 'SS' is still allowed but is
deprecated. This also included deprecating the varible
<Project>_ENABLE_SECONDARY_STABLE_CODE and replacing it with
<Project>_ENABLE_SECONDARY_TEST_CODE. Again, backward compatibility is
preserved. Also, the checkin-test.py arg --ss-extra-builds is deprecated and
replaced with --st-extra-builds.
Trilinos 11.6:
--------------
(*) Changed behavior of <Project>_ENABLE_<PACKAGE>=ON to enable all
subpackages for that package including in propogating forward dependencies.
See updated <Project>BuildQuickRef.* document.
Trilinos 11.3:
--------------
(*) Added ENVIRONMENT env1=val1 env2=val2 ... argument to TRIBITS_ADD_TEST(),
TRIBITS_ADD_ADVANCED_TEST(), and TRIBITS_ADD_EXECUTABLE_AND_TEST().
(*) Fixed the generation of headers for explicit instantation system for
subpackages: Now subpackages that use the macro
TRIBITS_CREATE_CLIENT_TEMPLATE_HEADERS() to generate XXX.hpp header files with
or without expliict instantation will key off of the parent package's explicit
instantation setting. In addition, packages that use the macro
TRIBITS_CREATE_CLIENT_TEMPLATE_HEADERS() will also need to add a call to
TRIBITS_ADD_EXPLICIT_INSTANTIATION_OPTION() in their top-level CMakeLists.txt
file.
TRIBITS_REPOSITORY_DEFINE_TPLS(
MPI "${${PROJECT_NAME}_TRIBITS_DIR}/core/std_tpls/" PT
)
tribits/Version.cmake
\ No newline at end of file
tribits/ci_support/checkin-test.py
\ No newline at end of file