There is a continued interest in being able to do static
linking of executables. When using pkg-config to determine
linking requirements, the default behavior is to only
specify libraries required for dynamic linking.
In many cases, it suffices even for static linking to
use
pkg-config --libs package
to obtain the linkage string required for ld. However, for
libraries that have dependencies on non-standard libraries,
this may not be the case. The cray PMI library is such a case.
On a Cray CLE 5.X system, for example
pkg-config --libs cray-pmi
returns a string like
-L/opt/cray/pmi/5.0.2-1.0000.9906.117.2.ari/lib64 -lpmi
whereas
pkgconfig --static --libs cray-pmi
returns a string (modified for git commits) like
-L/opt/cray/pmi/5.0.2-1.0000.9906.117.2.ari/lib64
-L/opt/cray/ugni/5.0-1.0000.8563.255.10.ari/lib64
-L/opt/cray/alps/6.0.0-2.0000.8544.102.21.ari/lib64
-L/opt/cray/wlm_detect/1.0-1.0000.48964.8.2.ari/lib64
-L/opt/cray/rca/1.0.0-2.0000.49383.133.60.ari/lib64
-lpmi -lpthread -lalpslli -lpthread -lwlm_detect
-lugni -lpthread -lalpsutil -lpthread -lrca
Unfortunately the pkg.m4 does not contain a function for adding
the --static option to PKG_CHECK_MODULES. This commit defines
a new function, PKG_CHECK_MODULES_STATIC, which in addition to
defining the $1_CFLAGS and $1_LIBS variables defined by PKG_CHECK_MODULES,
also defines a $1_STATIC_LIBS.
The ompi_osc_signal_outgoing was moved from ompi_osc_rdma_frag_start to frag_send
which gave correct results for the bug reproducer but hangs with simple OSC
tests. Moved the ompi_osc_signal_outgoing back and it now passes all tests.
Closes#256
opal_mutex_t must be OBJ_DESTRUCTed in order to avoid
a memory leak (pthread_mutex_init allocates memory under
Cygwin, so pthread_mutex_destroy is mandatory)
Thanks to Marco Atzeri for reporting this issue
We must also set the static library filenames properly (i.e., obey the
$FRAMEWORK_LIB_PREFIX that was set). Hence, set the prefixes earlier
in configure.ac, and update OPAL_MCA to set the static library names
properly.
Avoid a problem with double-derefence of a variable macro name (i.e.,
a macro with part of its name from an AC_SUBST, such as
```$(foo@BAR@baz)```.
In what might be a bug in Automake 1.14.1, if you do a pattern like
this:
```makefile
lib_LTLIBRARIES = lib@A_PREFIX@a_lib.la
noinst_LTLIBRARIES = lib@A_PREFIX@a_noinst.la
lib@A_PREFIX@a_lib_la_SOURCES = a.c
lib@A_PREFIX@a_noinst_la_SOURCES = $(lib@A_PREFIX@a_lib_la_SOURCES)
```
Then in the resulting Makefile, the value of
```$(lib@A_PREFIX@a_lib_la_OBJECTS)``` will be *blank* (when it really
should be ```a.o```).
To workaround this potential bug, I've simply avoided doing
double-derefences like this, and effectively set the second
```_SOURCES``` line equal to ```a.c``` (just like the first
```_SOURCES``` line).
Fixes#250.
These two macros set the MCA prefix and MCA cmd line id,
respectively. Specifically, MCA parameters will be named
PREFIX<foo> in the environment, and the cmd line will use
-ID foo bar.
These macros must be called during configure.ac and a value
supplied. In the case of Open MPI, the values given are
PREFIX=OMPI_MCA_ and ID=mca.
Other projects (such as ORCM) will call these macros with
their own unique values. For example, ORCM uses PREFIX=ORCM_MCA_
and ID=omca
This scheme is necessary to allow running Open MPI applications under
systems that use their own versions of ORTE and OPAL. For example,
when running OMPI applications under ORCM, we need the MCA params passed
to the ORCM daemons to be separated from those recognized by the OMPI application.
Some of the counters used by the "rdma" one-sided component are intended
to overflow. Since overflow behavior is undefined for signed integers in
C it is safer to use unsigned integers here.