You have two basic options for binding. First to use f2py
, the other to use interoperability with C in your Fortran and bind using Cython
. Tutorial for f2py
is here. It is not at all difficult, there are some directives for f2py to place to your Fortran code, but often they are not needed.
For parallelization, the first approach to use is probably OpenMP, if parallelization on a single machine is enough for you. It uses threads and is easy to use for loops with embarrassing parallelism. Just make sure you do not write to any global variables in the threads and if yes, use synchronization directives for that.