Skip to content

Commit 73c5aee

Browse files
authored
Merge pull request #8714 from awlauria/v5.0.x_opal_format_et_all
V5.0.x opal formatting and master sync
2 parents c445397 + 807e346 commit 73c5aee

File tree

629 files changed

+32731
-36298
lines changed

Some content is hidden

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

629 files changed

+32731
-36298
lines changed

.ci/lanl/gitlab-darwin-ci.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
variables:
2+
SCHEDULER_PARAMETERS: "-pgeneral -t 1:00:00 -N 1 --ntasks-per-node=16"
3+
GIT_STRATEGY: clone
4+
NPROCS: 4
5+
6+
stages:
7+
- build
8+
- test
9+
10+
build:intel:
11+
stage: build
12+
tags: [darwin-slurm-shared]
13+
script:
14+
- module load intel
15+
- git submodule update --init
16+
- ./autogen.pl
17+
- ./configure CC=icc FC=ifort CXX=icpc --prefix=$PWD/install_test --with-libevent=internal
18+
- make -j 8 install
19+
- make check
20+
- export PATH=$PWD/install_test/bin:$PATH
21+
- cd examples
22+
- make
23+
artifacts:
24+
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
25+
untracked: true
26+
paths:
27+
- examples
28+
- install_test
29+
expire_in: 1 week
30+
only:
31+
- scheduled
32+
33+
build:gnu:
34+
stage: build
35+
tags: [darwin-slurm-shared]
36+
script:
37+
- module load gcc
38+
- git submodule update --init
39+
- ./autogen.pl
40+
- ./configure --prefix=$PWD/install_test --with-libevent=internal
41+
- make -j 8 install
42+
- make check
43+
- export PATH=$PWD/install_test/bin:$PATH
44+
- cd examples
45+
- make
46+
artifacts:
47+
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
48+
untracked: true
49+
paths:
50+
- examples
51+
- install_test
52+
expire_in: 1 week
53+
only:
54+
- scheduled
55+
56+
test:intel:
57+
stage: test
58+
tags: [darwin-slurm-shared]
59+
dependencies:
60+
- build:intel
61+
needs: ["build:intel"]
62+
script:
63+
- pwd
64+
- ls
65+
- module load intel
66+
- export PATH=$PWD/install_test/bin:$PATH
67+
- which mpirun
68+
- cd examples
69+
- mpirun -np 4 hostname
70+
- mpirun -np 4 ./hello_c
71+
- mpirun -np 4 ./ring_c
72+
- mpirun -np 4 ./hello_mpifh
73+
- mpirun -np 4 ./ring_mpifh
74+
- mpirun -np 4 ./hello_usempi
75+
- mpirun -np 4 ./ring_usempi
76+
- mpirun -np 4 ./hello_usempif08
77+
- mpirun -np 4 ./ring_usempif08
78+
- mpirun -np 4 ./connectivity_c
79+
artifacts:
80+
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
81+
expire_in: 1 week
82+
only:
83+
- scheduled
84+
85+
test:gnu:
86+
stage: test
87+
tags: [dawrin-slurm-shared]
88+
dependencies:
89+
- build:gnu
90+
needs: ["build:gnu"]
91+
script:
92+
- pwd
93+
- ls
94+
- module load gcc
95+
- export PATH=$PWD/install_test/bin:$PATH
96+
- which mpirun
97+
- cd examples
98+
- mpirun -np 4 hostname
99+
- mpirun -np 4 ./hello_c
100+
- mpirun -np 4 ./ring_c
101+
- mpirun -np 4 ./hello_mpifh
102+
- mpirun -np 4 ./ring_mpifh
103+
- mpirun -np 4 ./hello_usempi
104+
- mpirun -np 4 ./ring_usempi
105+
- mpirun -np 4 ./hello_usempif08
106+
- mpirun -np 4 ./ring_usempif08
107+
- mpirun -np 4 ./connectivity_c
108+
artifacts:
109+
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
110+
expire_in: 1 week
111+
only:
112+
- scheduled

