forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CheckMate causes runtime failure when calling NAG Library DLLs

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Zahid



Joined: 03 Feb 2005
Posts: 26

PostPosted: Thu Jun 22, 2006 9:47 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

We have been testing calling the DLL version of the NAG Fortran Library from FTN95 and SCC through Plato3. We notice that under CheckMate Win32 many programs fail with access violation but work under Debug Win32 or Release Win32. For instance, the NAG example program for calling the C05ADF routine is one of these that fail under CheckMate, but there are many others. Some don't actually fail but give absurd results when returning from the NAG routine. If you wish I can provide examples.

Zahid Aziz
The University of Nottingham
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Jun 22, 2006 10:06 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

Zahid

CheckMate includes all of the checking options.

I would try a test with just /CHECK, then /UNDEF (which includes /CHECK), then /FULL_UNDEF (which includes /UNDEF).

It is possible that it will work with /UNDEF but not /FULL_UNDEF and this may be sufficient.
Back to top
View user's profile Send private message AIM Address
Zahid



Joined: 03 Feb 2005
Posts: 26

PostPosted: Fri Jun 23, 2006 3:03 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

Paul,

The Fortran program calling the c05adf NAG routine (using NAG DLLs) fails with /check and with /undef. It works with /full_debug.

A C example program calling NAG routine d02bgf fails with /check, /undef and /full_undef, but works with /debug.

Zahid.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Jun 23, 2006 5:37 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

Zahid

Maybe you should see if NAG has an comments on this.

A NAG DLL built for CVF should be accessed via /IMPORT_LIB on the FTN95 command line.
This is the same as setting a Plato project reference with property "STDCALL".

If the NAG DLL is built for FTN95 then you will not need /IMPORT_LIB.
Back to top
View user's profile Send private message AIM Address
Zahid



Joined: 03 Feb 2005
Posts: 26

PostPosted: Tue Jun 27, 2006 2:18 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

This problem occurs despite the fact that I have used /IMPORT_LIB (or the Plato project property stdcall).

Zahid Aziz
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Jun 27, 2006 2:28 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

Zahid

From your reply I assume that the NAG DLL is a Fortran DLL built for CVF.
I am also assuming the you are using the latest release 4.91.
If you can send me a short sample program that illustrates the failure then I will investigate the problem as soon as I can.

Regards

Paul
Back to top
View user's profile Send private message AIM Address
Zahid



Joined: 03 Feb 2005
Posts: 26

PostPosted: Tue Jun 27, 2006 3:08 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

Paul,

Yes, the NAG DLLs are built from the NAG Fortran Library using CVF.

I am using FTN95 4.9.0, which is the latest version that I can access through the Silverfrost website. I have checked just now, and can't see 4.91.

Here is a shortened version of the standard NAG example program for calling the routine c05adf:

program nagexample
DOUBLE PRECISION A, B, EPS, ETA, X
INTEGER IFAIL
DOUBLE PRECISION F
EXTERNAL F
WRITE (*,*) 'C05ADF Example Program Results'
A = 0.0D0
B = 1.0D0
EPS = 1.0D-5
ETA = 0.0D0
IFAIL = 1
CALL C05ADF(A,B,EPS,ETA,F,X,IFAIL)
WRITE (*,*)
IF (IFAIL.EQ.0) THEN
WRITE (*,*) 'Zero =', X
ELSE
WRITE (*,*) 'IFAIL =', IFAIL
IF (IFAIL.EQ.2 .OR. IFAIL.EQ.3) WRITE (*,*)
+ 'Final point = ', X
END IF
STOP
END
*
DOUBLE PRECISION FUNCTION F(X)
DOUBLE PRECISION X
INTRINSIC EXP
F = EXP(-X) - X
RETURN
END


I have re-confirmed that it fails with access violation under Checkmate and works with Debug. You will need to link it with the two NAG DLL files.

Thanks,
Zahid.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Jun 27, 2006 5:38 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

Zahid

Version 4.91 is available as a patch. Details are given in the Announcements.

You will need version 4.91 because it contains a relevant bug fix.

Please let me know if this problem is not fixed in the patch.

Regards

Paul
Back to top
View user's profile Send private message AIM Address
Zahid



Joined: 03 Feb 2005
Posts: 26

PostPosted: Tue Jun 27, 2006 8:08 am    Post subject: CheckMate causes runtime failure when calling NAG Library DL Reply with quote

Paul,

Shortly after my last message I did get hold of 4.9.1 and tried it, but I got the same failure as before.

Zahid.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group