Changes between Version 13 and Version 14 of FortranApps


Ignore:
Timestamp:
May 20, 2015, 11:09:09 PM (10 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FortranApps

    v13 v14  
     1[[PageOutline]]
    12= FORTRAN applications =
    23
    3 
    44== F2X ==
    5 One option is to use f2c to convert your FORTRAN program to C. M.F. Somers has created a [http://boinc.gorlaeus.net/F2c.php BOINC-enabled f2c library] that simplifies this process.
     5One option is to use f2c to convert your FORTRAN program to C.
     6M.F. Somers has created a [http://boinc.gorlaeus.net/F2c.php BOINC-enabled f2c library] that simplifies this process.
    67
    78== Windows: cygwin ==
     
    1314== Windows: Visual Studio ==
    1415
     16=== Wrapping FORTRAN in C++ main program ===
     17
     18One approach is to have a C++ main program do all the interaction with BOINC,
     19and call FORTRAN functions to do the work.
     20An example of this from Paul Calvert is
     21[http://boinc.berkeley.edu/for_win_build.zip here] and
     22[http://boinc.berkeley.edu/fortran_app.zip here].
     23
     24=== Calling BOINC API from FORTRAN ===
     25
    1526Note: there is [/TestLibs.zip a working example] similar to the following (based on outdated BOINC code); see also its [/taufer.txt README].
    1627
    17 Start by creating a new FORTRAN project. Add all the FORTRAN specific files, then add all the files needed for the BOINC library (e.g. `boinc_api.C`). Make sure that BOINC and the FORTRAN files are compiled using the same type of standard libraries. i.e. if the BOINC is compiled with the debug multithreaded DLL libraries, make sure the FORTRAN files are compiled with the DLL setting.
     28Start by creating a new FORTRAN project.
     29Add all the FORTRAN specific files, then add all the files needed for the BOINC library (e.g. `boinc_api.C`).
     30Make sure that BOINC and the FORTRAN files are compiled using the same type of standard libraries.
     31i.e. if the BOINC is compiled with the debug multithreaded DLL libraries,
     32make sure the FORTRAN files are compiled with the DLL setting.
    1833
    1934For every BOINC function you want to call from Fortran you must add an interface and subroutine: