-
Notifications
You must be signed in to change notification settings - Fork 7
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
Suffixed 64-bit integer symbols names #12
Comments
I might have not got the placement of underscores right. There's so many combinations. Here's the output of a snippet from
I think the right thing for flexiblas is to allow user provided suffixes during build time for ILP64 versions. Everyone can then pick what they want for their system. |
As I said, there are strange compilers around. ;-) Making them completely user defined would be a way, but a very hard way. Personally, I prefer to set standards since that allows an easy work-together. At the moment, as far as I recognize, there are only a few cases, where this is used and so we have still some time to define a good standard. What compiler did you use on the Mac? Since I rarely saw prefixed symbols. |
We pretty much use |
I need to organize my self a Mac System at work next year and to analyze the symbol generation there. But back to the problem, we should think of the appearing difference between the transformed C and FORTRAN function names. |
And here's linux:
|
Then the |
I don't have a strong opinion here. The broader the consensus upstream, the better for us. In Fedora, we primarily follow the trail of OpenBLAS. They support Anyway, we ported that to reference BLAS/LAPACK via some objcopy magic, and so we ship a version of both OpenBLAS and Netlib with |
The objcopy thing is really a bit tricky. In general the 64 bit suffix is what we need, but the quick and dirty way It was introduced reading the OpenBLAS discussion leads to this difference in the C and the Fortran Naming scheme. I would like to write in Fortran
and from C either
or
because than one can easily argue: "Everything works like in the normal case, only with a 64 added". With the 64 added in the Fortran function name, the C interface automatically gets "64_" in the GNU-GCC world. For the Julia guys this isn't a problem since the name mangling is implemented as The way this suffix was included in OpenBLAS seems to be only regarded from the C interface point of view and not what happens if you want to use it from Fortran. |
Maybe we should summon @tkelman @stevengj @susilehtola to this discussion. |
If you want to add I just checked the manual, and it seems that Intel Fortran |
I do not want to have the |
There are one or more new LLVM-world Fortran compilers that are relevant to keep in mind. I suspect/hope they will implement gfortran-compatible mangling by default. But they might choose to do something different on windows given the ifort precedent, I haven't followed closely enough to know. |
So you just want to append |
@stevengj
or
But not the mixed stuffed realized at the moment in OpenBLAS. The way SunPerf BLAS is one of the less used BLAS libraries, so I would like to establish a consistent interface rather then supporting a more or less quick-and-dirty looking solution. |
The reason we followed the SunPerf BLAS option was because it is supported by SuiteSparse, IIRC. The second option will be mostly compatible with what we are doing now (since Julia, SuiteSparse, and many other libraries use only the Fortran API). |
I look at We agree that first the edit |
Internal Issue No. 89. |
I did some research on the use of the suffixed function names for the 64bit integer build, and I found an inconsistency introduced by the way Julia introduced this suffix idea. It is no question that we need that suffixed symbol names to be able to mix 32 and 64 bit integer code without running into trouble. @ViralBShah, said that they added
64_
to all symbol names. That is true for Julia's OpenBLAS version and the ones compiled by the Fedora team, having the *64_ packages (@Enchufa2). But having a closer look the symbols we get the following cases:These three types are fine and nothing to complain. But if somebody tries to use this inside its Fortran code (calling from Fortran):
or using the Fortran interface from C ( or any other language over a C-like direct call):
Both cases conflict are valid if one look from the generated symbol name, but they look strange and conflicting, from my point of view, with the way the direct C symbols are transformed. I would suggest doing the following: First add the suffix to the functions and then apply the Fortran -> Symbolname name mangling scheme. Because there a stil compilers around, that does not the underscore thing as the GNU compiler. Even adding the
64_
instead of64
can cause trouble since some Fortran compilers add a second_
to the end of the symbol name whenever a function name contains a_
.So guys, @ViralBShah and @Enchufa2, I am open for a discussion about this.
The text was updated successfully, but these errors were encountered: