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 

FTN95 and AMD ACML2.6.0 LAPACK implementation

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





PostPosted: Mon Jun 13, 2005 3:15 pm    Post subject: FTN95 and AMD ACML2.6.0 LAPACK implementation Reply with quote

Hi,

I'm testing the installation of the Salford FTN95 and AMD LAPACK (ACML 2.6.0) by
running the LAPACK example: dgetrf_example.f

First: I note that comments in Salford FTN95 start with "!" whereas
LAPACK Fortran uses "*".

Second: the linking doesnot appear to work:

My machine is a Windows 2000 running on an AMD Athlon processor.

I tried:

1. ftn95 dgetrf_example.f /import_lib libacml.lib

which failed to open the import library.

2. Tried running the example in the VS.NET installation of FTN95. The compilation works, as does the linking:

slink dgetrf_example.obj libacml_dll.lib

but with a warning that the external LAPACK routines cannot be found. And execution breaks on call to LAPACK.

3. ftn95 dgetrf_example.f /link /import_lib ..liblibacml.lib

this compiles but detects missing items in obj code and when the example runs it returns a singlar matrix, whereas it should return a regular matrix (the expected result is given by AMD)

Much appreciate some advice on use of LAPACK and FTN95 on win32 and VS.NET.

Thanks
Michael

Michael_Newark
Back to top
Anonymous
Guest





PostPosted: Wed Jun 15, 2005 1:54 am    Post subject: FTN95 and AMD ACML2.6.0 LAPACK implementation Reply with quote

I got feedback from AMD: to cut a long story short the AMD ACMLY library assumes a calling convention that is incompatible with FTN95.

Michael
Back to top
Anonymous
Guest





PostPosted: Wed Jun 15, 2005 10:58 am    Post subject: FTN95 and AMD ACML2.6.0 LAPACK implementation Reply with quote

Great news from AMD: it now compiles as follows:

ftn95 dgetrf_example.f /link /import_lib ..liblibacml_dll.dll

and the program built, linked, and ran without any problems.

Using ACML with the Salford FTN95 compiler

------------------------------------------

Compilation

-----------

No source file changes are necessary to call the ACML DLL from Ftn95. However, since Ftn95 uses a variant of the cdecl calling convention, the compiler has to be told that the routines in the DLLs are to be called using the CVF calling convention. This can be accomplished using the /IMPORT_LIB command line switch as

follows:

ftn95 myprog /import_lib install_dirlibacml_dll.dll

where install_dir is the location of the DLL. The full pathname of install_dir should be specified to the DLL and should be enclosed within quotes if it contains spaces. The effect of this is to assume that all exported names in the DLL are CVF STDCALL and that any use of them should use the CVF STDCALL calling convention. External names passed via the argument list to a routine in the ACML DLL are automatically adjusted for whether or not they occur in the same source.

Linking

-------

The ACML DLL library may be added to the Salford Slink command line as usual e.g

Slink myprog.obj install_dirlibacml_dll.dll

As with compilation, the full path to the DLL should be specified here, within quotes if the pathname contains spaces. It is worth emphasising that the linker should link directly against the DLLs not the *.lib files.

Michael
Back to top
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