Skip to content

Commit dda17d4

Browse files
authored
Merge pull request #10246 from jsquyres/pr/misc-cleanups
Miscellaneous cleanups
2 parents c4d9812 + 0cc63a5 commit dda17d4

File tree

6 files changed

+42
-49
lines changed

6 files changed

+42
-49
lines changed

config/ompi_configure_options.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dnl $HEADER$
2828
dnl
2929

3030
AC_DEFUN([OMPI_CONFIGURE_OPTIONS],[
31-
opal_show_subtitle "OMPI Configuration options"
31+
opal_show_subtitle "MPI layer configuration options"
3232

3333
#
3434
# Disable MPI layer?
@@ -231,7 +231,7 @@ AC_DEFINE_UNQUOTED(MPI_PARAM_CHECK, $mpi_param_check,
231231
AC_DEFINE_UNQUOTED(OMPI_PARAM_CHECK, $ompi_param_check,
232232
[Whether we want to check MPI parameters never or possible (an integer constant)])
233233

234-
AC_MSG_CHECKING([if want ompio support])
234+
AC_MSG_CHECKING([if want OMPIO support])
235235
AC_ARG_ENABLE([io-ompio],
236236
[AS_HELP_STRING([--disable-io-ompio],
237237
[Disable the ompio MPI-IO component])])

config/ompi_setup_prrte.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
4242
OPAL_3RDPARTY_WITH([prrte], [prrte], [package_prrte], [1])
4343
4444
AC_ARG_WITH([prrte-bindir],
45-
[AC_HELP_STRING([--with-prrte-bindir=DIR],
45+
[AS_HELP_STRING([--with-prrte-bindir=DIR],
4646
[Search for PRRTE binaries in DIR. Defaults to PRRTE_DIR/bin if not specified])])
4747
4848
prrte_setup_internal_happy=0

config/opal_configure_options.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dnl $HEADER$
3232
dnl
3333

3434
AC_DEFUN([OPAL_CONFIGURE_OPTIONS],[
35-
opal_show_subtitle "OPAL Configuration options"
35+
opal_show_subtitle "General configuration options"
3636

3737

3838
#

config/oshmem_configure_options.m4

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ dnl $HEADER$
1616
dnl
1717

1818
AC_DEFUN([OSHMEM_CONFIGURE_OPTIONS],[
19-
opal_show_subtitle "OSHMEM Configuration options"
19+
opal_show_subtitle "OpenSHMEM Configuration options"
2020

2121
AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LIBS)
2222
AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LDFLAGS)
2323

2424
#
2525
# Disable Open SHMEM?
2626
#
27-
AC_MSG_CHECKING([if want oshmem])
27+
AC_MSG_CHECKING([if want OpenSHMEM])
2828
AC_ARG_ENABLE([oshmem],
2929
[AS_HELP_STRING([--enable-oshmem],
3030
[Enable building the OpenSHMEM interface (available on Linux only, where it is enabled by default)])])
@@ -76,7 +76,7 @@ AC_DEFINE_UNQUOTED([OSHMEM_SPEC_COMPAT], [$OSHMEM_SPEC_COMPAT],
7676
#
7777
# Do we want to disable OSHMEM parameter checking at run-time?
7878
#
79-
AC_MSG_CHECKING([if want OSHMEM API parameter checking])
79+
AC_MSG_CHECKING([if want OpenSHMEM API parameter checking])
8080
AC_ARG_WITH([oshmem-param-check],
8181
[AS_HELP_STRING([--with-oshmem-param-check(=VALUE)],
8282
[behavior of OSHMEM API function parameter checking. Valid values are: always, never. If --with-oshmem-param-check is specified with no VALUE argument, it is equivalent to a VALUE of "always"; --without-oshmem-param-check is equivalent to "never" (default: always).])])
@@ -104,7 +104,7 @@ AC_DEFINE_UNQUOTED(OSHMEM_PARAM_CHECK, $shmem_param_check,
104104
#
105105
AC_ARG_ENABLE([oshmem-profile],
106106
[AS_HELP_STRING([--enable-oshmem-profile],
107-
[enable OSHMEM profiling (default: enabled)])])
107+
[enable OpenSHMEM profiling (default: enabled)])])
108108
AC_MSG_CHECKING([if want pshmem])
109109
AS_IF([test "$enable_oshmem_profile" != "no"],
110110
[AC_MSG_RESULT([yes])],
@@ -123,17 +123,17 @@ AS_IF([test "$enable_oshmem" = "no" && \
123123
#
124124
# Fortran bindings
125125
#
126-
AC_MSG_CHECKING([if want to build OSHMEM fortran bindings])
126+
AC_MSG_CHECKING([if want to build OpenSHMEM fortran bindings])
127127
AC_ARG_ENABLE([oshmem-fortran],
128128
AS_HELP_STRING([--enable-oshmem-fortran],
129-
[enable OSHMEM Fortran bindings (default: enabled if Fortran compiler found)]))
129+
[enable OpenSHMEM Fortran bindings (default: enabled if Fortran compiler found)]))
130130
if test "$enable_oshmem_fortran" != "no"; then
131131
# If no OMPI FORTRAN, bail
132132
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS && \
133133
test "$enable_oshmem_fortran" = "yes"],
134134
[AC_MSG_RESULT([bad value OMPI_TRY_FORTRAN_BINDINGS: ($OMPI_TRY_FORTRAN_BINDINGS)])
135135
AC_MSG_WARN([Your request to --enable-oshmem-fortran can only be satisfied if fortran support is enabled in OMPI.
136-
You see this message because OMPI fortran support has been explicitly disabled via --disable-mpi-fortran and OSHMEM fortran support was explicitly enabled with --enable-oshmem-fortran.
136+
You see this message because MPI fortran support has been explicitly disabled via --disable-mpi-fortran and OpenSHMEM fortran support was explicitly enabled with --enable-oshmem-fortran.
137137
Configure will abort because you, a human, have asked for something that cannot be provided.])
138138
AC_MSG_ERROR([Cannot continue])])
139139
if test $OMPI_TRY_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS; then

configure.ac

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,10 @@ AC_DEFUN([OMPI_CHECK_DIR_FOR_SPACES],[
128128
AC_MSG_ERROR([Cannot continue.])])
129129
])
130130

131-
AC_DEFUN([OMPI_CANONICALIZE_PATH],[
132-
case $host_os in
133-
darwin*)
134-
# MacOS does not have "readlink -f" or realpath (at least as
135-
# of MacOS Cataline / 10.15). Instead, use Python, because we
136-
# know MacOS comes with a /usr/bin/python that has
137-
# os.path.realpath.
138-
$2=`/usr/bin/python -c 'import os; print os.path.realpath("'$1'")'`
139-
;;
140-
*)
141-
$2=`readlink -f $1`
142-
;;
143-
esac
144-
])
145-
146-
OMPI_CHECK_DIR_FOR_SPACES([$srcdir], [a], [source tree])
147-
OMPI_CANONICALIZE_PATH([$srcdir], [ompi_dir])
148-
OMPI_CHECK_DIR_FOR_SPACES([$ompi_dir], [an], [absolute source tree])
149-
OMPI_CANONICALIZE_PATH([.], [ompi_dir])
131+
ompi_dir=`pwd`
150132
OMPI_CHECK_DIR_FOR_SPACES([$ompi_dir], [a], [build tree])
133+
OMPI_CHECK_DIR_FOR_SPACES([$srcdir], [a], [source tree])
151134
OMPI_CHECK_DIR_FOR_SPACES([$prefix], [a], [prefix])
152-
OMPI_CANONICALIZE_PATH([$prefix], [ompi_dir])
153-
OMPI_CHECK_DIR_FOR_SPACES([$ompi_dir], [an], [absolute prefix])
154135

155136
opal_show_subtitle "Checking versions"
156137

@@ -288,17 +269,12 @@ m4_ifdef([project_oshmem],
288269

289270
OPAL_CONFIGURE_OPTIONS
290271

272+
###########################
273+
# Open MPI options
291274
m4_ifdef([project_ompi], [OMPI_CONFIGURE_OPTIONS])
292-
m4_ifdef([project_oshmem], [OSHMEM_CONFIGURE_OPTIONS])
293-
294-
# Set up project specific AM_CONDITIONALs
295-
AS_IF([test "$enable_ompi" != "no"], [project_ompi_amc=true], [project_ompi_amc=false])
296-
m4_ifndef([project_ompi], [project_ompi_amc=false])
297-
298-
AS_IF([test "$enable_oshmem" != "no"], [project_oshmem_amc=true], [project_oshmem_amc="no (disabled)"])
299-
m4_ifndef([project_oshmem], [project_oshmem_amc="no (not available)"])
300275

301276
# Enable/Disable Software-Based Performance Counters Capability
277+
AC_MSG_CHECKING([if want software-based performance counters (SPC)])
302278
AC_ARG_ENABLE([spc],
303279
[AS_HELP_STRING([--enable-spc],
304280
[Enable software-based performance counters capability (default: disabled)])])
@@ -324,10 +300,21 @@ fi
324300
# The library prefixes must be set before we call OPAL MCA. Here is
325301
# as good a place as any.
326302
m4_ifdef([project_opal],
327-
[OPAL_SET_LIB_NAME([open-pal])])
303+
[OPAL_SET_LIB_NAME([open-pal])])
328304

329305
m4_ifdef([project_ompi],
330-
[OMPI_SET_LIB_NAME([])])
306+
[OMPI_SET_LIB_NAME([])])
307+
308+
###########################
309+
# OSHMEM options
310+
m4_ifdef([project_oshmem], [OSHMEM_CONFIGURE_OPTIONS])
311+
312+
# Set up project specific AM_CONDITIONALs
313+
AS_IF([test "$enable_ompi" != "no"], [project_ompi_amc=true], [project_ompi_amc=false])
314+
m4_ifndef([project_ompi], [project_ompi_amc=false])
315+
316+
AS_IF([test "$enable_oshmem" != "no"], [project_oshmem_amc=true], [project_oshmem_amc="no (disabled)"])
317+
m4_ifndef([project_oshmem], [project_oshmem_amc="no (not available)"])
331318

