Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Yves Reymen (yves.reymen_at_[hidden])
Date: 2006-01-17 03:17:16


Brian Barrett wrote:
> On Jan 16, 2006, at 11:32 AM, Yves Reymen wrote:
>
>
>>Recently openmpi v1.0.1 was installed on our cluster. It contains all
>>parameters of ompi_config.h within a #ifndef OMPI_CONFIG_H. I am
>>wondering how it is possible to give one of these parameters an other
>>value after everthing is configured and installed, given the fact that
>>no ompi_config.h is present in the installation.
>>
>>Take for instance the OMPI_WANT_CXX_BINDINGS that decides if you
>>want to
>>include de C++ bindings in mpicxx.h or not. If I set it on my compile
>>line as -DOMPI_WANT_CXX_BINDINGS=0. It will always be redefined to the
>>value in mpi.h, which for our installation is 1.
>>
>>Is there a way of getting rid of this redefinition?
>
>
> Your only options are to live with the defaults installed or re-
> configure with the values you want. For this one value, you could
> probably safely edit the #define for OMPI_WANT_CXX_BINDINGS in mpi.h,
> but that would only work in this one scenario, and even then, would
> prevent the use of the C++ bindings with that install.
>
> We generally don't allow for overriding those configure options
> because in almost all cases, it won't result in what the user
> expects. For instance, if the value for WANT_CXX_BINDINGS is set to
> 0 by configure, and the user tries to set it to 1, the headers and
> libraries required for the C++ bindings won't be present. Or if you
> tried to change the WANT_EXCEPTIONS value from 0 to 1, code not built
> to handle exceptions might suddenly be expected to do so, resulting
> in very bad things.
>
> Is there a reason that you want to disable the C++ bindings after
> installation? They should be absolutely harmless if you aren't using
> them. If that isn't the case, then we need to fix whatever is
> causing your problems.

The problem is that I am using libraries written in C but intended also
for use in C++. The problem occurs with autopack, which is a
message-passing library which transparently packs small messages into
fewer larger ones for more efficient transport by MPI.
http://www-unix.mcs.anl.gov/autopack/
The last release is 1.3 and dates back to May 2000. Now it seems
development has started on version 1.4.
In the main header, autopack.h, mpi.h is included in a Extern C block if
a C++ compiler is used:
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
...
#include mpi.h>
...
#ifdef __cplusplus
}
#endif /* __cplusplus */

The problem can be solved by taking the #include out of the extern C
block, the C bindings will still be available. But that would mean I
have to edit third party software, which I like to avoid if possible.

Kind regards,
Yves

-- 
Yves Reymen
K.U.Leuven - Department of Mechanical Engineering
PMA - Noise & Vibration Research Group            Phone: +32-16-322523
Celestijnenlaan 300B, B-3001 Heverlee, Belgium      Fax: +32-16-322987
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm