python - Correct way to pass fortran OpenMP flags using numpy distutils? -
I am developing a Python package which uses the Fortran 90 code with OpenMP Directives and I can use the package Want to do Numpy.distutils The problem I am facing is that the compiler flags and OpenMP libraries are different for different FORTRAN compilers (for example - ForPenMP and GIFRAN and -Pampump for Gimp and -LimP-5 ifort).
I have found that when I know the compiler, then I can successfully pass in the compiler and add the flag. For example, if I'm sure the user has a cautious, then I can,
ext1 = numpy.distutils.core.Extension (name = 'rabacus_fc', source = f90_paths , Extra_f90_compile_args = ["First, I tried to force the compiler using an additional keyword argument in the extension to call F2py_options = ["--fcompiler = gnu95"]
This error message returns,
running running bdist_egg running egg_info Building_src build_src building extension "raba Cus_fc "source f2py option: ['--fcompiler = gnu95'] f2py: & gt; Anyone knows how to correctly pass the f2py options as opposed to the compiler option to create / Src.linux-x86_64-2.7 / rabacus_fcmodule.c unknown option. Next I tried to determine if a compiler knows which compiler are going to use f2py and numpy.distutils and Then use this information to set the appropriate flags. I have not found it anywhere and this is where I got stuck.
Comments
Post a Comment