View Issue Details

IDProjectCategoryView StatusLast Update
0001637OpenFOAM[All Projects] Bugpublic2015-03-26 17:24
ReporterwyldckatAssigned Tohenry 
Status resolvedResolutionfixed 
Product Version 
Fixed in Version 
Summary0001637: Foam::reduce that depends on the macro "MPIX_COMM_TYPE_SHARED" has a stray "debug" variable
DescriptionOriginal summary: 'The curious case of a lost "debug"'

I was trying to build OpenFOAM with MPICH2 1.5 and stumbled over the oddest bug... in the file "src/Pstream/mpi/UPstream.C" we have this method:

    void Foam::reduce
        scalar& Value,
        const sumOp<scalar>& bop,
        const int tag,
        const label communicator,
        label& requestID

A few lines below this we have this:

    if (debug)
        Pout<< "UPstream::allocateRequest for non-blocking reduce"
            << " : request:" << requestID
            << endl;

The problem? The "debug" variable does not exist in the "Foam" namespace.

The fix: I guess it was meant to be the following, since it's a static variable in the class for this file "UPstream.C":

    if (Foam::UPstream::debug)
        Pout<< "UPstream::allocateRequest for non-blocking reduce"
            << " : request:" << requestID
            << endl;
Additional InformationBy the way, yet another reason why MPI-related hardware manufacturers like MPICH2 so much: - and I quote:

  MPICH is distributed under a BSD-like license.

In other words, the source code does not need to be provided to the end user...
TagsNo tags attached.



2015-03-26 15:48

updater   ~0004489

Addendum: this issue is not present in 2.2.x.


2015-03-26 17:19

manager   ~0004490

UPstream::debug should be sufficent as the function is in the Foam namespace
I am making the change now.


2015-03-26 17:24

manager   ~0004491

Thanks for the report.
Resolved by commit c08a8c97a07545e03dd4727fe9cdcfd34f8b2ea4

Issue History

Date Modified Username Field Change
2015-03-26 15:47 wyldckat New Issue
2015-03-26 15:48 wyldckat Note Added: 0004489
2015-03-26 17:19 henry Note Added: 0004490
2015-03-26 17:24 henry Note Added: 0004491
2015-03-26 17:24 henry Status new => resolved
2015-03-26 17:24 henry Resolution open => fixed
2015-03-26 17:24 henry Assigned To => henry