- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the documentation for the Fortran version of ?jacobi the fcn argument must be declared as external:
https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-fortran/2025-0/jacobi.html
I want to avoid doing this because In my case fcn is a simple wrapper around a call to a module procedure which relies on internal state and declaring it as external would mess up the program structure more than I like. I tried compiling and running without declaring fcn as external (right now it is a subroutine I declare within the procedure calling djacobi). This seems to work without issue.
I would assume that if there is an issue with linking, I will get a linking error or a catastrophic runtime error. Since I do not get either of those, I would assume omitting the external keyword is fine in my case? Nevertheless, I am making this post to double check if I may be unknowingly creating unsafe behavior in this way and what exactly the reasoning is behind requiring a procedure to be declared as external as the documentation currently does.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Declaring the user-provided function as external is to pass it as an argument of djacobi. I also tried to declare it explicitly in an interface block. It works expected for the in-package example. I will report it to the team as a documentation issue. Thank you for pointing it out!

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