Personal Data

Curriculum Vitae



Programming Hints

Photo Gallery

Download Area

"Bernhard Seiwald: Programming Hints" Programming Hints

Programming Hints

  • Calling C routines from Fortran90/95

The sample shows how to use the nice command and the rename command. The sources and a short documentation can be found in CALL_C_FROM_F90.tar.gz

  • Using the NAG Fortran - lib for Linux 2.0.x with gcc 2.7.x:

The NAG Fortran-library is very usefull for numerical mathematics.

Here you find two examples for including NAG-routines in your C-program. I did it with fllux17d9 and NAGWare_f90-Compiler. The lib libnag.a is located in /usr/local/lib.

You may compile the code with the C-compiler. For linking the program, NAGWare_f90 is required.

If you want to use a routine from the lib, e.g abc123(), you have to call it in the following way in your C-program: abc123_(). The underscore is necessary. You have to take care of the length of the types of variables (e.g. DOUBLE PRECISSION <--> double). On calling a NAG-routine you have to use pointers in C! For using the variables (common-blocks) you have to take a look at the man-pages of the routines!

The first example generates random-numbers.
Click here g05dcf.tar.gz or here g05dcf.c to get the code.

The second example uses the Adams-method for integrating a system of first order ordinary differential equations.
Click here d02cbf.tar.gz or here d02cbf.c to get the code.

(german only)

The aim of this package is starting Matlab on a host computer from your program and using it as a calculator. Therefore it is possible to use computers somewhere in the net to do calculations which need a big amount of computational time.

  • Clustering of UNIX-Systems / Parallel computing

The current cluster contains five PCs (1xPentium 200MHz and 4xPentium II 266MHz). All computers are running under Linux (Red-Hat 5.x) . For parallel computing we use MPI (Message Passing Interface).

http://www.bernhardseiwald.com/ --- seiwald ( ) 2013-01-28 15:57:03