Skip to content

jacobwilliams/fortran-json-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

A demonstration of interfacing Fortran and Python via JSON. This code is described in this blog post.

Building

The Fortran file should be built as a shared library so that it can be called from Python.

A FoBiS configuration file (python_json_interface.fobis) is also provided that can also build the shared library. Use the mode flag to indicate what to build. For example:

  • To build the shared library using gfortran: FoBiS.py build -f python_json_interface.fobis -mode shared-gnu
  • To build the shared library using ifort: FoBiS.py build -f python_json_interface.fobis -mode shared-intel

The full set of modes are: static-gnu, static-gnu-debug, static-intel, static-intel-debug, shared-gnu, shared-gnu-debug, shared-intel, shared-intel-debug, tests-gnu, tests-gnu-debug, tests-intel, tests-intel-debug

To generate the documentation using ford, run:

  FoBis.py rule --execute makedoc -f python_json_interface.fobis

About

Interfacing Fortran and Python via JSON

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors