- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I am trying to compile a fortran 90 code that calls some MKL routines (VML functions vserfinv and vserf). I struggled a little while with the linking stage that kept saying :
fill_matrix.o: In function `fill_matrices_mp_perform_variable_change':
fill_matrix.f90:(.text+0x14ae): undefined reference to `vserf'
fill_matrix.o: In function `fill_matrices_mp_init_p':
fill_matrix.f90:(.text+0x8375): undefined reference to `vserfinv'
(don't mind the fill_matrix routine's name)
I found out that when removing the -names as_is option at the compilation time it worked out (even though I left it on when doing the link). I now ask the question : why is that? I tried to use either lower or upper case in my call to these VML functions but it turned to be rather unsucessful.
I would welcome any ideas / comments on that problem (which is not critical, I agree).
Thanks alot to all of this message's readers.
Pierre-Franois
ps : I don't know if I did right to write this message in this section of the forum. If not, I do apologize for any incovenience.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The MKL library assumes default Fortran external naming conventions. -names is a "big hammer" switch that can cause big problems if you use it in conjunction with an external library. My advice is to never ever use that switch.
If you need to call specific routines that have non-default naming (such as mixed-case), write interface blocks with BIND(C,NAME="MixedCaseName") in the procedure declaration rather than using switches.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page