Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement fcall #2167

Closed
ViralBShah opened this issue Feb 1, 2013 · 4 comments
Closed

Implement fcall #2167

ViralBShah opened this issue Feb 1, 2013 · 4 comments

Comments

@ViralBShah
Copy link
Member

Per-Olof Persson made a great suggestion - have an fcall, like ccall, which does not require the underscores in the function name, and we can even get rid of all the ampersands. Perhaps, we can also allow specifying arrays rather than pointers in the function signatures.

@milktrader
Copy link
Contributor

+1

@stevengj
Copy link
Member

One problem is that not all Fortran compilers use the same name mangling on a given platform. The most common culprit in practice here is probably Windows, where Intel Fortran defaults to all uppercase (probably because this was the convention established on Windows by Digital Visual Fortran years ago) while gfortran uses lowercase+underscore.

@tkelman
Copy link
Contributor

tkelman commented Nov 19, 2014

Yeah, ifort on Windows is kind of a pain. It's also an MSVC-style front end, so very few projects bother supporting it in their build systems. Matlab and the commercial Python distributions use it, I know that much. Not sure who else does.

Some libraries will export Fortran symbols available under multiple names to try to mitigate this. For example every function in libopenblas.dll is exported 3 times - once lowercase with trailing underscore, once lowercase without trailing underscore, and once uppercase without trailing underscore. Not all libraries are consistent about doing this, and working around it requires some occasional hacks to try to use different libraries together which were compiled with different conventions.

@ViralBShah ViralBShah added this to the 0.5 milestone Jun 29, 2015
@JeffBezanson JeffBezanson modified the milestones: 0.6.0, 0.5.0 Jan 27, 2016
@JeffBezanson JeffBezanson modified the milestones: 2.0+, 0.6.0, 1.x Nov 10, 2016
@JeffBezanson JeffBezanson modified the milestones: 2.0+, 1.x May 2, 2017
@StefanKarpinski StefanKarpinski modified the milestones: 2.0, 1.x Jan 22, 2019
@ViralBShah
Copy link
Member Author

ViralBShah commented May 25, 2020

Dup of #38872

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants