verne.freenode.net changed the topic of #mlpack to: http://www.mlpack.org/ -- We don't respond instantly... but we will respond. Give it a few minutes. Or hours. -- Channel logs: http://www.mlpack.org/irc/
witness has joined #mlpack
cheng_ has joined #mlpack
< cheng_>
hey guys anyone knows where i can get a statical lib of mlpack???
cheng__ has joined #mlpack
witness has quit [Read error: Connection reset by peer]
witness has joined #mlpack
witness has quit [Client Quit]
< naywhayare>
cheng_: cheng__: you mean statically compiled?
< naywhayare>
I could probably build you one quickly for Linux (if you let me know more about the target) but we don't have any precompiled builds for Windows
< cheng__>
Oh. I'm trying to use it on Linux. If it's not too much can someone point me to the settings in CMake to build the statically libraries?
< cheng__>
I might have to reproduce this process on other distros.
< cheng__>
I work with a lot of statisticians, and I usually just distribute statically linked compiled binaries as many of them don't know how to work a compiler...
< cheng__>
which is fine.
< cheng__>
My dev system is ubuntu 15.04
< cheng__>
the cluster this is gonna run on is RHEL 6 i belive??
< naywhayare>
ah, okay
< naywhayare>
I'm looking into what one needs to tell CMake to link statically now
< naywhayare>
it may be as simple as changing the line "add_library(mlpack SHARED ${MLPACK_SRCS})" to "add_library(mlpack ${MLPACK_SRCS})", in src/mlpack/CMakeLists.txt
< naywhayare>
I am currently testing to check...
cheng__ has quit [Ping timeout: 264 seconds]
cheng_ has quit [Ping timeout: 250 seconds]
travis-ci has joined #mlpack
< travis-ci>
mlpack/mlpack#168 (master - 7b0b67d : Ryan Curtin): The build passed.
< naywhayare>
cheng_: cheng__: I was able to make a static libmlpack.a by changing "add_library(mlpack SHARED ${MLPACK_SRCS})" to "add_library(mlpack ${MLPACK_SRCS})", in src/mlpack/CMakeLists.txt
< naywhayare>
however, to link the programs that are built against libmlpack.a requires all of the link targets to be static (at least according to my minor knowledge of static linking with gcc/clang)
< naywhayare>
so you would need to modify the CMake scripts to find only static versions of the boost libraries, and you'd need to modify the Armadillo CMake configuration in the same way as mlpack to build a statically-linked Armadillo
< naywhayare>
I think those are the only changes you'd need to make... not 100% certain though
< cheng__>
that sounds about right! thanks guys!!!
< cheng__>
i'll try out your method naywhayare.
< cheng__>
:]
< cheng__>
so much appreciation.
< naywhayare>
yeah, let me know if you have any issues; I'm happy to help out
< naywhayare>
if it's statically linked, I don't think there will be any issues moving the code built on Ubuntu 15.04 to RHEL6
< naywhayare>
the only issue would be if the architecture of the systems are different
< cheng__>
Yea, that's all I need.
< cheng__>
I'm using openMP so it's a pain to migrate to MacOS as well...
< cheng__>
so I'm not doing it any time soon...
< cheng__>
i cannot believe clang does not support openMP natively...
< cheng__>
ugh.
< naywhayare>
yeah, it's kind of frustrating that I can't test the OpenMP parts of mlpack with clang; I seem to remember reading that they are working on clang support for it, but I don't know when it'll be stable
< naywhayare>
fortunately, even if OpenMP isn't available, the #pragmas are just ignored, so it should at least still compile and run, although serially :)
< cheng__>
Yea. That's true. I've just given up on that though. The stuff I write would be insanely slow to run with single thread. I usually use 32 threads to run it.
< cheng__>
on a cluster I use.
< cheng__>
I was planning to implement parallelization with openMPI but got scared by how much more complicated it is than openMP lol
< cheng__>
to think i took the distributed computing course and already understand the basics lol
< cheng__>
utterly uselesss....
< naywhayare>
yeah, I've been using boost.mpi and it's quite complex
< cheng__>
openMP has been implemented with clang. but you need to recompile clang... which is not something i'm willing to do, considering it would be less stable than the version shipped with apple.
< cheng__>
shipped with the os i mean.
< naywhayare>
ah, okay
< cheng__>
i'm eating an apple.
< naywhayare>
yeah, recompiling clang, a bit too much overhead...
< naywhayare>
hmmm, I should get an apple too... sounds good :)
< cheng__>
thanks for the help btw, i'm trying it out now :]
< naywhayare>
sure, hopefully it will work. the only part that I know works is compiling libmlpack.a statically, but I only have guesses for what needs to be done after that
< cheng__>
oh, u mean link my program against the libmlpack.a??
< cheng__>
hopefully that wont' turn out to be too painful.
< naywhayare>
well, CMake should link against libmlpack.a automatically
< naywhayare>
unless you're just building something on top of mlpack
< naywhayare>
in which case yeah, just link against libmlpack.a; shouldn't be too terrible, I think you just need to pass -static to gcc (or some argument like that)
< cheng__>
yea. that's straightforward.
< naywhayare>
hopefully it's as straightforward as that :)
< naywhayare>
I think that -static to gcc does require that all of the other things you need to link against are static too (if you're building against mlpack, that will probably mean you also need to link against armadillo and a few boost libraries)
< cheng__>
ah... ideally i need to put the -static option after the gcc command to compile the mlpack