Changes between Version 6 and Version 7 of FortranApps


Ignore:
Timestamp:
Aug 9, 2007, 1:54:09 PM (17 years ago)
Author:
Nicolas
Comment:

Some formatting on Korth's additions - still needs somebody to merge it with the rest of the content. Note: I think we need a separate page explaining how to "build the libs the standard way" for each platform. Even if it has redundant info with other pages, at least it's not scattered around the wiki...

Legend:

Unmodified
Added
Removed
Modified
  • FortranApps

    v6 v7  
    1515Note: a working example similar to the following (based on outdated BOINC code) is [/TestLibs.zip here]; see also its [/taufer.txt README].
    1616
    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.
     17Start 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.
    1818
    19 For every BOINC function you want to call from fortran you must add an interface and subroutine:
     19For every BOINC function you want to call from Fortran you must add an interface and subroutine:
    2020
    2121{{{
     
    5454== Intel FORTRAN compiler ==
    5555
    56 `-ax<codes>` generate codes specialized for processors specified by <codes>` while also generating generic IA-32 code. `<codes>` includes one or more of the following characters:
     56`-ax<codes>` generate codes specialized for processors specified by `<codes>` while also generating generic IA-32 code. `<codes>` includes one or more of the following characters:
    5757
    5858 K:: Intel Pentium III and compatible Intel processors
     
    6969 B:: Intel Pentium M and compatible Intel processors
    7070
    71 You should not use the -x options!
     71You should not use the `-x` options!
    7272
    7373== Instructions from Martin Korth ==
    74 (can someone please integrate these with the above?)
     74''(can someone please integrate these with the above?)''
    7575
    76 Under linux:
    77  1. compile BOINC libs the standard way (you need boinc.a, boinc_api.a, and for
    78 graphics also boinc_graphics_lib.a)
    79  2. compile boinc_api_fortran.o
    80  3. compile own graphics lib if needed
    81  4. compile app files (for us: 'ifort -O2 ...' and 'icc -O2 ...')
    82  5. link application (for us: 'ifort -static-libcxa ...')
     76Under Linux:
     77 1. Compile BOINC libs the standard way (you need `boinc.a`, `boinc_api.a`, and for graphics also `boinc_graphics_lib.a`).
     78 2. Compile `boinc_api_fortran.o`.
     79 3. Compile own graphics lib if needed.
     80 4. Compile app files (for us: `ifort -O2 ...' and 'icc -O2 ...`).
     81 5. Link application (for us: `ifort -static-libcxa ...`).
    8382
    84 link with : boinc_api_fortran.o, boinc.a, boinc_api.a, boinc_graphics_lib.a,
    85 C-(runtime)-libs (dl, nsl, gcc_s, stdc++, pthread, m, c, ... - as they are
    86 not default for the fortran compiler), and own graphics lib
     83Link with: `boinc_api_fortran.o`, `boinc.a`, `boinc_api.a`, `boinc_graphics_lib.a`, `C-(runtime)-libs` (`dl`, `nsl`, `gcc_s`, `stdc++`, `pthread`, `m`, `c`, ... - as they are not default for the Fortran compiler), and own graphics lib.
    8784
    88 Under windows:
    89  1. compile BOINC libs the standard way (you need libboinc.lib, libboincapi.lib)
    90  2. compile boinc_api_fortran.o (at the moment I still use my old solution with an interface for every fortran function, as shown on the BOINC fortran page)
    91  3. compile own graphics lib if needed
    92  4. compile app files (for us: 'ifort /nologo /MT /O2 ...'  and 'cl /nologo /MT /O2 ...') - btw: 'nmake' makes life easier ...
    93  5. link application (for us 'ifort /nologo /MT ...'
     85Under Windows:
     86 1. Compile BOINC libs the standard way (you need `libboinc.lib`, `libboincapi.lib`).
     87 2. Compile `boinc_api_fortran.o` (at the moment I still use my old solution with an interface for every Fortran function).
     88 3. Compile own graphics lib if needed.
     89 4. Compile app files (for us: `ifort /nologo /MT /O2 ...` and `cl /nologo /MT /O2 ...`) - 'nmake' makes life easier ...
     90 5. Link application (for us `ifort /nologo /MT ...`).
    9491
    95 link with: libboinc.lib, libboincapi.lib, own graphics lib,
    96 gdi32.lib user32.lib opengl32.lib glu32.lib advapi32.lib delayimp.lib
    97 freetype.lib glut32.lib (you may need /link /nodefaultlib:libc.lib)
     92Link with: `libboinc.lib`, `libboincapi.lib`, own graphics lib, `gdi32.lib` `user32.lib` `opengl32.lib` `glu32.lib` `advapi32.lib` `delayimp.lib` `freetype.lib` `glut32.lib` (you may need `/link /nodefaultlib:libc.lib`).