Tree [6cd4a1] master /

File Date Author Commit
 PyC++ 2009-11-18 David Car David Car [3e6387] Merge branch 'master' into exp/pyparsing
 PyF95++ 2011-07-03 Michael List Michael List [6cd4a1] Merge branch 'develop'
 blockit 2011-07-03 Michael List Michael List [6cd4a1] Merge branch 'develop'
 doc 2011-07-03 Michael List Michael List [6cd4a1] Merge branch 'develop'
 .gitignore 2011-07-03 Michael List Michael List [6cd4a1] Merge branch 'develop'
 CHANGELOG.html 2011-07-03 Michael List Michael List [6cd4a1] Merge branch 'develop'
 CREDITS 2009-12-05 Michael List Michael List [61916d] Merge branch 'master' into dev/pyf95++/foptparse
 Doxyfile 2010-07-11 David Car David Car [c221da] Merge branch 'hotfix-1.5.1' into develop
 LICENSE 2011-07-03 Michael List Michael List [732c7b] Merge branch 'master' of ssh://blockit.git.sour...
 Makefile 2011-07-03 Michael List Michael List [6cd4a1] Merge branch 'develop'
 README 2010-07-08 David Car David Car [966ff1] * Fixed merge conflicts from develop branch.
 VERSION 2011-07-03 Michael List Michael List [6cd4a1] Merge branch 'develop'
 gpl-2.0.txt 2011-07-03 Michael List Michael List [732c7b] Merge branch 'master' of ssh://blockit.git.sour...
 setup.cfg 2009-10-24 David Car David Car [00ba97] * Added more to README and setup.cfg. 2011-07-03 Michael List Michael List [732c7b] Merge branch 'master' of ssh://blockit.git.sour...

Read Me

David Car (
Michael List (

gnu make
Python > 2.5

To build the examples with PyF95++ you also need:

Fortran compiler: gfortran 4.3, ifort or pgfortran
The unit tests Makefile assumes gfortran.

* Version 1.5.0 - This version represents a significant departure from the
1.4.x series of the BlockIt/PyF95++ code base.  The 1.5.x series has dropped
the Library functionality in favor of caching parsed files using the
filesystem through a new CacheManager class.  To facilitate this change, all
blocks are now pickleable (serializable) directly.  Currently, the block
parsing process in multithreaded with plans to have all phases multithreaded.
There are two multithreaded implementations under the hood of PyF95++.  One
uses the threading module available in python 2.5 and higher.  The other uses
the multiprocessing module only available in python 2.6 and higher.  You are
strongly encouraged to upgrade to python 2.6 since the multiprocessing module
is the superior choice as it will facilitate the multithreading of all

* Version 1.4.3 - With this version, you will need to do a `make uninstall`
prior to installing this version.  There has been some small directory changes
and such.  Also, this will force the rebuild of the STL.lib.

The beginning of the documentation exists in the doc directory. It is a work
in progress at the moment.  You'll find a tex file in there and can build it
with pdfLaTeX or LaTeX.

NOTE: There's been problems with the PyF95++ install failing.  It's been
traced to the Makefile not properly setting the PYTHONPATH environment
variable prior to running PyF95++.  I haven't been able to track this down, 
but a certain fix is to set the environment variables in the secion
*Environmnet Variables* below BEFORE doing 'make install'. FYI.

To install the blockit package *only* you can simply do:

  python install

which uses the Python distutils package to install it.  The default
installation prefix location is in ~/slash which can be found in the setup.cfg
file.  If you would like a different location, then please set the 'prefix'
variable accordingly, i.e.


would install the blockit package in:


If you want to install the blockit package and the PyF95++ code, then do:

  make install

If you have a *PREVIOUS VERSION INSTALLED*, then do:

  make uninstall

before 'make install' to clean out any old templates and such.  Also,
sometimes files are renamed and this will clear out the old names. This will
install PyF95++ under the PREFIX variable found in the Makefile.  Currently,
this is set to ~/slash.  Then PyF95++ components will be installed under the
following directories:


If there is a problem building the STL.lib file, please setup the environment
variables listed in the section *Environment Variables* below.  I've had some
issues with the PYTHONPATH not being set correctly from the Makefile and it
failing.  I haven't been able to track this down yet.

*Environment Variables*
In order to use PyF95++ after the install, set the following environment


where the 2.x in python2.x above is your current Python version.  So if you have
Python 2.6 installed on your system, then:


Simply do:

make uninstall

BlockIt is a Python framework that allows you to quickly define what blocks
are within your code and parse your code into a b+-tree of blocks.  At face
value, this doesn't appear very useful, but with it you can build a fairly
sophisticated pre-processor that allows for some pretty creative software.  In
particular, it has allowed me to fairly easily build a templating
(i.e. generic programming) feature for the F90/95 language and from this
develop a standard template library.  The BlockIt module contains a few key
base classes to inherit from as well as some functions to parse and manipulate
a template string; create dependency graphs based on your blocks;
topologically sort those graphs.  The documentation of the framework is
currently in the works, but to get a feel for what you can do, please take a
look at the PyF95++ directory which contains PyF95++.  Also, the blockit
package contains the F95 package which is the module built on the BlockIt
module and shows how the blocks are defined for the F90/95 language with some
special block extensions, along with some key methods they should have.  The is the executable pre-processor which performs the templating.

*Example PyF95++ Build from the PyF95++/tests directory*
You can build the entire set of unit tests by typing the following:

make unit-tests

The Makefile assumes gfortran.  This will build a series of unit tests for the
Standard Template Library for Fortran.  If this works, you're in good shape.
If you frequently pull from the git repo, you can execute this make again and
it will be much faster the second time since it will use a cached version of
the file if the file has not changed.  This results in much faster builds.