Changes between Version 6 and Version 7 of FortranApps
- Timestamp:
- Aug 9, 2007, 1:54:09 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
FortranApps
v6 v7 15 15 Note: a working example similar to the following (based on outdated BOINC code) is [/TestLibs.zip here]; see also its [/taufer.txt README]. 16 16 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.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. 18 18 19 For every BOINC function you want to call from fortran you must add an interface and subroutine:19 For every BOINC function you want to call from Fortran you must add an interface and subroutine: 20 20 21 21 {{{ … … 54 54 == Intel FORTRAN compiler == 55 55 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: 57 57 58 58 K:: Intel Pentium III and compatible Intel processors … … 69 69 B:: Intel Pentium M and compatible Intel processors 70 70 71 You should not use the -xoptions!71 You should not use the `-x` options! 72 72 73 73 == Instructions from Martin Korth == 74 (can someone please integrate these with the above?) 74 ''(can someone please integrate these with the above?)'' 75 75 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 ...') 76 Under 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 ...`). 83 82 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 83 Link 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. 87 84 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 needed92 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 ...'85 Under 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 ...`). 94 91 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) 92 Link 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`).