Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29282 Discussions

IVF Versions - can this be source of DLL issues?

DavidWhite
Valued Contributor II
759 Views
We run a third-party application, which has the capability of compiling and linking internal Fortran code into a DLL for models develoepd within the application. This application is on a server, and it usesIVF 10.1.024 and the IDE (when used) is VS2003 to generate these DLL's.

However, I have a major calculation DLL that I want to implement in place of this "internally" generated DLL. I want to use my "external" DLL instead.

I have generated my DLL and copied it to the server. When I attempt to run the model on the server, I get the error "unable to find function xxxx in N:\.....\xyz.DLL" The path given to the DLL is fully specified and is the correct file. According to dependency walker, the required entry point is there.

On my development machine, I am using VS2005 with IVF 11.1.038. Is this difference in versions between my machine and the server a possible cause of the failure to access the DLL?

Thanks,

David
0 Kudos
1 Solution
Steven_L_Intel1
Employee
759 Views

Yes, you can. You'll need to add the following directive to the routines you want to export as CVF-compatible:

!DEC$ ATTRIBUTES STDCALL,REFERENCE,MIXED_STR_LEN_ARG,DECORATE,ALIAS:"ROUTINE" :: routine

where ROUTINE is the name of your routine. Make it uppercase in the ALIAS part.

View solution in original post

0 Kudos
6 Replies
Steven_L_Intel1
Employee
759 Views
I can't think of any way that version differences would be relevant here. How are you loading the DLL?
0 Kudos
DavidWhite
Valued Contributor II
759 Views
I can't think of any way that version differences would be relevant here. How are you loading the DLL?
Steve,

The DLL is loaded through the application software, so it is not clear how it is done. The application code simply has a Library command and in our case with the full path and name of the DLL.

The error message leads me to believe that the DLL is found, but that perhaps there is an incompatibility in the argument list or calling convention which means that it is not correctly finding the entry point.

Overnight one of my colleagues tried building an internal DLL, and got an ifort not found error, so I think IVF may have been installed incorrectly. While my DLL should not need any runtime libraries, maybe there is something else wrong that we need to address.

Thanks,

David
0 Kudos
Steven_L_Intel1
Employee
759 Views
Ok - the application likely uses LoadLibrary. How sure are you that it is loading the correct DLL?
0 Kudos
DavidWhite
Valued Contributor II
759 Views
Ok - the application likely uses LoadLibrary. How sure are you that it is loading the correct DLL?

Steve,

Also now found out that the application expects CVF Calling Convention. Can I export some entry points using CVF and some using Default (the DLL is used by multiple applications), or doI need to build this as a separate project?

Thanks,

David
0 Kudos
Steven_L_Intel1
Employee
760 Views

Yes, you can. You'll need to add the following directive to the routines you want to export as CVF-compatible:

!DEC$ ATTRIBUTES STDCALL,REFERENCE,MIXED_STR_LEN_ARG,DECORATE,ALIAS:"ROUTINE" :: routine

where ROUTINE is the name of your routine. Make it uppercase in the ALIAS part.
0 Kudos
DavidWhite
Valued Contributor II
759 Views

Yes, you can. You'll need to add the following directive to the routines you want to export as CVF-compatible:

!DEC$ ATTRIBUTES STDCALL,REFERENCE,MIXED_STR_LEN_ARG,DECORATE,ALIAS:"ROUTINE" :: routine

where ROUTINE is the name of your routine. Make it uppercase in the ALIAS part.

thanks, Steve. I thought that I would be able to do it this way; finding the specific set of keywords in the Help documentation was the problem.

David
0 Kudos
Reply