Remix.run Logo
hulitu 3 days ago

> Translate Fortran to C++ with AI and RAG

f2c ? But yeah, 1 level of abstraction sucks. We need around 10 to be satisfied.

cpgxiii 3 days ago | parent [-]

f2c produces pretty sketchy C code. It's very easy for reasonable thread-safe Fortran code to go through f2c and end up as C code with globals and other thread-unsafe constructs. You have to be prepared to completely rewrite the generated C code to make it usable, possibly more unpleasantly than just doing the port by hand.