View Issue Details

IDProjectCategoryView StatusLast Update
0001637OpenFOAMBugpublic2015-03-26 17:24
Reporterwyldckat Assigned Tohenry  
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
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
    )
    {
    #ifdef MPIX_COMM_TYPE_SHARED


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: http://www.mpich.org/downloads/ - 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.

Activities

wyldckat

2015-03-26 15:48

updater   ~0004489

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

henry

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.

henry

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