Intel ifort compiler replaces -openmp with -qopenmp

527 views
Skip to first unread message

Yingxing Cheng

unread,
Jun 20, 2019, 3:36:54 AM6/20/19
to dirac-users

Dear developers:

When I tried to compile DIRAC-18 using OpenMPI and Intel compiler with 64 integer , there is an error as follows:

ifort: command line error: option '-openmp' is not supported. Please use the replacement option '-qopenmp'

make[2]: *** [dirac.x] Error 1

make[1]: *** [CMakeFiles/dirac.x.dir/all] Error 2

make: *** [all] Error 2


It seems the version of Intel compiler is not compatible with DIRAC-18 and the Intel compiler version is 2019a as follows:

  1) cluster/phanpy                                       

  2) GCCcore/8.2.0

  3) binutils/2.31.1-GCCcore-8.2.0

  4) icc/2019.1.144-GCC-8.2.0-2.31.1

  5) ifort/2019.1.144-GCC-8.2.0-2.31.1

  6) iccifort/2019.1.144-GCC-8.2.0-2.31.1

  7) impi/2018.4.274-iccifort-2019.1.144-GCC-8.2.0-2.31.1

  8) iimpi/2019a

  9) imkl/2019.1.144-iimpi-2019a

 10) intel/2019a


How can I solve this problem, e.g. using older Intel compiler?

Best regards,
Yingxing Cheng

Hans Jørgen Aagaard Jensen

unread,
Jun 20, 2019, 4:12:06 AM6/20/19
to dirac...@googlegroups.com
In the file cmake/downloaded/autocmake_omp.cmake you can find the lines:

        if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
            if(WIN32)
                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Qopenmp")
            elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel" AND
                   "${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -openmp")
            else()
                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qopenmp")
            endif()
        endif()

If you delete the lines marked with red it should work. It suppose that the cmake command VERSION_LESS does not work for the version string for intel compiler version 2019a.

-- Hans Jørgen.

--
You received this message because you are subscribed to the Google Groups "dirac-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dirac-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/dirac-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/dirac-users/a819290d-4d1a-4e09-8edb-9c1b55a68d7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yingxing Cheng

unread,
Jun 20, 2019, 4:58:56 AM6/20/19
to dirac-users
Thank you Hans! Actually, if I want to use Intel MKL I have to replace the line in the file ./downloaded/autocmake_math_libs.cmake:

368          # take care of omp flags
 369         set(_omp_flag)
 370         if(HAVE_MKL_BLAS OR HAVE_MKL_LAPACK)
 371             if(MKL_COMPILER_BINDINGS MATCHES Intel)
 372                 #set(_omp_flag -openmp)
 373                 set(_omp_flag -qopenmp)
 374             endif()
 375             if(MKL_COMPILER_BINDINGS MATCHES GNU)
 376                 set(_omp_flag -fopenmp)
 377             endif()

and then it works!
To unsubscribe from this group and stop receiving emails from it, send an email to dirac...@googlegroups.com.

Hans Jørgen Aagaard Jensen

unread,
Jun 20, 2019, 5:02:50 AM6/20/19
to dirac...@googlegroups.com
Thank you, we had not spotted that one. We will fix that for the next patch release.

-- Hans Jørgen.

To unsubscribe from this group and stop receiving emails from it, send an email to dirac-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages