Julian Taylor <jtaylor.deb...@googlemail.com> wrote:

> There is still one problem in regards to parallelizing fortran 90. The
> ccompiler.py contains following comment:
>     # build any sources in same order as they were originally specified
>     #   especially important for fortran .f90 files using modules
> 
> This indicates the f90 builds cannot be trivially parallelized. I do not
> know much fortran, can someone explain to me when ordering of single
> file compiles is an issue in f90?


Sure :)

When a Fortran module is compiled, the compiler emits an object file (.o)
and a module file (.mod). The module file plays the role of a header file
in C. So when another Fortran file imports the module with a use statement,
the compiler looks for the module file. Because the .mod file is generated
by the compiler, unlike the .h file in C, the ordering of compilation is
more critical in Fortran 90 than in C. If B.f90 has a "use A" statement,
then A.f90 must be compiled before B.f90. CMake has an intelligent system
for working out the correct order of compilation of Fortran 90 files.


Sturla

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to