These are chat archives for elemental/chat

1st
Aug 2016
Ryan H. Lewis
@rhl-
Aug 01 2016 00:42
@poulson it is supposed to append the suffix to the end of executables (as perhaps the name suggests) and it does not. On the other hand I can append to the end of shared objects. I need this for packaging..
Ryan H. Lewis
@rhl-
Aug 01 2016 01:39
it looks like CMake might overwrite the variable for some reason.. I need to make all the executables have _openmpi and or _mpich
Jack Poulson
@poulson
Aug 01 2016 02:32
I don't see anything in El setting that variable.
What is it set to in your cache?
Ryan H. Lewis
@rhl-
Aug 01 2016 02:57
@poulson hm? right, I am trying to set the variable to achieve the affect of renaming all the executables
Jack Poulson
@poulson
Aug 01 2016 02:58
nothing in Elemental directly modified that variable; what is it set to in CMakeCache.txt?
(after you tried to manually set it)
Ryan H. Lewis
@rhl-
Aug 01 2016 02:58
no I know that. its set to what I want it to be, but somehow it doesnt work
not sure what to do about it.
Jack Poulson
@poulson
Aug 01 2016 03:00
did you set it in the initial CMake command or a later one?
CMake can be finicky about not responding to variable changes
Ryan H. Lewis
@rhl-
Aug 01 2016 03:00
yeah, I'm running this: cmake -DCMAKE_BUILD_TYPE=RELEASE -DRELEASE_POSTFIX=_mpich -DCMAKE_RELEASE_POSTFIX=_mpich -DCMAKE_EXECUTABLE_SUFFIX=_mpich -DEL_TESTS=ON -DEL_EXAMPLES=ON -DINSTALL_PYTHON_PACKAGE=ON -DINSTALL_PYTHON_INTO_USER_SITE=ON -DGFORTRAN_LIB=/usr/lib/gcc/x86_64-redhat-linux/6.1.1/libgfortran.so -DEL_DISABLE_SCALAPACK=ON -DEL_DISABLE_PARMETIS=ON ..
Jack Poulson
@poulson
Aug 01 2016 03:04
ah, I know the issue
I will submit a fix real quick
Ryan H. Lewis
@rhl-
Aug 01 2016 03:04
awesome.
while your at it, can you make the following other modifications
add install targets so that I can automate this:
sh-4.3$ cd rpmbuild/BUILDROOT/elemental-0.86-1.fc24.x86_64/usr/share/doc/
AUTHORS LICENSE PUBLICATIONS.bib
sh-4.3$ cd rpmbuild/BUILDROOT/elemental-0.86-1.fc24.x86_64/usr/share/elemental/
CMake/ conf/ sandbox/
uh, shoot, I messed up
/usr/share/doc/elemental/AUTHORS for example
it should be
Ryan H. Lewis
@rhl-
Aug 01 2016 03:11

I think this is the install target:

install( DIRECTORY ${CMAKE_SOURCE_DIR}
DESTINATION share/doc/elemental
FILES_MATCHING PATTERN "AUTHOS|LICENSE|PUBLICATIONS.bib"
PATTERN "CMakeLists.txt"
PATTERN "CMakeFiles" EXCLUDE)

But I could have slightly messed it up
Jack Poulson
@poulson
Aug 01 2016 03:12
CMakeFiles is not in the CMAKE_SOURCE_DIR
Ryan H. Lewis
@rhl-
Aug 01 2016 03:13
Oh, those patterns at the end are not necessary. apologies.
install( DIRECTORY ${CMAKE_SOURCE_DIR}
DESTINATION share/doc/elemental
FILES_MATCHING PATTERN "AUTHOS|LICENSE|PUBLICATIONS.bib")
i'm not sure the | is right
Jack Poulson
@poulson
Aug 01 2016 03:13
it might make more sense to just manually specify each of those files
Ryan H. Lewis
@rhl-
Aug 01 2016 03:14
uh, yeah, ,you can call them out specifically for sure
Jack Poulson
@poulson
Aug 01 2016 03:14
I can add that
Ryan H. Lewis
@rhl-
Aug 01 2016 03:14
I think its: install(TARGETS AUTHORS LICENSE PUBLICATIONS.bib DESTINATION share/doc/elemental)
and then the other stuff should go to share/elemental
that is: CMake/ conf/ sandbox/
Jack Poulson
@poulson
Aug 01 2016 03:16
install(FILES "${PROJECT_SOURCE_DIR}/AUTHORS" DESTINATION share/doc/elemental) etc.
Ryan H. Lewis
@rhl-
Aug 01 2016 03:16
yeah, that looks good
Jack Poulson
@poulson
Aug 01 2016 03:17
Do we need the share/ subdirectory?
I'm currently installing input files into data/
Ryan H. Lewis
@rhl-
Aug 01 2016 03:17
I believe we do
I think it should look like share/elemental/data
in there you can stick all the cpp files and such
Jack Poulson
@poulson
Aug 01 2016 03:20
and not share/data/elemental?!?
that seems inconsistent
Ryan H. Lewis
@rhl-
Aug 01 2016 03:20
I'm not 100% confident
but i'm pretty confident that it should be the other way
according to FHS the "data directory" is /usr/share
so elemental data would live in /usr/share/elemental
Jack Poulson
@poulson
Aug 01 2016 03:21
so just change installing into data/ to elemental/?
Ryan H. Lewis
@rhl-
Aug 01 2016 03:22
so I think the idea is that you want to just set the "CMAKE_INSTALL_PREFIX" and then you are installing the standard filesystem layout
so I think you actually want share/elemental
we can ask in #fedora-devel I guess.
Ok, I guess you don't need the share
i mean, im not totally sure
Jack Poulson
@poulson
Aug 01 2016 03:27
I'll install it into share/elemental
using the assumption of installing into /usr/local as a guide
Ryan H. Lewis
@rhl-
Aug 01 2016 03:28
i think it either installs into /usr/local or /usr
Jack Poulson
@poulson
Aug 01 2016 03:28
either way
/usr/share and /usr/local/share are a thing
though I find the word share to be useless
Ryan H. Lewis
@rhl-
Aug 01 2016 03:29
yeah, agreed.
Jack Poulson
@poulson
Aug 01 2016 03:29
data would be better
Ryan H. Lewis
@rhl-
Aug 01 2016 03:51
let me know when you push that
i'm working on my sparse matrix branch
merged master in, trying to get it to compile
Jack Poulson
@poulson
Aug 01 2016 04:02
committed
you need to use CMAKE_EXECUTABLE_SUFFIX_CXX
Ryan H. Lewis
@rhl-
Aug 01 2016 04:02
ohhh
have you tried that?
Jack Poulson
@poulson
Aug 01 2016 04:02
after some experimentation, it seems that CMAKE_EXECUTABLE_SUFFIX is not meant to be changed
and that one should try with each language
yes, it worked
Ryan H. Lewis
@rhl-
Aug 01 2016 04:03
ah, great.
Jack Poulson
@poulson
Aug 01 2016 04:03
but not CMAKE_EXECUTABLE_SUFFIX
it stays empty for some reason
I think it's because it has to always be .exe on Windows
I'll chalk it up to CMake idiosyncrasy number 773
Ryan H. Lewis
@rhl-
Aug 01 2016 04:07
Ok, I am not sure if I did the multiply sparse matrix refactor correctly
but, I guess travis will tell me
Jack Poulson
@poulson
Aug 01 2016 04:08
do you have unit tests for the new functionality?
Ryan H. Lewis
@rhl-
Aug 01 2016 04:08
nope. just trying to get the compile going
Jack Poulson
@poulson
Aug 01 2016 04:08
ok
I think unit tests also serve as a nice form of documentation
Ryan H. Lewis
@rhl-
Aug 01 2016 04:08
Indeed
I will do that once it compiles cleanly
somehow it doesn't even seem like I added any code
I just moved stuff around
Ryan H. Lewis
@rhl-
Aug 01 2016 04:18
Ok, i made a new prelease with the new cmake stuff, I modified the spec to point at it, and I updated it to use the correct suffix var. lets see how it goes.
Btw, I also profiled the build. It seems like 99% of the time is as perhaps expected spent in code gen
Jack Poulson
@poulson
Aug 01 2016 04:45
any idea how to operationalize that knowledge?
Ryan H. Lewis
@rhl-
Aug 01 2016 04:50
I was going to ask steve canon, or maybe bring the results with me to the LLVM meetup
I have a sense I know whats going on
which is what I said way back
the results are consistent with it, although, its only correlation, not proof.
Jack Poulson
@poulson
Aug 01 2016 04:51
and what is the hypothesis?
Ryan H. Lewis
@rhl-
Aug 01 2016 04:51
essentially each cpp file you have is roughly speaking re-instantiating a massive number of templates
Jack Poulson
@poulson
Aug 01 2016 04:52
yes, we started down the path of using extern template declarations to alleviate that
but only made it through BLAS 1 or so
Ryan H. Lewis
@rhl-
Aug 01 2016 04:52
I'm not exactly sure how that solves the problem
or if we saw benefit
Jack Poulson
@poulson
Aug 01 2016 04:53
extern template is explicitly meant to prevent templates being instantiated in particular compilation units
Ryan H. Lewis
@rhl-
Aug 01 2016 04:53
right, but, they eventually get instantiated
Jack Poulson
@poulson
Aug 01 2016 04:53
what was done so far isn't enough to tell because we didn't completely implement it
Ryan H. Lewis
@rhl-
Aug 01 2016 04:53
I mean, I just dont understand the compiler enough.
Jack Poulson
@poulson
Aug 01 2016 04:53
ideally they only get instantiated once
Ryan H. Lewis
@rhl-
Aug 01 2016 04:53
Yeah, I think we probably shouldn't try and do something like that if we dont know its going to work
I'll try and ask steve tomorrow
Ryan H. Lewis
@rhl-
Aug 01 2016 04:59
asking in #llvm right now
@poulson can you take a look at my sparse matrix PR, it seems to build. It's been a while since I really worked with it, and aside from moving code around, it doesn't seem like I really did much
Jack Poulson
@poulson
Aug 01 2016 05:00
is there a unit test?
I can take a look even if there isn't one
Ryan H. Lewis
@rhl-
Aug 01 2016 05:01
I will add one, but, I can't right at this moment.
I just want to understand what I was up to. You had me moving around this multMeta object
and I don't see the new implementation of the new multiply
so it seems
Ryan H. Lewis
@rhl-
Aug 01 2016 05:28
<joker-eph> rhl-: The report is confusing, I know, but:
<joker-eph> 1.3419 (100.0%) Clang front-end timer
<joker-eph> 0.2323 ( 86.3%) Code Generation Time
<joker-eph> 0.0370 ( 13.7%) LLVM IR Generation Time
<joker-eph> (Percentages don't make sense because the grouping is stupid)
Ryan H. Lewis
@rhl-
Aug 01 2016 05:33
<joker-eph> rhl-: the frontend is taking all the time apparently
<rhl-> well I mean, great, but, what does that mean? where is the time going?
<rhl-> what is it within the front-end
<rhl-> or does that clearly identify some specific thing that I need to do to speed things up?
<joker-eph> Parsing, instantiating templates
<joker-eph> I don't know, I more used to work on the optimizer/codegen...
<joker-eph> rhl-: I don't, I'd use instrument
yeah, its clearly too much template instantiation. for example the build hangs for a long time on Instantiate.cpp
Ryan H. Lewis
@rhl-
Aug 01 2016 05:46
its like 60x slower.
Jack Poulson
@poulson
Aug 01 2016 14:44
60x slower than what?
Ryan H. Lewis
@rhl-
Aug 01 2016 15:05
that one cpp file is 60x slower than most the others
Jack Poulson
@poulson
Aug 01 2016 15:05
ah, thanks
Ryan H. Lewis
@rhl-
Aug 01 2016 15:06
@poulson i was wrong with the install targets last night, but, this morning fedora-devel suggests we use this: https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html
ill patch it up and send you a PR
Jack Poulson
@poulson
Aug 01 2016 15:44
great, thanks!