Skip to content

Conversation

@erikzenker
Copy link
Member

@erikzenker erikzenker commented Sep 22, 2016

Conan provides a simple solution to resolve dependencies of your C/C++ code. This PR introduces conan into the graybat cmake config file. Up to now only the zmq dependency can be resolved. Available boost packages have no mpi support yet. Providing an own boost package would be the way to go.

@bussmann
Copy link
Member

Why not snap?

@erikzenker
Copy link
Member Author

Are there good reasons to use snap?

@bussmann
Copy link
Member

Just that there was a similar suggestion to use snap for picongpu made by @ax3l. So the only reason would be consistency.

@erikzenker
Copy link
Member Author

Thx for the hint. Its a good idea to have a look at snap and compare it to conan.

@ax3l ax3l assigned ax3l and unassigned ax3l Oct 5, 2016
@ax3l
Copy link
Member

ax3l commented Oct 5, 2016

Just that there was a similar suggestion to use snap for picongpu made by @ax3l. So the only reason would be consistency.

I suggest everything packaging wise :D

No seriously, I did not know conan and it looks like a good way to ship binaries and code platform independently. Snap is quite canonical specific.

Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes are great and I did not know conan before. I would change the title to Document Dependency Install via Conan and would be interested in a follow-up PR that documents how to upload graybat itself to conan (and how to use it in examples from the user side).

.travis.yml Outdated
# Conan
#############################################################################
- pip install --upgrade pip --user
- pip install conan --user
Copy link
Member

@ax3l ax3l Oct 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and then? :)
it's missing the conan based install ^^

update: ah, I see the changes in CMakeLists.txt

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add the build-deps-from-source and the use conan dependencies as two independent tests in the travis build matrix

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea !

* zeromq 4.1.3 (zeromq communication policy)
* metis 5.1 (graph partitioning mapping)

**Note** that some graybat dependencies can be resolved using [conan](https://www.conan.io/) automatically. Have a look into the [conan documentation](http://docs.conan.io/en/latest/getting_started.html) for more details on that.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add the conan code below this paragraph to resolve all dependencies :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some or all dependencies?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to investigate if I could use local dependencies when they are available and just get the missing ones.

if(Boost_FOUND)
set(graybat_INCLUDE_DIRS ${graybat_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
set(graybat_LIBRARIES ${graybat_LIBRARIES} ${Boost_LIBRARIES})
else()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually you should never get this branch since find_package on Boost is already issuing a standardized FATAL_ERROR message on REQUIRED.

set(graybat_INCLUDE_DIRS ${graybat_INCLUDE_DIRS} ${MPI_C_INCLUDE_PATH})
set(graybat_LIBRARIES ${graybat_LIBRARIES} ${MPI_C_LIBRARIES})
set(graybat_LIBRARIES ${graybat_LIBRARIES} ${MPI_CXX_LIBRARIES})
else()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make MPI in find_package REQUIRED instead

set(graybat_LIBRARIES ${graybat_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
if(Threads_FOUND)
set(graybat_LIBRARIES ${graybat_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
else()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make Threads in find_package REQUIRED instead

set(graybat_INCLUDE_DIRS ${graybat_INCLUDE_DIRS} ${ZMQ_INCLUDE_DIRS})
set(graybat_LIBRARIES ${graybat_LIBRARIES} ${ZMQ_LIBRARIES})
else()
message(FATAL_ERROR " ZMQ not found.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fatal errors will stop the build. if that is planned, make REQUIRED

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same above with metis

.travis.yml Outdated
- pip install conan --user

script:
- cd $HOME/build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build matrix 2: conan install $GRAYBAT_ROOT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah lets test it.

@erikzenker erikzenker changed the title Using Conan Package Management Dependency Install via Conan Package Management Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants