View Issue Details

IDProjectCategoryView StatusLast Update
0002863OpenFOAMBugpublic2018-03-01 22:16
Reporterfertinaz Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformBlueGene/Q HPC ClusterOSRed Hat Enterprise Linux Server OS Version6.7
Fixed in Versiondev 
Summary0002863: OpenFOAM-5.x/Allwmake fails in the begining
DescriptionAfter installing ThirdParty Libraries, I type ./Allwmake to compile OpenFOAM and receive the following error:
OpenFoam/OpenFOAM-5.x/src/OpenFOAM/lnInclude/token.H:80:27: error: enumerator value -127 is too large for underlying type ‘char’
PUNCTUATION = -127,
Steps To ReproduceOpenFOAM-5.x/Allwmake
Additional InformationSince I am trying to make an installation on a BGQ Cluster, one needs to cross-compile OpenFOAM and ThirdParty Libraries. I installed Scotch successfully and skipped CGAl.

Front-end nodes: RedHat 6.7, Power 7 CPUs
Compute nodes: CNK, IBM A2 processors
Gcc-4.8.1

I changed
PUNCTUATION = -127,
to
PUNCTUATION,
in the file
OpenFOAM-5.x/src/OpenFOAM/lnInclude/token.H (line 80)
and issue seems to be resolved.
TagsNo tags attached.

Activities

henry

2018-02-28 22:53

manager   ~0009354

In OpenFOAM-5.x line 80 of token.H is
        PUNCTUATION,

you appear to be compiling OpenFOAM-dev which has

        PUNCTUATION = -127,

On your machine what is the underlying type of char? Why is -127 too large for char?

> I changed
> PUNCTUATION = -127,
> to
> PUNCTUATION,

this won't work as the type tokens will overlap with the ASCII characters.

henry

2018-03-01 11:14

manager   ~0009361

Try

    //- Enumeration defining the types of token
    enum tokenType : char
    {
        UNDEFINED = 0,

        PUNCTUATION = char(128),
        WORD,
        VARIABLE,
        STRING,
        VERBATIMSTRING,
        LABEL,
        FLOAT_SCALAR,
        DOUBLE_SCALAR,
        LONG_DOUBLE_SCALAR,
        COMPOUND,

        ERROR
    };

This should work on machines with either form of char.

fertinaz

2018-03-01 21:36

reporter   ~0009365

Hi Henry

You're right, this seems to be the OpenFOAM-dev version and I realized that it is renamed to OpenFOAM-5.x afterwards.

Your suggestion worked. Thank you.

Allwmake still fails due to different reasons but I guess you can close this issue.

henry

2018-03-01 22:16

manager   ~0009366

Resolved by commit 0d2fe24cd7f12a0de9f106ea438547b7c8a2135d

Issue History

Date Modified Username Field Change
2018-02-28 22:28 fertinaz New Issue
2018-02-28 22:53 henry Note Added: 0009354
2018-03-01 11:14 henry Note Added: 0009361
2018-03-01 21:36 fertinaz Note Added: 0009365
2018-03-01 22:16 henry Assigned To => henry
2018-03-01 22:16 henry Status new => resolved
2018-03-01 22:16 henry Resolution open => fixed
2018-03-01 22:16 henry Fixed in Version => dev
2018-03-01 22:16 henry Note Added: 0009366