Skip to content

Commit

Permalink
Merge pull request #9 from grondo/toss4
Browse files Browse the repository at this point in the history
Various fixes for Lua 5.3, Slurm 19.05, and hwloc 2.x
  • Loading branch information
ryanday36 authored Jun 30, 2020
2 parents 332dd33 + 6934f99 commit b724d69
Show file tree
Hide file tree
Showing 15 changed files with 144 additions and 2,546 deletions.
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Version 0.39 (2020-06-30)
- lua: updates for Lua >= 5.2 compatibility
- lua: remove lua-affinity
- mpibind: update for hwloc v2+
- workaround for Slurm inclusion of List typedef
- fix compilation issue related to -Werror=format-security (Adrien Devresse)

Version 0.38 (2018-05-16)
- mpibind: fix GPU binding

Expand Down
4 changes: 3 additions & 1 deletion auto-affinity.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
#define __USE_GNU
#include <sched.h>

/* Include list.h before slurm.h since slurm header stole our List type */
#include "lib/list.h"

#include <slurm/slurm.h>
#include <slurm/spank.h>

#include "lib/list.h"
#include "lib/split.h"
#include "lib/fd.h"

Expand Down
3 changes: 2 additions & 1 deletion lib/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

#ifndef LSD_LIST_H
#define LSD_LIST_H

/* Depressing workaround for slurm.h inclusion of our List typedef */
#define __list_datatypes_defined

/***********
* Notes *
Expand Down
47 changes: 20 additions & 27 deletions lua/Makefile
Original file line number Diff line number Diff line change
@@ -1,47 +1,40 @@
PLUGINS = \
lua.so \
LUA_VER ?= 5.3
PKGCONF := pkg-config --silence-errors

SUBDIRS = \
lua-schedutils
LUA_LIB ?= \
$(shell $(PKGCONF) --libs lua$(LUA_VER) || $(PKGCONF) --libs lua)

ifeq ($(HAVE_SPANK_OPTION_GETOPT), 1)
EXTRA_CFLAGS = -DHAVE_SPANK_OPTION_GETOPT
endif
LUA_INCLUDES ?= \
$(shell $(PKGCONF) --cflags lua$(LUA_VER) || $(PKGCONF) --cflags lua)

all: $(PLUGINS) subdirs
LIBLUA_DSO ?= \
$(shell echo $(LUA_LIB) | sed 's/^.*-l\(lua[^ ]*\).*/lib\1.so/')

check: subdirs-check
PLUGINS = \
lua.so \

subdirs:
@for d in $(SUBDIRS); do make -C $$d; done
CFLAGS = -g -Wall -DLIBLUA_DSO=\"$(LIBLUA_DSO)\"

subdirs-check:
@for d in $(SUBDIRS); do make -C $$d check; done
ifeq ($(HAVE_SPANK_OPTION_GETOPT), 1)
EXTRA_CFLAGS += -DHAVE_SPANK_OPTION_GETOPT
endif

all: $(PLUGINS)

.SUFFIXES: .c .o .so

.c.o:
$(CC) -I.. $(EXTRA_CFLAGS) $(CFLAGS) -o $@ -fPIC -c $<
$(CC) -I.. $(LUA_INCLUDES) $(EXTRA_CFLAGS) $(CFLAGS) -o $@ -fPIC -c $<

lua.so : lua.o ../lib/list.o
$(CC) -shared -o $*.so $^ -llua

clean: subdirs-clean
rm -f *.so *.o lib/*.o
$(CC) -shared -o $*.so $^ $(LUA_LIB)

subdirs-clean:
@for d in $(SUBDIRS); do make -C $$d clean; done
clean:
rm -f *.so *.o

install: subdirs-install
install:
@mkdir -p --mode=0755 $(DESTDIR)$(LIBDIR)/slurm
@for p in $(PLUGINS); do \
echo "Installing $$p in $(LIBDIR)/slurm"; \
install -m0755 $$p $(DESTDIR)$(LIBDIR)/slurm; \
done

subdirs-install:
@for d in $(SUBDIRS); do \
make -C $$d DESTDIR=$(DESTDIR) install; \
done

30 changes: 0 additions & 30 deletions lua/lua-schedutils/Makefile

This file was deleted.

Loading

0 comments on commit b724d69

Please sign in to comment.