- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have one Module defines a Type like this:
TYPE MKL_DSS_HANDLE; INTEGER(KIND=8) DUMMY; END TYPE
In another Module where trying to use it like this:
TYPE(MKL_DSS_HANDLE),INTENT(OUT):: HANDLE
The compiling error is #6451: A dummy argument name is required in this context. [HANDLE]
I found another thread mentioned this error at here:
a strange problem - Intel Communities
But no clue how to fix my case.
Thank you for help.
Cheers
Cean
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The program does not define a parameter "LONG", so it should come in via the module (or modules), but the source code as found in the zip file does not contain any definition of such a parameter. So the compiler complains about it.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is HANDLE one of the arguments to the function/subroutine?
Is HANDLE an fpp macro name?
If both answers are no, try changing (in both argument and argument declaration) HANDLE to H. If this works, then there is some sort of name collision. And if so, please present a simple reproducer.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HANDLE is a named (PARAMETER) constant in the Windows API declaration modules, but this declaration should hide that if it is accessible. The error message is suggesting that HANDLE isn't a dummy argument of the procedure containing this declaration - the INTENT(OUT) attribute requires that.
I'll comment that, with compiler error messages, context is everything - especially so for Fortran. Showing a single statement, especially one that complains about dummy arguments, doesn't give enough detail for us to help you. As Jim suggests, a minimal reproducer helps a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks all.
I changed the name HANDLE to BJHANDLE, still the same error.
It Is one of the arguments to a function. It is called like this:
IntMKL_IER = DSS_CREATE ( BJHANDLE, opt )
This DSS_CREATE function is in module A:
INTERFACE
FUNCTION DSS_CREATE( HANDLE, OPT )
USE MKL_DSS_PRIVATE
TYPE(MKL_DSS_HANDLE), INTENT(OUT) :: HANDLE
INTEGER, INTENT(IN) :: OPT
INTEGER :: DSS_CREATE
END FUNCTION DSS_CREATE
END INTERFACE
Module USE MKL_DSS_PRIVATE has that Type declaration.
Module A also use MKL_DSS_PRIVATE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
there's not enough to go on here. Do you have something we can compile?
And you didn't mention what version of the compiler you are using. Is this the latest v2022 compiler? Ifort and not IFX, correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using VS 17.3.2 + IFC w_oneAPI_2022.1.0.256.
I am trying to make a little program:
program Console4
USE MKL_DSS
IMPLICIT NONE
TYPE(MKL_DSS_HANDLE) :: HANDLE
INTEGER(LONG) :: OPT ! Option indicator for Intel MKL dss routines
INTEGER(LONG) :: IntMKL_IER ! Intel MKL error code (see MKL documentation for values)
OPT = MKL_DSS_MSG_LVL_WARNING
IntMKL_IER = DSS_CREATE ( HANDLE, OPT )
end program Console4
It calls Function DSS_CREATE which is in MKL_DSS.f90
MKL_DSS.f90 needs MKL_DSS_PRIVATE.f90. It declares TYPE MKL_DSS_HANDLE.
This is an old program and inside MKL_DSS.f90 it says these two modules are from an old MKL example.
But the error now is:
error #6683: A kind type parameter must be a compile-time constant. [LONG]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The program does not define a parameter "LONG", so it should come in via the module (or modules), but the source code as found in the zip file does not contain any definition of such a parameter. So the compiler complains about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
I added LONG.
program Console4
USE MKL_DSS
IMPLICIT NONE
TYPE(MKL_DSS_HANDLE) :: HANDLE
INTEGER, PARAMETER :: LONG = 4
INTEGER(LONG) :: OPT ! Option indicator for Intel MKL dss routines
INTEGER(LONG) :: IntMKL_IER ! Intel MKL error code (see MKL documentation for values)
OPT = MKL_DSS_MSG_LVL_WARNING
IntMKL_IER = DSS_CREATE ( HANDLE, OPT )
end program Console4
Now the error is:
error LNK2019: unresolved external symbol DSS_CREATE referenced in function MAIN_
Why it can't find that Function inside MKL_DSS.f90?
Also this test program doesn't demonstrate the error in my real program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In this case, the error goes away by linking to the MKL library (e.g. /Qmkl:parallel). In VS this is set under project properties > Fortran > Libraries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found a dss_sym_f90.f90 at mkl\2022.1.0\examples\core\sparse_directsolvers\source. It is the same function as what I want. I can compile it with no problem.
Need to figure out what went wrong for my version.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page