Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28446 Discussions

64 bit compile: Error: There is no matching specific subroutine for this generic subroutine call. [QSORT]

andrew_terekhov
Beginner
428 Views
I use Visual C++ 8 (.Net 2005) IDE to invoke Intel Fortran 9.1. 32 bit version builds without any problem, but for 64 bit configuration I have the error:

Error: There is no matching specific subroutine for this generic subroutine call. [QSORT]


Any help would be greatly appreciated.

Thanks,
Andrew
0 Kudos
4 Replies
Steven_L_Intel1
Employee
428 Views
What are the datatypes of the arguments? As supplied, QSORT does not have a signature for INTEGER(8) arguments, but you can extend the generic to add your own signature and supply an appropriate compare routine.
0 Kudos
andrew_terekhov
Beginner
428 Views
Thank you for the prompt reply.

Here is the code:


! vars declarations
integer(4) num_run
integer(4) sortElementSize
REAL(8) pointLossDistribution(num_run)
integer(2), external :: compareDescendReal8Function


! invocation
sortElementSize = 8
CALL qsort( pointLossDistribution, num_run, sortElementSize,
& compareDescendReal8Function)


! comp func definition
integer(2) function compareDescendReal8Function(arg1, arg2)
REAL(8) arg1, arg2

if (arg1 > arg2) then
compareDescendReal8Function = -1
elseif (arg1 < arg2) then
compareDescendReal8Function = 1
else
compareDescendReal8Function = 0
endif


Thanks,
Andrew

0 Kudos
Steven_L_Intel1
Employee
428 Views

Ah -I was mistaken about the lack of a signaturefor I8, though that's not your problem.

Change::

integer(4) num_run
integer(4) sortElementSize
to

integer(SIZEOF_TIME_T) num_run
integer(SIZEOF_TIME_T) sortElementSize

On Intel 64, the length and size arguments are INTEGER(8). Using the above definitions will be correct on both 32 and 64-bit platforms. If you pass or accept these variables as arguments, make sure the corresponding declarations are also correct.

0 Kudos
drle
Beginner
428 Views

Hello Andrew,

can you tell me which options do you use to compile your codes?

Thanks

Thoi.

0 Kudos
Reply