git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@128 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
850b834510
commit
865913df71
488 changed files with 0 additions and 46037 deletions
|
|
@ -1 +0,0 @@
|
|||
SUBDIRS= mpi
|
||||
|
|
@ -1,445 +0,0 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = src/rmc
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EO_DIR = @EO_DIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOEO_DIR = @MOEO_DIR@
|
||||
MO_DIR = @MO_DIR@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = mpi
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/rmc/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/rmc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-recursive ctags ctags-recursive \
|
||||
distclean distclean-generic distclean-recursive distclean-tags \
|
||||
distdir dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
CXX=mpicxx
|
||||
|
||||
INCLUDES = \
|
||||
`xml2-config --cflags` \
|
||||
-I$(EO_DIR)/src
|
||||
|
||||
AM_CXXFLAGS =\
|
||||
-g \
|
||||
-Wall
|
||||
|
||||
lib_LIBRARIES = librmc_mpi.a
|
||||
|
||||
librmc_mpi_a_SOURCES = \
|
||||
node.h \
|
||||
node.cpp \
|
||||
param.h \
|
||||
param.cpp \
|
||||
comm.h \
|
||||
comm.cpp \
|
||||
coop.h \
|
||||
coop.cpp \
|
||||
mess.h \
|
||||
mess.cpp \
|
||||
rmc.cpp \
|
||||
scheduler.h \
|
||||
scheduler.cpp \
|
||||
worker.h \
|
||||
worker.cpp \
|
||||
send.h \
|
||||
send.cpp \
|
||||
recv.h \
|
||||
recv.cpp \
|
||||
xml_parser.h \
|
||||
xml_parser.cpp \
|
||||
schema.h \
|
||||
schema.cpp \
|
||||
runner.cpp \
|
||||
service.h \
|
||||
service.cpp
|
||||
|
|
@ -1,478 +0,0 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = src/rmc/mpi
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLIBRARIES_INSTALL = $(INSTALL_DATA)
|
||||
LIBRARIES = $(lib_LIBRARIES)
|
||||
AR = ar
|
||||
ARFLAGS = cru
|
||||
librmc_mpi_a_AR = $(AR) $(ARFLAGS)
|
||||
librmc_mpi_a_LIBADD =
|
||||
am_librmc_mpi_a_OBJECTS = node.$(OBJEXT) param.$(OBJEXT) \
|
||||
comm.$(OBJEXT) coop.$(OBJEXT) mess.$(OBJEXT) rmc.$(OBJEXT) \
|
||||
scheduler.$(OBJEXT) worker.$(OBJEXT) send.$(OBJEXT) \
|
||||
recv.$(OBJEXT) xml_parser.$(OBJEXT) schema.$(OBJEXT) \
|
||||
runner.$(OBJEXT) service.$(OBJEXT)
|
||||
librmc_mpi_a_OBJECTS = $(am_librmc_mpi_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(librmc_mpi_a_SOURCES)
|
||||
DIST_SOURCES = $(librmc_mpi_a_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = mpicxx
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EO_DIR = @EO_DIR@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MOEO_DIR = @MOEO_DIR@
|
||||
MO_DIR = @MO_DIR@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
INCLUDES = \
|
||||
`xml2-config --cflags` \
|
||||
-I$(EO_DIR)/src
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-g \
|
||||
-Wall
|
||||
|
||||
lib_LIBRARIES = librmc_mpi.a
|
||||
librmc_mpi_a_SOURCES = \
|
||||
node.h \
|
||||
node.cpp \
|
||||
param.h \
|
||||
param.cpp \
|
||||
comm.h \
|
||||
comm.cpp \
|
||||
coop.h \
|
||||
coop.cpp \
|
||||
mess.h \
|
||||
mess.cpp \
|
||||
rmc.cpp \
|
||||
scheduler.h \
|
||||
scheduler.cpp \
|
||||
worker.h \
|
||||
worker.cpp \
|
||||
send.h \
|
||||
send.cpp \
|
||||
recv.h \
|
||||
recv.cpp \
|
||||
xml_parser.h \
|
||||
xml_parser.cpp \
|
||||
schema.h \
|
||||
schema.cpp \
|
||||
runner.cpp \
|
||||
service.h \
|
||||
service.cpp
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/rmc/mpi/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/rmc/mpi/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-libLIBRARIES: $(lib_LIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
@$(POST_INSTALL)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLIBRARIES:
|
||||
-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
|
||||
librmc_mpi.a: $(librmc_mpi_a_OBJECTS) $(librmc_mpi_a_DEPENDENCIES)
|
||||
-rm -f librmc_mpi.a
|
||||
$(librmc_mpi_a_AR) librmc_mpi.a $(librmc_mpi_a_OBJECTS) $(librmc_mpi_a_LIBADD)
|
||||
$(RANLIB) librmc_mpi.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comm.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/coop.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mess.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/param.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recv.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmc.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runner.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scheduler.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/schema.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/send.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/service.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/worker.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml_parser.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLIBRARIES ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-libLIBRARIES install-man install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-info-am uninstall-libLIBRARIES
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "comm.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
|
||||
#include <mpi.h>
|
||||
|
||||
#include "comm.h"
|
||||
#include "mess.h"
|
||||
#include "node.h"
|
||||
#include "param.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
#include "../../core/runner.h"
|
||||
#include "send.h"
|
||||
#include "recv.h"
|
||||
#include "scheduler.h"
|
||||
|
||||
static sem_t sem_comm_init;
|
||||
|
||||
static Communicator * the_thread;
|
||||
|
||||
Communicator :: Communicator (int * __argc, char * * * __argv) {
|
||||
|
||||
the_thread = this;
|
||||
initNode (__argc, __argv);
|
||||
loadRMCParameters (* __argc, * __argv);
|
||||
sem_post (& sem_comm_init);
|
||||
}
|
||||
|
||||
void Communicator :: start () {
|
||||
|
||||
while (true) {
|
||||
|
||||
/* Zzz Zzz Zzz :-))) */
|
||||
sleep ();
|
||||
sendMessages ();
|
||||
|
||||
if (! atLeastOneActiveRunner ())
|
||||
break;
|
||||
receiveMessages ();
|
||||
}
|
||||
waitBuffers ();
|
||||
printDebugMessage ("finalizing");
|
||||
MPI_Finalize ();
|
||||
}
|
||||
|
||||
void initCommunication () {
|
||||
|
||||
sem_init (& sem_comm_init, 0, 0);
|
||||
}
|
||||
|
||||
void waitNodeInitialization () {
|
||||
|
||||
sem_wait (& sem_comm_init);
|
||||
}
|
||||
|
||||
void wakeUpCommunicator () {
|
||||
|
||||
the_thread -> wakeUp ();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "comm.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __comm_mpi_h
|
||||
#define __comm_mpi_h
|
||||
|
||||
#include "../../core/communicable.h"
|
||||
#include "../../core/reac_thread.h"
|
||||
|
||||
class Communicator : public ReactiveThread {
|
||||
|
||||
public :
|
||||
|
||||
/* Ctor */
|
||||
Communicator (int * __argc, char * * * __argv);
|
||||
|
||||
void start ();
|
||||
};
|
||||
|
||||
extern void initCommunication ();
|
||||
|
||||
extern void waitNodeInitialization ();
|
||||
|
||||
extern void wakeUpCommunicator ();
|
||||
|
||||
#endif
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "coop.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include "../../core/cooperative.h"
|
||||
#include "send.h"
|
||||
#include "tags.h"
|
||||
#include "schema.h"
|
||||
#include "mess.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
|
||||
Runner * Cooperative :: getOwner () {
|
||||
|
||||
return owner;
|
||||
}
|
||||
|
||||
void Cooperative :: setOwner (Runner & __runner) {
|
||||
|
||||
owner = & __runner;
|
||||
}
|
||||
|
||||
void Cooperative :: send (Cooperative * __coop) {
|
||||
|
||||
:: send (this, getRankOfRunner (__coop -> getOwner () -> getID ()), COOP_TAG);
|
||||
// stop ();
|
||||
}
|
||||
|
||||
Cooperative * getCooperative (COOP_ID __key) {
|
||||
|
||||
return dynamic_cast <Cooperative *> (getCommunicable (__key));
|
||||
}
|
||||
|
||||
void Cooperative :: notifySending () {
|
||||
|
||||
//getOwner -> setPassive ();
|
||||
// resume ();
|
||||
// printDebugMessage (b);
|
||||
}
|
||||
|
|
@ -1,252 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "mess.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include <mpi.h>
|
||||
#include <vector>
|
||||
|
||||
#include "mess.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
#include "node.h"
|
||||
|
||||
#define MPI_BUF_SIZE 1024*64
|
||||
|
||||
static char mpi_buf [MPI_BUF_SIZE];
|
||||
|
||||
static int pos_buf ;
|
||||
|
||||
static std :: vector <char *> act_buf; /* Active buffers */
|
||||
|
||||
static std :: vector <MPI_Request *> act_req; /* Active requests */
|
||||
|
||||
void cleanBuffers () {
|
||||
|
||||
for (unsigned i = 0; i < act_req.size ();) {
|
||||
|
||||
MPI_Status stat ;
|
||||
int flag ;
|
||||
MPI_Test (act_req [i], & flag, & stat) ;
|
||||
if (flag) {
|
||||
|
||||
delete act_buf [i] ;
|
||||
delete act_req [i] ;
|
||||
|
||||
act_buf [i] = act_buf.back () ;
|
||||
act_buf.pop_back () ;
|
||||
|
||||
act_req [i] = act_req.back () ;
|
||||
act_req.pop_back () ;
|
||||
}
|
||||
else
|
||||
i ++;
|
||||
}
|
||||
}
|
||||
|
||||
void waitBuffers () {
|
||||
|
||||
printDebugMessage ("waiting the termination of the asynchronous operations to complete");
|
||||
|
||||
for (unsigned i = 0; i < act_req.size (); i ++) {
|
||||
|
||||
MPI_Status stat ;
|
||||
|
||||
MPI_Wait (act_req [i], & stat) ;
|
||||
|
||||
delete act_buf [i] ;
|
||||
delete act_req [i] ;
|
||||
}
|
||||
}
|
||||
|
||||
bool probeMessage (int & __src, int & __tag) {
|
||||
|
||||
int flag;
|
||||
|
||||
MPI_Status stat;
|
||||
|
||||
MPI_Iprobe (MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, & flag, & stat);
|
||||
|
||||
__src = stat.MPI_SOURCE;
|
||||
__tag = stat.MPI_TAG;
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
void waitMessage () {
|
||||
|
||||
MPI_Status stat;
|
||||
|
||||
MPI_Probe (MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, & stat);
|
||||
}
|
||||
|
||||
void initMessage () {
|
||||
|
||||
pos_buf = 0;
|
||||
}
|
||||
|
||||
void sendMessage (int __to, int __tag) {
|
||||
|
||||
cleanBuffers ();
|
||||
act_buf.push_back (new char [pos_buf]);
|
||||
act_req.push_back (new MPI_Request);
|
||||
memcpy (act_buf.back (), mpi_buf, pos_buf);
|
||||
MPI_Isend (act_buf.back (), pos_buf, MPI_PACKED, __to, __tag, MPI_COMM_WORLD, act_req.back ());
|
||||
}
|
||||
|
||||
void sendMessageToAll (int __tag) {
|
||||
|
||||
for (int i = 0; i < getNumberOfNodes (); i ++)
|
||||
sendMessage (i, __tag);
|
||||
}
|
||||
|
||||
void receiveMessage (int __from, int __tag) {
|
||||
|
||||
MPI_Status stat;
|
||||
MPI_Request req;
|
||||
|
||||
MPI_Irecv (mpi_buf, MPI_BUF_SIZE, MPI_PACKED, __from, __tag, MPI_COMM_WORLD, & req) ;
|
||||
MPI_Wait (& req, & stat) ;
|
||||
}
|
||||
|
||||
/* Char */
|
||||
void pack (const char & __c) {
|
||||
|
||||
MPI_Pack ((void *) & __c, 1, MPI_CHAR, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Float */
|
||||
void pack (const float & __f, int __nitem) {
|
||||
|
||||
MPI_Pack ((void *) & __f, __nitem, MPI_FLOAT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Double */
|
||||
void pack (const double & __d, int __nitem) {
|
||||
|
||||
MPI_Pack ((void *) & __d, __nitem, MPI_DOUBLE, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Integer */
|
||||
void pack (const int & __i, int __nitem) {
|
||||
|
||||
MPI_Pack ((void *) & __i, __nitem, MPI_INT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Unsigned int. */
|
||||
void pack (const unsigned int & __ui, int __nitem) {
|
||||
|
||||
MPI_Pack ((void *) & __ui, __nitem, MPI_UNSIGNED, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Short int. */
|
||||
void pack (const short & __sh, int __nitem) {
|
||||
|
||||
MPI_Pack ((void *) & __sh, __nitem, MPI_SHORT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Unsigned short */
|
||||
void pack (const unsigned short & __ush, int __nitem) {
|
||||
|
||||
MPI_Pack ((void *) & __ush, __nitem, MPI_UNSIGNED_SHORT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Long */
|
||||
void pack (const long & __l, int __nitem) {
|
||||
|
||||
MPI_Pack ((void *) & __l, __nitem, MPI_LONG, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Unsigned long */
|
||||
void pack (const unsigned long & __ul, int __nitem) {
|
||||
|
||||
MPI_Pack ((void *) & __ul, __nitem, MPI_UNSIGNED_LONG, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* String */
|
||||
void pack (const char * __str) {
|
||||
|
||||
int len = strlen (__str) + 1;
|
||||
MPI_Pack (& len, 1, MPI_INT, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
MPI_Pack ((void *) __str, len, MPI_CHAR, mpi_buf, MPI_BUF_SIZE, & pos_buf, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Char */
|
||||
void unpack (char & __c) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __c, 1, MPI_CHAR, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Float */
|
||||
void unpack (float & __f, int __nitem) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __f, __nitem, MPI_FLOAT, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Double */
|
||||
void unpack (double & __d, int __nitem) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __d, __nitem, MPI_DOUBLE, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Integer */
|
||||
void unpack (int & __i, int __nitem) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __i, __nitem, MPI_INT, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Unsigned int. */
|
||||
void unpack (unsigned int & __ui, int __nitem) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __ui, __nitem, MPI_UNSIGNED, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Short int. */
|
||||
void unpack (short & __sh, int __nitem) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __sh, __nitem, MPI_SHORT, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Unsigned short */
|
||||
void unpack (unsigned short & __ush, int __nitem) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __ush, __nitem, MPI_UNSIGNED_SHORT, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Long */
|
||||
void unpack (long & __l, int __nitem) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __l, __nitem, MPI_LONG, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* Unsigned long */
|
||||
void unpack (unsigned long & __ul, int __nitem) {
|
||||
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & __ul, __nitem, MPI_UNSIGNED_LONG, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
/* String */
|
||||
void unpack (char * __str) {
|
||||
|
||||
int len;
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, & len, 1, MPI_INT, MPI_COMM_WORLD);
|
||||
MPI_Unpack (mpi_buf, MPI_BUF_SIZE, & pos_buf, __str, len, MPI_CHAR, MPI_COMM_WORLD);
|
||||
}
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "mess.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __mess_rmc_h
|
||||
#define __mess_rmc_h
|
||||
|
||||
#include "../../core/messaging.h"
|
||||
|
||||
extern void initMessage ();
|
||||
|
||||
extern void sendMessage (int __to, int __tag);
|
||||
|
||||
extern void sendMessageToAll (int __tag);
|
||||
|
||||
extern void receiveMessage (int __from, int __tag);
|
||||
|
||||
extern void cleanBuffers ();
|
||||
|
||||
extern void waitBuffers ();
|
||||
|
||||
extern bool probeMessage (int & __src, int & __tag);
|
||||
|
||||
extern void waitMessage ();
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "node.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include <mpi.h>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
static int rk, sz; /* Rank & size */
|
||||
|
||||
static std :: map <std :: string, int> name_to_rk;
|
||||
|
||||
static std :: vector <std :: string> rk_to_name;
|
||||
|
||||
int getNodeRank () {
|
||||
|
||||
return rk;
|
||||
}
|
||||
|
||||
int getNumberOfNodes () {
|
||||
|
||||
return sz;
|
||||
}
|
||||
|
||||
int getRankFromName (const std :: string & __name) {
|
||||
|
||||
return atoi (__name.c_str ());
|
||||
}
|
||||
|
||||
void initNode (int * __argc, char * * * __argv) {
|
||||
|
||||
int provided;
|
||||
MPI_Init_thread (__argc, __argv, MPI_THREAD_FUNNELED, & provided);
|
||||
assert (provided == MPI_THREAD_FUNNELED); /* The MPI implementation must be multi-threaded.
|
||||
Yet, only one thread performs the comm.
|
||||
operations */
|
||||
MPI_Comm_rank (MPI_COMM_WORLD, & rk); /* Who ? */
|
||||
MPI_Comm_size (MPI_COMM_WORLD, & sz); /* How many ? */
|
||||
|
||||
char names [sz] [MPI_MAX_PROCESSOR_NAME];
|
||||
int len;
|
||||
|
||||
/* Processor names */
|
||||
MPI_Get_processor_name (names [0], & len); /* Me */
|
||||
MPI_Allgather (names, MPI_MAX_PROCESSOR_NAME, MPI_CHAR, names, MPI_MAX_PROCESSOR_NAME, MPI_CHAR, MPI_COMM_WORLD); /* Broadcast */
|
||||
|
||||
for (int i = 0; i < sz; i ++) {
|
||||
rk_to_name.push_back (names [i]);
|
||||
name_to_rk [names [i]] = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "node.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __node_h
|
||||
#define __node_h
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
|
||||
extern int getNodeRank (); /* It gives the rank of the calling process */
|
||||
|
||||
extern int getNumberOfNodes (); /* It gives the size of the environment (Total number of nodes) */
|
||||
|
||||
extern int getRankFromName (const std :: string & __name); /* It gives the rank of the process
|
||||
expressed by its name */
|
||||
|
||||
extern void initNode (int * __argc, char * * * __argv);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "param.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include <utils/eoParser.h>
|
||||
|
||||
#include "schema.h"
|
||||
|
||||
void loadRMCParameters (int & __argc, char * * & __argv) {
|
||||
|
||||
eoParser parser (__argc, __argv);
|
||||
|
||||
/* Schema */
|
||||
eoValueParam <std :: string> schema_param ("schema.xml", "schema", "?");
|
||||
parser.processParam (schema_param);
|
||||
loadSchema (schema_param.value ().c_str ());
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "param.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __rmc_param_h
|
||||
#define __rmc_param_h
|
||||
|
||||
extern void loadRMCParameters (int & __argc, char * * & __argv);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "recv.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include "comm.h"
|
||||
#include "tags.h"
|
||||
#include "worker.h"
|
||||
#include "scheduler.h"
|
||||
#include "mess.h"
|
||||
#include "node.h"
|
||||
#include "../../core/runner.h"
|
||||
#include "../../core/cooperative.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
|
||||
void receiveMessages () {
|
||||
|
||||
cleanBuffers ();
|
||||
|
||||
do {
|
||||
|
||||
if (! atLeastOneActiveThread ()) {
|
||||
// printDebugMessage ("debut wait");
|
||||
waitMessage ();
|
||||
//printDebugMessage ("fin wait");
|
||||
}
|
||||
|
||||
int src, tag;
|
||||
|
||||
while (probeMessage (src, tag)) {
|
||||
|
||||
receiveMessage (src, tag);
|
||||
initMessage ();
|
||||
/*
|
||||
char b [1000];
|
||||
sprintf (b, "traitement recv %d\n", tag);
|
||||
printDebugMessage (b);
|
||||
*/
|
||||
|
||||
switch (tag) {
|
||||
|
||||
case RUNNER_STOP_TAG:
|
||||
unpackTerminationOfRunner ();
|
||||
wakeUpCommunicator ();
|
||||
break;
|
||||
|
||||
case COOP_TAG:
|
||||
// printDebugMessage ("reception de message de cooperation");
|
||||
COOP_ID coop_id;
|
||||
unpack (coop_id);
|
||||
getCooperative (coop_id) -> unpack ();
|
||||
break;
|
||||
|
||||
case SCHED_REQUEST_TAG:
|
||||
unpackResourceRequest ();
|
||||
break;
|
||||
|
||||
case SCHED_RESULT_TAG:
|
||||
{
|
||||
/* Unpacking the resource */
|
||||
SERVICE_ID serv_id;
|
||||
unpack (serv_id);
|
||||
Service * serv = getService (serv_id);
|
||||
int dest;
|
||||
unpack (dest);
|
||||
WORKER_ID worker_id;
|
||||
unpack (worker_id);
|
||||
|
||||
/* Going back ... */
|
||||
initMessage ();
|
||||
pack (worker_id);
|
||||
pack (serv_id);
|
||||
serv -> packData ();
|
||||
serv -> notifySendingData ();
|
||||
sendMessage (dest, TASK_DATA_TAG);
|
||||
break;
|
||||
}
|
||||
|
||||
case TASK_DATA_TAG:
|
||||
{
|
||||
WORKER_ID worker_id;
|
||||
unpack (worker_id);
|
||||
Worker * worker = getWorker (worker_id);
|
||||
worker -> setSource (src);
|
||||
worker -> unpackData ();
|
||||
worker -> wakeUp ();
|
||||
break;
|
||||
}
|
||||
|
||||
case TASK_RESULT_TAG:
|
||||
{
|
||||
SERVICE_ID serv_id;
|
||||
unpack (serv_id);
|
||||
Service * serv = getService (serv_id);
|
||||
serv -> unpackResult ();
|
||||
break;
|
||||
}
|
||||
|
||||
case TASK_DONE_TAG:
|
||||
unpackTaskDone ();
|
||||
break;
|
||||
|
||||
default:
|
||||
;
|
||||
};
|
||||
}
|
||||
|
||||
} while (! atLeastOneActiveThread () && atLeastOneActiveRunner () /*&& ! allResourcesFree ()*/);
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "recv.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __recv_h
|
||||
#define __recv_h
|
||||
|
||||
extern void receiveMessages ();
|
||||
|
||||
#endif
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; messent-column: 35; -*-
|
||||
|
||||
// "rmc.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include "send.h"
|
||||
#include "worker.h"
|
||||
#include "schema.h"
|
||||
#include "comm.h"
|
||||
#include "scheduler.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
|
||||
static std :: vector <pthread_t *> ll_threads; /* Low level threads */
|
||||
|
||||
void runRMC () {
|
||||
|
||||
/* Worker(s) ? */
|
||||
for (unsigned i = 0; i < my_node -> num_workers; i ++)
|
||||
addThread (new Worker, ll_threads);
|
||||
|
||||
wakeUpCommunicator ();
|
||||
}
|
||||
|
||||
void initRMC (int & __argc, char * * & __argv) {
|
||||
|
||||
/* Communication */
|
||||
initCommunication ();
|
||||
addThread (new Communicator (& __argc, & __argv), ll_threads);
|
||||
waitNodeInitialization ();
|
||||
initSending ();
|
||||
|
||||
/* Scheduler */
|
||||
if (isScheduleNode ())
|
||||
initScheduler ();
|
||||
|
||||
///
|
||||
}
|
||||
|
||||
void finalizeRMC () {
|
||||
|
||||
printDebugMessage ("before join threads RMC");
|
||||
joinThreads (ll_threads);
|
||||
printDebugMessage ("after join threads RMC");
|
||||
}
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "runner.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include "../../core/messaging.h"
|
||||
#include "../../core/runner.h"
|
||||
#include "node.h"
|
||||
#include "send.h"
|
||||
#include "tags.h"
|
||||
#include "schema.h"
|
||||
|
||||
bool Runner :: isLocal () {
|
||||
|
||||
for (unsigned i = 0; i < my_node -> id_run.size (); i ++)
|
||||
if (my_node -> id_run [i] == id)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void Runner :: packTermination () {
|
||||
|
||||
pack (id);
|
||||
}
|
||||
|
||||
void Runner :: terminate () {
|
||||
|
||||
sendToAll (this, RUNNER_STOP_TAG);
|
||||
}
|
||||
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "sched_thread.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include <queue>
|
||||
|
||||
#include "scheduler.h"
|
||||
#include "tags.h"
|
||||
#include "mess.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
|
||||
static std :: queue <SCHED_RESOURCE> resources; /* Free resources */
|
||||
|
||||
static std :: queue <SCHED_REQUEST> requests; /* Requests */
|
||||
|
||||
static unsigned initNumberOfRes = 0;
|
||||
|
||||
void initScheduler () {
|
||||
|
||||
for (unsigned i = 0; i < the_schema.size (); i ++) {
|
||||
|
||||
const Node & node = the_schema [i];
|
||||
|
||||
if (node.rk_sched == my_node -> rk)
|
||||
for (unsigned j = 0; j < node.num_workers; j ++)
|
||||
resources.push (std :: pair <RANK_ID, WORKER_ID> (i, j + 1));
|
||||
}
|
||||
initNumberOfRes = resources.size ();
|
||||
}
|
||||
|
||||
bool allResourcesFree () {
|
||||
|
||||
return resources.size () == initNumberOfRes;
|
||||
}
|
||||
|
||||
static void update () {
|
||||
|
||||
unsigned num_alloc = std :: min (resources.size (), requests.size ());
|
||||
|
||||
for (unsigned i = 0; i < num_alloc; i ++) {
|
||||
|
||||
SCHED_REQUEST req = requests.front ();
|
||||
requests.pop ();
|
||||
|
||||
SCHED_RESOURCE res = resources.front ();
|
||||
resources.pop ();
|
||||
|
||||
printDebugMessage ("allocating a resource.");
|
||||
initMessage ();
|
||||
pack (req.second);
|
||||
pack (res);
|
||||
sendMessage (req.first, SCHED_RESULT_TAG);
|
||||
}
|
||||
}
|
||||
|
||||
void unpackResourceRequest () {
|
||||
|
||||
printDebugMessage ("queuing a resource request.");
|
||||
SCHED_REQUEST req;
|
||||
unpack (req);
|
||||
requests.push (req);
|
||||
update ();
|
||||
}
|
||||
|
||||
void unpackTaskDone () {
|
||||
|
||||
printDebugMessage ("I'm notified a worker is now idle.");
|
||||
SCHED_RESOURCE res;
|
||||
unpack (res);
|
||||
resources.push (res);
|
||||
if (resources.size () == initNumberOfRes)
|
||||
printDebugMessage ("all the resources are now free.");
|
||||
update ();
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "scheduler.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __scheduler_h
|
||||
#define __scheduler_h
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "schema.h"
|
||||
#include "worker.h"
|
||||
|
||||
typedef std :: pair <RANK_ID, WORKER_ID> SCHED_RESOURCE;
|
||||
|
||||
typedef std :: pair <RANK_ID, SERVICE_ID> SCHED_REQUEST;
|
||||
|
||||
/* Initializing the list of available workers */
|
||||
extern void initScheduler ();
|
||||
|
||||
/* Processing a resource request from a service */
|
||||
extern void unpackResourceRequest ();
|
||||
|
||||
/* Being known a worker is now idle :-) */
|
||||
extern void unpackTaskDone ();
|
||||
|
||||
extern bool allResourcesFree ();
|
||||
|
||||
#endif
|
||||
|
|
@ -1,150 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "schema.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
|
||||
#include "schema.h"
|
||||
#include "xml_parser.h"
|
||||
#include "comm.h"
|
||||
#include "node.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
|
||||
std :: vector <Node> the_schema;
|
||||
|
||||
Node * my_node;
|
||||
|
||||
RANK_ID getRankOfRunner (RUNNER_ID __key) {
|
||||
|
||||
for (unsigned i = 0; i < the_schema.size (); i ++)
|
||||
for (unsigned j = 0; j < the_schema [i].id_run.size (); j ++)
|
||||
if (the_schema [i].id_run [j] == __key)
|
||||
return the_schema [i].rk;
|
||||
assert (false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void loadNode (int __rk_sched) {
|
||||
|
||||
Node node;
|
||||
|
||||
node.rk_sched = __rk_sched;
|
||||
|
||||
/* ATT: name*/
|
||||
node.rk = getRankFromName (getAttributeValue ("name"));
|
||||
/* ATT: num_workers */
|
||||
node.num_workers = atoi (getAttributeValue ("num_workers").c_str ());
|
||||
|
||||
while (true) {
|
||||
|
||||
/* TAG: <runner> | </node> */
|
||||
std :: string name = getNextNode ();
|
||||
assert (name == "runner" || name == "node");
|
||||
if (name == "runner") {
|
||||
/* TAG: </node> */
|
||||
node.id_run.push_back (atoi (getNextNode ().c_str ()));
|
||||
/* TAG: </runner> */
|
||||
assert (getNextNode () == "runner");
|
||||
}
|
||||
else {
|
||||
/* TAG: </node> */
|
||||
the_schema.push_back (node);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void loadGroup () {
|
||||
|
||||
std :: string name;
|
||||
|
||||
/* ATT: scheduler*/
|
||||
int rk_sched = getRankFromName (getAttributeValue ("scheduler"));
|
||||
|
||||
while (true) {
|
||||
|
||||
/* TAG: <node> | </group> */
|
||||
name = getNextNode ();
|
||||
assert (name == "node" || name == "group");
|
||||
if (name == "node")
|
||||
/* TAG: <node> */
|
||||
loadNode (rk_sched);
|
||||
else
|
||||
/* TAG: </group> */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool isScheduleNode () {
|
||||
|
||||
return my_node -> rk == my_node -> rk_sched;
|
||||
}
|
||||
|
||||
void loadSchema (const char * __filename) {
|
||||
|
||||
openXMLDocument (__filename);
|
||||
|
||||
std :: string name;
|
||||
|
||||
/* TAG: <schema> */
|
||||
name = getNextNode ();
|
||||
assert (name == "schema");
|
||||
|
||||
while (true) {
|
||||
|
||||
/* TAG: <group> | </schema> */
|
||||
name = getNextNode ();
|
||||
assert (name == "group" || name == "schema");
|
||||
if (name == "group")
|
||||
/* TAG: <group> */
|
||||
loadGroup ();
|
||||
else
|
||||
/* TAG: </schema> */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Looking for my node */
|
||||
for (unsigned i = 0; i < the_schema.size (); i ++)
|
||||
if (the_schema [i].rk == getNodeRank ())
|
||||
my_node = & (the_schema [i]);
|
||||
|
||||
/* About me */
|
||||
char mess [1000];
|
||||
|
||||
sprintf (mess, "my rank is %d", my_node -> rk);
|
||||
printDebugMessage (mess);
|
||||
if (isScheduleNode ())
|
||||
printDebugMessage ("I'am a scheduler");
|
||||
for (unsigned i = 0; i < my_node -> id_run.size (); i ++) {
|
||||
sprintf (mess, "I manage the runner %d", my_node -> id_run [i]);
|
||||
printDebugMessage (mess);
|
||||
}
|
||||
if (my_node -> num_workers) {
|
||||
|
||||
sprintf (mess, "I manage %d worker(s)", my_node -> num_workers);
|
||||
printDebugMessage (mess);
|
||||
}
|
||||
|
||||
closeXMLDocument ();
|
||||
}
|
||||
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "schema.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __schema_h
|
||||
#define __schema_h
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
|
||||
#include "../../core/runner.h"
|
||||
|
||||
typedef int RANK_ID;
|
||||
|
||||
struct Node {
|
||||
|
||||
RANK_ID rk; /* Rank */
|
||||
std :: string name; /* Host name */
|
||||
unsigned num_workers; /* Number of parallel workers */
|
||||
int rk_sched; /* rank of the scheduler */
|
||||
std :: vector <RUNNER_ID> id_run; /* List of runners */
|
||||
};
|
||||
|
||||
extern std :: vector <Node> the_schema;
|
||||
|
||||
extern Node * my_node;
|
||||
|
||||
extern void loadSchema (const char * __filename);
|
||||
|
||||
extern RANK_ID getRankOfRunner (RUNNER_ID __key);
|
||||
|
||||
extern bool isScheduleNode ();
|
||||
|
||||
#endif
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "send.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include <mpi.h>
|
||||
#include <semaphore.h>
|
||||
#include <queue>
|
||||
|
||||
#include "tags.h"
|
||||
#include "comm.h"
|
||||
#include "worker.h"
|
||||
#include "scheduler.h"
|
||||
#include "mess.h"
|
||||
#include "node.h"
|
||||
#include "../../core/cooperative.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
|
||||
#define TO_ALL -1
|
||||
|
||||
typedef struct {
|
||||
|
||||
Communicable * comm;
|
||||
int to;
|
||||
int tag;
|
||||
|
||||
} SEND_REQUEST;
|
||||
|
||||
static std :: queue <SEND_REQUEST> mess;
|
||||
|
||||
static sem_t sem_send;
|
||||
|
||||
void initSending () {
|
||||
|
||||
sem_init (& sem_send, 0, 1);
|
||||
}
|
||||
|
||||
void send (Communicable * __comm, int __to, int __tag) {
|
||||
|
||||
SEND_REQUEST req;
|
||||
req.comm = __comm;
|
||||
req.to = __to;
|
||||
req.tag = __tag;
|
||||
|
||||
sem_wait (& sem_send);
|
||||
mess.push (req);
|
||||
sem_post (& sem_send);
|
||||
wakeUpCommunicator ();
|
||||
}
|
||||
|
||||
void sendToAll (Communicable * __comm, int __tag) {
|
||||
|
||||
send (__comm, TO_ALL, __tag);
|
||||
}
|
||||
|
||||
void sendMessages () {
|
||||
|
||||
sem_wait (& sem_send);
|
||||
|
||||
while (! mess.empty ()) {
|
||||
|
||||
SEND_REQUEST req = mess.front ();
|
||||
/*
|
||||
char b [1000];
|
||||
sprintf (b, "traitement send %d\n", req.tag);
|
||||
printDebugMessage (b);
|
||||
*/
|
||||
|
||||
Communicable * comm = req.comm;
|
||||
|
||||
initMessage ();
|
||||
|
||||
switch (req.tag) {
|
||||
|
||||
case RUNNER_STOP_TAG:
|
||||
dynamic_cast <Runner *> (comm) -> packTermination ();
|
||||
dynamic_cast <Runner *> (comm) -> notifySendingTermination ();
|
||||
break;
|
||||
|
||||
case COOP_TAG:
|
||||
dynamic_cast <Cooperative *> (comm) -> pack ();
|
||||
dynamic_cast <Cooperative *> (comm) -> notifySending ();
|
||||
break;
|
||||
|
||||
case SCHED_REQUEST_TAG:
|
||||
dynamic_cast <Service *> (comm) -> packResourceRequest ();
|
||||
dynamic_cast <Service *> (comm) -> notifySendingResourceRequest ();
|
||||
break;
|
||||
|
||||
case TASK_RESULT_TAG:
|
||||
dynamic_cast <Worker *> (comm) -> packResult ();
|
||||
dynamic_cast <Worker *> (comm) -> notifySendingResult ();
|
||||
break;
|
||||
|
||||
case TASK_DONE_TAG:
|
||||
dynamic_cast <Worker *> (comm) -> packTaskDone ();
|
||||
dynamic_cast <Worker *> (comm) -> notifySendingTaskDone ();
|
||||
break;
|
||||
|
||||
default :
|
||||
break;
|
||||
|
||||
};
|
||||
|
||||
if (req.to == TO_ALL)
|
||||
sendMessageToAll (req.tag);
|
||||
else
|
||||
sendMessage (req.to, req.tag);
|
||||
mess.pop ();
|
||||
}
|
||||
|
||||
sem_post (& sem_send);
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "send.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __send_h
|
||||
#define __send_h
|
||||
|
||||
#include "../../core/communicable.h"
|
||||
|
||||
extern void initSending ();
|
||||
|
||||
extern void send (Communicable * __comm, int __to, int __tag);
|
||||
|
||||
extern void sendToAll (Communicable * __comm, int __tag);
|
||||
|
||||
extern void sendMessages ();
|
||||
|
||||
#endif
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "service.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include "../../core/service.h"
|
||||
#include "../../core/messaging.h"
|
||||
#include "node.h"
|
||||
#include "tags.h"
|
||||
#include "send.h"
|
||||
#include "scheduler.h"
|
||||
|
||||
void Service :: requestResourceRequest (unsigned __how_many) {
|
||||
|
||||
num_sent_rr = __how_many;
|
||||
for (unsigned i = 0; i < __how_many; i ++)
|
||||
send (this, my_node -> rk_sched, SCHED_REQUEST_TAG);
|
||||
}
|
||||
|
||||
void Service :: packResourceRequest () {
|
||||
|
||||
SCHED_REQUEST req;
|
||||
req.first = getNodeRank ();
|
||||
req.second = getKey ();
|
||||
// printf ("demande de ressource pour %d\n", req.second);
|
||||
:: pack (req);
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "tags.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __tags_h
|
||||
#define __tags_h
|
||||
|
||||
#define RUNNER_STOP_TAG 13
|
||||
|
||||
#define COOP_TAG 14
|
||||
|
||||
#define SCHED_REQUEST_TAG 16
|
||||
|
||||
#define SCHED_RESULT_TAG 17
|
||||
#define TASK_DATA_TAG 18
|
||||
|
||||
#define TASK_RESULT_TAG 19
|
||||
#define TASK_DONE_TAG 20
|
||||
|
||||
#endif
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
|
||||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "worker.cpp"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "tags.h"
|
||||
#include "send.h"
|
||||
#include "node.h"
|
||||
#include "schema.h"
|
||||
#include "worker.h"
|
||||
#include "mess.h"
|
||||
#include "../../core/peo_debug.h"
|
||||
|
||||
static std :: vector <Worker *> key_to_worker (1); /* Vector of registered workers */
|
||||
|
||||
Worker * getWorker (WORKER_ID __key) {
|
||||
|
||||
return key_to_worker [__key];
|
||||
}
|
||||
|
||||
Worker :: Worker () {
|
||||
|
||||
toto = false;
|
||||
id = key_to_worker.size ();
|
||||
key_to_worker.push_back (this);
|
||||
}
|
||||
|
||||
void Worker :: packResult () {
|
||||
|
||||
pack (serv_id);
|
||||
serv -> packResult ();
|
||||
}
|
||||
|
||||
void Worker :: unpackData () {
|
||||
|
||||
printDebugMessage ("unpacking the ID. of the service.");
|
||||
unpack (serv_id);
|
||||
serv = getService (serv_id);
|
||||
printDebugMessage ("found the service.");
|
||||
serv -> unpackData ();
|
||||
printDebugMessage ("unpacking the data.");
|
||||
setActive ();
|
||||
}
|
||||
|
||||
void Worker :: packTaskDone () {
|
||||
|
||||
pack (getNodeRank ());
|
||||
pack (id);
|
||||
}
|
||||
|
||||
void Worker :: notifySendingResult () {
|
||||
|
||||
/* Notifying the scheduler of the termination */
|
||||
toto = true;
|
||||
wakeUp ();
|
||||
}
|
||||
|
||||
void Worker :: notifySendingTaskDone () {
|
||||
|
||||
setPassive ();
|
||||
}
|
||||
|
||||
void Worker :: setSource (int __rank) {
|
||||
|
||||
src = __rank;
|
||||
}
|
||||
|
||||
void Worker :: start () {
|
||||
|
||||
while (true) {
|
||||
|
||||
sleep ();
|
||||
|
||||
if (! atLeastOneActiveRunner ())
|
||||
break;
|
||||
|
||||
if (toto) {
|
||||
send (this, my_node -> rk_sched, TASK_DONE_TAG);
|
||||
toto = false;
|
||||
}
|
||||
else {
|
||||
|
||||
printDebugMessage ("executing the task.");
|
||||
serv -> execute ();
|
||||
send (this, src, TASK_RESULT_TAG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "worker.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __worker_h
|
||||
#define __worker_h
|
||||
|
||||
#include "../../core/communicable.h"
|
||||
#include "../../core/reac_thread.h"
|
||||
#include "../../core/service.h"
|
||||
|
||||
typedef unsigned WORKER_ID;
|
||||
|
||||
class Worker : public Communicable, public ReactiveThread {
|
||||
|
||||
public :
|
||||
|
||||
Worker ();
|
||||
|
||||
void start ();
|
||||
|
||||
void packResult ();
|
||||
|
||||
void unpackData ();
|
||||
|
||||
void packTaskDone ();
|
||||
|
||||
void notifySendingResult ();
|
||||
|
||||
void notifySendingTaskDone ();
|
||||
|
||||
void setSource (int __rank);
|
||||
|
||||
private :
|
||||
|
||||
WORKER_ID id;
|
||||
SERVICE_ID serv_id;
|
||||
Service * serv;
|
||||
int src;
|
||||
|
||||
bool toto;
|
||||
};
|
||||
|
||||
extern Worker * getWorker (WORKER_ID __key);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "xml_parser.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#include <libxml/xmlreader.h>
|
||||
|
||||
#include "xml_parser.h"
|
||||
|
||||
static xmlTextReaderPtr reader;
|
||||
|
||||
void openXMLDocument (const char * __filename) {
|
||||
|
||||
reader = xmlNewTextReaderFilename (__filename);
|
||||
|
||||
if (! reader) {
|
||||
|
||||
fprintf (stderr, "unable to open '%s'.\n", __filename);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
void closeXMLDocument () {
|
||||
|
||||
xmlFreeTextReader (reader);
|
||||
}
|
||||
|
||||
std :: string getAttributeValue (const std :: string & __attr) {
|
||||
|
||||
xmlChar * value = xmlTextReaderGetAttribute (reader, (const xmlChar *) __attr.c_str ());
|
||||
|
||||
std :: string str ((const char *) value);
|
||||
|
||||
xmlFree (value);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
static bool isSep (const xmlChar * __text) {
|
||||
|
||||
for (unsigned i = 0; i < strlen ((char *) __text); i ++)
|
||||
if (__text [i] != ' ' && __text [i] != '\t' && __text [i] != '\n')
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
std :: string getNextNode () {
|
||||
|
||||
xmlChar * name, * value;
|
||||
|
||||
do {
|
||||
xmlTextReaderRead (reader);
|
||||
name = xmlTextReaderName (reader);
|
||||
value = xmlTextReaderValue (reader);
|
||||
// printf ("value = %s\n", value);
|
||||
} while (! strcmp ((char *) name, "#text") && isSep (value));
|
||||
|
||||
std :: string str;
|
||||
|
||||
if (strcmp ((char *) name, "#text"))
|
||||
str.assign ((char *) name);
|
||||
else
|
||||
str.assign ((char *) value);
|
||||
|
||||
if (name)
|
||||
xmlFree (name);
|
||||
if (value)
|
||||
xmlFree (value);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// "xml_parser.h"
|
||||
|
||||
// (c) OPAC Team, LIFL, August 2005
|
||||
|
||||
/* This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: cahon@lifl.fr
|
||||
*/
|
||||
|
||||
#ifndef __xml_parser_h
|
||||
#define __xml_parser_h
|
||||
|
||||
#include <string>
|
||||
|
||||
extern void openXMLDocument (const char * __filename);
|
||||
|
||||
extern void closeXMLDocument ();
|
||||
|
||||
extern std :: string getAttributeValue (const std :: string & __attr);
|
||||
|
||||
extern std :: string getNextNode ();
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue