Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7121 Discussions

Warning signs when compiling Fortran 2008 code that uses mkl_cluster_sparse_solver.f90

Marcos_V_1
New Contributor I
1,190 Views

Hello, I'm compiling a code that is linked to the MKL cluster sparse solver. This code is written in Fortran 2008 and compilation uses the -stand:f08 intel Fortran compiler flag. I use the include statement at the beginning to the interfaces of cluster_sparse_solver

#include "mkl_cluster_sparse_solver.f90"

and have a module use this compiled module.

When I compile the code with debug flags -m64 -check all -fp-stack-check -warn unused -O0 -auto -WB -traceback -ggdb -fpe0 -fltconsistency -stand:f08 -no-wrap-margin -I/opt/intel/compilers_and_libraries_2016.3.170/mac/mkl/include -fpp , it gives the following warnings for the module MKL_CLUSTER_SPARSE_SOLVER:

Warnings - Compile with MPI debug:
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(27): warning #7025: This directive is not standard F2008.
!DEC$ IF .NOT. DEFINED( __MKL_CLUSTER_SPARSE_SOLVER_F90 )
------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(29): warning #7025: This directive is not standard F2008.
!DEC$ DEFINE __MKL_CLUSTER_SPARSE_SOLVER_F90
------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(61): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(82): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(103): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(124): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(145): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(166): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(187): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(208): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(235): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(256): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(277): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(298): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(319): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(340): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(361): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(382): warning #6916: Fortran 2008 does not allow this length specification.   [4]
          INTEGER*4,          INTENT(IN)    :: COMM
------------------^
/opt/intel16/compilers_and_libraries_2016.3.210/linux/mkl/include/mkl_cluster_sparse_solver.f90(388): warning #7025: This directive is not standard F2008.
!DEC$ ENDIF
------^

which is telling me that the interface directive !DEC$ and declaration INTEGER*4 don't belongto the standard 2008. I understand the library uses the standard f90. So, which options would you recommend to supress these warnings on debug mode?

Also, are you planning on moving these interfaces to be f08 compliant in the furture?

Thank you,

Marcos

 

 

 

0 Kudos
1 Reply
Xj_Kong
Novice
1,190 Views

Directives for conditional selection of source text

There are three forms of conditional selection of source text.

Form 1:

#if condition_1
block_1
#elif condition_2
block_2
#elif ...
#else
block_n
#endif

Form 2:

#ifdefname
block_1
#elif condition
block_2
#elif ...
#else
block_n
#endif

Form 3:

#ifndef name
block_1
#elif condition
block_2
#elif ...
#else
block_n
#endif

The elif and else parts are optional in all three forms. There may be more than one elif part in each form.

Conditional expressions

condition_1, condition_2, etc. are logical expressions involving fpp constants, macros, and intrinsic functions. The following items are permitted:

  • C language operations: <, >, ==, !=, >=, <=, +, -, /, *, %, <<, >>, &, ~, |, &&, || They are interpreted by fpp in accordance to the C language semantics (this facility is provided for compatibility with "old" Fortran programs using cpp)

  • Fortran language operations: .AND., .OR., .NEQV., .XOR., .EQV., .NOT., .GT., .LT., .LE., .GE., .NE., .EQ., ** (power).

  • Fortran logical constants: .TRUE. , .FALSE.

  • the fpp intrinsic function "defined": defined(name) or defined name which returns .TRUE. if name is defined as an fpp variable or a macro or returns .FALSE. if the name is not defined

#ifdef is a shorthand for #if defined(name) and #ifndef is a shorthand for #if .not. defined(name).

Only these items, integer constants, and names can be used within a constant-expression. A name that has not been defined with the -D option, a #define directive, or by default, has a value of 0. The C operation != (not equal) can be used in #if or #elif directive, but not in the #define directive, where the symbol ! is considered as the Fortran comment symbol by default.

Conditional constructs

The following table summarizes conditional constructs.

Construct

Result

#if condition

Subsequent lines up to the matching #else, #elif, or #endif directive appear in the output only if condition evaluates to .TRUE. .

#ifdef name

Subsequent lines up to the matching #else, #elif, or #endif appear in the output only if name has been defined, either by a #define directive or by the -D option, with no intervening #undef directive. No additional tokens are permitted on the directive line after name.

#ifndef name

Subsequent lines up to the matching #else, #elif, or #endif appear in the output only if name has not been defined, or if its definition has been removed with an #undef directive. No additional tokens are permitted on the directive line after name.

#elif condition

Subsequent lines up to the matching #else, #elif, or #endif appear in the output only if all of the following occur:

  • The condition in the preceding #if directive evaluates to .FALSE. or the name in the preceding #ifdef directive is not defined, or the name in the preceding #ifndef directive is defined.

  • The conditions in all of the preceding #elif directives evaluate to .FALSE.

  • The condition in the current #elif evaluates to .TRUE.

Any condition allowed in an #if directive is allowed in an #elif directive. Any number of #elif directives may appear between an #if, #ifdef, or #ifndef directive and a matching #else or #endif directive.

#else

Subsequent lines up to the matching #endif appear in the output only if all of the following occur:

  • The condition in the preceding #if directive evaluates to .FALSE. or the name in the preceding #ifdef directive is not defined, or the name in the preceding #ifndef directive is defined.

  • The conditions in all of the preceding #elif directives evaluate to .FALSE.

#endif

End a section of lines begun by one of the conditional directives #if, #ifdef, or #ifndef. Each such directive must have a matching #endif.

0 Kudos
Reply