.clang-format

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ AlignConsecutiveAssignments: false
3636
AlignConsecutiveBitFields: false
3737
AlignConsecutiveDeclarations: false
3838
AlignEscapedNewlines: Left
39-
AlignOperands: Align
39+
AlignOperands: true
4040
AlignTrailingComments: true
41-
AllowAllArgumentsOnNextLine: true
41+
AllowAllArgumentsOnNextLine: false
4242
AllowAllConstructorInitializersOnNextLine: true
4343
AllowAllParametersOfDeclarationOnNextLine: true
4444
AllowShortEnumsOnASingleLine: true
4545
AllowShortBlocksOnASingleLine: Never
4646
AllowShortCaseLabelsOnASingleLine: false
47-
AllowShortFunctionsOnASingleLine: All
47+
AllowShortFunctionsOnASingleLine: None
4848
AllowShortLambdasOnASingleLine: All
4949
AllowShortIfStatementsOnASingleLine: Never
5050
AllowShortLoopsOnASingleLine: false
@@ -73,7 +73,7 @@ BraceWrapping:
7373
SplitEmptyFunction: true
7474
SplitEmptyRecord: true
7575
SplitEmptyNamespace: true
76-
BreakBeforeBinaryOperators: None
76+
BreakBeforeBinaryOperators: true
7777
BreakBeforeBraces: Custom
7878
BreakBeforeInheritanceComma: false
7979
BreakInheritanceList: BeforeColon
@@ -92,7 +92,6 @@ Cpp11BracedListStyle: true
9292
DeriveLineEnding: true
9393
DerivePointerAlignment: false
9494
DisableFormat: false
95-
ExperimentalAutoDetectBinPacking: false
9695
FixNamespaceComments: true
9796
ForEachMacros:
9897
- foreach
@@ -139,8 +138,8 @@ ObjCBlockIndentWidth: 4
139138
ObjCBreakBeforeNestedBlockParam: true
140139
ObjCSpaceAfterProperty: false
141140
ObjCSpaceBeforeProtocolList: true
142-
PenaltyBreakAssignment: 300
143-
PenaltyBreakBeforeFirstCallParameter: 300
141+
PenaltyBreakAssignment: 250
142+
PenaltyBreakBeforeFirstCallParameter: 301
144143
PenaltyBreakComment: 300
145144
PenaltyBreakFirstLessLess: 120
146145
PenaltyBreakString: 1000

config/ompi_check_psm2.m4

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
# and Technology (RIST). All rights reserved.
1818
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
1919
# reserved.
20+
# Copyright (c) 2021 Triad National Security, LLC. All rights
21+
# reserved.
22+
#
2023
# $COPYRIGHT$
2124
#
2225
# Additional copyrights may follow
@@ -65,10 +68,6 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
6568
[ompi_check_psm2_happy="no"])],
6669
[ompi_check_psm2_happy="no"])
6770

68-
CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS"
69-
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
70-
LIBS="$ompi_check_psm2_$1_save_LIBS"
71-
7271
AS_IF([test "$ompi_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"],
7372
[AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
7473
ompi_check_psm2_happy="no"])
@@ -81,15 +80,21 @@ AC_DEFUN([OMPI_CHECK_PSM2],[
8180
ompi_check_psm2_happy="no"])])
8281

