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

[WIP] Fixing and improving algorithms with view expressions #410

Open
wants to merge 192 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
eea0c28
Extending n-dim view tests
fuchsto Mar 18, 2017
949fb7b
Fixed rank in cartesian index space, SeqTilePattern.local_blockspec
fuchsto Mar 18, 2017
8586b3f
Skipping WIP test case
fuchsto Mar 18, 2017
92e2a34
Implementing n-dim block views
fuchsto Mar 18, 2017
09c0a77
Implementing n-dim block views
fuchsto Mar 18, 2017
6a7de46
Minor, added notes
fuchsto Mar 20, 2017
b0513c3
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Mar 20, 2017
3275589
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Mar 22, 2017
8d61420
Intermediate commit, likely broken
devreal May 10, 2017
1b431e0
Implement global-to-global dash::copy
devreal May 10, 2017
b0b07b3
Honor distribution in dash::transform
devreal May 10, 2017
7fa405e
Make g2g dash::copy work with matrix blocks and adapt test
devreal May 10, 2017
71e62bf
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto May 20, 2017
0245217
Added test on local view of cyclic array
fuchsto May 20, 2017
4f24fb0
Using view expressions in dash::copy, added unit tests, extended rang…
fuchsto May 20, 2017
f7aa958
Added stream operators for unique_ptr, shared_ptr
fuchsto May 23, 2017
9dbd69c
View test: copy blockcyclic local to global
fuchsto May 23, 2017
5d31f88
Cleanup in dash::copy
fuchsto May 23, 2017
90595ea
Cleanup
fuchsto May 23, 2017
f9a9c21
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto May 23, 2017
86ec450
Updated CartesianTest
fuchsto May 23, 2017
4e9519c
Documenting the DASH Index Set concept
fuchsto May 24, 2017
2d52c28
Fixing index set of dash::make_range
fuchsto May 25, 2017
a99d710
Minor
fuchsto May 25, 2017
155bd30
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto May 25, 2017
19b5939
Fixing index set of dash::make_range
fuchsto May 25, 2017
671f566
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto May 25, 2017
f0b18cc
Fixing index set of dash::make_range
fuchsto May 25, 2017
25c93b5
Added ex.02.array-views
fuchsto May 25, 2017
950e25a
Fixing dash::make_range
fuchsto May 26, 2017
a3253c8
Merge branch 'development' into feat-192-nviews
fuchsto May 30, 2017
1bb8fb2
Fixing dash::make_range
fuchsto May 30, 2017
d0f4dfc
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto May 30, 2017
f275c06
Fixing dash::make_range
fuchsto May 30, 2017
81f089d
Fixed type definition traits macro
fuchsto May 30, 2017
bd91cd4
Fixed pointer ranges
fuchsto May 30, 2017
c880aab
Fixing dash::make_range
fuchsto May 30, 2017
12ad36b
Fixing dash::make_range
fuchsto May 30, 2017
368de77
Fixed dash::make_range
fuchsto May 30, 2017
f9ee3b1
Cleanup ex.02.array-views (local-to-global copy)
fuchsto May 31, 2017
6ae01cf
Cleanup in ex.02.array-views
fuchsto May 31, 2017
e1f7a72
Update LocalPattern.h
fuchsto May 31, 2017
c1a9219
Added multidimensional block phase views
fuchsto May 31, 2017
f0ad61e
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto May 31, 2017
c170d7c
Minor fix in NView test
fuchsto May 31, 2017
8325b0f
Merge branch 'development' into bug-386-transform
fuchsto May 31, 2017
1382b48
Merge branch 'bug-386-transform' of github.com:dash-project/dash into…
fuchsto May 31, 2017
63da3cd
Defining iterator ranges as model of View concept
fuchsto May 31, 2017
9d02589
Defined iterator ranges as model of View concept
fuchsto May 31, 2017
d90ee38
Adding local views for iterator ranges
fuchsto Jun 1, 2017
d5a7b72
Adding local views for iterator ranges
fuchsto Jun 1, 2017
e2a1512
Adding local views for iterator ranges
fuchsto Jun 1, 2017
3877796
Adding local views for iterator ranges
fuchsto Jun 1, 2017
9b5a790
Redefining dash::transform with views/ranges
fuchsto Jun 1, 2017
876f55e
Extended ex.02.array-copy
fuchsto Jun 1, 2017
911851f
Extended ex.02.array-copy
fuchsto Jun 1, 2017
d87c51d
Extended ex.02.array-copy
fuchsto Jun 1, 2017
7e15ff7
Cleanup in view headers
fuchsto Jun 2, 2017
f12b797
Iterator range adapter types
fuchsto Jun 2, 2017
83327b4
Iterator range adapter types
fuchsto Jun 3, 2017
15c9f5d
Iterator range adapter types
fuchsto Jun 3, 2017
e3b0aa1
Range ostream operators
fuchsto Jun 3, 2017
05d77c1
Decouple concepts IndexSet and Pattern
fuchsto Jun 3, 2017
5fce765
extending ex.02.array-copy
fuchsto Jun 3, 2017
85c19ce
Fixed compiler errors
fuchsto Jun 5, 2017
088fff6
Removed view_traits::pattern_type
fuchsto Jun 6, 2017
09ca07f
Removed view_traits::pattern_type
fuchsto Jun 6, 2017
527199c
hscale, fixed compiler error
fuchsto Jun 6, 2017
7701ef4
Fixed index set, passing view/nview tests
fuchsto Jun 6, 2017
6fb2762
Fixing IndexSetLocalOriginBase
fuchsto Jun 6, 2017
32d51f3
Fixed IteratorRangeLocalOrigin
fuchsto Jun 6, 2017
ca6de54
Fixed make_range
fuchsto Jun 6, 2017
514e47c
Fixed make_range
fuchsto Jun 6, 2017
acccf22
Extended nview, copy tests
fuchsto Jun 7, 2017
e869352
Extending view examples, fix in IndexSetBase
fuchsto Jun 7, 2017
50fae61
ShiftTilePattern.local_block_at, ViewIterator.local
fuchsto Jun 8, 2017
c9004ab
Added dash::sub<SDim>(offset, domain)
fuchsto Jun 8, 2017
e46d541
Fixing n-dim make_range
fuchsto Jun 9, 2017
37fc1d6
Intermediate experiments with view iterator ranges
fuchsto Jun 17, 2017
0b99972
Intermediate, adding view iterator ranges
fuchsto Jun 17, 2017
16cad8f
Cleanup dash::origin
fuchsto Jun 19, 2017
d0551b0
Removed cast workaround for dash::origin
fuchsto Jun 19, 2017
767967d
Fixes in iterator range types
fuchsto Jun 19, 2017
ae89a88
Updating nview tests
fuchsto Jun 19, 2017
aeffeca
Updating nview tests
fuchsto Jun 19, 2017
ef50faf
Fixing view iterator range types
fuchsto Jun 19, 2017
3da8a24
Fixing view iterator range types
fuchsto Jun 19, 2017
24bec10
Fixing n-dim. local views
fuchsto Jun 19, 2017
95e16d6
Fixing n-dim. view iterator ranges
fuchsto Jun 22, 2017
bef690a
added unit test for local blocks
Jun 26, 2017
7dde45c
Adding chunked view concepts
fuchsto Jun 29, 2017
95e4934
Adding chunked view concepts
fuchsto Jun 29, 2017
4065273
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto Jun 29, 2017
6b34c09
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Sep 12, 2017
43f14f9
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Sep 16, 2017
729564b
Tentative switch to c++14
fuchsto Sep 16, 2017
2a7bda3
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto Sep 16, 2017
1bc3b41
Deduction of domain index set type via declval
fuchsto Sep 16, 2017
8aab38b
Added LocalMatrixRef.pattern(), returning global pattern
fuchsto Sep 16, 2017
25f1847
Extending matrix halo views example
fuchsto Sep 16, 2017
43e7454
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Sep 19, 2017
9037281
Added pipe utils
fuchsto Sep 19, 2017
acb61a8
Added local() pipeable
fuchsto Sep 19, 2017
c4f1f0c
Added sub, domain pipeables
fuchsto Sep 19, 2017
393adbe
Added origin, blocks, index, global pipeables
fuchsto Sep 19, 2017
068077c
Minor
fuchsto Sep 19, 2017
cdd90c0
Added missing (c) header
fuchsto Sep 19, 2017
dff4a8b
Cleanup in view examples
fuchsto Sep 20, 2017
c46b3a0
Extending view examples
fuchsto Sep 20, 2017
c23cc85
Extending view examples
fuchsto Sep 20, 2017
c502ef2
Introducing LocalViewIter, extending view examples
fuchsto Sep 20, 2017
d78ac8d
Intermediate fix
fuchsto Sep 20, 2017
b08f6db
Extending view examples
fuchsto Sep 20, 2017
d40995d
Extending view examples
fuchsto Sep 21, 2017
ab20737
Extending view examples
fuchsto Sep 22, 2017
813dc57
Fixing dash::expand view operation for matrix blocks
fuchsto Sep 23, 2017
0abbeac
Fixed dash::expand view operation for matrix blocks
fuchsto Sep 23, 2017
8dbf926
Using type dim_t for dimension template types in views
fuchsto Sep 23, 2017
d460493
Cleanup dash::expand
fuchsto Sep 23, 2017
52b1bce
Cleanup dash::expand
fuchsto Sep 23, 2017
87e3703
Added view operation dash::shift
fuchsto Sep 23, 2017
05be952
Using deduced return type for view.extents, view.offsets
fuchsto Sep 23, 2017
f8840fb
Fixed IndexSetLocal for ndim blocks
fuchsto Sep 23, 2017
d38dd86
Fixed ex.02.matrix-views example
fuchsto Sep 23, 2017
75e7da7
Added dash::intersect view operation
fuchsto Sep 23, 2017
9e7fb8c
Cleanup ex.02.matrix-sub-views example
fuchsto Sep 23, 2017
f038f98
Migrating dash::Matrix to view expressions
fuchsto Sep 24, 2017
75d63ec
Implementing range-based global to global copy
fuchsto Sep 24, 2017
7ab8b40
Adding dash::is_view_region<T>, dash::rank<T>, restructuring headers
fuchsto Sep 25, 2017
daf8cea
Fixed block views on n-dim subspaces
fuchsto Sep 25, 2017
aa12565
Added block view .is_local_at, cleanup
fuchsto Sep 26, 2017
1b064a1
Cleanup
fuchsto Sep 26, 2017
0631e79
Fixing Matrix.local
fuchsto Sep 26, 2017
d54a020
Fixed MatrixTest.CopyRow
fuchsto Sep 26, 2017
83a3e71
Fixed typo in dash::copy
fuchsto Sep 26, 2017
d417278
Fixed matrix unit tests
fuchsto Sep 26, 2017
b68573b
Intermediate, fixing matrix local block views
fuchsto Sep 26, 2017
5e32fa0
Fixed IndexSetBlock.rel for local domain
fuchsto Sep 26, 2017
9d013cd
Fixed Local-/GlobalViewIter operator[] offsets
fuchsto Sep 26, 2017
c76907e
Fixed LocalViewIter operator[] local offsets
fuchsto Sep 26, 2017
a4460c2
Further fixes in LocalViewIter
fuchsto Sep 26, 2017
8184295
Fixed IndexSetBlock.rel for local views
fuchsto Sep 26, 2017
1b929af
Cleanup in example ex.02.matrix-copy
fuchsto Sep 26, 2017
7043632
Fixing n-dim local sub-views
fuchsto Sep 26, 2017
f2d8197
Renamed example
fuchsto Sep 26, 2017
f8a5d6f
Fixed macro usage in dart_communication
fuchsto Sep 26, 2017
a2cf66f
Adding examples, fixes in ViewBlocksMod, LocalMatrixRef
fuchsto Sep 27, 2017
4ea390e
Extending examples, fixed viewspecs in local matrix
fuchsto Sep 27, 2017
fb919fa
Extending examples
fuchsto Sep 27, 2017
81b88a9
Fixing matrix | sub | local
fuchsto Sep 27, 2017
2d7d283
Extending examples
fuchsto Sep 27, 2017
34205b8
Merge branch 'feat-192-nviews' of coreglit.ch:/opt/git/dash into feat…
fuchsto Sep 27, 2017
3a5b9e9
Cleanup in examples
fuchsto Sep 29, 2017
0ab4cb7
Cleanup in examples
fuchsto Sep 29, 2017
0900d1d
Cleanup in examples
fuchsto Sep 29, 2017
8de7bf6
Cleanup in examples
fuchsto Sep 29, 2017
285dea4
Cleanup in examples
fuchsto Sep 29, 2017
d3de745
Fixes for SuperMIC
fuchsto Oct 2, 2017
dd591ab
clean-up of root directory, build-scripts in build-tools
ddiefenthaler Oct 3, 2017
056a436
made build scripts independant of working directory
ddiefenthaler Oct 3, 2017
96614c7
unified build scripts, parameter can be used to change build type
ddiefenthaler Oct 5, 2017
d2b3211
minor fix to use specified cmake command
ddiefenthaler Oct 5, 2017
82710d9
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Oct 6, 2017
944b275
Adding matrix view tests
fuchsto Oct 6, 2017
a49cb64
Merge branch 'feat-192-nviews' of coreglit.ch:/opt/git/dash into feat…
fuchsto Oct 6, 2017
57f8a35
Adding matrix view tests
fuchsto Oct 7, 2017
14cfcc6
Adding matrix view tests
fuchsto Oct 7, 2017
5f23f01
Adding matrix view tests
fuchsto Oct 7, 2017
2571daf
Adding matrix view tests
fuchsto Oct 7, 2017
60b074e
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Oct 10, 2017
9904630
Merge branch 'sup-build-supermic' of github.com:dash-project/dash int…
fuchsto Oct 10, 2017
55f584c
Merge branch 'sup-build-tools-directory' of github.com:dash-project/d…
fuchsto Oct 10, 2017
9fddf12
Cleanup in examples
fuchsto Oct 10, 2017
d2e6b73
Merge branch 'feat-192-nviews' of coreglit.ch:/opt/git/dash into feat…
fuchsto Oct 10, 2017
345e008
Fixes for clang c++14 compliance
fuchsto Oct 10, 2017
3e1f92f
Fixes for clang
fuchsto Oct 10, 2017
3d0e030
Specify C++ standard version via CMake built-in option
fuchsto Oct 11, 2017
829422c
Specify C++ standard version via CMake built-in option
fuchsto Oct 11, 2017
e95cb75
Intermediate
fuchsto Oct 16, 2017
55ac8f4
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Oct 16, 2017
4f88c99
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Oct 16, 2017
c82b403
Merge branch 'feat-192-nviews' of coreglit.ch:/opt/git/dash into feat…
fuchsto Oct 16, 2017
79d9553
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto Oct 16, 2017
1c1647f
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Dec 10, 2017
0c0961f
Fixed build errors from incomplete merge
fuchsto Dec 14, 2017
c67bde2
Fixed build errors from incomplete merge
fuchsto Dec 14, 2017
30f40b0
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Mar 21, 2018
6bed0a9
Merge branch 'development' of github.com:dash-project/dash into feat-…
fuchsto Mar 21, 2018
b157125
Merge branch 'feat-192-nviews' of github.com:dash-project/dash into f…
fuchsto Mar 21, 2018
ead6e72
Fixing build after merge
fuchsto Mar 21, 2018
f5bcd07
Rollback of pathological concept changes on development branch after …
fuchsto Mar 21, 2018
3dab958
Outlining pattern concept separation
fuchsto Mar 21, 2018
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ build.mic*
build.min*
build.nasty*
build.cov*
build.gcc*
build.clang*
build.icc*
build.analyze*
build-ci*
compile_commands.json
Expand All @@ -21,7 +24,7 @@ dash/include/dash/util/StaticConfig.h
*.log
*.out
ipm/*/GEN.*
my.*.sh
my.*
.syntastic*
.clang*
tags
Expand Down
11 changes: 0 additions & 11 deletions .syntastic_c

This file was deleted.

14 changes: 0 additions & 14 deletions .syntastic_cpp

This file was deleted.

27 changes: 22 additions & 5 deletions CMakeExt/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# -rdynamic Instructs the linker to add all symbols, not only used ones,
# to the dynamic symbol table

set(CMAKE_CXX_STANDARD ${DASH_CXX_STANDARD})


find_package(OpenMP)

Expand Down Expand Up @@ -62,6 +64,8 @@ if (ENABLE_DEV_COMPILER_WARNINGS
"${DASH_DEVELOPER_CCXX_FLAGS} -Wunused -Wtrigraphs")
set (DASH_DEVELOPER_CCXX_FLAGS
"${DASH_DEVELOPER_CCXX_FLAGS} -Wdeprecated -Wno-float-equal")
set (DASH_DEVELOPER_CCXX_FLAGS
"${DASH_DEVELOPER_CCXX_FLAGS} -ftemplate-backtrace-limit=0")

if (OPENMP_FOUND)
set (DASH_DEVELOPER_CCXX_FLAGS
Expand Down Expand Up @@ -154,6 +158,11 @@ endif()
# Set C++ compiler flags:
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
# using Clang
set (CXX_GDB_FLAG "-g"
CACHE STRING "C++ compiler (clang++) debug symbols flag")
set (CXX_OMP_FLAG ${OpenMP_CXX_FLAGS})
set (CC_OMP_FLAG ${OpenMP_CC_FLAGS})

set (CXX_STD_FLAG "--std=c++${DASH_CXX_STD_PREFERED}"
CACHE STRING "C++ compiler std flag")

Expand All @@ -163,9 +172,14 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")

elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
# using GCC
set (CXX_GDB_FLAG "-ggdb3 -rdynamic"
CACHE STRING "C++ compiler GDB debug symbols flag")
set (CXX_OMP_FLAG ${OpenMP_CXX_FLAGS})
set (CC_OMP_FLAG ${OpenMP_CC_FLAGS})

set (CXX_STD_FLAG "--std=c++${DASH_CXX_STD_PREFERED}"
CACHE STRING "C++ compiler std flag")
set (CXX_GDB_FLAG "-ggdb3 -rdynamic")

if(ENABLE_LT_OPTIMIZATION)
set (CXX_LTO_FLAG "-flto -fwhole-program -fno-use-linker-plugin")
endif()
Expand All @@ -176,25 +190,28 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")

elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")
# using Intel C++
set (CXX_OMP_FLAG ${OpenMP_CXX_FLAGS})
set (CC_OMP_FLAG ${OpenMP_CC_FLAGS})

set (CXX_STD_FLAG "-std=c++${DASH_CXX_STD_PREFERED}"
CACHE STRING "C++ compiler std flag")

if(ENABLE_LT_OPTIMIZATION)
set (CXX_LTO_FLAG "-ipo")
endif()
if(ENABLE_CC_REPORTS)
set (CC_REPORT_FLAG "-qopt-report=4 -qopt-report-phase ipo")
endif()


if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "15.0.0")
message(FATAL_ERROR "Insufficient Intel compiler version (< 15.0.0)")
endif()

elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Cray")
# Cray compiler not supported for C++
message(FATAL_ERROR,
"Cray compiler does not support C++11 features and is only "
"eligible for building DART.")
message(WARNING,
"Cray compiler does not support C++11/14 features and is "
"only eligible for building DART.")
endif()

set (CC_GDB_FLAG "-g"
Expand Down
35 changes: 25 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ if(POLICY CMP0016)
cmake_policy(SET CMP0016 OLD)
endif(POLICY CMP0016)
if(POLICY CMP0058)
cmake_policy(SET CMP0058 NEW)
endif()
cmake_policy(SET CMP0058 OLD)
endif(POLICY CMP0058)

if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
set(DEFAULT_COMPTIME_RED on)
Expand All @@ -34,6 +34,9 @@ else()
endif()

## Build options
set(DASH_CXX_STANDARD "14"
CACHE STRING "C++ standard version for DASH")

option(BUILD_TESTS
"Whether tests should be built" on)
option(INSTALL_TESTS
Expand Down Expand Up @@ -122,14 +125,6 @@ include(${CMAKE_SOURCE_DIR}/CMakeExt/Platform.cmake)
include(${CMAKE_SOURCE_DIR}/CMakeExt/Environment.cmake)
include(${CMAKE_SOURCE_DIR}/CMakeExt/StdLib.cmake)

if (ENABLE_THREADSUPPORT)
include(${CMAKE_SOURCE_DIR}/CMakeExt/Threading.cmake)
endif()

if (ENABLE_COMPTIME_RED)
include(${CMAKE_SOURCE_DIR}/CMakeExt/cotire.cmake)
endif()

# Load build modules to locate libraries after environment setup
# has been loaded:
include(${CMAKE_SOURCE_DIR}/CMakeExt/MPI.cmake)
Expand Down Expand Up @@ -218,6 +213,14 @@ set(DASH_DART_BASE_INCLUDE_DIR
## Set compiler flags (depend on CMake options)
include(${CMAKE_SOURCE_DIR}/CMakeExt/CompilerFlags.cmake)

if (ENABLE_THREADSUPPORT)
include(${CMAKE_SOURCE_DIR}/CMakeExt/Threading.cmake)
endif()

if (ENABLE_COMPTIME_RED)
include(${CMAKE_SOURCE_DIR}/CMakeExt/cotire.cmake)
endif()

## Build results output directories (/bin, /lib, /doc)

file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Expand Down Expand Up @@ -245,10 +248,19 @@ message(EMPH "Install prefix: (INSTALL_PREFIX) "
${CMAKE_INSTALL_PREFIX})
message(EMPH "Build type: (CMAKE_BUILD_TYPE) "
${CMAKE_BUILD_TYPE})
message(EMPH "C compiler: (CMAKE_C_COMPILER) "
${CMAKE_C_COMPILER_ID})
message(EMPH "C++ compiler: (CMAKE_CXX_COMPILER) "
${CMAKE_CXX_COMPILER_ID})
message(EMPH "C++ standard version: (DASH_CXX_STANDARD) "
${CMAKE_CXX_STANDARD})
message(EMPH "Generic build: (BUILD_GENERIC) "
${BUILD_GENERIC})
message(EMPH "Build shared libraries: (BUILD_SHARED_LIBS) "
${BUILD_SHARED_LIBS})
if (MPI_FOUND)
message(EMPH "MPI implementation: " ${MPI_IMPL_ID})
endif()

message(INFO "Build tests: (BUILD_TESTS) "
${BUILD_TESTS})
Expand Down Expand Up @@ -305,12 +317,15 @@ message(INFO "HDF5 support: (ENABLE_HDF5) "
${ENABLE_HDF5})
message(INFO "Enabled DART backends: (DART_IMPLEMENTATIONS) "
${DART_IMPLEMENTATIONS})


message(INFO "C compiler id: ${CMAKE_C_COMPILER_ID}")
message(INFO "C++ compiler id: ${CMAKE_CXX_COMPILER_ID}")
if (DEFINED MPI_IMPL_ID)
message(INFO "MPI implementation: " ${MPI_IMPL_ID})
endif()


if (ENABLE_PAPI)
if (PAPI_FOUND)
message(INFO "PAPI enabled")
Expand Down
92 changes: 37 additions & 55 deletions build.analyze.sh → build-tools/build.analyze.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#!/bin/sh

if ! [ -z ${SOURCING+x} ]; then

# This script runs scan-build to perform a static code analysis
# https://clang-analyzer.llvm.org/scan-build.html
#
# The actual compilers have to be set in the CCC prefix env. variables. e.g:
# export CCC_CC=clang-3.8
# export CCC_CXX=clang++3.8

BUILD_DIR=./build.analyze
REPORT_DIR=report # relative to BUILD_DIR
BUILD_WRAPPER="${SCANBUILD_BIN}";



## !! NOTE !!
#
# See documentation of scan-build for details on recommended build
Expand All @@ -21,44 +18,6 @@ BUILD_WRAPPER="${SCANBUILD_BIN}";
#
##



# try to find build wrapper
if [ "$BUILD_WRAPPER" = "" ]; then
BUILD_WRAPPER="scan-build"
fi
if [ "$SCANBUILD_OPTS" = "" ]; then
SCANBUILD_OPTS="-analyze-headers -plist-html"
fi
SCANBUILD_OPTS="-o $REPORT_DIR ${SCANBUILD_OPTS}"
SCANBUILD_OPTS="--force-analyze-debug-code -v ${SCANBUILD_OPTS}"

which $BUILD_WRAPPER ||
(echo "This build requires $BUILD_WRAPPER. Set env. var SCANBUILD_BIN" \
& exit 1);

FORCE_BUILD=false
if [ "$1" = "-f" ]; then
FORCE_BUILD=true
fi

await_confirm() {
if ! $FORCE_BUILD; then
echo ""
echo " To build and analyze using these settings, hit ENTER"
read confirm
fi
}

exit_message() {
echo "--------------------------------------------------------"
echo "Done. To install DASH, run make install in $BUILD_DIR"
}

if [ "${PAPI_HOME}" = "" ]; then
PAPI_HOME=$PAPI_BASE
fi

# To specify a build configuration for a specific system, use:
#
# -DENVIRONMENT_TYPE=<type> \
Expand Down Expand Up @@ -86,11 +45,30 @@ fi
# For likwid support, ensure that the likwid development headers are
# installed.

# Configure with default release build settings:
rm -Rf $BUILD_DIR/*
mkdir -p $BUILD_DIR/$REPORT_DIR
(cd $BUILD_DIR && $BUILD_WRAPPER $SCANBUILD_OPTS \
cmake3 -DCMAKE_BUILD_TYPE=Debug \

BUILD_DIR=build.analyze
REPORT_DIR=report # relative to BUILD_DIR
BUILD_WRAPPER="${SCANBUILD_BIN}";

# try to find build wrapper
if [ "$BUILD_WRAPPER" = "" ]; then
BUILD_WRAPPER="scan-build"
fi
if [ "$SCANBUILD_OPTS" = "" ]; then
SCANBUILD_OPTS="-analyze-headers -plist-html"
fi
SCANBUILD_OPTS="-o $REPORT_DIR ${SCANBUILD_OPTS}"
SCANBUILD_OPTS="--force-analyze-debug-code -v ${SCANBUILD_OPTS}"

which $BUILD_WRAPPER ||
(echo "This build requires $BUILD_WRAPPER. Set env. var SCANBUILD_BIN" \
& exit 1);

# custom cmake command
CMAKE_COMMAND="$BUILD_WRAPPER $SCANBUILD_OPTS cmake3"

# default release build settings:
CMAKE_OPTIONS=" -DCMAKE_BUILD_TYPE=Debug \
-DENVIRONMENT_TYPE=default \
-DENABLE_COMPTIME_RED=OFF \
\
Expand Down Expand Up @@ -130,10 +108,14 @@ mkdir -p $BUILD_DIR/$REPORT_DIR
-DIPM_PREFIX=${IPM_HOME} \
-DPAPI_PREFIX=${PAPI_HOME} \
\
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
../ && \
await_confirm && \
$BUILD_WRAPPER $SCANBUILD_OPTS make) && \
(cp $BUILD_DIR/compile_commands.json .) && \
exit_message
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"

# the make command used
MAKE_COMMAND="$BUILD_WRAPPER $SCANBUILD_OPTS make"

else

$(dirname $0)/build.sh analyze $@

fi

Loading