8000 adding new fortran compiler (Trac #1043) · Issue #1641 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

adding new fortran compiler (Trac #1043) #1641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thouis opened this issue Oct 19, 2012 · 10 comments
Closed

adding new fortran compiler (Trac #1043) #1641

thouis opened this issue Oct 19, 2012 · 10 comments

Comments

@thouis
Copy link
Contributor
thouis commented Oct 19, 2012

Original ticket http://projects.scipy.org/numpy/ticket/1043 on 2009-03-09 by trac user avi, assigned to unknown.

Hi,

I have added a new compiler -- pathscale -- and added it to numpy/distutils/fcompiler and edited init.py to add it to the list.

However when I run
% python setup.py config_fc

I get the pathscale compiler recognized but then the setup bypasses and continues and subsequently picks the gfortran, which I don't want.

When I added some verbosity to the above, I noticed this difference between pathscale and gfortran

% python setup.py -v config_fc

Running os.system('( /opt/pathscale/ice9_native_3.2n_B_sicortex/bin/pathf95 -v ; echo $? > /tmp/tmpoXv0XE/VCZd1T ) > /tmp/tmpoXv0XE/yNOdmp 2>&1')
_update_environment(...)
customize PGroupFCompiler
:

with gfortran..

Running os.system('( /.root0/usr/bin/gfortran --version ; echo $? > /tmp/tmpoXv0XE/xX3wVg ) > /tmp/tmpoXv0XE/tQhxpb 2>&1')
_update_environment(...)
exec_command(['/.root0/usr/bin/gfortran', '-Wall', '-ffixed-form', '-fno-second-underscore', '-fPIC', '-O3', '-funroll-loops', '-print-libgcc-file-name'],)
Retaining cwd: /.root0/net/home/avi/builds/numpy-1.2.1
_preserve_environment([])

So it seems to me that it is finding the pathscale compiler but skipping the exec_command.

Any help in resolving this appreciated. I am attaching the log file for the above script run and the pathscale.py files.

Other tidbits on system and os..

(sc1-m3n6:~/builds/scipy-0.7.0) avi% uname -a
Linux sc1-m3n6.scsystem 2.6.18.8-sc-lustre-perfmon #1 SMP Thu Sep 25 13:19:45 EDT 2008 mips64 SiCortex ICE9B V1.0 FPU V0.1 SiCortex SC-1000 GNU/Linux

(sc1-m3n6:~/builds/scipy-0.7.0) avi% python -c 'import os,sys;print os.name,sys.platform'
posix linux2

Thank You

Avi

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

Attachment added by trac user avi on 2009-03-09: fortran_compilers_setup

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

Attachment added by trac user avi on 2009-03-09: pathscale2.py

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

@cournape wrote on 2009-03-09

You should specify the compiler you want:

python setup.py build --fcompiler=pathscale

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

Attachment added by trac user rperez on 2009-07-11: init.py

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

trac user avi wrote on 2009-03-09

Replying to [comment:1 cdavid]:

You should specify the compiler you want:

{{{
python setup.py build --fcompiler=pathscale
}}}

I already tried it. Adding --fcompiler=pathscale did not make any difference .. here is a small snippet:

(sc1-m3n6:~/builds/numpy-1.2.1) avi% python setup.py config_fc --fcompiler=pathscale

:
:
customize LaheyFCompiler
Could not locate executable lf95
customize PathScaleFCompiler
Found executable /opt/pathscale/ice9_native_3.2n_B_sicortex/bin/pathf95
customize PGroupFCompiler
Could not locate executable pgf90
Could not locate executable pgf77
customize AbsoftFCompiler
Could not locate executable f90
customize NAGFCompiler
Could not locate executable f95
customize VastFCompiler
customize GnuFCompiler
customize CompaqFCompiler
Could not locate executable fort
customize IntelItaniumFCompiler
Could not locate executable efort
Could not locate executable efc
customize IntelEM64TFCompiler
customize Gnu95FCompiler
Found executable /.root0/usr/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using config
compiling '_configtest.c':

:
:

If I can make the execution made by pathscale then the build process would work. In the current state it is bypassing pathscale and going straight to gfortran.

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

Attachment added by trac user rperez on 2009-07-11: pathf95.py

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

Attachment added by trac user rperez on 2009-07-11: ccompiler.py

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

Attachment added by trac user rperez on 2009-07-11: pathccompiler.py

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

trac user rperez wrote on 2009-07-11

Avi, your pathscale configuration fails as the version pattern is wrongly configured returning None as the compiler version.

The version_pattern should read:

version_pattern =  r'PathScale\(TM\) Compiler Suite: Version (?P<version>[\d.]+)'

Attached are the files I used to build and install numpy with the PathScale compilers on my SiCortex machine. Replacing the init.py file and adding the pathf95.py file into the numpy/distutils/fcompiler folder enable functionality for the PathScale Fortran compilers. Replacing the ccompiler.py and adding the pathccompiler.py into the numpy/distutils/ enable functionality for the PathScale C/C++ compilers.

To build and install numpy with the pathscale compilers I used:

python setup.py build -v --compiler=pathcc --fcompiler=pathf95
python setup.py install

After installation f2py also recognized the pathf95 compiler.

Good Luck

RP

@thouis
Copy link
Contributor Author
thouis commented Oct 19, 2012

@rgommers wrote on 2010-12-12

Thanks, applied in 8d0b5817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0