Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit ba1fc53

Browse files
authored
Merge pull request #2 from pramodk/master
CoreNeuron development changes from BBP repository
2 parents 7338b7d + 8aa48d2 commit ba1fc53

File tree

172 files changed

+18126
-7038
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+18126
-7038
lines changed

.clang-format

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Chromium
4+
AccessModifierOffset: -2
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlinesLeft: true
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: false
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: false
15+
AllowShortIfStatementsOnASingleLine: false
16+
AllowShortLoopsOnASingleLine: false
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: true
22+
BinPackParameters: false
23+
BraceWrapping:
24+
AfterClass: false
25+
AfterControlStatement: false
26+
AfterEnum: false
27+
AfterFunction: false
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: false
31+
AfterUnion: false
32+
BeforeCatch: false
33+
BeforeElse: false
34+
IndentBraces: false
35+
BreakBeforeBinaryOperators: None
36+
BreakBeforeBraces: Attach
37+
BreakBeforeTernaryOperators: true
38+
BreakConstructorInitializersBeforeComma: false
39+
BreakAfterJavaFieldAnnotations: false
40+
BreakStringLiterals: false
41+
ColumnLimit: 100
42+
CommentPragmas: '^ IWYU pragma:'
43+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
44+
ConstructorInitializerIndentWidth: 4
45+
ContinuationIndentWidth: 4
46+
Cpp11BracedListStyle: true
47+
DerivePointerAlignment: false
48+
DisableFormat: false
49+
ExperimentalAutoDetectBinPacking: false
50+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
51+
IncludeCategories:
52+
- Regex: '^<.*\.h>'
53+
Priority: 1
54+
- Regex: '^<.*'
55+
Priority: 2
56+
- Regex: '.*'
57+
Priority: 3
58+
IncludeIsMainRegex: '([-_](test|unittest))?$'
59+
IndentCaseLabels: true
60+
IndentWidth: 4
61+
IndentWrappedFunctionNames: false
62+
KeepEmptyLinesAtTheStartOfBlocks: false
63+
MacroBlockBegin: ''
64+
MacroBlockEnd: ''
65+
MaxEmptyLinesToKeep: 1
66+
NamespaceIndentation: All
67+
ObjCBlockIndentWidth: 2
68+
ObjCSpaceAfterProperty: false
69+
ObjCSpaceBeforeProtocolList: false
70+
PenaltyBreakBeforeFirstCallParameter: 1
71+
PenaltyBreakComment: 300
72+
PenaltyBreakFirstLessLess: 120
73+
PenaltyBreakString: 1000
74+
PenaltyExcessCharacter: 1000000
75+
PenaltyReturnTypeOnItsOwnLine: 200
76+
PointerAlignment: Left
77+
ReflowComments: true
78+
SortIncludes: false
79+
SpaceAfterCStyleCast: false
80+
SpaceBeforeAssignmentOperators: true
81+
SpaceBeforeParens: ControlStatements
82+
SpaceInEmptyParentheses: false
83+
SpacesBeforeTrailingComments: 2
84+
SpacesInAngles: false
85+
SpacesInContainerLiterals: true
86+
SpacesInCStyleCastParentheses: false
87+
SpacesInParentheses: false
88+
SpacesInSquareBrackets: false
89+
Standard: Cpp03
90+
TabWidth: 8
91+
UseTab: Never
92+
JavaScriptQuotes: Leave
93+
...
94+

.gitreview

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[gerrit]
2+
host=bbpcode.epfl.ch
3+
port=22
4+
project=sim/coreneuron
5+
defaultbranch=master
6+
defaultremote=origin

CMake/ClangFormatUtils.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
string(REPLACE " " ";" FILES_TO_FORMAT ${SOURCE_FILES})
2+
3+
FOREACH(SRC_FILE ${FILES_TO_FORMAT})
4+
execute_process(COMMAND ${CLANG_FORMAT_EXECUTABLE} -i -style=file -fallback-style=none ${SRC_FILE})
5+
ENDFOREACH()

CMake/Findmod2c.cmake

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Copyright (c) 2016, Blue Brain Project
2+
# All rights reserved.
3+
4+
# Redistribution and use in source and binary forms, with or without modification,
5+
# are permitted provided that the following conditions are met:
6+
# 1. Redistributions of source code must retain the above copyright notice,
7+
# this list of conditions and the following disclaimer.
8+
# 2. Redistributions in binary form must reproduce the above copyright notice,
9+
# this list of conditions and the following disclaimer in the documentation
10+
# and/or other materials provided with the distribution.
11+
# 3. Neither the name of the copyright holder nor the names of its contributors
12+
# may be used to endorse or promote products derived from this software
13+
# without specific prior written permission.
14+
15+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
25+
# THE POSSIBILITY OF SUCH DAMAGE.
26+
27+
28+
# Findmod2c
29+
# -------------
30+
#
31+
# Find mod2c
32+
#
33+
# Find the mod2c Blue Brain HPC utils library
34+
#
35+
# Using mod2c:
36+
#
37+
# ::
38+
#
39+
# find_package(mod2c REQUIRED)
40+
# include_directories(${mod2c_INCLUDE_DIRS})
41+
# target_link_libraries(foo ${mod2c_LIBRARIES})
42+
#
43+
# This module sets the following variables:
44+
#
45+
# ::
46+
#
47+
# mod2c_FOUND - set to true if the library is found
48+
# mod2c_INCLUDE_DIRS - list of required include directories
49+
# mod2c_LIBRARIES - list of libraries to be linked
50+
51+
#=============================================================================
52+
# Copyright 2015 Adrien Devresse <[email protected]>
53+
#
54+
#=============================================================================
55+
# (To distribute this file outside of CMake, substitute the full
56+
# License text for the above reference.)
57+
58+
59+
# UNIX paths are standard, no need to write.
60+
find_program(mod2c_BINARY
61+
NAMES mod2c_core
62+
PATHS "/usr/bin"
63+
)
64+
65+
66+
# Checks 'REQUIRED', 'QUIET' and versions.
67+
include(FindPackageHandleStandardArgs)
68+
69+
find_package_handle_standard_args(mod2c
70+
FOUND_VAR mod2c_FOUND
71+
REQUIRED_VARS mod2c_BINARY)
72+

CMake/TestScriptUtils.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2525
# THE POSSIBILITY OF SUCH DAMAGE.
2626

27+
2728
# Utility functions for manipulating test labels and producing
2829
# tests from scripts:
2930
#

CMake/config/CompilerFlagsHelpers.cmake

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2525
# THE POSSIBILITY OF SUCH DAMAGE.
2626

27+
2728
# CompilerFlagsHelpers.cmake
2829
#
2930
# set of Convenience functions for portable compiler flags
@@ -33,7 +34,6 @@ set(SUPPORTED_COMPILER_LANGUAGE_LIST "C;CXX")
3334

3435
## detect compiler
3536
foreach(COMPILER_LANGUAGE ${SUPPORTED_COMPILER_LANGUAGE_LIST})
36-
3737
if(CMAKE_${COMPILER_LANGUAGE}_COMPILER_ID STREQUAL "XL")
3838
set(CMAKE_${COMPILER_LANGUAGE}_COMPILER_IS_XLC ON)
3939
elseif(CMAKE_${COMPILER_LANGUAGE}_COMPILER_ID STREQUAL "Intel")
@@ -72,6 +72,8 @@ foreach(COMPILER_LANGUAGE ${SUPPORTED_COMPILER_LANGUAGE_LIST})
7272
set(CMAKE_${COMPILER_LANGUAGE}_POSITION_INDEPENDANT "-qpic=small")
7373

7474
set(CMAKE_${COMPILER_LANGUAGE}_VECTORIZE "-qhot")
75+
set(ADDITIONAL_THREADSAFE_FLAGS "-qthreaded")
76+
set(IGNORE_UNKNOWN_PRAGMA_FLAGS "-qsuppress=1506-224")
7577

7678
# Microsoft compiler
7779
elseif(CMAKE_${COMPILER_LANGUAGE}_COMPILER_IS_MSVC)
@@ -104,6 +106,7 @@ foreach(COMPILER_LANGUAGE ${SUPPORTED_COMPILER_LANGUAGE_LIST})
104106
set(CMAKE_${COMPILER_LANGUAGE}_POSITION_INDEPENDANT "-fPIC")
105107

