Do not get fooled by the symlinks to opal_wrapper !

opal_wrapper checks how it is invoked (e.g. check argv[0] in main()) and the behavior is different

if it is invoked as mpicc, mpiCC, mpifort and other


If the error persists with mpicc, you can manually extract the mpicc command line, and manually run it with the -showme parameter,

it will show you the full command line (and who knows, mpicc might invoke a C++ compiler after all, and that would be a config issue)


Cheers,


Gilles

On 4/4/2019 7:48 AM, afernan...@odyhpc.com wrote:

Sam and Jeff,

Thank you for your answers. My first attempts actually used mpicc rather than mpiCC, switching to mpiCC was simply to check out if the problem persisted. I noticed that both mpicc and mpiCC are linked to the same file (opal_wrapper) and didn't bother switching it back. I'm not sure if the wrapper figures out what compiler you call because I was getting the same error message. Jeff is right pointing out that 'try' is reserved but the original file seems to be really old (think 1970). Apparently, the new compiler (shipped with OMPIv4) is more sensitive and beeps when the older didn't.

Thanks again,

AFernandez

Indeed, you cannot use "try" as a variable name in C++ because it is a https://en.cppreference.com/w/cpp/keyword.

As already suggested, use a C compiler, or you can replace "try" with "xtry" or any other non-reserved word.

Jeff

On Wed, Apr 3, 2019 at 1:41 PM Gutierrez, Samuel K. via users <users@lists.open-mpi.org <mailto:users@lists.open-mpi.org>> wrote:

    Hi,

    It looks like you are using the C++ wrapper compiler (mpiCC)
    instead of the C wrapper compiler (mpicc). Perhaps using mpicc
    instead of mpiCC will resolve your issue.

    Best,

    Sam



        On Apr 3, 2019, at 12:38 PM, afernan...@odyhpc.com
        <mailto:afernan...@odyhpc.com> wrote:

        Hello,

        I'm trying to compile HPL(v2.3) with OpenBLAS and OMPI. The
        compilation succeeds when using the old OMPI (v1.10.8) but
        fails with OMPI v4.0.0 (I'm still not using v4.0.1). The error
        is for an old subroutine that determines machine-specific
        arithmetic constants:

        mpiCC -o HPL_dlamch.o -c
        -I/home/centos/benchmarks/hpl-2.2/include
        -I/home/centos/benchmarks/hpl-2.2/include/impetus03
        -I/opt/openmpi/include  ../HPL_dlamch.c

        ../HPL_dlamch.c: In function ‘void HPL_dlamc5(int, int, int,
        int, int*, double*)’:

        ../HPL_dlamch.c:749:67: error: expected unqualified-id before
        ‘try’

        int                        exbits=1, expsum, i, lexp=1, nbits,
        try,

        ^

        ../HPL_dlamch.c:761:8: error: expected ‘{’ before ‘=’ token

            try = (int)( (unsigned int)(lexp) << 1 );

                ^

        ../HPL_dlamch.c:761:8: error: expected ‘catch’ before ‘=’ token

        ../HPL_dlamch.c:761:8: error: expected ‘(’ before ‘=’ token

        ../HPL_dlamch.c:761:8: error: expected type-specifier before
        ‘=’ token

        ../HPL_dlamch.c:761:8: error: expected ‘)’ before ‘=’ token

        ../HPL_dlamch.c:761:8: error: expected ‘{’ before ‘=’ token

        ../HPL_dlamch.c:761:8: error: expected primary-expression
        before ‘=’ token

        ../HPL_dlamch.c:762:8: error: expected primary-expression
        before ‘try’

            if( try <= ( -EMIN ) ) { lexp = try; exbits++; goto l_10; }

                ^

        ../HPL_dlamch.c:762:8: error: expected ‘)’ before ‘try’

        ../HPL_dlamch.c:762:36: error: expected primary-expression
        before ‘try’

            if( try <= ( -EMIN ) ) { lexp = try; exbits++; goto l_10; }

        ^

        ../HPL_dlamch.c:762:36: error: expected ‘;’ before ‘try’

        ../HPL_dlamch.c:764:26: error: ‘uexp’ was not declared in this
        scope

            if( lexp == -EMIN ) { uexp = lexp; } else { uexp = try;
        exbits++; }

        ^

        ../HPL_dlamch.c:764:48: error: ‘uexp’ was not declared in this
        scope

            if( lexp == -EMIN ) { uexp = lexp; } else { uexp = try;
        exbits++; }

        ^

        ../HPL_dlamch.c:764:55: error: expected primary-expression
        before ‘try’

            if( lexp == -EMIN ) { uexp = lexp; } else { uexp = try;
        exbits++; }

        ^

        ../HPL_dlamch.c:764:55: error: expected ‘;’ before ‘try’

        ../HPL_dlamch.c:770:10: error: ‘uexp’ was not declared in this
        scope

            if( ( uexp+EMIN ) > ( -lexp-EMIN ) )

                  ^

        make[2]: *** [HPL_dlamch.o] Error 1

        make[2]: Leaving directory
        `/home/centos/hpl-2.3/src/auxil/impetus03'

        make[1]: *** [build_src] Error 2

        make[1]: Leaving directory `/home/centos/hpl-2.3'

        make: *** [build] Error 2

        I don't understand the nature of the problem or why it works
        with the old OMPI version and not with the new. Any help or
        pointer would be appreciated.

        Thanks.

        AFernandez

        _______________________________________________
        users mailing list
        users@lists.open-mpi.org <mailto:users@lists.open-mpi.org>
        https://lists.open-mpi.org/mailman/listinfo/users

    _______________________________________________
    users mailing list
    users@lists.open-mpi.org <mailto:users@lists.open-mpi.org>
    https://lists.open-mpi.org/mailman/listinfo/users


--

Jeff Hammond
jeff.scie...@gmail.com <mailto:jeff.scie...@gmail.com>
http://jeffhammond.github.io/


_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users
_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Reply via email to