- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'd like to use the interval solvers available in the MKL library in a C/C++ application (to be more specific, in a MATLAB MEX-function) using MS Visual C++ 2005.
Now I found out that there are only FORTRAN interfaces available for the interval solvers of the MKL. My question is now, how to access these routines from my C program.
My first approach was to use f2c (from netlib.org) to convert the mkl_interval.f90 into a C header file and to link with the provided MKL libraries. This fails since f2c provides no support for Fortran90.
Additionally, I found the following statement on the Intel pages: "
* The interval libraries will require the libifcore library from Intel Fortran compiler.
* Interval arithmetic functions require a processor which supports SSE instructions."
So I can't use the interval part from MS Visual C++ 2005 without also obtaining the Intel Fortran Compiler?
One last question: Can I distribute the programm (internally for scientific purposes), or do I need a licence for every user during runtime?
Thanks a lot and best regards,
Tobias
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't have a definitive answer, but I'll offer some comments.
I note that the file mkl_interval.f90 isn't present in the newer versions of mkl. I don't know if that's intentional.
I don't know whether your target is C or C++, or why you don't consider Fortran. I see that mkl_interval.f90 seems to work OK with gfortran (and probably with most any up to date Fortran, in spite of its gratuitous non-portabilities). Unfortunately, to the extent that MKL depends on Fortran run-time library, it is tied to Intel Fortran.
C++ is enough different from Fortran, with enough differences of opinion on how to go about things, that some kind of C++ interface would be way beyond the capability of an automatic translator. I suppose some C++ fanatics have considered interval solvers; I doubt that it's easy.
In case you make a program which depends on Intel run-time libraries, the standard full license (please read) does cover the case of distributing the run-time libraries, should you choose a dynamic link. The libraries come in both static and dynamic versions. Individual users would need the Intel compiler/MKL licenses only for recompilation, and could use a floating license if they do require it. I believe there are academic terms, should that be applicable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
and thanks a lot for your statement.
Since I'm not familiar with FORTRAN, I would like to avoid any implementation using that language. As far as I know, function translation is normally possible, but I'm not sure in that point.
Regarding the mkl_interval.f90 file: I just downloaded the MKL 10 library 14 days ago - it still contains this file.
Can someone give me a definitive answer to my problem - e.g. if someone already tried to wrap the fortran codes by C header files?
Best Regards,
Tobias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Tobias,
You can use the FORTRAN interfaces directly from C/C++/VC++/CLI without the need for a FORTRAN compiler (they are also faster and more memory efficient than the C alternatives).
Just google: 'mixed programming' || 'calling FORTRAN from C/C++'
If I remember corectly, you will need to specify __cdecl in the visual studio settings (google: 'cdecl msdn') and use pointers for arguments.
A quick search on the forum brought up this post: (http://software.intel.com/en-us/forums/showthread.php?t=59818) which is illustrating a sample that is calling a VML function via, what appears to be, the FORTRAN 77 interface.
Hope this helps.
Newton
--------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IIRC, Intel dropped support for interval arithmetic in the latest MKL claiming that not enough users used it. By eliminating it they have guaranteed that this will be so for post MKL 10. Like good strawmen, they'll now claim that they were right!
BTW, most researchers in the interval arithmetic game use Fortran (FWIT, FORTRAN died out with bell bottoms and disco) or Pascal.
Matlab has an interval arithmetic toolbox, INITLAB by Rump.
Gerry
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page