56cdcb breaks LINSOLV compilation on lucid

Bug #1195802 reported by Bruno Chareyre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Undecided
Unassigned

Bug Description

Now I'm the one who can't compile with linsolv... :-/

First attempt:
-- Could NOT find Metis (missing: METIS_INCLUDE_DIR)

This one was easy to solve, but it doesn't make much sense to force the definition of such a trivial path...
-DMETIS_INCLUDE_DIR="/usr/lib"

Second attempt:
[ 34%] make[2]: *** No rule to make target `/lib/libopenblas.so', needed by `lib/libsupport.so'. Stop.

/lib/libopenblas.so is on my disk though.
Does it work with other linux versions?

description: updated
Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

> Does it work with other linux versions?

I compiled successfully on Debian Squeeze, not facing this error...

Revision history for this message
Anton Gladky (gladky-anton) wrote :

Hi Bruno,

please, try the latest trunk. I did not check it on Ubuntu.
New Metis-library is available on yade-users-external PPA
for all Ubuntu-versions, starting from Precise.

Do you have any particular reasons to use Lucid? It is relatively
old system and even unsupported AFAIK. Backporting on it is
a difficult task.

Anton

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Fixed.
Thanks Anton!

I have Precise on the laptop, it doesn't give me a strong reason to upgrade the desktop's Lucid.
I'm fine with it for the moment. No need to backport stuff, everything works as expected. :)

Changed in yade:
status: New → Fix Released
Changed in yade:
status: Fix Released → In Progress
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Reopening. The problem is in fact not linked to flow engine. I think I spotted the problem in CMakeLists.txt, where yade library is never defined unless chunkSize=0 (code below). I really wonder why it works on different platforms, since nobody is typing -DCHUNKSIZE=0, I guess.

cmake ../trunk -DCHUNKSIZE=1
CMake Error at CMakeLists.txt:359 (TARGET_LINK_LIBRARIES):
  Cannot specify link libraries for target "yade" which is not built by this
  project.

cmake ../trunk -DCHUNKSIZE=0
--> ok

I 'm about to fix that Anton, but since you made this combination of core/lib/plugins, you maybe have suggestions?

Bruno

==============

IF (CHUNKSIZE)
  INCLUDE(CombineSources)

  COMBINE_SOURCES(${CMAKE_BINARY_DIR}/core "${SRC_CORE}" ${CHUNKSIZE})
  FILE(GLOB SRC_CORE_COMBINED "${CMAKE_BINARY_DIR}/core.*.cpp")
  ADD_LIBRARY(core SHARED ${SRC_CORE_COMBINED})

  COMBINE_SOURCES(${CMAKE_BINARY_DIR}/pkg "${SRC_PKG}" ${CHUNKSIZE})
  FILE(GLOB SRC_PKG_COMBINED "${CMAKE_BINARY_DIR}/pkg.*.cpp")
  ADD_LIBRARY(plugins SHARED ${SRC_PKG_COMBINED})

  COMBINE_SOURCES(${CMAKE_BINARY_DIR}/lib "${SRC_LIB}" ${CHUNKSIZE})
  FILE(GLOB SRC_LIB_COMBINED "${CMAKE_BINARY_DIR}/lib.*.cpp")
  ADD_LIBRARY(support SHARED ${SRC_LIB_COMBINED})
ELSE (CHUNKSIZE)
  ADD_LIBRARY(yade SHARED ${SRC_CORE} ${SRC_PKG} ${SRC_LIB})
ENDIF (CHUNKSIZE)

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Anton, I don't understand your last changes in cmake.
This line will trigger the compilation of all combined *.cpp from the three folders in a single yade lib, right?
ADD_LIBRARY(yade SHARED ${SRC_CORE} ${SRC_PKG} ${SRC_LIB})

Besides I don't see this line called unless chunkSize=0, I'm in doubt to tell if it is really good to do this.
It seems to be more or less equivalent to setting a very big chunksize (except that chunksize would not merge many forlders). The drawback of this is known: high memory requirements.

I would suggest to fix the clump cross-linking issue in source instead of changing the build system.
Please tell me if I don't understand the cmake correctly.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

My bad on one thing: letting chunkSize undefined is ok. The problem appears when chunkSize is defined and >0.

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1195802] Re: 56cdcb breaks LINSOLV compilation on lucid

Hi Bruno,
sorry, i am having a limited internet/working computer access these days.
Will try to fix it soon.

Cheers,

Anton

