Leiden Classical F2C for BOINC

Download the Leiden Classical BOINC-enabled f2c library here.

Download the Leiden Classical BOINC-enabled f2c library here.

This page describes how to make the good old f77 codes BOINC ready without any fuzz.

Step 1; getting the stuff:

Get the BOINCyfied f2c library form Leiden Classical here.

Step 2:

Untar the library sources and run 'make -f makefile.u' in the src subdirectory to get the
unix f2c binary. Run 'nmake -f makefile.vc' under windows using the MS-VC++ compiler to get
it for Windows (not tested). Put the program somewhere logically like at /usr/local/bin/f2c
or c:\f2c\f2c.exe

Step 3a (X11/Linux only):

Get your version of freeglut here if you want to get graphically enabled BOINCyfied clients.
Make your own freeglut libraries for your platform and place them in the glut_libs subdirectory
in the directory tree obtained in step 2. Be sure to put the right headers into the 'includes'
subdirectory too. You could use the included freeglut 2.4.0 to test. For Windows this step is not

Step 3b:

Get your version of the BOINC api library from here. Make your own binary api libraries for your
platform and place them in the boinc_libs subdirectory of the tree you got in step 2. Put the include
files into the correct 'includes' subdirectory too. You could use the outdated 5.3.x BOINC version
included with the source tarball above as a test. Be sure to use the in step 3a compiled freeglut
libraries in building the BOINC graphical api library under Linux / Unix. For Windows freeglut
is not needed.

Step 4; we have everything we need:

Go to the boinclibf2c subdirectory from the tree obtained in step 2. Run 'make -f makefile_boinc.u'
to get the BOINCyfied-f2c library for text only for Unix. Run 'make -f makefile_graphical_boinc.u'
to get the BOINCyfied-f2c library with the graphical BOINC api enabled for Unix (using the freeglut
library from step 3a). Use similar make commands to compile for Windows. You should now have the binary
libraries ready for use.

Step 5; we go to C-land:

Get your old f77 code and f2c it using 'f2c -C++ mycode.f77'. This will produce a mycode.c C++ code if all
goes well. If you encounter any errors, please fix them and try to test compile your f2c-ed application by
trying to compile it as it is. For this you also need the normal libf2c.a or f2c.lib libraries. These are
easilly obtained too in step 4. Usually you would compile your code with a command like 'gcc -o mycode.x
mycode.c -lm -lf2c' under linux. Under Windows you would use commands like 'cl /TP /EHsc mycode.c' and 'link
mycode.obj f2c.lib libcmt.lib libcpmt.lib winmm.lib opengl32.lib glu32.lib glaux.lib odbc32.lib odbccp32.lib
kernel32.lib user32.lib gdi32.lib shell32.lib' for which probably only half of these stupid libs are needed.

Step 6; we are in BOINC-world:

Once you have passed step 5; you are 10 seconds away from having your BOINCyfied client. If you want a
graphically enabled BOINCyfied client, be sure to include and adapt this stub include file. Just relink your
code from step 5 with the Leiden Classical BOINCyfied f2c library compiled in step 4.

That's it... You now have a fully ported BOINC application ready to be used for you project...

Under linux this usually is easy enough. For Windows, you need probably need to fiddle with libraries to be
included. For that this example batch file might be a guide to you!

Return to Leiden Classical main page

Copyright © 2017 Leiden University - Leiden Institute of Chemistry - Theoretical Chemistry Department