M_process - read and write lines to or from a process from Fortran via a C wrapper
The M_process Fortran module ( A fortran-lang.org package ) reads and writes from processes by calling the C popen(3c) procedure.
NB. These procedures require a platform that supports POSIX routines and the popen(3c) procedure in particular.
Just download the github repository, enter the src/ directory and run make:
git clone https://github.com/urbanjost/M_process.git
cd M_process/src
# change Makefile if not using one of the listed compilers
# for gfortran
make clean
make F90=gfortran gfortran
# for ifort
make clean
make F90=ifort ifort
# for nvfortran
make clean
make F90=nvfortran nvfortran
# optionally
make test # run the unit tests (needs M_msg(3f) module)
make run --example "*" # run all the demo programs from the man-pages
make help # see other developer options
This will compile the M_process module and optionally build all the example programs from the document pages in the example/ sub-directory and run the unit tests.
(registered at the fpm(1) registry )
Alternatively, download the github repository and build it with fpm ( as described at Fortran Package Manager )
git clone https://github.com/urbanjost/M_process.git
cd M_process
fpm build
fpm test
or just list it as a dependency in your fpm.toml project file.
[dependencies]
M_process = { git = "https://github.com/urbanjost/M_process.git" }
The man-pages contain small sample programs that have been extracted and placed in the example/ directory.
There are currently several different ways to view the documentation ...
and there are man-pages in the distribution in
- manpage.tgz or
- manpage.zip
- CHANGELOG provides a history of significant changes
The Fortran Wiki fortranwiki.org contains information on other libraries and modules that provide access to processes and threads.