Comments (6)
On the more mundane task of just getting ngrm building again, I added a new pkg-config file called flux-core-srctree
in pull request #74 that is not installed, and can be accessed from the GNU Makefile of a project checked out beside it like this:
topdir := $(dir $(lastword $(MAKEFILE_LIST)))
abs_topdir := $(abspath $(topdir))
flux_top_builddir := $(abspath $(abs_topdir)/../flux-core)
flux_top_srcdir := $(abspath $(abs_topdir)/../flux-core)
FLUX_CFLAGS := $(shell PKG_CONFIG_PATH=$(flux_top_builddir)/etc \
pkg-config --cflags flux-core-srctree)
FLUX_LIBS := $(shell PKG_CONFIG_PATH=$(flux_top_builddir)/etc \
pkg-config --libs flux-core-srctree)
This provides a relatively simple way to export the information needed to find lua, json-c, zmq, czmq, and to link against -lflux-core
and #include <flux/core.h>
in a manner such that code will not need to be changed to build against installed vs source tree flux-core.
The utility code duplication problem could be solved by breaking liblsd out to its own installed package and maybe adding optparse and nodeset to it. LSD code would need to be built without the exit-on-error handlers compiled in, and nodset etc would need to not call xzmalloc() and oom() internally. Alternatively, this code could be compiled as a git subpackage in its own repo and shared between flux-core, ngrm, and whatever else needs it. Posponing this decision, I created an ngrm branch ngrm-builds-against-flux-core
which simply pulls in any utility bits it needs with vpath
, thus it only builds against the checked out source tree, e.g.
# Borrow some source from flux-core source tree that was not
# intended to be exported (FIXME)
#
vpath %.c $(flux_top_srcdir)/src/bindings/lua
vpath %.c $(flux_top_srcdir)/src/common/liblsd
vpath %.c $(flux_top_srcdir)/src/common/libutil
from flux-core.
We changed the approach in ngrm-builds-against-core
slightly. IInstead of the flux-core-srctree
pkg-config file, now we generate a Makefile.inc in flux-core that can be included in ngrm. In ngrm, run ./config ../flux-core
(relative path to flux-core's build directory). This allows more info, such as the srctree locaiton, to be exported from flux-core to other projects, and eliminates the need to edit ngrm's Makefile.inc, which could be a hassle.
from flux-core.
Just for an example, I created a quick CMake based build setup for the flux-barrier repo here: https://github.com/trws/flux-barrier
If we were to go that way, I would probably suggest including a FindFluxCore.cmake or similar in the main project that can populate all of the necessary stuff in any branch project. That way people are free to use a flux-like tree or not as they like. To get this to work now, all it needs is cmake -D FLUX_CORE_PATH=<path to installed flux core>
where it will pull in the pkg-config from the current setup and use that to build the xbarrier libraries and module.
It's pretty minimal at the moment, but it should at least give an idea of what the full system would look like.
from flux-core.
@trws: sorry, I have not had time to really focus on this. Would you be willing to submit a pull request to flux-core to add the needed cmake bits?
from flux-core.
Here is a nice comparison of some of the options - albeit one promoting a commercial solution.
http://www.perforce.com/blog/121025/managing-projects-across-git-repositories
from flux-core.
I think we've reached a fairly stable arrangement at least with regard to flux-core and flux-sched. Any further issues can be opened separately.
from flux-core.
Related Issues (20)
- shell: input: stop writing stdin when reader is not ready HOT 2
- t2410-sdexec-memlimit.t: not ok 13 - memory.high configuration changed HOT 10
- log message: resource expiration updated from 0.00 to 0.00 (-inf) HOT 1
- cray MPI: MPIDI_OFI_mpi_init_hook:Invalid argument HOT 1
- improperly sorted hostlist in 'flux resource list' output HOT 2
- content: pending stores are stuck after ENOSPC from backing store
- kvs: uncompleted RPCs should receive ENOSYS response when module is unloaded HOT 1
- alloc-bypass jobs get stuck in CLEANUP after a flux restart
- broker[0]: quorum-full: ignored in shutdown
- flux-dump: add option to make content read errors non-fatal
- flux-jobs: state PRIORITY is not documented
- flux-run(1) incorrectly reports that --input=FILENAME bypasses the KVS
- hostlist: perf issue in `hostlist_find_host()` due to `hostname_create()` HOT 1
- job-manager: problem with alloc queue on elcap HOT 9
- systemctl stop flux is delayed if upstream is offline
- shell: truncated output message is repeated
- broker: runat_abort cleanup (signal 15): No such file or directory HOT 3
- Minor documentation fix for flux-jobs
- doc: flux-exec manpage is confusing
- doc: document `userrc` job shell option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flux-core.