The future of FORTRAN mex?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
With Apple M1 now out, and hopefully future MATLAB releases will have native support. The next question is FORTRAN mex comiler support. Up to this point for both Windows and Mac, it was Intel only (though you could jump through hoops to get gfortran mex on the Mac). So MathWorks, coders want to know, what is next? How should we prepare? NAG has a native FORTRAN M1 version out, and there is some "betas" for gfotran for M1. I doubt Intel will put out a compiler for Apple M1. Should we start porting FORTRAN mex code to C?
1 comentario
dpb
el 28 de Dic. de 2020
"Should we start porting FORTRAN mex code to C?"
Probably. TMW seems to have basically abandoned Fortran 10 years ago.
Combined with their incredibly arcane and absurd installation where they won't just give you the directions for compile/link steps,but try to force an "approved" compiler, I gave up entirely.
There's no excuse for such a nightmare; I had a legacy system to try to maintain, but they broke compatibility and then wouldn't let a .mex file load if the link wasn't with the specific version libraries even though there were no changes. Frustrating wasn't the word for the feelings I had...and support stock answer is "unsupported".
Then, too, trying to get them to tell you what may be in the future is futile as well.
Wish had better news...
Respuestas (1)
Chris Rorden
el 3 de En. de 2021
Editada: Chris Rorden
el 5 de En. de 2021
An experimental build of the open source gFortran compiler is available for the M1
In my testing, it performs very well
A challenge for moving mathematical operations between architectures is how they handle not-a-number values. However, this will impact any compiler, Fortran or C. This is a reason that tools like R have been slow to convert:
The Fortran code in Matlab is robust and proven. Switching to C would not provide any performance benefit. The benefit of Fortran is well established, proven routines. The advantage of C is that it is more familiar to most contemporary programmers, which might help maintaining and extending code. However, conducting both a switch in architectures and a switch in languages at the same time seems to be a perilous choice. A better approach is to maintain the proven Fortran code for the new architecture, to help identify architecture specific issues.
Ver también
Categorías
Más información sobre Fortran with MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!