8000 ENH: Make numpy.distutils.system_info.get_info("blas_opt") print less by nouiz · Pull Request #4081 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

ENH: Make numpy.distutils.system_info.get_info("blas_opt") print less #4081

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
wants to merge 3 commits into from

Conversation

nouiz
Copy link
Contributor
@nouiz nouiz commented Nov 27, 2013

stuff on the stdout.

@rgommers
Copy link
Member

With numpy master the stdout output is:

ATLAS version 3.10.1 built by buildd on Sat Jul 27 19:07:24 UTC 2013:
   UNAME    : Linux aatxe 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:10 UTC 2013 i686 i686 i686 GNU/Linux
   INSTFLG  : -1 0 -a 1 -l 1
   ARCHDEFS : -DATL_OS_Linux -DATL_ARCH_x86x87 -DATL_CPUMHZ=1596 -DATL_GAS_x8632
   F2CDEFS  : -DAdd_ -DF77_INTEGER=int -DStringSunStyle
   CACHEEDGE: 65536
   F77      : /usr/bin/gfortran-4.8, version GNU Fortran (Ubuntu/Linaro 4.8.1-8ubuntu1) 4.8.1
   F77FLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -fPIC -m32
   SMC      : /usr/bin/gcc-4.8, version gcc-4.8 (Ubuntu/Linaro 4.8.1-8ubuntu1) 4.8.1
   SMCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -fPIC -m32
   SKC      : /usr/bin/gcc-4.8, version gcc-4.8 (Ubuntu/Linaro 4.8.1-8ubuntu1) 4.8.1
   SKCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -fPIC -m32

And with this patch there's no output to stdout. This should be fine I think, assuming
that what's removed from stdout is still being returned. That doesn't seem to
be the case however:

In [12]: s.get_info("blas_opt")
Out[12]: 
{'define_macros': [('ATLAS_INFO', '"\\"3.10.1\\""')],
 'include_dirs': ['/usr/include/atlas'],
 'language': 'c',
 'libraries': ['f77blas', 'cblas', 'atlas'],
 'library_dirs': ['/usr/lib/atlas-base']}

@nouiz
Copy link
Contributor Author
nouiz commented Dec 13, 2013

I don't understand your objection.

You want all the info that was on stdout be available from
s.get_info("blas_opt")?

This is still printed during compilation. Should we just add new keys in
the dict with UNAME, INSTFLG, ...?

On Thu, Dec 12, 2013 at 2:47 PM, Ralf Gommers notifications@github.comwrote:

With numpy master the stdout output is:

ATLAS version 3.10.1 built by buildd on Sat Jul 27 19:07:24 UTC 2013:
UNAME : Linux aatxe 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:10 UTC 2013 i686 i686 i686 GNU/Linux
INSTFLG : -1 0 -a 1 -l 1
ARCHDEFS : -DATL_OS_Linux -DATL_ARCH_x86x87 -DATL_CPUMHZ=1596 -DATL_GAS_x8632
F2CDEFS : -DAdd_ -DF77_INTEGER=int -DStringSunStyle
CACHEEDGE: 65536
F77 : /usr/bin/gfortran-4.8, version GNU Fortran (Ubuntu/Linaro 4.8.1-8ubuntu1) 4.8.1
F77FLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -fPIC -m32
SMC : /usr/bin/gcc-4.8, version gcc-4.8 (Ubuntu/Linaro 4.8.1-8ubuntu1) 4.8.1
SMCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -fPIC -m32
SKC : /usr/bin/gcc-4.8, version gcc-4.8 (Ubuntu/Linaro 4.8.1-8ubuntu1) 4.8.1
SKCFLAGS : -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -fPIC -m32

And with this patch there's no output to stdout. This should be fine I
think, assuming
that what's removed from stdout is still being returned. That doesn't seem
to
be the case however:

In [12]: s.get_info("blas_opt")
Out[12]:
{'define_macros': [('ATLAS_INFO', '""3.10.1""')],
'include_dirs': ['/usr/include/atlas'],
'language': 'c',
'libraries': ['f77blas', 'cblas', 'atlas'],
'library_dirs': ['/usr/lib/atlas-base']}


Reply to this email directly or view it on GitHubhttps://github.com//pull/4081#issuecomment-30455129
.

@rgommers
Copy link
Member

Yes, adding those keys to the returned dict would make sense to me.

@nouiz
Copy link
Contributor Author
nouiz commented Dec 19, 2013

I see. I won't have the time to work on this before January. So if nobody
do this, it is going to wait.

When is planned the next release of NumPy? To make sure it is finished by
that time.

On Fri, Dec 13, 2013 at 5:19 PM, Ralf Gommers notifications@github.comwrote:

Yes, adding those keys to the returned dict would make sense to me.


Reply to this email directly or view it on GitHubhttps://github.com//pull/4081#issuecomment-30548410
.

@charris
Copy link
Member
charris commented Dec 19, 2013

I'm thinking a release 6 months after 1.8, or about the beginning of May, with the branch made at the beginning of April.

abergeron and others added 2 commits February 26, 2014 13:13
@nouiz
Copy link
Contributor Author
nouiz commented Feb 26, 2014

@abergeron introduced a verbosity parameter to allow printing or not of this information.

What about this? It is more robust then capturing/parsing the output on many OS.

@charris
Copy link
Member
charris commented Feb 27, 2014

@nouiz This should be raised on the list. The new parameter also needs to be documented somewhere.

8000
@abergeron
Copy link
Contributor

Should the documentation go in doc/DISTUTILS.rst.txt?

@charris
Copy link
Member
charris commented Feb 27, 2014

Probably that too ;) I was thinking it should go into the function docstring somewhere. But maybe those functions aren't documented? There should also probably be a mention in the doc/release/1.9.0-notes.rst. Were you folks hoping to see this in 1.8.1? If so, it's new, not a bug fix. 1.9 should be out in a couple of months.

@nouiz
Copy link
Contributor Author
nouiz commented Feb 27, 2014

I was hoping it could go in 1.8.1, as I see it as a "regression fix". I see
it that way, as this is caused by a previous change introduced in 1.8 that
changed the internal of numpy that we used. Now we are forced to use the
public api that is verbose.

But I won't argue about this if 1.9 go out "shortly". Just tell us so that
we know it. Also, you told you would do a 1.8.1rc, so if you accept it in
1.8, it would be tested.

@abergeron I let you contact the numpy mailing list. I started a thread on
this "Silencing NumPy output".

On Wed, Feb 26, 2014 at 10:16 PM, Charles Harris
notifications@github.comwrote:

Probably that too ;) I was thinking it should go into the function
docstring somewhere. But maybe those functions aren't documented? There
should also probably be a mention in the doc/release/1.9.0-notes.rst. Were
you folks hoping to see this in 1.8.1? If so, it's new, not a bug fix. 1.9
should be out in a couple of months.

Reply to this email directly or view it on GitHubhttps://github.com//pull/4081#issuecomment-36206132
.

@rgommers
Copy link
Member

@abergeron the documentation should go into doc/source/reference/distutils.rst.

@charris
Copy link
Member
charris commented Mar 18, 2014

Looking at #4387 instead, so closing this.

@charris charris closed this Mar 18, 2014
@nouiz nouiz deleted the get_info branch March 18, 2014 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0