8382
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
84-
[AC_CHECK_DECL([PSM2_LIB_REFCOUNT_CAP],
83+
[AS_IF([ test ! -z "$ompi_check_psm2_dir"],
84+
[CPPFLAGS="-I $ompi_check_psm2_dir/include $CPPFLAGS"])
85+
AC_CHECK_DECL([PSM2_LIB_REFCOUNT_CAP],
8586
[AC_DEFINE([HAVE_PSM2_LIB_REFCOUNT_CAP], [1],
8687
[have PSM2_LIB_REFCOUNT_CAP in psm2.h])],
8788
[AS_IF([test "x$enable_psm2_version_check" != "xno"],
8889
[ompi_check_psm2_happy="no"
8990
AC_MSG_WARN([PSM2 needs to be version 11.2.173 or later. Disabling MTL.])]
9091
)],
91-
[#include <psm2.h>])
92-
])
92+
[#include <psm2.h>])]
93+
)
94+
95+
CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS"
96+
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
97+
LIBS="$ompi_check_psm2_$1_save_LIBS"
9398

9499
OPAL_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy])
95100
fi

config/ompi_setup_cxx.m4

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,33 @@ AC_DEFUN([OMPI_SETUP_CXX_BANNER],[
2929
])
3030

3131
AC_DEFUN([OMPI_PROG_CXX],[
32-
OPAL_VAR_SCOPE_PUSH([ompi_cxxflags_save])
32+
OPAL_VAR_SCOPE_PUSH([ompi_cxxflags_save ompi_cxx_argv0])
33+
3334
ompi_cxxflags_save="$CXXFLAGS"
3435
AC_PROG_CXX
3536
AC_PROG_CXXCPP
3637
CXXFLAGS="$ompi_cxxflags_save"
38+
39+
# Note: according to the Autoconf docs, if no C++ compiler is
40+
# found, $CXX is still set to "g++" (!!). So make sure that we
41+
# actually found a C++ compiler; if not, set CXX to "no", per
42+
# thread at
43+
# https://www.open-mpi.org/community/lists/users/2013/02/21356.php,
44+
# which advises us to set Libtool precious variables to "no" if we
45+
# don't want Libtool to setup that language at all.
46+
AS_IF([test "x$CXX" = "x"], [CXX=no])
47+
set dummy $CXX
48+
ompi_cxx_argv0=[$]2
49+
OPAL_WHICH([$ompi_cxx_argv0], [OMPI_CXX_ABSOLUTE])
50+
AS_IF([test "x$OMPI_CXX_ABSOLUTE" = "x"],
51+
[CXX=no
52+
OMPI_CXX_ABSOLUTE=no])
53+
54+
AC_DEFINE_UNQUOTED(OMPI_CXX, "$CXX", [OMPI underlying C++ compiler])
55+
AC_SUBST(OMPI_CXX_ABSOLUTE)
56+
57+
AM_CONDITIONAL([OMPI_HAVE_CXX_COMPILER], [test "$CXX" != "no"])
58+
3759
OPAL_VAR_SCOPE_POP
3860
])
3961

@@ -44,8 +66,6 @@ dnl wrapper compiler (there is no C++ code in Open MPI, so we do not
4466
dnl need to setup for internal C++ compilations). Safe to AC_REQUIRE
4567
dnl this macro.
4668
AC_DEFUN([OMPI_SETUP_CXX],[
47-
OPAL_VAR_SCOPE_PUSH([ompi_cxx_argv0])
48-
4969
# Do a little tomfoolery to get the subsection title printed first
5070
AC_REQUIRE([OMPI_SETUP_CXX_BANNER])
5171

@@ -54,20 +74,11 @@ AC_DEFUN([OMPI_SETUP_CXX],[
5474
# see the docs for AC PROG_CC for details.
5575
AC_REQUIRE([OMPI_PROG_CXX])
5676

57-
BASECXX="`basename $CXX`"
58-
59-
AS_IF([test "x$CXX" = "x"], [CXX=none])
60-
set dummy $CXX
61-
ompi_cxx_argv0=[$]2
62-
OPAL_WHICH([$ompi_cxx_argv0], [OMPI_CXX_ABSOLUTE])
63-
AS_IF([test "x$OMPI_CXX_ABSOLUTE" = "x"], [OMPI_CXX_ABSOLUTE=none])
64-
65-
AC_DEFINE_UNQUOTED(OMPI_CXX, "$CXX", [OMPI underlying C++ compiler])
66-
AC_SUBST(OMPI_CXX_ABSOLUTE)
67-
68-
# Make sure we can link with the C compiler
69-
OPAL_LANG_LINK_WITH_C([C++], [],
70-
[cat <<EOF >&2
77+
# If we have a C++ compiler, do some additional tests
78+
AS_IF([test "$CXX" != "no"],
79+
[ # Make sure we can link with the C compiler
80+
OPAL_LANG_LINK_WITH_C([C++], [],
81+
[cat <<EOF >&2
7182
**********************************************************************
7283
* It appears that your C++ compiler is unable to link against object
7384
* files created by your C compiler. This generally indicates either
@@ -78,13 +89,6 @@ AC_DEFUN([OMPI_SETUP_CXX],[
7889
* available in the config.log file in this directory.
7990
**********************************************************************
8091
EOF
81-
AC_MSG_ERROR([C and C++ compilers are not link compatible. Can not continue.])])
82-
83-
# bool type size and alignment
84-
AC_LANG_PUSH(C++)
85-
AC_CHECK_SIZEOF(bool)
86-
OPAL_C_GET_ALIGNMENT(bool, OPAL_ALIGNMENT_CXX_BOOL)
87-
AC_LANG_POP(C++)
88-
89-
OPAL_VAR_SCOPE_POP
92+
AC_MSG_ERROR([C and C++ compilers are not link compatible. Can not continue.])])
93+
])
9094
])

config/opal_case_sensitive_fs_setup.m4

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ AC_ARG_WITH([cs_fs],
6363
[AS_HELP_STRING([--with-cs-fs],
6464
[Destination FS is case sensitive (default: set to value of the build FS's case sensitivity)])])
6565
66+
dnl Stupid emacs syntax hilighting: '
67+
6668
if test "$with_cs_fs" = "yes"; then
6769
OPAL_WANT_CS_FS=1
6870
elif test -z "$with_cs_fs"; then
@@ -78,6 +80,12 @@ else
7880
fi
7981

8082
AM_CONDITIONAL(CASE_SENSITIVE_FS, test "$OPAL_WANT_CS_FS" = "1")
83+
# There is a case in the ompi/tools/wrappers/Makefile.am where we need
84+
# to know if there is a case sensitive filesystem *and* if we have a
85+
# C++ compiler. Since we can't use operators like "&&" or "and" to
86+
# join together AM CONDITIONALs in a Makefile.am, effectively make a
87+
# combo CONDITIONAL here.
88+
AM_CONDITIONAL([CASE_SENSITIVE_FS_AND_HAVE_CXX_COMPILER], [test "$OPAL_WANT_CS_FS" = "1" && test "$CXX" != "no"])
8189

8290
if test "$OPAL_WANT_CS_FS" = "0"; then
8391
cat <<EOF

config/opal_config_asm.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,6 @@ dnl
10871087
dnl #################################################################
10881088
AC_DEFUN([OPAL_CONFIG_ASM],[
10891089
AC_REQUIRE([OPAL_SETUP_CC])
1090-
AC_REQUIRE([OPAL_SETUP_CXX])
10911090
AC_REQUIRE([AM_PROG_AS])
10921091
10931092
AC_ARG_ENABLE([c11-atomics],[AS_HELP_STRING([--enable-c11-atomics],

config/opal_setup_cc.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ AC_DEFUN([OPAL_SETUP_CC],[
296296
_OPAL_CHECK_SPECIFIC_CFLAGS(-Wmissing-prototypes, Wmissing_prototypes)
297297
_OPAL_CHECK_SPECIFIC_CFLAGS(-Wstrict-prototypes, Wstrict_prototypes)
298298
_OPAL_CHECK_SPECIFIC_CFLAGS(-Wcomment, Wcomment)
299+
_OPAL_CHECK_SPECIFIC_CFLAGS(-Wshadow, Wshadow)
299300
_OPAL_CHECK_SPECIFIC_CFLAGS(-Werror-implicit-function-declaration, Werror_implicit_function_declaration)
300301
_OPAL_CHECK_SPECIFIC_CFLAGS(-Wno-long-double, Wno_long_double, int main() { long double x; })
301302
_OPAL_CHECK_SPECIFIC_CFLAGS(-fno-strict-aliasing, fno_strict_aliasing, int main() { long double x; })

0 commit comments

Comments
 (0)