106108
set(CMAKE_${COMPILER_LANGUAGE}_VECTORIZE "-ftree-vectorize")
109+
set(IGNORE_UNKNOWN_PRAGMA_FLAGS "-Wno-unknown-pragmas")
107110

108111
if(CMAKE_${COMPILER_LANGUAGE}_COMPILER_IS_GCC AND ( CMAKE_${COMPILER_LANGUAGE}_COMPILER_VERSION VERSION_GREATER "4.7.0") )
109112
set(CMAKE_${COMPILER_LANGUAGE}_LINK_TIME_OPT "-flto")
@@ -119,14 +122,19 @@ foreach(COMPILER_LANGUAGE ${SUPPORTED_COMPILER_LANGUAGE_LIST})
119122
## rest of the world
120123
else()
121124

125+
## unknown compiler flags produce error on Cray and hence just set this for intel now
126+
if(CMAKE_${COMPILER_LANGUAGE}_COMPILER_IS_ICC)
127+
set(IGNORE_UNKNOWN_PRAGMA_FLAGS "-Wno-unknown-pragmas")
128+
endif()
129+
122130
set(CMAKE_${COMPILER_LANGUAGE}_WARNING_ALL "")
123131

124-
set(CMAKE_${COMPILER_LANGUAGE}_DEBUGINFO_FLAGS "-g")
132+
set(CMAKE_${COMPILER_LANGUAGE}_DEBUGINFO_FLAGS "")
125133

126-
set(CMAKE_${COMPILER_LANGUAGE}_OPT_NONE "-O0")
127-
set(CMAKE_${COMPILER_LANGUAGE}_OPT_NORMAL "-O2")
128-
set(CMAKE_${COMPILER_LANGUAGE}_OPT_AGGRESSIVE "-O3")
129-
set(CMAKE_${COMPILER_LANGUAGE}_OPT_FASTEST "-O3")
134+
set(CMAKE_${COMPILER_LANGUAGE}_OPT_NONE "")
135+
set(CMAKE_${COMPILER_LANGUAGE}_OPT_NORMAL "")
136+
set(CMAKE_${COMPILER_LANGUAGE}_OPT_AGGRESSIVE "")
137+
set(CMAKE_${COMPILER_LANGUAGE}_OPT_FASTEST "")
130138

131139
set(CMAKE_${COMPILER_LANGUAGE}_STACK_PROTECTION "")
132140
set(CMAKE_${COMPILER_LANGUAGE}_POSITION_INDEPENDANT "")

CMake/config/DefineInstallationPaths.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2525
# THE POSSIBILITY OF SUCH DAMAGE.
2626

27+
2728
IF (UNIX)
2829
IF (NOT APPLICATION_NAME)
2930
MESSAGE(STATUS "${PROJECT_NAME} is used as APPLICATION_NAME")
@@ -32,7 +33,6 @@ IF (UNIX)
3233

3334
# detect lib suffix
3435

35-
3636
GET_PROPERTY(LIB64_SUFFIX GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
3737

3838
IF(LIB64_SUFFIX)

CMake/config/ReleaseDebugAutoFlags.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2525
# THE POSSIBILITY OF SUCH DAMAGE.
2626

27+
2728
# ReleaseDebugAutoFlags.cmake
2829
#
2930
# Release / Debug configuration helper

CMake/config/TestHelpers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2525
# THE POSSIBILITY OF SUCH DAMAGE.
2626

27+
2728
# TestHelpers.cmake
2829
#
2930
# set of Convenience functions for unit testing with cmake
3031

31-
3232
##
3333
# enable or disable detection of SLURM and MPIEXEC
3434
option(AUTO_TEST_WITH_SLURM "automatically add srun as test prefix in a SLURM environment" TRUE)

CMake/packages/FindBBPTestData.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2424
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
2525
# THE POSSIBILITY OF SUCH DAMAGE.
26+
27+
2628
##
2729
## Find package file for the Blue Brain Functional test data files
2830
##

0 commit comments

Comments
 (0)