Re: [f2py] Compiling/linking the Fortran source files manually
Ben Forbes <[email protected]> Tue, 26 Apr 2011 18:33:13 +1000
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
Okay I had copied intel.py in the same directory, so it was loading it twice. I changed 'linker_so' : ['<F90>', "-shared"], to 'linker_so' : ['<F90>', "/dll"], but it's still putting it in the wrong place: C:\Program Files (x86)\Intel\Compiler\11.1\067\bin\intel64\ifort.exe /dll /dll foomodule.o fortranobject.o helloworld.o -LC:\Python27\libs -LC:\Python27\PCbuild\amd64 -lpython27 /OUT:.\foo.pyd The /dll flag needs to be after /link, right at the end. Is this a flaw with distutils? On Tue, Apr 26, 2011 at 6:26 PM, Ben Forbes <[email protected]> wrote: > I'm attempting to implement that, but there's suddenly another problem: > > C:\Users\bdforbes\pyfor\simple_f2py>f2py -c -m foo helloworld.f90 > --fcompiler=intelvem > Forcing DISTUTILS_USE_SDK=1 > Traceback (most recent call last): > File "C:\Python27\Scripts\f2py-script.py", line 24, in <module> > main() > File "C:\Python27\lib\site-packages\numpy\f2py\f2py2e.py", line 561, in main > run_compile() > File "C:\Python27\lib\site-packages\numpy\f2py\f2py2e.py", line 447, > in run_compile > fcompiler.load_all_fcompiler_classes() > File "C:\Python27\lib\site-packages\numpy\distutils\fcompiler\__init__.py", > line 736, in load_all_fco > mpiler_classes > fcompiler_aliases[alias][1].__name__)) > ValueError: alias 'ifort' defined for both IntelFCompiler and IntelFCompiler > > I can't remember what changed to make this happen. > > > On Tue, Apr 26, 2011 at 5:58 PM, Pearu Peterson > <[email protected]> wrote: >> >> >> On 04/26/2011 10:49 AM, Ben Forbes wrote: >>> Modifying PATH makes it find the 64-bit compiler now. However, I'm >>> still getting the same issues with the compiler and linker flags: >>> >>> ifort: command line warning #10006: ignoring unknown option '/shared' >>> ifort: command line warning #10006: ignoring unknown option '/shared' >>> ifort: command line warning #10006: ignoring unknown option '/LC:\Python27\libs' >>> ifort: command line warning #10006: ignoring unknown option >>> '/LC:\Python27\PCbuild\amd64' >>> ifort: command line warning #10006: ignoring unknown option '/lpython27' >>> ifort: command line warning #10006: ignoring unknown option '/OU' >>> ifort: command line warning #10006: ignoring unknown option '/OT' >>> ifort: command line warning #10155: ignoring option '/optimize'; >>> argument required >>> ifort: command line warning #10006: ignoring unknown option '/O.' >>> ifort: command line warning #10006: ignoring unknown option '/O\' >>> ifort: command line warning #10006: ignoring unknown option '/Of' >>> ifort: command line warning #10006: ignoring unknown option '/Oo' >>> ifort: command line warning #10006: ignoring unknown option '/Oo' >>> ifort: command line warning #10006: ignoring unknown option '/O.' >>> ifort: command line remark #10010: option '/Op' is deprecated and will >>> be removed in a future release. >>> See '/help deprecated' >>> ifort: command line warning #10148: option '-Oy' not supported >> >> They are all warnings and therefore can be ignored... except >> that '/shared' and '/lpython27' options should be fixed. >> Consult the compiler help to find out how to properly >> specify these options and modify intel.py accordingly. >> >> HTH, >> Pearu >> >> _______________________________________________ >> f2py-users mailing list >> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] >> http://cens.ioc.ee/mailman/listinfo/f2py-users >> > > > > -- > Benjamin D. Forbes > School of Physics > The University of Melbourne > Parkville, VIC 3010, Australia > -- Benjamin D. Forbes School of Physics The University of Melbourne Parkville, VIC 3010, Australia