332319
############################################################################
333320
# Libtool: part one

ompi/mpi/java/c/mpi_Info.c

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,20 @@ JNIEXPORT jlong JNICALL Java_mpi_Info_getNull(JNIEnv *env, jclass clazz)
4545
return (jlong)MPI_INFO_NULL;
4646
}
4747

48+
// At least some versions of jni.h have a global named "jvalue", and
49+
// we get a compiler warning if we have a parameter or variable of the
50+
// same name. So use "ljvalue" instead.
4851
JNIEXPORT void JNICALL Java_mpi_Info_set(
49-
JNIEnv *env, jobject jthis, jlong handle, jstring jkey, jstring jvalue)
52+
JNIEnv *env, jobject jthis, jlong handle, jstring jkey, jstring ljvalue)
5053
{
51-
const char *key = (*env)->GetStringUTFChars(env, jkey, NULL),
52-
*value = (*env)->GetStringUTFChars(env, jvalue, NULL);
54+
const char *key = (*env)->GetStringUTFChars(env, jkey, NULL),
55+
*value = (*env)->GetStringUTFChars(env, ljvalue, NULL);
5356

5457
int rc = MPI_Info_set((MPI_Info)handle, (char*)key, (char*)value);
5558
ompi_java_exceptionCheck(env, rc);
5659

57-
(*env)->ReleaseStringUTFChars(env, jkey, key);
58-
(*env)->ReleaseStringUTFChars(env, jvalue, value);
60+
(*env)->ReleaseStringUTFChars(env, jkey, key);
61+
(*env)->ReleaseStringUTFChars(env, ljvalue, value);
5962
}
6063

6164
JNIEXPORT jstring JNICALL Java_mpi_Info_get(
@@ -83,9 +86,12 @@ JNIEXPORT jstring JNICALL Java_mpi_Info_get(
8386
return NULL;
8487
}
8588

86-
jstring jvalue = (*env)->NewStringUTF(env, value);
89+
// At least some versions of jni.h have a global named "jvalue",
90+
// and we get a compiler warning if we have a parameter or
91+
// variable of the same name. So use "ljvalue" instead.
92+
jstring ljvalue = (*env)->NewStringUTF(env, value);
8793
free(value);
88-
return jvalue;
94+
return ljvalue;
8995
}
9096

9197
JNIEXPORT void JNICALL Java_mpi_Info_delete(

0 commit comments

Comments
 (0)