- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I have installed VS2013 and Intel Parallel Studio XE 2013 in Windows 7, 64 bit Laptop.
I have some fortran 77 code that I have been using for so Long. I want to recompile them using Intel Parallel Studio XE 2013.
When I compile one of them with Intel Visual Fortran, it' s compiled. But I don't have the expected result, because the end-of-file condition occurs. (IERR Error) ERROR !!! QSORT : IERR = ****.
QSORT is a subroutine in my .f source file.
CALL QSORT(NSR,NK,MSF,IERR)
C---------------------------------------------------------------
IF(IERR.EQ.0) GOTO 300
WRITE(*,290) IERR
290 FORMAT(1X,'ERROR !!! QSORT: IERR =',I6)
GOTO 999
C
Thanks in advance for any help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you calling the Intel QSORT or another (your own?) version?
From the Intel help for QSORT the fourth argument (your IERR) is not a variable but a "Integer*2 name of a user-defined ordering function that determines sort order"
I suspect that your f77 code is calling another version of QSORT.
You should search your f77 code for an existing QSORT and it would help if you showed more surrounding information - for example the whole of the subprogram which calls QSORT (or at least that part up to the call, especially the declarations of the variables.
What are the values of NK and MSF before the call?
NSR should be a one dimensional array of size NK.
MSF determines the size in bytes of a single element of NSR.
Les
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you calling the Intel QSORT or another (your own?) version?
From the Intel help for QSORT the fourth argument (your IERR) is not a variable but a "Integer*2 name of a user-defined ordering function that determines sort order"
I suspect that your f77 code is calling another version of QSORT.
You should search your f77 code for an existing QSORT and it would help if you showed more surrounding information - for example the whole of the subprogram which calls QSORT (or at least that part up to the call, especially the declarations of the variables.
What are the values of NK and MSF before the call?
NSR should be a one dimensional array of size NK.
MSF determines the size in bytes of a single element of NSR.
Les
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK looking at the code for QSORT the variable IERR is only set in one place - to the value -2
Which means that if IERR is not set before you call QSORT and the subroutine completes successfully then IERR will have some value left over in memory which is unlikely to be zero.
It may be your f77 code relies on uninitialized variables being set to zero.
This is not true of all compilers, and you should resist the temptation to use the compiler setting to initialise variables to zero.
You should give IERR a value (presumably zero) either before you call QSORT or at the top of QSORT.
You should compile your code with all of the debug options switched ON - e.g. uninitialized variables, array subscripts out of range etc.
Hope this helps.
Les
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page