2013/7/16 Bruno Chareyre <email address hidden>:
> Anton, I don't understand your last changes in cmake.
> This line will trigger the compilation of all combined *.cpp from the three folders in a single yade lib, right?
> ADD_LIBRARY(yade SHARED ${SRC_CORE} ${SRC_PKG} ${SRC_LIB})
>
> Besides I don't see this line called unless chunkSize=0, I'm in doubt to tell if it is really good to do this.
> It seems to be more or less equivalent to setting a very big chunksize (except that chunksize would not merge many forlders). The drawback of this is known: high memory requirements.
>
> I would suggest to fix the clump cross-linking issue in source instead of changing the build system.
> Please tell me if I don't understand the cmake correctly.
>
> --
> You received this bug notification because you are subscribed to Yade.
> https://bugs.launchpad.net/bugs/1195802
>
> Title:
> 56cdcb breaks LINSOLV compilation on lucid
>
> Status in Yet Another Dynamic Engine:
> In Progress
>
> Bug description:
> Now I'm the one who can't compile with linsolv... :-/
>
> First attempt:
> -- Could NOT find Metis (missing: METIS_INCLUDE_DIR)
>
> This one was easy to solve, but it doesn't make much sense to force the definition of such a trivial path...
> -DMETIS_INCLUDE_DIR="/usr/lib"
>
> Second attempt:
> [ 34%] make[2]: *** No rule to make target `/lib/libopenblas.so', needed by `lib/libsupport.so'. Stop.
>
> /lib/libopenblas.so is on my disk though.
> Does it work with other linux versions?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/yade/+bug/1195802/+subscriptions

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote : Re: [Yade-dev] [Bug 1195802] Re: 56cdcb breaks LINSOLV compilation on lucid

Changes in CMakeList reverted for the moment. They fixed an issue for
someone, but triggered other problems, and breaks the buildbot.
Let us fix that carefully.

B

https://github.com/yade/trunk/commit/5243d8872b5bec5f9373e4e9f6934ae4c8059127

Revision history for this message
Anton Gladky (gladky-anton) wrote :

Hi Bruno, I reverted your revert and fixed CHUNKSIZE-issue.
Please, check, whether it works for you now. If not - let me know.

Regarding putting all stuff in libyade. It is not only the clumps-issue.
I was thinking about it already some time ago. libsupport, libcore and
libplugins cannot be used separately. They are used together. So, from
my point of view, it should be just libyade, which contains all the stuff,
which is needed for simulation.

If you are not agreed, let's discuss it. I am open to revert it.

Cheers,

Anton

2013/7/17 Bruno Chareyre <email address hidden>:
> Changes in CMakeList reverted for the moment. They fixed an issue for
> someone, but triggered other problems, and breaks the buildbot.
> Let us fix that carefully.
>
> B
>
> https://github.com/yade/trunk/commit/5243d8872b5bec5f9373e4e9f6934ae4c8059127
>
> --
> You received this bug notification because you are subscribed to Yade.
> https://bugs.launchpad.net/bugs/1195802
>
> Title:
> 56cdcb breaks LINSOLV compilation on lucid
>
> Status in Yet Another Dynamic Engine:
> In Progress
>
> Bug description:
> Now I'm the one who can't compile with linsolv... :-/
>
> First attempt:
> -- Could NOT find Metis (missing: METIS_INCLUDE_DIR)
>
> This one was easy to solve, but it doesn't make much sense to force the definition of such a trivial path...
> -DMETIS_INCLUDE_DIR="/usr/lib"
>
> Second attempt:
> [ 34%] make[2]: *** No rule to make target `/lib/libopenblas.so', needed by `lib/libsupport.so'. Stop.
>
> /lib/libopenblas.so is on my disk though.
> Does it work with other linux versions?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/yade/+bug/1195802/+subscriptions

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1195802] Re: 56cdcb breaks LINSOLV compilation on lucid

2013/7/16 Bruno Chareyre <email address hidden>:
> Anton, I don't understand your last changes in cmake.
> This line will trigger the compilation of all combined *.cpp from the three folders in a single yade lib, right?
> ADD_LIBRARY(yade SHARED ${SRC_CORE} ${SRC_PKG} ${SRC_LIB})

Hmm, not quite. It just adds a new library and indicates, which
sources are used.

> Besides I don't see this line called unless chunkSize=0, I'm in doubt to tell if it is really good to do this.

I fixed that hopefully in aa512cc7. I forgot about chunksize>0

> It seems to be more or less equivalent to setting a very big chunksize (except that chunksize would not merge many forlders). The drawback of this is known: high memory requirements.
>
> I would suggest to fix the clump cross-linking issue in source instead of changing the build system.

I think, Christian has fixed that already.

Anton

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Apparently it works with chunkSize (sorry for wrong alert in previous emails, it must have been some bad merging with my local changes).
The buildbot still crashes though.

Revision history for this message
Anton Gladky (gladky-anton) wrote :

I am closing the bug. Feel free to reopen it, if the problem still exists.

Anton

Changed in yade:
status: In Progress → Fix Released
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Reading the thread again, I have two questions:
-Is the option cmake option -DMETIS_INCLUDE_DIR still mandatory? (if so, it is a small bug, the library should be in standard path)
-Is there any use of a PPA for metis, since it is a very common and stable library? (I recommend parmetis, btw)

Revision history for this message
Anton Gladky (gladky-anton) wrote :

2013/8/29 Bruno Chareyre <email address hidden>:
> Reading the thread again, I have two questions:
> -Is the option cmake option -DMETIS_INCLUDE_DIR still mandatory?

No, if you install the "standard" package.
13.10 and later Ubuntu versions are (will be) having metis in main repo.

> -Is there any use of a PPA for metis, since it is a very common and stable library? (I recommend parmetis, btw)

https://launchpad.net/~yade-users/+archive/external

parmetis is "non-free" AFAIK.

Anton

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.