ifort 2018.1 internal compiler error when compiling MUMPS

ifort 2018.1 internal compiler error when compiling MUMPS

I'm getting "Internal compiler error: segmentation violation signal raised" when i try to compile MUMPS with ifort 2018.1.Here's a test case which hopefully reproduces the problem:

$ wget https://bitbucket.org/petsc/pkg-mumps/raw/968459b56e28f08f51e6e3f642b6aecb41ad097b/src/zsol_aux.F
$ ifort -c zsol_aux.F -o zsol_aux.o

EDIT: The compilation line should read:

$ ifort -xCORE-AVX512 -c zsol_aux.F -o zsol_aux.o
AttachmentSize
Downloadapplication/octet-stream zsol_aux.F34.63 KB
16 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

An internal compiler error is never good, and we would love to diagnose the reason.

However, I can't "wget" the file listed here, probably due to security reasons.

Could you attach the zsol_aux.F file, please?

                 thank you --

                                  --Lorri

Sure, i've attached the file to the original post.

The source codes for the modules USEd in zsol_aux.F will also be needed before compilation can be attempted.

I didn't include the other source files because they're not needed to reproduce the segfault. Are you saying that `ifort -c zsol_aux.F -o zsol_aux.o` doesn't segfault for you?

My colleague pointed me towards a web URL where I could download all the  mumps sources, so I'm able to compile zsol_aux now.

If you look in that source file, it USEs at least one other module.  Without the sources to that module, it's not possible to build, etc etc.

I have enough to try and reproduce the fail now though, thank you --

                             --Lorri

Quote:

Nolta, Mike wrote:
I didn't include the other source files because they're not needed to reproduce the segfault. Are you saying that `ifort -c zsol_aux.F -o zsol_aux.o` doesn't segfault for you?

Correct. As soon as the compiler sees a USE <module_name> statement, which must come even before IMPLICIT none, if it does not find the corresponding module file, it will decide that lots of variables and symbols have no known type, emit lots of error messages and then will abort the compilation after the first pass.

If the segfault that you saw occurred in a later pass of the compiler (e.g., the "back-end"), I would never get to that point without having the *.mod files.

Here's what i'm seeing. A lot of errors due to the missing dependencies, and a segfault at the end.

$ ifort -c zsol_aux.F -o zsol_aux.o 
zsol_aux.F(686): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [ZMUMPS_OOC]
      USE ZMUMPS_OOC
----------^
zsol_aux.F(697): error #6404: This name does not have a type, and must have an explicit type.   [ZMUMPS_SOLVE_IS_INODE_IN_MEM]
      RETURN_VALUE=ZMUMPS_SOLVE_IS_INODE_IN_MEM(INODE,PTRFAC,
-------------------^
zsol_aux.F(699): error #6404: This name does not have a type, and must have an explicit type.   [OOC_NODE_NOT_IN_MEM]
      IF(RETURN_VALUE.EQ.OOC_NODE_NOT_IN_MEM)THEN
-------------------------^
zsol_aux.F(720): error #6404: This name does not have a type, and must have an explicit type.   [OOC_NODE_PERMUTED]
      IF(RETURN_VALUE.NE.OOC_NODE_PERMUTED)THEN
-------------------------^
zsol_aux.F(731): error #5102: Cannot open include file 'mpif.h'
      INCLUDE 'mpif.h'
--------------^
zsol_aux.F(729): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [ZMUMPS_STRUC_DEF]
      USE ZMUMPS_STRUC_DEF
----------^
zsol_aux.F(732): error #6457: This derived type name has not been declared.   [ZMUMPS_STRUC]
      TYPE(ZMUMPS_STRUC), TARGET :: id
-----------^
zsol_aux.F(739): error #6404: This name does not have a type, and must have an explicit type.   [ID]
      I_AM_SLAVE = (id%MYID .NE. MASTER
--------------------^
zsol_aux.F(739): error #6460: This is not a field name that is defined in the encompassing structure.   [MYID]
      I_AM_SLAVE = (id%MYID .NE. MASTER
-----------------------^
zsol_aux.F(740): error #6460: This is not a field name that is defined in the encompassing structure.   [KEEP]
     &     .OR. ((id%MYID.EQ.MASTER).AND.(id%KEEP(46).EQ.1)))
---------------------------------------------^
zsol_aux.F(750): error #6460: This is not a field name that is defined in the encompassing structure.   [PTLUST_S]
            IF(id%PTLUST_S(I).NE.0) THEN
------------------^
zsol_aux.F(757): error #6404: This name does not have a type, and must have an explicit type.   [MPI_INTEGER]
     &           MPI_INTEGER, MASTER, TAG_SIZE, id%COMM,IERR)
-----------------^
zsol_aux.F(757): error #6460: This is not a field name that is defined in the encompassing structure.   [COMM]
     &           MPI_INTEGER, MASTER, TAG_SIZE, id%COMM,IERR)
