These are chat archives for elemental/chat

30th
Nov 2016
Ryan H. Lewis
@rhl-
Nov 30 2016 00:03
recompiling in debug mode to see if the bug exists..
Ryan H. Lewis
@rhl-
Nov 30 2016 01:34
the bug is only appearing with -O3 in PPC
Jack Poulson
@poulson
Nov 30 2016 02:23
I'm just getting to read your messages: do you have an example of the directory structure with the new GMP version implementation?
the PPC bug is reminding me of Issue #200 where GCC was making a wrong assumption with -O3
err, Issue #181
perhaps it is time to start queueing up bug reports to GCC
Ryan H. Lewis
@rhl-
Nov 30 2016 02:30
yeah, also it seems that GCC has a test suite
where they test downstream packages
they test a few linear algebra libraries
perhaps they should test Elemental.
Jack Poulson
@poulson
Nov 30 2016 02:32
in the mean time, I suggest we disable the PPC build as a flake
Ryan H. Lewis
@rhl-
Nov 30 2016 02:33
I’m asking to excludearch ppc from the redhat build given the circumstances
Jack Poulson
@poulson
Nov 30 2016 02:33
yea
noticing that they want us to also build on (2x?) variants of ARM as well.
Jack Poulson
@poulson
Nov 30 2016 02:35
by the way, what is the file structure you were referring to that had the GMP macro defined in it?
Ryan H. Lewis
@rhl-
Nov 30 2016 02:35
gmp.h just contains #includes
Jack Poulson
@poulson
Nov 30 2016 02:35
and one of the includes had the macro definition?
Ryan H. Lewis
@rhl-
Nov 30 2016 02:35
the one for your architecture :)
Jack Poulson
@poulson
Nov 30 2016 02:35
ugh
Ryan H. Lewis
@rhl-
Nov 30 2016 02:35
thats why I used the pre-processor.
I suggest we do the thing I suggested for gcc/clang and then for all other architectures, don’t enforce the version requirement
and just print out a warning
until we can figure it out.
Jack Poulson
@poulson
Nov 30 2016 02:37

we could do something similar to

execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
"import numpy as n; print(n.__version__); print(n.get_include());"
RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS
OUTPUT_VARIABLE _NUMPY_VALUES_OUTPUT
ERROR_VARIABLE _NUMPY_ERROR_VALUE
OUTPUT_STRIP_TRAILING_WHITESPACE)

and execute a program to print the version numbers

Ryan H. Lewis
@rhl-
Nov 30 2016 02:37
yeah, that would require python though.
Jack Poulson
@poulson
Nov 30 2016 02:37
this is compiler independent
it doesn't need to involve python
that was just an example
Ryan H. Lewis
@rhl-
Nov 30 2016 02:37
well, sure, but, how would we do it.
oh, I have an idea.
find ${PATH} -name “gmp*.h” | grep VERSION
[rhl@40fd0da24cd9 SRPMS]$ find /usr/include/ -name "gmp*h"
/usr/include/gmp.h
/usr/include/gmp-x86_64.h
/usr/include/gmp-mparam.h
/usr/include/gmpxx.h
/usr/include/gmp-mparam-x86_64.h
[rhl@40fd0da24cd9 SRPMS]$ find /usr/include/ -name "gmp*h" | xargs grep VERSION
/usr/include/gmp-x86_64.h:#ifdef __SCO_VERSION__
/usr/include/gmp-x86_64.h:#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \
/usr/include/gmp-x86_64.h:#define __GNU_MP_VERSION            6
/usr/include/gmp-x86_64.h:#define __GNU_MP_VERSION_MINOR      1
/usr/include/gmp-x86_64.h:#define __GNU_MP_VERSION_PATCHLEVEL 1
/usr/include/gmp-x86_64.h:#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL)
infact here you go:
find /usr/include/ -name "gmp*h" | xargs grep VERSION | cut -d: -f2 | grep "#define __GNU_MP_VERSION"
Jack Poulson
@poulson
Nov 30 2016 02:41
is it the same version in every subdirectory?
Ryan H. Lewis
@rhl-
Nov 30 2016 02:41
no only one file exists
wait what do you mean
Jack Poulson
@poulson
Nov 30 2016 02:41
ah, it's just one subfolder
it bothers me that it isn't a subfolder
so we would need to read the appropriate filename from gmp.h
or deduce it from the architecture
Ryan H. Lewis
@rhl-
Nov 30 2016 02:42
why not use the exact command that I just gave you?
Jack Poulson
@poulson
Nov 30 2016 02:43
because it isn't always installed in /usr/include?
magic..
but you could parameterize it..
find $PATH -name "gmp*h" | xargs grep VERSION
Jack Poulson
@poulson
Nov 30 2016 02:43
gmp*h also seems...fuzzy
Ryan H. Lewis
@rhl-
Nov 30 2016 02:44
ok, just do
gmp-*.h
or
better yet
Jack Poulson
@poulson
Nov 30 2016 02:45
I vote for following the logic similar to how -std=c++11-like flags are handled for your -dm -E suggestion
ugh, I forgot about MSVC
Ryan H. Lewis
@rhl-
Nov 30 2016 02:47
im honestly not sure how on microsoft any of this stuff would work
Jack Poulson
@poulson
Nov 30 2016 02:47
which stuff? I have built Elemental on windows before
Ryan H. Lewis
@rhl-
Nov 30 2016 02:47
like any of these grep commands or whatever
you need cmake variants of all of the commands
Jack Poulson
@poulson
Nov 30 2016 02:48
yes, that is why I try to avoid shell commands in CMake
perhaps we could just hardcode the small list of filenames different from gmp.h, such as gmp-x86-64.h
and search for each of them
the list can't be that big
Ryan H. Lewis
@rhl-
Nov 30 2016 02:49
infact:
[rhl@40fd0da24cd9 SRPMS]$ grep gmp- /usr/include/gmp.h | grep include
#include "gmp-arm.h"
#include "gmp-i386.h"
#include "gmp-ia64.h"
#include "gmp-ppc64.h"
#include "gmp-ppc64le.h"
#include "gmp-ppc.h"
#include "gmp-ppcle.h"
#include "gmp-s390x.h"
#include "gmp-s390.h"
#include "gmp-x86_64.h"
#include "gmp-alpha.h"
#include "gmp-sh.h"
#include "gmp-sparc64.h"
#include "gmp-sparc.h"
#include "gmp-aarch64.h"
#include "gmp-mips64el.h"
#include "gmp-mips64.h"
#include "gmp-mipsel.h"
#include "gmp-mips.h”
Jack Poulson
@poulson
Nov 30 2016 02:49
perfect
so we just loop over the list until one exists and then look for the version number
Ryan H. Lewis
@rhl-
Nov 30 2016 02:50
not sure what gitter is thinking with the formatting
you should be able to easily ask cmake to do this for you
Jack Poulson
@poulson
Nov 30 2016 02:50
you want "" followed by a newline, followed by your verbatim code, followed by newline, followed by ""
ugh
triple backticks in the quotes
Ryan H. Lewis
@rhl-
Nov 30 2016 02:51
there we go
Jack Poulson
@poulson
Nov 30 2016 02:51
that list may grow over time, but I doubt it would change any time soon
Ryan H. Lewis
@rhl-
Nov 30 2016 02:52
well
you dont need to hardcode it
give me a second..
Jack Poulson
@poulson
Nov 30 2016 02:53
/gmp-[\w*].h/?
yeah, that looks good.
Jack Poulson
@poulson
Nov 30 2016 02:53
actually, gmp-[\w*_?\w*].h
because of the x86_64 counter-example
Ryan H. Lewis
@rhl-
Nov 30 2016 02:54
file( STRINGS “gmp.h" GMP_INCLUDE_LINES “gmp-[\w*_?\w*].h")
Jack Poulson
@poulson
Nov 30 2016 02:54
assuming the escaping is correct
Ryan H. Lewis
@rhl-
Nov 30 2016 02:54
its probably not
and then you need to iterate over the result of that
Jack Poulson
@poulson
Nov 30 2016 02:55
yea
Ryan H. Lewis
@rhl-
Nov 30 2016 02:55
or something
then you need to string out the parts of that that are not what you need.
Ryan H. Lewis
@rhl-
Nov 30 2016 03:02
i guess they cancel builds on Koji once one fails.
Ryan H. Lewis
@rhl-
Nov 30 2016 04:26
@poulson gmp builds on OSX are differnet
the homebrew gmp doesn't have multiple architectures
Ryan H. Lewis
@rhl-
Nov 30 2016 04:35
you know one nice way of doing this would be with: https://cmake.org/cmake/help/v3.0/command/try_compile.html
use GMP, and then also print out the value of those version strings
Jack Poulson
@poulson
Nov 30 2016 04:35
I almost have something working
Ryan H. Lewis
@rhl-
Nov 30 2016 04:35
oh, sweet.
Jack Poulson
@poulson
Nov 30 2016 04:36
the gotcha was that file(GLOB ...) has very different semantics than file(GLOB_RECURSE ...)
despite the documentation not saying so
Ryan H. Lewis
@rhl-
Nov 30 2016 04:36
I was trying something here, but, it didn't work and I needed to make dinner.
Jack Poulson
@poulson
Nov 30 2016 04:36
if you give a RELATIVE argument followed by something like gmp.h this is occay for GLOB_RECURSE but not okay for GLOB
you have to give the pattern including the full path up to gmp.h
Ryan H. Lewis
@rhl-
Nov 30 2016 04:37
ah
Jack Poulson
@poulson
Nov 30 2016 04:37
one of the many joys of writing CMake
Ryan H. Lewis
@rhl-
Nov 30 2016 04:44
yeah
not fun
Jack Poulson
@poulson
Nov 30 2016 04:51
committed
it definitely works in the original case (and I fixed a bug in adding the include directories when the GMP version check failed)
Ryan H. Lewis
@rhl-
Nov 30 2016 05:04
does the new version still check for the strings in the file gmp.h as well?
Jack Poulson
@poulson
Nov 30 2016 05:04
yes
Ryan H. Lewis
@rhl-
Nov 30 2016 05:04
ok, perfect
Ryan H. Lewis
@rhl-
Nov 30 2016 16:02
Elemental builds and runs green on ARM aarch64 and armvhl7
Jack Poulson
@poulson
Nov 30 2016 16:09
+1
Jack Poulson
@poulson
Nov 30 2016 16:22
since there have been a few bug fixes, it might be time to push out 0.87.6
the number is getting high, but the large number of bug fixes is a good thing
(at least, relative to the bugs still existing)
most of them were fixed due to people kicking the tires
Ryan H. Lewis
@rhl-
Nov 30 2016 16:34
Maybe we should be incrementing a different version. I would cleanup the history a bit
We don't need 6 0.87 releases
Jack Poulson
@poulson
Nov 30 2016 16:35
they are just bug fixes
I don't like incrementing the version number without functionality improvements
Ryan H. Lewis
@rhl-
Nov 30 2016 16:35
No I mean
0.87.1.1 or something
Usually what you're are doing is called a release candidate
Jack Poulson
@poulson
Nov 30 2016 16:37
yes, I am aware of the RC terminology
Ryan H. Lewis
@rhl-
Nov 30 2016 16:37
We don't need the history of the old RCs
Jack Poulson
@poulson
Nov 30 2016 16:37
what problem does it cause?
it is nice to not hide such history
Ryan H. Lewis
@rhl-
Nov 30 2016 16:37
I think it just looks crufty
Jack Poulson
@poulson
Nov 30 2016 16:38
it is reality
I would agree if it was a product
Ryan H. Lewis
@rhl-
Nov 30 2016 16:38
Fair
Jack Poulson
@poulson
Nov 30 2016 16:38
but we're not trying to sell anything
Ryan H. Lewis
@rhl-
Nov 30 2016 16:38
I mean whatever works
Jack Poulson
@poulson
Nov 30 2016 16:38
and it might be useful for younger projects to see how messy such processes can be
(earlier on I tried to trojan horse bug fixes into bigger commits to avoid showing such edges)
Ryan H. Lewis
@rhl-
Nov 30 2016 16:39
Fair
Jack Poulson
@poulson
Nov 30 2016 16:40
Also, me being more OCD seems to easily lead to a year without any releases :-)
but I agree that after people start trusting us with RC's again that we should do so again
I was worried about two RC's in a row with no delivery
no one spends the time to kick the tires
Ryan H. Lewis
@rhl-
Nov 30 2016 16:49
It's nice to have users
Jack Poulson
@poulson
Nov 30 2016 16:53
yes, and I think finishing the tour/quickstart will help drive that
Ryan H. Lewis
@rhl-
Nov 30 2016 17:36
indeed
Ryan H. Lewis
@rhl-
Nov 30 2016 21:32
I started an appveyor.yml branch
For MSFT builds. Looks like you've done this before.