- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
We are in the process of evaluating Intel Fortran for Windows.
We plan to use a.Net language (VB.Net for eg.) as the front end. Could any one please tell the different ways i can interact with Intel Fortran from VB.Net (or C#.Net).
I know that the Intel Fortran source can be packaged to a DLL and then called from VB.Net. I am looking for better options with true interoperability.
Would greatly appreciate your replies.
Cheers!
Link Copied
13 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can write"native" Win32-API codein F90as easily and with as much versatility as any other language. There is no need for .NET anything to make F90 apps with full-featured Win32 user and system interfaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
But the idea is to use .Net as the front end and Fortran for the complex engineering calcs.
So in what ways can i access Fortran code from .Net (without using a DLL).
Thanks very much.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Without using a DLL, not at this time using Intel Fortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using a DLL is the only approach supported, but what do you mean by "true interoperability"? You should be able to do most anything you want, given some effort.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve.
What i mean is like in Salford Fortran, they have an interface that supports calls from outside. You do not have to declare a DLL in the VB program. Just adding a reference will do it.
real*8 function add_ (x, y)
assembly_interface (name="Add")
Wondering if you have good example(s) to access Intel Fortran from VB.Net and C#.Netusing DLLs and a document explaining rules for data type mapping between VB.Net and Intel Fortran. I would greatly appreciate that.
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. Salford Fortran supports direct generation of MSIL, and has added features to support that. Intel Fortran generates native code only.
I have a VB.NET example I'll post in a bit. I don't have a document specifically oriented at this. Mostly you would use the information in our mixed-language applications chapter on datatypes and the VB.NET or C# documentation on interfacing with native DLLs. For simple datatypes and arrays, it's pretty easy to pass them. If you want to handle SafeArrays and BStrings, it's more complex.
I have a VB.NET example I'll post in a bit. I don't have a document specifically oriented at this. Mostly you would use the information in our mixed-language applications chapter on datatypes and the VB.NET or C# documentation on interfacing with native DLLs. For simple datatypes and arrays, it's pretty easy to pass them. If you want to handle SafeArrays and BStrings, it's more complex.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the clarification. Would i right in saying that the native code that IntelFortran generates will run faster than the MSIL?
Please post the VB.NET example for accessing a Fortran DLL.
Thanks...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the native code will be much faster.
Here's the example (I hope attachments are working...)
Here's the example (I hope attachments are working...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve. That helps.
I have a rather annoying problem now.
I am not able to edit the fortran (.f90) source file the way i would edit a VB.Net program for example. In other words, I am not able to click some where in the source code and press the to delete characters and i am not able to press to insert a newline etc.
But i am able to type anywhere by clicking or even able to use key. I am able to save these chages as well. So its not a problem with this file being read only. But the , and the arrow keys are not working on .f90 file from the .Net Text Editor.
Wondering what i am doing wrong. This happens even with a new Intel FortranSource file. An other non-intel projects work fine in the text editor.
I would greatly appreciate your help on how i can edit .f90 files within .Net as i would edit any other file.
Please reply at your earliest.
Cheers!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have Lahey Fortran installed, am I right? It corrupts the VS.NET environment in just this way. It could be that Salford does this too, but I haven't heard of reports of that.
Most users who encounter this find that uninstalling Lahey fixes the problem. But here's another way.
1. Uninstall the Intel Visual Fortran Integration into Visual Studio
2. In Add or Remove Programs, select Visual Studio.NET and click Change.
3. In the VS.NET install screen that comes up, click item 2, Visual Studio.NET
4. Select Reinstall/Repair
5. When it is done, reinstall the Intel integration.
Please be sure that you have at least version 9.0.020 of Intel Fortran installed. 9.0.021 will probably become available from the Premier Support file downloads site tomorrow.
Most users who encounter this find that uninstalling Lahey fixes the problem. But here's another way.
1. Uninstall the Intel Visual Fortran Integration into Visual Studio
2. In Add or Remove Programs, select Visual Studio.NET and click Change.
3. In the VS.NET install screen that comes up, click item 2, Visual Studio.NET
4. Select Reinstall/Repair
5. When it is done, reinstall the Intel integration.
Please be sure that you have at least version 9.0.020 of Intel Fortran installed. 9.0.021 will probably become available from the Premier Support file downloads site tomorrow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I have Lahey installed as well.
I will try the instructions and let you know how it went.
Thanks for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve.
It works now. Thanks for your help. Appreciate it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page