|
[Sponsors] |
December 13, 2020, 09:57 |
Fortran-C/C++ interoperability example codes
|
#1 |
Senior Member
Sayan Bhattacharjee
Join Date: Mar 2020
Posts: 495
Rep Power: 8 |
Hi everyone,
Since Fortran-C/C++ interoperability can become complex at times and there aren't many good tutorials on the matter, I created a few example codes for my work. I thought it would be helpful to others if I shared them. Since I'm new to using Fortran, I don't know all of the use cases/features of the interoperability features. I'm looking for ideas on what example codes can be created next to demonstrate more advanced interoperability features of Fortran. I have plans to create a few YouTube tutorials on this subject. GITHUB REPO : https://github.com/aerosayan/fortran-c-interop/ Example codes created for the following cases : Code:
- BASIC ' '- interop-0-1 : extern "C" ' '- interop-1-1 : Call Fortran subroutine from C. '- interop-1-2 : Call C void function from Fortran. ' '- interop-2-1 : Send integer and double digits to Fortran subroutine from C. '- interop-2-2 : Send integer and double digits to C void function from Fortran. - INTERMEDIATE ' '- interop-3-1 : Send dynamic integer array to Fortran subroutine from C. ' '- interop-4-1 : Send dynamic integer matrix to Fortran subroutine from C. Sayan |
|
Tags |
fortran 90, fortran-c/c++ |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DS2V Fortran codes | Marin4444 | Main CFD Forum | 2 | December 15, 2020 14:54 |
fortran codes | HaKu | Main CFD Forum | 1 | July 8, 2011 15:23 |
fortran codes 3D | HaKu | Main CFD Forum | 1 | July 8, 2011 11:34 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
BOOK ON OPTIMIZATION OF FORTRAN CODES | Alberto | Main CFD Forum | 3 | November 10, 2008 07:07 |