[Numpy-discussion] parallel compilation with numpy.distutils in numpy 1.10

Julian Taylor jtaylor.debian at googlemail.com
Fri Oct 10 15:55:29 EDT 2014

On 10.10.2014 21:09, Sturla Molden wrote:
> Julian Taylor <jtaylor.debian at 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.

thanks for the explanation.
Modules are only available with f90 right? f77 files do not have these
generated interdependencies?
being able to handle f77 would already be quite good, as it should at
least cover current scipy.
One can look at a smarter scheme for f90 later.

More information about the NumPy-Discussion mailing list