Description
Background information
What version of Open MPI are you using?
5.0.7
Describe how Open MPI was installed
Tarball/source
Please describe the system on which you are running
I'm trying to build Open MPI with MPI_f08 bindings on a Linux system, using clang and flang build from recent llvm-project Git repository:
$ flang --version
flang version 21.0.0git (https://github.com/llvm/llvm-project.git 5d50af3f0368847ab9ce1d86cb6e46ffaf317b59)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/llvm/llvm-project/install/bin
By default, quad precision is disabled when building flang
except when explicitly enabled. I did not enable that when building flang
.
Details of the problem
I configure Open MPI with few options: ./configure --with-pic --prefix=/opt/llvm/openmpi/openmpi-5.0.5/install
, I am on this system not interested in any fancy interconnects or anything special.
Relevant output of the configure-script is:
checking size of Fortran REAL... 4
checking for C type corresponding to REAL... float
checking alignment of Fortran REAL... 4
checking for corresponding KIND value of REAL... C_FLOAT
checking KIND value of Fortran C_FLOAT... 4
checking if Fortran compiler supports REAL*2... yes
checking size of Fortran REAL*2... 2
checking for C type corresponding to REAL*2... opal_short_float_t
checking alignment of Fortran REAL*2... 2
checking for corresponding KIND value of REAL*2... C_SHORT_FLOAT
checking KIND value of Fortran C_SHORT_FLOAT... no ISO_C_BINDING -- fallback
checking Fortran value of selected_int_kind(4)... 2
2
checking if Fortran compiler supports REAL*4... yes
checking size of Fortran REAL*4... 4
checking for C type corresponding to REAL*4... float
checking alignment of Fortran REAL*4... 4
checking for corresponding KIND value of REAL*4... C_FLOAT
checking KIND value of Fortran C_FLOAT... (cached) 4
checking if Fortran compiler supports REAL*8... yes
checking size of Fortran REAL*8... 8
checking for C type corresponding to REAL*8... double
checking alignment of Fortran REAL*8... 8
checking for corresponding KIND value of REAL*8... C_DOUBLE
checking KIND value of Fortran C_DOUBLE... 8
checking if Fortran compiler supports REAL*16... no
checking for C type matching bit representation of REAL*16... skipped (no REAL*16)
configure: WARNING: MPI_REAL16 and MPI_COMPLEX32 support have been disabled
checking if Fortran compiler supports DOUBLE PRECISION... yes
checking size of Fortran DOUBLE PRECISION... 8
checking for C type corresponding to DOUBLE PRECISION... double
checking alignment of Fortran DOUBLE PRECISION... 8
checking for corresponding KIND value of DOUBLE PRECISION... C_DOUBLE
checking KIND value of Fortran C_DOUBLE... (cached) 8
checking if Fortran compiler supports COMPLEX... yes
checking size of Fortran COMPLEX... 8
checking for C type corresponding to COMPLEX... float _Complex
checking alignment of Fortran COMPLEX... 4
checking for corresponding KIND value of COMPLEX... C_FLOAT_COMPLEX
checking KIND value of Fortran C_FLOAT_COMPLEX... 4
checking if Fortran compiler supports COMPLEX*4... yes
checking size of Fortran COMPLEX*4... 4
checking for C type corresponding to COMPLEX*4... opal_short_float_complex_t
checking alignment of Fortran COMPLEX*4... 2
checking for corresponding KIND value of COMPLEX*4... C_SHORT_FLOAT_COMPLEX
checking KIND value of Fortran C_SHORT_FLOAT_COMPLEX... no ISO_C_BINDING -- fallback
checking Fortran value of selected_int_kind(4)... (cached) 2
2
checking if Fortran compiler supports COMPLEX*8... yes
checking size of Fortran COMPLEX*8... 8
checking for C type corresponding to COMPLEX*8... float _Complex
checking alignment of Fortran COMPLEX*8... 4
checking for corresponding KIND value of COMPLEX*8... C_FLOAT_COMPLEX
checking KIND value of Fortran C_FLOAT_COMPLEX... (cached) 4
checking if Fortran compiler supports COMPLEX*16... yes
checking size of Fortran COMPLEX*16... 16
checking for C type corresponding to COMPLEX*16... double _Complex
checking alignment of Fortran COMPLEX*16... 8
checking for corresponding KIND value of COMPLEX*16... C_DOUBLE_COMPLEX
checking KIND value of Fortran C_DOUBLE_COMPLEX... 8
checking if Fortran compiler supports COMPLEX*32... yes
checking size of Fortran COMPLEX*32... 32
checking for C type corresponding to COMPLEX*32... long double _Complex
checking alignment of Fortran COMPLEX*32... 16
checking for corresponding KIND value of COMPLEX*32... C_LONG_DOUBLE_COMPLEX
checking KIND value of Fortran C_LONG_DOUBLE_COMPLEX... 10
checking if Fortran compiler supports DOUBLE COMPLEX... yes
checking size of Fortran DOUBLE COMPLEX... 16
checking for C type corresponding to DOUBLE COMPLEX... double _Complex
checking alignment of Fortran DOUBLE COMPLEX... 8
checking for corresponding KIND value of DOUBLE COMPLEX... C_DOUBLE_COMPLEX
checking KIND value of Fortran C_DOUBLE_COMPLEX... (cached) 8
So Open MPI configure correctly detect that quad precision/real128 support is not present in the compiler.
When compiling Open MPI I get the following error:
FC psizeof_f.lo
error: Semantic errors in psizeof_f.f90
./psizeof_f.f90:161:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128)::x
^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:171:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:181:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:191:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:201:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:211:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:221:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:231:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:241:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:251:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:261:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:271:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:281:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:291:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:301:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
./psizeof_f.f90:311:7: error: COMPLEX(KIND=-1) is not a supported type
COMPLEX(REAL128), DIMENSION(1,1,1,1,1,1,1,1,1,1,1,1,1,1,*)::x
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
make[3]: *** [Makefile:2591: psizeof_f.lo] Error 1
make[3]: Leaving directory '/opt/llvm/openmpi/openmpi-5.0.7/ompi/mpi/fortran/mpif-h/profile'
make[2]: *** [Makefile:3440: all-recursive] Error 1
make[2]: Leaving directory '/opt/llvm/openmpi/openmpi-5.0.7/ompi/mpi/fortran/mpif-h'
make[1]: *** [Makefile:2710: all-recursive] Error 1
make[1]: Leaving directory '/opt/llvm/openmpi/openmpi-5.0.7/ompi'
make: *** [Makefile:1539: all-recursive] Error 1
So it seems that Open MPI is trying to work with COMPLEX(real128)
, which I certainly not expect the compiler to support when ordinary quad real128 is not supported.
A workaround is to recompile the compiler with quad precision support.