---------------------------------------------------^
zsol_aux.F(761): error #6460: This is not a field name that is defined in the encompassing structure.   [IPTR_WORKING]
            ALLOCATE(id%IPTR_WORKING(1),
------------------------^
zsol_aux.F(762): error #6460: This is not a field name that is defined in the encompassing structure.   [WORKING]
     &           id%WORKING(1),
--------------------^
zsol_aux.F(780): error #6460: This is not a field name that is defined in the encompassing structure.   [NPROCS]
         DO I=1, id%NPROCS-1
--------------------^
zsol_aux.F(781): error #6404: This name does not have a type, and must have an explicit type.   [MPI_ANY_SOURCE]
            CALL MPI_RECV(TMP, 1, MPI_INTEGER, MPI_ANY_SOURCE,
-----------------------------------------------^
zsol_aux.F(796): error #6514: Substring or array slice notation requires CHARACTER type or array.   [WORKING]
            id%WORKING(id%IPTR_WORKING(TMP):id%IPTR_WORKING(TMP+1)-1)
---------------^
zsol_aux.F(797): error #6054: A CHARACTER data type is required in this context.   [LOCAL_LIST]
     &           = LOCAL_LIST(1:id%IPTR_WORKING(TMP+1)
-------------------^
zsol_aux.F(796): error #6366: The shapes of the array expressions do not conform.   [WORKING]
            id%WORKING(id%IPTR_WORKING(TMP):id%IPTR_WORKING(TMP+1)-1)
---------------^
zsol_aux.F(803): error #6404: This name does not have a type, and must have an explicit type.   [MPI_SOURCE]
            TMP = STATUS(MPI_SOURCE)+1
-------------------------^
zsol_aux.F(804): error #6514: Substring or array slice notation requires CHARACTER type or array.   [WORKING]
            id%WORKING(id%IPTR_WORKING(TMP):id%IPTR_WORKING(TMP+1)-1)
---------------^
zsol_aux.F(805): error #6054: A CHARACTER data type is required in this context.   [LOCAL_LIST]
     &           = LOCAL_LIST(1:id%IPTR_WORKING(TMP+1)-
-------------------^
zsol_aux.F(804): error #6366: The shapes of the array expressions do not conform.   [WORKING]
            id%WORKING(id%IPTR_WORKING(TMP):id%IPTR_WORKING(TMP+1)-1)
---------------^
zsol_aux.F(736): error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association.   [MPI_STATUS_SIZE]
      INTEGER :: STATUS(MPI_STATUS_SIZE)
------------------------^
zsol_aux.F(736): error #6404: This name does not have a type, and must have an explicit type.   [MPI_STATUS_SIZE]
      INTEGER :: STATUS(MPI_STATUS_SIZE)
------------------------^
catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for zsol_aux.F (code 1)

 

I dug into this a bit more, and it appears to be caused by the presence of `-xHost` in our ifort.cfg file. Removing that option makes the segfault go away.

Also, i tried the 2017.5 compiler and got the same results.

OS is Centos 7.4, CPU is Skylake Xeon, GCC is 6.4.

At a minimum you need to resolve the dependencies. That -xHost triggers the ICE suggests that it's getting to the code generator, but it wouldn't with those errors. Of course, an ICE is always a compiler bug.

Steve (aka "Doctor Fortran") - Retired from Intel

That -xHost triggers the ICE suggests that it's getting to the code generator, but it wouldn't with those errors.

Are you saying i'm not seeing what i'm seeing ;-)

If you want a non-minimal test case, here you go:

$ wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.8.3.tar.gz
$ tar -xaf petsc-3.8.3.tar.gz
$ cd petsc-3.8.3
$ ./configure \
    COPTFLAGS="-xHost -O3" \
    CXXOPTFLAGS="-xHost -O3" \
    FOPTFLAGS="-xHost -O3" \
    --download-mumps=1 \
    --download-scalapack=1 \
    --with-blas-lapack-dir="$MKLROOT" \
    --with-cc=mpicc \
    --with-cxx=mpicxx \
    --with-fc=mpif90 \
    --with-debugging=0 \
    --with-mkl_pardiso-dir="$MKLROOT" \
    --with-x=0

 

Narrowing the problem down further, i tried replacing `-xHost` with `-xCORE-AVX512`, `-xCOMMON-AVX512`, and `-xCORE-AVX2`. Only `-xCORE-AVX512` segfaults.

Hi Mike, I also have seen an issue in PSXE 2018 with Windows OS regarding /QaxCORE-AVX512 (similar as -xCORE-AVX512 but Windows and multiple, feature-specific auto-dispatch code paths):

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/745716

I've not filed my case in Intel's OSC nor got I feedback... However, I think these two issues are related.

I've whittled the problem down to two self-contained test cases (attached).

$ ifort -c ZMUMPS_QD2.F -o tmp.o -xCORE-AVX512
catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for ZMUMPS_QD2.F (code 1)

$ ifort -c ZMUMPS_SOL_Y.F -o tmp.o -xCORE-AVX512
catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for ZMUMPS_SOL_Y.F (code 1)

 

Attachments: 

AttachmentSize
Downloadapplication/octet-stream ZMUMPS_QD2.F2.58 KB
Downloadapplication/octet-stream ZMUMPS_SOL_Y.F2.01 KB

Mike, please report this via https://supporttickets.intel.com/?lang=en-US

Devorah - Intel® Developer Support

Quote:

Nolta, Mike wrote:

I've whittled the problem down to two self-contained test cases (attached).

$ ifort -c ZMUMPS_QD2.F -o tmp.o -xCORE-AVX512
catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for ZMUMPS_QD2.F (code 1)

$ ifort -c ZMUMPS_SOL_Y.F -o tmp.o -xCORE-AVX512
catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.
compilation aborted for ZMUMPS_SOL_Y.F (code 1)

 

These were fixed. Fixes will be available in the future compiler release.

Devorah - Intel® Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today