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> 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 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
> https://lists.open-mpi.org/mailman/listinfo/users
>
>
> _______________________________________________
> users mailing list
> users@lists.open-mpi.org
> https://lists.open-mpi.org/mailman/listinfo/users



-- 
Jeff Hammond
jeff.scie...@gmail.com
http://jeffhammond.github.io/
_______________________________________________
users mailing list
users@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/users

Reply via email to