computational science and engineering

Archive for the ‘Fortran’ Category

Parsing INI configuration files with FORTRAN

Tuesday, August 23rd, 2011 Posted in Fortran, Software development | 2 Comments »

Fortran would not be my first choice for working with text, in any form! However, sometimes even numerical codes need to read data from configuration files. The easiest way to read a configuration file from a Fortran 90 routine is ...

A self-contained Fortran linear equation solver

Wednesday, March 16th, 2011 Posted in Fortran, Python, Scientific computing, Software development | No Comments »

I've just released a self-contained Fortran module that solves a system of linear equations using the LU decomposition. Download the Fortran linear solver from github This module is based on code that was implemented and released on the Web by Jean-Pierre Moreau.  ...

Finding a value in an unordered Fortran array

Friday, March 11th, 2011 Posted in Fortran, Scientific computing, Software development | 2 Comments »

I have been optimizing some Fortran code that involved searching for an integer value in an unordered array (we know the value occurs only once).  Since there is no intrinsic procedure to accomplish this, I thought I'd try a couple ...

Building and linking to a shared Fortran library

Monday, October 26th, 2009 Posted in Fortran, Linux, Scientific computing | 1 Comment »

I'm using GNU Fortran (gfortran) to build several shared libraries, and then dynamically linking to them from a Fortran program.  The process is a little different than what I'm used to for C libraries, so I thought I'd explain it.  ...

f2py: binding Fortran and Python

Wednesday, September 23rd, 2009 Posted in Fortran, Python, Software development | No Comments »

I  have recently started using f2py to call Fortran from Python.  I have found this useful for two reasons: speeding up Python scripts by calling compiled Fortran code, and using Python as a unit testing framework for Fortran modules.   Unfortunately, ...