openmpi 2.1.6 and pgi 18.10 -> check failed


we need a newer openmpi version. So I downloaded 2.1.6 and build it
with the settings below.
The build process is working, but the “make check fails” with the
following message

asename: extra operand `--test-name'
Try `basename --help' for more information.
--> Testing 
../../config/test-driver: line 107: 162535 Illegal instruction     "$@" > $log_file 2>&1
FAIL: atomic_math
    - 1 threads: Passed
../../config/test-driver: line 107: 162538 Illegal instruction     "$@" > $log_file 2>&1
FAIL: atomic_math
    - 2 threads: Passed
../../config/test-driver: line 107: 162542 Illegal instruction     "$@" > $log_file 2>&1
FAIL: atomic_math
    - 4 threads: Passed
../../config/test-driver: line 107: 162546 Illegal instruction     "$@" > $log_file 2>&1
FAIL: atomic_math
    - 5 threads: Passed
../../config/test-driver: line 107: 162550 Illegal instruction     "$@" > $log_file 2>&1
FAIL: atomic_math
    - 8 threads: Passed

Any idea ?

I used the following settings:

export PGI_MPI=/usr/local/apps/pgi/18.10/software
export LDFLAGS="-L$PGI_MPI/lib"
export CPPFLAGS="-I$PGI_MPI/include -DpgiFortran"
export CC=pgcc
export FC=pgf90  
export CPPFLAGS="-DpgiFortran" 
export CFLAGS="-O2 -fPIC"   
export FFLAGS="-O2 -Msignextend -fPIC"

./configure --prefix=$PGI_MPI --enable-mpi-fortran

Bye, Peer

Hi Peer,

An “illegal instruction” error implies that you built the executable on a newer CPU architecture but are running it on an older architecture.

Are you running “test-driver” on the same system that you built?

By default, the compiler will target the code generation to the system on which it is built. You can override this by using the “-tp” (target-processor) option, giving it the architecture on which you intend to run. “-tp px” will target a generic x86 process and run on all modern x86 CPUs but will disable some architecture specific optimizations. For a full list of available architectures run “pgcc -help -tp”.


I found an post: using -O1 solves the problem.

This is working for 2.1.6 and for 3.1.3.

Bye, Peer