diff --git a/README.md b/README.md index 39d32b3bd3..784331afa4 100644 --- a/README.md +++ b/README.md @@ -26,17 +26,19 @@ Synopsis of Active Draco Packages --------------------------------- * c4 - A communications library for message passing interfaces (MPI). - * For builds without MPI, all communication commnds will be no-op functions - (`DRACO_C4={MPI;SCALAR}`). + * For builds without MPI, all communication commnds will be no-op + functions (`DRACO_C4={MPI;SCALAR}`). Also proivdes a wrapper to + [libquo](https://github.com/lanl/libquo) * cdi - Access to material data. The Common Data Interface (CDI) specifies a common abstraction for objects and libraries that return material data (opacities, atomic cross sections, equation-of-state data, etc.) * cdi_analytic - Analytic models for physical data * cdi_CPEloss - Stopping power models for charged particles. * cdi_eospac - Equation-of-State data - * These classes wrap the EOSPAC6 libraries that read sesame files; Commonly - used to access gray opacity data and heat capacities. - (`EOSPAC_LIB_DIR=`). + * These classes wrap the [EOSPAC6 + libraries](https://laws.lanl.gov/projects/data/eos.html) that read + sesame files; Commonly used to access gray opacity data and heat + capacities. (`EOSPAC_LIB_DIR=`). * cdi_ipcress - Gray and multigroup opacities * The classes in this component will read and parse opacity values from an IPCRESS file produced by TOPS. @@ -44,7 +46,7 @@ Synopsis of Active Draco Packages accessing [nuclear data tables](https://xweb.lanl.gov/projects/data/nuclear/ndi/ndi.html). * compton - Provides access to Compton scattering models and data as provided - by the CSK library. + by the [CSK library](https://gitlab.lanl.gov/CSK/CSK).. * device - Wrapper for heterogeneous device communication * The classes in this component provide access to DaCS (deprecated) and CUDA calls for use on heterogeneous architecture platforms (GPU machines). @@ -97,16 +99,18 @@ Many thanks go to Draco's [contributors](https://github.com/lanl/Draco/graphs/co Draco was originally written by staff from Los Alamos's [CCS-2 Computational Physics and Methods Group](http://www.lanl.gov/org/padste/adtsc/computer-computational-statistical-sciences/computational-physics-methods/index.php): -> *CCS-2 Draco Team:* Kelly G. Thompson, Kent G. Budge, Ryan T. Wollaeger, -> James S. Warsa, Alex R. Long, Kendra P. Long, Jae H. Chang, -> Matt A. Cleveland, Andrew T. Till, and Tim Kelley. +> *CCS-2 Draco Team:* Kelly G. Thompson, Kent G. Budge, +> Ryan T. Wollaeger, Alex R. Long, Ben R. Ryan, Kendra P. Long, +> James S. Warsa, Matt A. Cleveland, Tim Kelley, Jae H. Chang, +> Andrew T. Till, Seth D. Cook, Ondrej Certik, and David A. Dixon. -> *Prior Contributers:* Gabriel M. Rockefeller, Allan B. Wollaber, -> Lori A. Pritchett-Sheats, Rob B. Lowrie, Paul W. Talbot, Katherine J. Wang, -> Peter Ahrens, Daniel Holladay, Jeff D. Densmore, Massimiliano Rosa, -> Todd J. Urbatsch, Jeff Furnish, John McGhee, Kris C. Garrett, Mike Buksas, -> Nick Myers, Paul Henning, Randy Roberts, Seth Johnson, Todd Adams, and -> Tom Evans. + +> *Prior Contributers:* Gabriel M. Rockefeller, +> Allan B. Wollaber, Rob B. Lowrie, Paul W. Talbot, Katherine J. Wang, +> Peter Ahrens, Daniel Holladay, Jeff D. Densmore, Massimiliano Rosa, +> Todd J. Urbatsch, Jeff Furnish, John McGhee, Kris C. Garrett, Mike Buksas, +> Nick Myers, Paul Henning, Randy Roberts, Seth Johnson, Todd Adams, +> Tom Evans, and Lori Pritchett-Sheats. Release ---------------- diff --git a/config/compilerEnv.cmake b/config/compilerEnv.cmake index de845f0f24..ce7690add4 100644 --- a/config/compilerEnv.cmake +++ b/config/compilerEnv.cmake @@ -7,6 +7,7 @@ include_guard(GLOBAL) include( FeatureSummary ) +include( string_manip ) if( NOT DEFINED PLATFORM_CHECK_OPENMP_DONE OR NOT DEFINED CCACHE_CHECK_AVAIL_DONE ) @@ -124,16 +125,16 @@ macro(dbsSetupCompilers) message( STATUS "Code coverage build ... disabled (Compiler not GNU|Clang)") endif() if(CODE_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - if( NOT CODE_COVERAGE_IGNORE_REGEX) - message( "Setting CODE_COVERAGE_IGNORE_REGEX...") - set(CODE_COVERAGE_IGNORE_REGEX - /usr/* - *test/* - */opt/spack/* - *terminal/* - *FortranChecks/* - CACHE STRING "List of regex that lcov will ignore") - endif() + list(APPEND CODE_COVERAGE_IGNORE_REGEX + /usr/* + *test/* + */opt/spack/* + *terminal/* + *FortranChecks/*) + list(REMOVE_DUPLICATES CODE_COVERAGE_IGNORE_REGEX) + set( CODE_COVERAGE_IGNORE_REGEX ${CODE_COVERAGE_IGNORE_REGEX} + CACHE STRING "List of regex that lcov will ignore" FORCE) + if( CMAKE_BUILD_TYPE STREQUAL Debug ) # Add required flags (GCC & LLVM/Clang) target_compile_options(coverage_config INTERFACE --coverage ) @@ -159,19 +160,22 @@ macro(dbsSetupCompilers) COMMAND ${CMAKE_COMMAND} -E echo \"==> View HTML coverage report with command: firefox cov-html/index.html\" COMMAND ${CMAKE_COMMAND} -E echo \"==> Repeat text coverage report with command: lcov --list coverage.info\" BYPRODUCTS "${PROJECT_BINARY_DIR}/coverage.info" ) - message( STATUS "Code coverage build ... enabled ('make covrep' to " - "see a text and/or a html report)") - else() - message( STATUS "Code coverage build ... disabled (lcov and/or gcov " - "not found)" ) - endif() + message( STATUS "Code coverage build ... enabled ('make covrep' to " + "see a text and/or a html report)") + message("CODE_COVERAGE_IGNORE_REGEX = ${CODE_COVERAGE_IGNORE_REGEX}") + block_indent( 90 27 + "CODE_COVERAGE_IGNORE_REGEX = ${CODE_COVERAGE_IGNORE_REGEX}") else() - message( STATUS "Code coverage build ... disabled (CMAKE_BUILD_TYPE " - "!= Debug" ) + message( STATUS "Code coverage build ... disabled (lcov and/or gcov " + "not found)" ) endif() + else() + message( STATUS "Code coverage build ... disabled (CMAKE_BUILD_TYPE " + "!= Debug" ) endif() + endif() - endif() # dbsSetupCompilers_done + endif() # dbsSetupCompilers_done endmacro() #------------------------------------------------------------------------------# diff --git a/config/string_manip.cmake b/config/string_manip.cmake index f27aa50fa9..4e4a8d6562 100644 --- a/config/string_manip.cmake +++ b/config/string_manip.cmake @@ -22,6 +22,14 @@ include_guard(GLOBAL) # # hanging_indent( 80 5 ${mymsg} ) # +# output: +# +# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod +# tempor incididunt ut labore et dolore magna aliqua. Ut sem nulla +# pharetra diam sit amet nisl suscipit adipiscing. Venenatis a condimentum +# vitae sapien pellentesque habitant. Urna porttitor rhoncus dolor +# purus +# # See src/CMakeLists.txt for an other example. #------------------------------------------------------------------------------# function (hanging_indent width indent message) @@ -50,6 +58,58 @@ function (hanging_indent width indent message) endfunction() +#------------------------------------------------------------------------------# +# Print the string ${message} formatted as a block indent. Text will be wrapped +# at column ${width} and all lines will be indented ${indent} spaces. +# +# Example use: +# +# set( mymsg "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do \ +# eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut sem nulla \ +# pharetra diam sit amet nisl suscipit adipiscing. Venenatis a condimentum \ +# vitae sapien pellentesque habitant. Urna porttitor rhoncus dolor \ +# purus.") +# +# block_indent( 80 5 ${mymsg} ) +# +# output: +# +# Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod +# tempor incididunt ut labore et dolore magna aliqua. Ut sem nulla +# pharetra diam sit amet nisl suscipit adipiscing. Venenatis a condimentum +# vitae sapien pellentesque habitant. Urna porttitor rhoncus dolor +# purus +# +#------------------------------------------------------------------------------# +function (block_indent width indent message) + + string(REPLACE ";" " " message "${message}") + foreach(idx RANGE 1 ${indent}) + string(APPEND padding " ") + endforeach() + set(line "${padding}") # 1st line + + string(REPLACE " " ";" msg_list "${message}" ) + + foreach(word ${msg_list} ) + string(LENGTH "${word}" word_len) + string(LENGTH "${line}" line_len) + math( EXPR proposed_len "${word_len} + ${line_len}" ) + if( ${word_len} GREATER ${width} ) + message("${line}") + message("${padding}${word}") + set(line "${padding}") + elseif( ${proposed_len} LESS_EQUAL ${width} ) + string(APPEND line "${word} ") + else() + message("${line}") + set(line "${padding}${word} ") + endif() + endforeach() + message("${line}") + +endfunction() + #------------------------------------------------------------------------------# # End config/string_manip.cmake #------------------------------------------------------------------------------# diff --git a/config/vendor_libraries.cmake b/config/vendor_libraries.cmake index 79f6a1070e..52bab8e06e 100644 --- a/config/vendor_libraries.cmake +++ b/config/vendor_libraries.cmake @@ -844,16 +844,19 @@ Looking for Draco...\") # Provide helper functions used by component CMakeLists.txt files # This block of code generated by draco/config/vendor_libraries.cmake. + # Setup defaults, value checks, etc. + include(buildEnv) + dbsSetDefaults() + # CMake macros that check the system for features like 'gethostname', etc. include( platform_checks ) - - # Sanity check for Cray Programming Environments query_craype() # Set compiler options include( compilerEnv ) dbsSetupCxx() dbsSetupFortran() + dbsSetupCuda() dbsSetupProfilerTools() # CMake macros like 'add_component_library' and 'add_component_executable' diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d1aec25081..4d7e86f5ce 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -45,6 +45,9 @@ message(" ") message( STATUS "Configuring Level 1 packages --" ) add_dir_if_exists( ds++ ) +# Only test ds++ if CI_CLANG_TIDY is running +if( NOT CI_CLANG_TIDY ) + # Level 2 message(" ") message( STATUS "Configuring Level 2 packages --" ) @@ -93,6 +96,8 @@ message( STATUS "Configuring Level 5 packages --" ) add_dir_if_exists( mesh ) # needs c4, ds++, mesh_element add_dir_if_exists( quadrature ) # needs mesh_element, parser, special_functions +endif() + # Summary if( VERBOSE OR ENV{VERBOSE} ) diff --git a/src/ds++/StackTrace.hh b/src/ds++/StackTrace.hh index a57c939a95..8270e7618b 100644 --- a/src/ds++/StackTrace.hh +++ b/src/ds++/StackTrace.hh @@ -56,7 +56,7 @@ namespace rtt_dsxx { * - http://stackoverflow.com/questions/77005/how-to-generate-a-stacktrace-when-my-gcc-c-app-crashes * - http://stackwalker.codeplex.com */ -DLL_PUBLIC_dsxx std::string print_stacktrace(std::string const &error_name); +std::string print_stacktrace(std::string const &error_name); } // end namespace rtt_dsxx