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

Qsort can not be used under linux X64 l_fc_p_10.1.015

crimsonpig
Beginner
755 Views

http://www.intel.com/support/performancetools/fortran/linux/sb/cs-007815.htm

We use the Qsort subroutine of intel Portability Library in our codes. All things are okunder windows, butthe same codes can not be compiled under linux, We got an error message:

fortcom: Error: Species.F90, line 62: There is no matching specific subroutine for this generic subroutine call. [QSORT]

We haveadopted Use ifport/ Use iflport/include 'iflport.f90' in the program module. But it does not work for the linux. Othersubroutines like Random seem ok.

Under windows XP SP3, all things are ok, ourcompiler version is: VS2005+Intel Fortran Compiler 10.0.027 [IA-32]

Under Linux Ubuntu 8.04 home,Qsort can't be used, ourcompiler version is:Intel Fortran Compiler for applications running on Intel 64, Version 10.1 Build 20080312 Package ID: l_fc_p_10.1.015
Copyright (C) 1985-2008 Intel Corporation. All rights reserved

 

Tank you for your help!

0 Kudos
3 Replies
Kevin_D_Intel
Employee
755 Views

The declared type for the len and isize arguments to QSORT differs between IA-32 and Intel 64. They are INTEGER(4) for IA-32 and INTEGER(8) for Intel 64. On the Intel 64 system, check to see if the declared type is INTEGER(8)for these arguments.

0 Kudos
crimsonpig
Beginner
755 Views

Thanks for timely reply.

We did check the declared types. We did check the ducuments and following the instructions.

We just know what is wrong , wecall the sub like:

Call QSort(Pindex,MNpar,8,mycmp)

We had thoughtthe compiler willconsider 8as integer(8),but we are wrong, the default is integer(4), so we got that error. Thank you very much!

0 Kudos
Steven_L_Intel1
Employee
755 Views
What happened was that a bug was fixed in the compiler where it had not detected a "kind" mismatch for constants as actual arguments to a routine with an explicit interface - the compiler would "silently" do the conversion for you. We fixed the compiler to diagnose the error. However, we then realized that this caused problems for a lot of code similar to yours, so we later made another change to allow this conversion but give a standards warning if that was requested. So, if you updated to a current compiler it would "work" again!
0 Kudos
Reply