diff --git a/Makefile b/Makefile deleted file mode 100644 index b8add26d37da684413071eb2cbf5daba2f74a604..0000000000000000000000000000000000000000 --- a/Makefile +++ /dev/null @@ -1,782 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - - - -# This file is part of SWIFT. -# Coypright (c) 2012 pedro.gonnet@durham.ac.uk. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -pkgdatadir = $(datadir)/QUICKSCHED -pkgincludedir = $(includedir)/QUICKSCHED -pkglibdir = $(libdir)/QUICKSCHED -pkglibexecdir = $(libexecdir)/QUICKSCHED -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -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 = : -build_triplet = x86_64-unknown-linux-gnu -host_triplet = x86_64-unknown-linux-gnu -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure $(top_srcdir)/doc/Makefile.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS compile config.guess config.sub \ - depcomp install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_ext.m4 \ - $(top_srcdir)/m4/ax_func_posix_memalign.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_openmp.m4 \ - $(top_srcdir)/m4/ax_prog_doxygen.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = doc/Makefile -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = ${SHELL} /home/aidan/quicksched/missing --run aclocal-1.11 -AMTAR = ${SHELL} /home/aidan/quicksched/missing --run tar -AR = ar -AUTOCONF = ${SHELL} /home/aidan/quicksched/missing --run autoconf -AUTOHEADER = ${SHELL} /home/aidan/quicksched/missing --run autoheader -AUTOMAKE = ${SHELL} /home/aidan/quicksched/missing --run automake-1.11 -AWK = gawk -CC = gcc -std=gnu99 -CCDEPMODE = depmode=gcc3 -CFLAGS = -g -O2 -pthread -CPP = gcc -E -CPPFLAGS = -CUDA_CFLAGS = -I/home/aidan/cuda_6.0//include -CUDA_LIBS = -L/home/aidan/cuda_6.0//lib -L/home/aidan/cuda_6.0//lib64 -lcudart -CYGPATH_W = echo -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps -DOXYGEN_PAPER_SIZE = -DSYMUTIL = -DUMPBIN = -DX_CONFIG = doc/Doxyfile -DX_DOCDIR = doc/ -DX_DOT = /usr/bin/dot -DX_DOXYGEN = /usr/bin/doxygen -DX_DVIPS = /usr/bin/dvips -DX_EGREP = /bin/egrep -DX_ENV = SRCDIR='.' PROJECT='libchebfun' DOCDIR='doc/' VERSION='' PERL_PATH='/usr/bin/perl' HAVE_DOT='YES' DOT_PATH='/usr/bin' GENERATE_MAN='NO' GENERATE_RTF='NO' GENERATE_XML='NO' GENERATE_HTMLHELP='NO' GENERATE_CHI='NO' GENERATE_HTML='YES' GENERATE_LATEX='YES' -DX_FLAG_chi = 0 -DX_FLAG_chm = 0 -DX_FLAG_doc = 1 -DX_FLAG_dot = 1 -DX_FLAG_html = 1 -DX_FLAG_man = 0 -DX_FLAG_pdf = 1 -DX_FLAG_ps = 1 -DX_FLAG_rtf = 0 -DX_FLAG_xml = 0 -DX_HHC = -DX_LATEX = /usr/bin/latex -DX_MAKEINDEX = /usr/bin/makeindex -DX_PDFLATEX = /usr/bin/pdflatex -DX_PERL = /usr/bin/perl -DX_PROJECT = libchebfun -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /bin/grep -E -EXEEXT = -FGREP = /bin/grep -F -GREP = /bin/grep -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -LD = /usr/bin/ld -m elf_x86_64 -LDFLAGS = -LIBOBJS = -LIBS = -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIPO = -LN_S = ln -s -LTLIBOBJS = -MAKEINFO = ${SHELL} /home/aidan/quicksched/missing --run makeinfo -MKDIR_P = /bin/mkdir -p -NM = /usr/bin/nm -B -NMEDIT = -NVCC = /home/aidan/cuda_6.0//bin/nvcc -OBJDUMP = objdump -OBJEXT = o -OPENMP_CFLAGS = -fopenmp -OTOOL = -OTOOL64 = -PACKAGE = QUICKSCHED -PACKAGE_BUGREPORT = -PACKAGE_NAME = -PACKAGE_STRING = -PACKAGE_TARNAME = -PACKAGE_VERSION = -PATH_SEPARATOR = : -PRTDIAG = -PTHREAD_CC = gcc -std=gnu99 -PTHREAD_CFLAGS = -pthread -PTHREAD_LIBS = -RANLIB = ranlib -SED = /bin/sed -SET_MAKE = -SHELL = /bin/sh -SIMD_FLAGS = -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -STRIP = strip -VERSION = VERSION -abs_builddir = /home/aidan/quicksched -abs_srcdir = /home/aidan/quicksched -abs_top_builddir = /home/aidan/quicksched -abs_top_srcdir = /home/aidan/quicksched -ac_ct_CC = gcc -ac_ct_DUMPBIN = -acx_pthread_config = -am__include = include -am__leading_dot = . -am__quote = -am__tar = ${AMTAR} chof - "$$tardir" -am__untar = ${AMTAR} xf - -bindir = ${exec_prefix}/bin -build = x86_64-unknown-linux-gnu -build_alias = -build_cpu = x86_64 -build_os = linux-gnu -build_vendor = unknown -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -docdir = ${datarootdir}/doc/${PACKAGE} -dvidir = ${docdir} -exec_prefix = ${prefix} -host = x86_64-unknown-linux-gnu -host_alias = -host_cpu = x86_64 -host_os = linux-gnu -host_vendor = unknown -htmldir = ${docdir} -includedir = ${prefix}/include -infodir = ${datarootdir}/info -install_sh = ${SHELL} /home/aidan/quicksched/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localedir = ${datarootdir}/locale -localstatedir = ${prefix}/var -lt_ECHO = echo -mandir = ${datarootdir}/man -mkdir_p = /bin/mkdir -p -oldincludedir = /usr/include -pdfdir = ${docdir} -prefix = /usr/local -program_transform_name = s,x,x, -psdir = ${docdir} -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target_alias = -top_build_prefix = -top_builddir = . -top_srcdir = . - -# Automake stuff -AUTOMAKE_OPTIONS = gnu -ACLOCAL_AMFLAGS = -I m4 - -# Show the way... -SUBDIRS = src examples doc -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -doc/Makefile: $(top_builddir)/config.status $(top_srcdir)/doc/Makefile.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt - -# 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): - @fail= 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; \ - ($(am__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" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= 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; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - 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 || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$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; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile config.h -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) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-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: diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 491dce02a6ac70c35a0227fc84102eb10dfd136e..0000000000000000000000000000000000000000 --- a/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ - -# This file is part of SWIFT. -# Coypright (c) 2012 pedro.gonnet@durham.ac.uk. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# Automake stuff -AUTOMAKE_OPTIONS = gnu -ACLOCAL_AMFLAGS = -I m4 - -# Show the way... -SUBDIRS = src examples doc diff --git a/config.log b/config.log deleted file mode 100644 index 89d8d2d2d88ed65bb862d334b0a7cfe68cc22f0e..0000000000000000000000000000000000000000 --- a/config.log +++ /dev/null @@ -1,2573 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by configure, which was -generated by GNU Autoconf 2.63. Invocation command line was - - $ ./configure --with-cuda=/home/aidan/cuda_6.0/ --no-create --no-recursion - -## --------- ## -## Platform. ## -## --------- ## - -hostname = gtx690 -uname -m = x86_64 -uname -r = 2.6.32-358.6.2.el6.x86_64 -uname -s = Linux -uname -v = #1 SMP Thu May 16 20:59:36 UTC 2013 - -/usr/bin/uname -p = unknown -/bin/uname -X = unknown - -/bin/arch = x86_64 -/usr/bin/arch -k = unknown -/usr/convex/getsysinfo = unknown -/usr/bin/hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: /usr/local/cuda-5.5/bin -PATH: /usr/local/cuda-5.0/bin -PATH: /usr/local/lib -PATH: /home/aidan/cuda_6.0/lib64/ -PATH: /home/aidan/cuda_6.0/lib/ -PATH: /usr/lib64/qt-3.3/bin -PATH: /usr/local/bin -PATH: /bin -PATH: /usr/bin -PATH: /usr/local/sbin -PATH: /usr/sbin -PATH: /sbin -PATH: /home/aidan/bin - - -## ----------- ## -## Core tests. ## -## ----------- ## - -configure:2143: checking for a BSD-compatible install -configure:2211: result: /usr/bin/install -c -configure:2222: checking whether build environment is sane -configure:2282: result: yes -configure:2423: checking for a thread-safe mkdir -p -configure:2462: result: /bin/mkdir -p -configure:2475: checking for gawk -configure:2491: found /bin/gawk -configure:2502: result: gawk -configure:2513: checking whether make sets $(MAKE) -configure:2535: result: yes -configure:2629: checking for style of include used by make -configure:2657: result: GNU -configure:2727: checking for gcc -configure:2743: found /usr/bin/gcc -configure:2754: result: gcc -configure:2986: checking for C compiler version -configure:2994: gcc --version >&5 -gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) -Copyright (C) 2010 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -configure:2998: $? = 0 -configure:3005: gcc -v >&5 -Using built-in specs. -Target: x86_64-redhat-linux -Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux -Thread model: posix -gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) -configure:3009: $? = 0 -configure:3016: gcc -V >&5 -gcc: '-V' option must have argument -configure:3020: $? = 1 -configure:3043: checking for C compiler default output file name -configure:3065: gcc conftest.c >&5 -configure:3069: $? = 0 -configure:3107: result: a.out -configure:3126: checking whether the C compiler works -configure:3136: ./a.out -configure:3140: $? = 0 -configure:3159: result: yes -configure:3166: checking whether we are cross compiling -configure:3168: result: no -configure:3171: checking for suffix of executables -configure:3178: gcc -o conftest conftest.c >&5 -configure:3182: $? = 0 -configure:3208: result: -configure:3214: checking for suffix of object files -configure:3240: gcc -c conftest.c >&5 -configure:3244: $? = 0 -configure:3269: result: o -configure:3273: checking whether we are using the GNU C compiler -configure:3302: gcc -c conftest.c >&5 -configure:3309: $? = 0 -configure:3326: result: yes -configure:3335: checking whether gcc accepts -g -configure:3365: gcc -c -g conftest.c >&5 -configure:3372: $? = 0 -configure:3473: result: yes -configure:3490: checking for gcc option to accept ISO C89 -configure:3564: gcc -c -g -O2 conftest.c >&5 -configure:3571: $? = 0 -configure:3594: result: none needed -configure:3614: checking dependency style of gcc -configure:3724: result: gcc3 -configure:3745: checking how to run the C preprocessor -configure:3785: gcc -E conftest.c -configure:3792: $? = 0 -configure:3823: gcc -E conftest.c -conftest.c:10:28: error: ac_nonexistent.h: No such file or directory -configure:3830: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| /* end confdefs.h. */ -| #include <ac_nonexistent.h> -configure:3863: result: gcc -E -configure:3892: gcc -E conftest.c -configure:3899: $? = 0 -configure:3930: gcc -E conftest.c -conftest.c:10:28: error: ac_nonexistent.h: No such file or directory -configure:3937: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| /* end confdefs.h. */ -| #include <ac_nonexistent.h> -configure:3977: checking for grep that handles long lines and -e -configure:4037: result: /bin/grep -configure:4042: checking for egrep -configure:4106: result: /bin/grep -E -configure:4111: checking for ANSI C header files -configure:4141: gcc -c -g -O2 conftest.c >&5 -configure:4148: $? = 0 -configure:4247: gcc -o conftest -g -O2 conftest.c >&5 -configure:4251: $? = 0 -configure:4257: ./conftest -configure:4261: $? = 0 -configure:4279: result: yes -configure:4303: checking for sys/types.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4303: checking for sys/stat.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4303: checking for stdlib.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4303: checking for string.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4303: checking for memory.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4303: checking for strings.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4303: checking for inttypes.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4303: checking for stdint.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4303: checking for unistd.h -configure:4324: gcc -c -g -O2 conftest.c >&5 -configure:4331: $? = 0 -configure:4348: result: yes -configure:4373: checking minix/config.h usability -configure:4390: gcc -c -g -O2 conftest.c >&5 -conftest.c:53:26: error: minix/config.h: No such file or directory -configure:4397: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <stdio.h> -| #ifdef HAVE_SYS_TYPES_H -| # include <sys/types.h> -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include <sys/stat.h> -| #endif -| #ifdef STDC_HEADERS -| # include <stdlib.h> -| # include <stddef.h> -| #else -| # ifdef HAVE_STDLIB_H -| # include <stdlib.h> -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include <memory.h> -| # endif -| # include <string.h> -| #endif -| #ifdef HAVE_STRINGS_H -| # include <strings.h> -| #endif -| #ifdef HAVE_INTTYPES_H -| # include <inttypes.h> -| #endif -| #ifdef HAVE_STDINT_H -| # include <stdint.h> -| #endif -| #ifdef HAVE_UNISTD_H -| # include <unistd.h> -| #endif -| #include <minix/config.h> -configure:4411: result: no -configure:4415: checking minix/config.h presence -configure:4430: gcc -E conftest.c -conftest.c:20:26: error: minix/config.h: No such file or directory -configure:4437: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| /* end confdefs.h. */ -| #include <minix/config.h> -configure:4451: result: no -configure:4479: checking for minix/config.h -configure:4486: result: no -configure:4517: checking whether it is safe to define __EXTENSIONS__ -configure:4545: gcc -c -g -O2 conftest.c >&5 -configure:4552: $? = 0 -configure:4567: result: yes -configure:4622: checking build system type -configure:4640: result: x86_64-unknown-linux-gnu -configure:4662: checking host system type -configure:4677: result: x86_64-unknown-linux-gnu -configure:4699: checking for a sed that does not truncate output -configure:4765: result: /bin/sed -configure:4783: checking for fgrep -configure:4847: result: /bin/grep -F -configure:4882: checking for ld used by gcc -configure:4949: result: /usr/bin/ld -configure:4958: checking if the linker (/usr/bin/ld) is GNU ld -configure:4973: result: yes -configure:4985: checking for BSD- or MS-compatible name lister (nm) -configure:5034: result: /usr/bin/nm -B -configure:5152: checking the name lister (/usr/bin/nm -B) interface -configure:5159: gcc -c -g -O2 conftest.c >&5 -configure:5162: /usr/bin/nm -B "conftest.o" -configure:5165: output -0000000000000000 B some_variable -configure:5172: result: BSD nm -configure:5175: checking whether ln -s works -configure:5179: result: yes -configure:5187: checking the maximum length of command line arguments -configure:5307: result: 1966080 -configure:5324: checking whether the shell understands some XSI constructs -configure:5334: result: yes -configure:5338: checking whether the shell understands "+=" -configure:5344: result: yes -configure:5379: checking for /usr/bin/ld option to reload object files -configure:5386: result: -r -configure:5455: checking for objdump -configure:5471: found /usr/bin/objdump -configure:5482: result: objdump -configure:5514: checking how to recognize dependent libraries -configure:5710: result: pass_all -configure:5770: checking for ar -configure:5786: found /usr/bin/ar -configure:5797: result: ar -configure:5875: checking for strip -configure:5891: found /usr/bin/strip -configure:5902: result: strip -configure:5974: checking for ranlib -configure:5990: found /usr/bin/ranlib -configure:6001: result: ranlib -configure:6091: checking command to parse /usr/bin/nm -B output from gcc object -configure:6209: gcc -c -g -O2 conftest.c >&5 -configure:6212: $? = 0 -configure:6216: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' \> conftest.nm -configure:6219: $? = 0 -configure:6273: gcc -o conftest -g -O2 conftest.c conftstm.o >&5 -configure:6276: $? = 0 -configure:6314: result: ok -configure:6409: gcc -c -g -O2 conftest.c >&5 -configure:6412: $? = 0 -configure:7179: checking for dlfcn.h -configure:7200: gcc -c -g -O2 conftest.c >&5 -configure:7207: $? = 0 -configure:7224: result: yes -configure:7410: checking for objdir -configure:7425: result: .libs -configure:7721: checking if gcc supports -fno-rtti -fno-exceptions -configure:7739: gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5 -cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C -configure:7743: $? = 0 -configure:7756: result: no -configure:7776: checking for gcc option to produce PIC -configure:8048: result: -fPIC -DPIC -configure:8060: checking if gcc PIC flag -fPIC -DPIC works -configure:8078: gcc -c -g -O2 -fPIC -DPIC -DPIC conftest.c >&5 -configure:8082: $? = 0 -configure:8095: result: yes -configure:8119: checking if gcc static flag -static works -configure:8147: result: no -configure:8162: checking if gcc supports -c -o file.o -configure:8183: gcc -c -g -O2 -o out/conftest2.o conftest.c >&5 -configure:8187: $? = 0 -configure:8209: result: yes -configure:8217: checking if gcc supports -c -o file.o -configure:8264: result: yes -configure:8297: checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries -configure:9371: result: yes -configure:9408: checking whether -lc should be explicitly linked in -configure:9413: gcc -c -g -O2 conftest.c >&5 -configure:9416: $? = 0 -configure:9431: gcc -shared conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /bin/grep -lc \>/dev/null 2\>\&1 -configure:9434: $? = 0 -configure:9446: result: no -configure:9610: checking dynamic linker characteristics -configure:10053: gcc -o conftest -g -O2 -Wl,-rpath -Wl,/foo conftest.c >&5 -configure:10060: $? = 0 -configure:10296: result: GNU/Linux ld.so -configure:10398: checking how to hardcode library paths into programs -configure:10423: result: immediate -configure:11256: checking whether stripping libraries is possible -configure:11261: result: yes -configure:11296: checking if libtool supports shared libraries -configure:11298: result: yes -configure:11301: checking whether to build shared libraries -configure:11322: result: yes -configure:11325: checking whether to build static libraries -configure:11329: result: yes -configure:11377: checking whether gcc and cc understand -c and -o together -configure:11412: gcc -c conftest.c -o conftest2.o >&5 -configure:11416: $? = 0 -configure:11422: gcc -c conftest.c -o conftest2.o >&5 -configure:11426: $? = 0 -configure:11437: cc -c conftest.c >&5 -configure:11441: $? = 0 -configure:11449: cc -c conftest.c -o conftest2.o >&5 -configure:11453: $? = 0 -configure:11459: cc -c conftest.c -o conftest2.o >&5 -configure:11463: $? = 0 -configure:11481: result: yes -configure:11508: checking for gcc option to accept ISO C99 -configure:11667: gcc -c -g -O2 conftest.c >&5 -conftest.c:77: error: expected ';', ',' or ')' before 'text' -conftest.c: In function 'main': -conftest.c:131: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newvar' -conftest.c:131: error: 'newvar' undeclared (first use in this function) -conftest.c:131: error: (Each undeclared identifier is reported only once -conftest.c:131: error: for each function it appears in.) -conftest.c:141: error: 'for' loop initial declarations are only allowed in C99 mode -conftest.c:141: note: use option -std=c99 or -std=gnu99 to compile your code -configure:11674: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| /* end confdefs.h. */ -| #include <stdarg.h> -| #include <stdbool.h> -| #include <stdlib.h> -| #include <wchar.h> -| #include <stdio.h> -| -| // Check varargs macros. These examples are taken from C99 6.10.3.5. -| #define debug(...) fprintf (stderr, __VA_ARGS__) -| #define showlist(...) puts (#__VA_ARGS__) -| #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -| static void -| test_varargs_macros (void) -| { -| int x = 1234; -| int y = 5678; -| debug ("Flag"); -| debug ("X = %d\n", x); -| showlist (The first, second, and third items.); -| report (x>y, "x is %d but y is %d", x, y); -| } -| -| // Check long long types. -| #define BIG64 18446744073709551615ull -| #define BIG32 4294967295ul -| #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -| #if !BIG_OK -| your preprocessor is broken; -| #endif -| #if BIG_OK -| #else -| your preprocessor is broken; -| #endif -| static long long int bignum = -9223372036854775807LL; -| static unsigned long long int ubignum = BIG64; -| -| struct incomplete_array -| { -| int datasize; -| double data[]; -| }; -| -| struct named_init { -| int number; -| const wchar_t *name; -| double average; -| }; -| -| typedef const char *ccp; -| -| static inline int -| test_restrict (ccp restrict text) -| { -| // See if C++-style comments work. -| // Iterate through items via the restricted pointer. -| // Also check for declarations in for loops. -| for (unsigned int i = 0; *(text+i) != '\0'; ++i) -| continue; -| return 0; -| } -| -| // Check varargs and va_copy. -| static void -| test_varargs (const char *format, ...) -| { -| va_list args; -| va_start (args, format); -| va_list args_copy; -| va_copy (args_copy, args); -| -| const char *str; -| int number; -| float fnumber; -| -| while (*format) -| { -| switch (*format++) -| { -| case 's': // string -| str = va_arg (args_copy, const char *); -| break; -| case 'd': // int -| number = va_arg (args_copy, int); -| break; -| case 'f': // float -| fnumber = va_arg (args_copy, double); -| break; -| default: -| break; -| } -| } -| va_end (args_copy); -| va_end (args); -| } -| -| int -| main () -| { -| -| // Check bool. -| _Bool success = false; -| -| // Check restrict. -| if (test_restrict ("String literal") == 0) -| success = true; -| char *restrict newvar = "Another string"; -| -| // Check varargs. -| test_varargs ("s, d' f .", "string", 65, 34.234); -| test_varargs_macros (); -| -| // Check flexible array members. -| struct incomplete_array *ia = -| malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); -| ia->datasize = 10; -| for (int i = 0; i < ia->datasize; ++i) -| ia->data[i] = i * 1.234; -| -| // Check named initializers. -| struct named_init ni = { -| .number = 34, -| .name = L"Test wide string", -| .average = 543.34343, -| }; -| -| ni.number = 58; -| -| int dynamic_array[ni.number]; -| dynamic_array[ni.number - 1] = 543; -| -| // work around unused variable warnings -| return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' -| || dynamic_array[ni.number - 1] != 543); -| -| ; -| return 0; -| } -configure:11667: gcc -std=gnu99 -c -g -O2 conftest.c >&5 -configure:11674: $? = 0 -configure:11704: result: -std=gnu99 -configure:11717: checking for working posix_memalign -configure:11751: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5 -configure:11755: $? = 0 -configure:11761: ./conftest -configure:11765: $? = 0 -configure:11782: result: yes -configure:11804: checking for gcc architecture flag -configure:11806: result: -configure:11828: checking for x86 cpuid 0 output -configure:11867: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5 -configure:11871: $? = 0 -configure:11877: ./conftest -configure:11881: $? = 0 -configure:11898: result: d:756e6547:6c65746e:49656e69 -configure:11914: checking for x86 cpuid 1 output -configure:11953: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5 -configure:11957: $? = 0 -configure:11963: ./conftest -configure:11967: $? = 0 -configure:11984: result: 306a9:6100800:7f9ae3bf:bfebfbff -configure:12229: checking whether C compiler accepts -march=pentium2 -configure:12254: gcc -std=gnu99 -c -march=pentium2 conftest.c >&5 -conftest.c:1: error: CPU you selected does not support x86-64 instruction set -conftest.c:1: error: CPU you selected does not support x86-64 instruction set -configure:12261: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:12277: result: no -configure:12229: checking whether C compiler accepts -mcpu=pentium2 -configure:12254: gcc -std=gnu99 -c -mcpu=pentium2 conftest.c >&5 -`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. -conftest.c:1: error: CPU you selected does not support x86-64 instruction set -configure:12261: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:12277: result: no -configure:12229: checking whether C compiler accepts -mpentium2 -configure:12254: gcc -std=gnu99 -c -mpentium2 conftest.c >&5 -cc1: error: unrecognized command line option "-mpentium2" -configure:12261: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:12277: result: no -configure:12229: checking whether C compiler accepts -march=pentiumpro -configure:12254: gcc -std=gnu99 -c -march=pentiumpro conftest.c >&5 -conftest.c:1: error: CPU you selected does not support x86-64 instruction set -conftest.c:1: error: CPU you selected does not support x86-64 instruction set -configure:12261: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:12277: result: no -configure:12229: checking whether C compiler accepts -mcpu=pentiumpro -configure:12254: gcc -std=gnu99 -c -mcpu=pentiumpro conftest.c >&5 -`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. -conftest.c:1: error: CPU you selected does not support x86-64 instruction set -configure:12261: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:12277: result: no -configure:12229: checking whether C compiler accepts -mpentiumpro -configure:12254: gcc -std=gnu99 -c -mpentiumpro conftest.c >&5 -cc1: error: unrecognized command line option "-mpentiumpro" -configure:12261: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| /* end confdefs.h. */ -| -| int -| main () -| { -| -| ; -| return 0; -| } -configure:12277: result: no -configure:12294: checking for gcc architecture flag -configure:12296: result: unknown -configure:12314: checking for x86 cpuid 0x00000001 output -configure:12353: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5 -configure:12357: $? = 0 -configure:12363: ./conftest -configure:12367: $? = 0 -configure:12384: result: 306a9:6100800:7f9ae3bf:bfebfbff -configure:12396: checking whether mmx is supported -configure:12408: result: yes -configure:12411: checking whether sse is supported -configure:12423: result: yes -configure:12426: checking whether sse2 is supported -configure:12438: result: yes -configure:12441: checking whether sse3 is supported -configure:12453: result: yes -configure:12456: checking whether ssse3 is supported -configure:12468: result: yes -configure:12471: checking whether sse4.1 is supported -configure:12483: result: yes -configure:12486: checking whether sse4.2 is supported -configure:12498: result: yes -configure:12501: checking whether avx is supported -configure:12513: result: yes -configure:12522: checking whether C compiler accepts -mmmx -configure:12551: gcc -std=gnu99 -c -g -O2 -mmmx conftest.c >&5 -configure:12558: $? = 0 -configure:12574: result: yes -configure:12591: checking whether C compiler accepts -msse -configure:12620: gcc -std=gnu99 -c -g -O2 -msse conftest.c >&5 -configure:12627: $? = 0 -configure:12643: result: yes -configure:12660: checking whether C compiler accepts -msse2 -configure:12689: gcc -std=gnu99 -c -g -O2 -msse2 conftest.c >&5 -configure:12696: $? = 0 -configure:12712: result: yes -configure:12729: checking whether C compiler accepts -msse3 -configure:12758: gcc -std=gnu99 -c -g -O2 -msse3 conftest.c >&5 -configure:12765: $? = 0 -configure:12781: result: yes -configure:12798: checking whether C compiler accepts -mssse3 -configure:12827: gcc -std=gnu99 -c -g -O2 -mssse3 conftest.c >&5 -configure:12834: $? = 0 -configure:12850: result: yes -configure:12867: checking whether C compiler accepts -msse4.1 -configure:12896: gcc -std=gnu99 -c -g -O2 -msse4.1 conftest.c >&5 -configure:12903: $? = 0 -configure:12919: result: yes -configure:12936: checking whether C compiler accepts -msse4.2 -configure:12965: gcc -std=gnu99 -c -g -O2 -msse4.2 conftest.c >&5 -configure:12972: $? = 0 -configure:12988: result: yes -configure:13005: checking whether C compiler accepts -mavx -configure:13034: gcc -std=gnu99 -c -g -O2 -mavx conftest.c >&5 -configure:13041: $? = 0 -configure:13057: result: yes -configure:13086: checking for a BSD-compatible install -configure:13154: result: /usr/bin/install -c -configure:13165: checking whether make sets $(MAKE) -configure:13187: result: yes -configure:13196: checking for ANSI C header files -configure:13364: result: yes -configure:13572: checking for the pthreads library -lpthreads -configure:13615: gcc -std=gnu99 -o conftest -g -O2 conftest.c -lpthreads >&5 -/usr/bin/ld: cannot find -lpthreads -collect2: ld returned 1 exit status -configure:13622: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| /* end confdefs.h. */ -| #include <pthread.h> -| int -| main () -| { -| pthread_t th; pthread_join(th, 0); -| pthread_attr_init(0); pthread_cleanup_push(0, 0); -| pthread_create(0,0,0,0); pthread_cleanup_pop(0); -| ; -| return 0; -| } -configure:13645: result: no -configure:13517: checking whether pthreads work without any flags -configure:13615: gcc -std=gnu99 -o conftest -g -O2 conftest.c >&5 -/tmp/ccvllwcI.o: In function `main': -/home/aidan/quicksched/conftest.c:41: undefined reference to `pthread_join' -/home/aidan/quicksched/conftest.c:42: undefined reference to `__pthread_register_cancel' -/home/aidan/quicksched/conftest.c:43: undefined reference to `pthread_create' -/home/aidan/quicksched/conftest.c:43: undefined reference to `__pthread_unregister_cancel' -collect2: ld returned 1 exit status -configure:13622: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| /* end confdefs.h. */ -| #include <pthread.h> -| int -| main () -| { -| pthread_t th; pthread_join(th, 0); -| pthread_attr_init(0); pthread_cleanup_push(0, 0); -| pthread_create(0,0,0,0); pthread_cleanup_pop(0); -| ; -| return 0; -| } -configure:13645: result: no -configure:13522: checking whether pthreads work with -Kthread -configure:13615: gcc -std=gnu99 -o conftest -g -O2 -Kthread conftest.c >&5 -gcc: unrecognized option '-Kthread' -/tmp/ccV2KRWK.o: In function `main': -/home/aidan/quicksched/conftest.c:41: undefined reference to `pthread_join' -/home/aidan/quicksched/conftest.c:42: undefined reference to `__pthread_register_cancel' -/home/aidan/quicksched/conftest.c:43: undefined reference to `pthread_create' -/home/aidan/quicksched/conftest.c:43: undefined reference to `__pthread_unregister_cancel' -collect2: ld returned 1 exit status -configure:13622: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| /* end confdefs.h. */ -| #include <pthread.h> -| int -| main () -| { -| pthread_t th; pthread_join(th, 0); -| pthread_attr_init(0); pthread_cleanup_push(0, 0); -| pthread_create(0,0,0,0); pthread_cleanup_pop(0); -| ; -| return 0; -| } -configure:13645: result: no -configure:13522: checking whether pthreads work with -kthread -configure:13615: gcc -std=gnu99 -o conftest -g -O2 -kthread conftest.c >&5 -gcc: unrecognized option '-kthread' -/tmp/ccn1dSfN.o: In function `main': -/home/aidan/quicksched/conftest.c:41: undefined reference to `pthread_join' -/home/aidan/quicksched/conftest.c:42: undefined reference to `__pthread_register_cancel' -/home/aidan/quicksched/conftest.c:43: undefined reference to `pthread_create' -/home/aidan/quicksched/conftest.c:43: undefined reference to `__pthread_unregister_cancel' -collect2: ld returned 1 exit status -configure:13622: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| /* end confdefs.h. */ -| #include <pthread.h> -| int -| main () -| { -| pthread_t th; pthread_join(th, 0); -| pthread_attr_init(0); pthread_cleanup_push(0, 0); -| pthread_create(0,0,0,0); pthread_cleanup_pop(0); -| ; -| return 0; -| } -configure:13645: result: no -configure:13572: checking for the pthreads library -llthread -configure:13615: gcc -std=gnu99 -o conftest -g -O2 conftest.c -llthread >&5 -/usr/bin/ld: cannot find -llthread -collect2: ld returned 1 exit status -configure:13622: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| /* end confdefs.h. */ -| #include <pthread.h> -| int -| main () -| { -| pthread_t th; pthread_join(th, 0); -| pthread_attr_init(0); pthread_cleanup_push(0, 0); -| pthread_create(0,0,0,0); pthread_cleanup_pop(0); -| ; -| return 0; -| } -configure:13645: result: no -configure:13522: checking whether pthreads work with -pthread -configure:13615: gcc -std=gnu99 -o conftest -g -O2 -pthread conftest.c >&5 -configure:13622: $? = 0 -configure:13645: result: yes -configure:13664: checking for joinable pthread attribute -configure:13689: gcc -std=gnu99 -o conftest -g -O2 -pthread conftest.c >&5 -configure:13696: $? = 0 -configure:13716: result: PTHREAD_CREATE_JOINABLE -configure:13726: checking if more special flags are required for pthreads -configure:13733: result: no -configure:13831: checking for OpenMP flag of C compiler -configure:13877: gcc -std=gnu99 -o conftest -g -O2 -pthread -fopenmp conftest.c >&5 -configure:13884: $? = 0 -configure:13907: result: -fopenmp -configure:13931: checking for inline -configure:13957: gcc -std=gnu99 -c -g -O2 -pthread conftest.c >&5 -configure:13964: $? = 0 -configure:13982: result: inline -configure:14001: checking whether time.h and sys/time.h may both be included -configure:14031: gcc -std=gnu99 -c -g -O2 -pthread conftest.c >&5 -configure:14038: $? = 0 -configure:14053: result: yes -configure:14082: checking sys/time.h usability -configure:14099: gcc -std=gnu99 -c -g -O2 -pthread conftest.c >&5 -configure:14106: $? = 0 -configure:14120: result: yes -configure:14124: checking sys/time.h presence -configure:14139: gcc -E conftest.c -configure:14146: $? = 0 -configure:14160: result: yes -configure:14188: checking for sys/time.h -configure:14197: result: yes -configure:14082: checking c_asm.h usability -configure:14099: gcc -std=gnu99 -c -g -O2 -pthread conftest.c >&5 -conftest.c:74:19: error: c_asm.h: No such file or directory -configure:14106: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| #include <stdio.h> -| #ifdef HAVE_SYS_TYPES_H -| # include <sys/types.h> -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include <sys/stat.h> -| #endif -| #ifdef STDC_HEADERS -| # include <stdlib.h> -| # include <stddef.h> -| #else -| # ifdef HAVE_STDLIB_H -| # include <stdlib.h> -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include <memory.h> -| # endif -| # include <string.h> -| #endif -| #ifdef HAVE_STRINGS_H -| # include <strings.h> -| #endif -| #ifdef HAVE_INTTYPES_H -| # include <inttypes.h> -| #endif -| #ifdef HAVE_STDINT_H -| # include <stdint.h> -| #endif -| #ifdef HAVE_UNISTD_H -| # include <unistd.h> -| #endif -| #include <c_asm.h> -configure:14120: result: no -configure:14124: checking c_asm.h presence -configure:14139: gcc -E conftest.c -conftest.c:41:19: error: c_asm.h: No such file or directory -configure:14146: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| #include <c_asm.h> -configure:14160: result: no -configure:14188: checking for c_asm.h -configure:14197: result: no -configure:14082: checking intrinsics.h usability -configure:14099: gcc -std=gnu99 -c -g -O2 -pthread conftest.c >&5 -conftest.c:74:24: error: intrinsics.h: No such file or directory -configure:14106: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| #include <stdio.h> -| #ifdef HAVE_SYS_TYPES_H -| # include <sys/types.h> -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include <sys/stat.h> -| #endif -| #ifdef STDC_HEADERS -| # include <stdlib.h> -| # include <stddef.h> -| #else -| # ifdef HAVE_STDLIB_H -| # include <stdlib.h> -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include <memory.h> -| # endif -| # include <string.h> -| #endif -| #ifdef HAVE_STRINGS_H -| # include <strings.h> -| #endif -| #ifdef HAVE_INTTYPES_H -| # include <inttypes.h> -| #endif -| #ifdef HAVE_STDINT_H -| # include <stdint.h> -| #endif -| #ifdef HAVE_UNISTD_H -| # include <unistd.h> -| #endif -| #include <intrinsics.h> -configure:14120: result: no -configure:14124: checking intrinsics.h presence -configure:14139: gcc -E conftest.c -conftest.c:41:24: error: intrinsics.h: No such file or directory -configure:14146: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| #include <intrinsics.h> -configure:14160: result: no -configure:14188: checking for intrinsics.h -configure:14197: result: no -configure:14082: checking mach/mach_time.h usability -configure:14099: gcc -std=gnu99 -c -g -O2 -pthread conftest.c >&5 -conftest.c:74:28: error: mach/mach_time.h: No such file or directory -configure:14106: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| #include <stdio.h> -| #ifdef HAVE_SYS_TYPES_H -| # include <sys/types.h> -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include <sys/stat.h> -| #endif -| #ifdef STDC_HEADERS -| # include <stdlib.h> -| # include <stddef.h> -| #else -| # ifdef HAVE_STDLIB_H -| # include <stdlib.h> -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include <memory.h> -| # endif -| # include <string.h> -| #endif -| #ifdef HAVE_STRINGS_H -| # include <strings.h> -| #endif -| #ifdef HAVE_INTTYPES_H -| # include <inttypes.h> -| #endif -| #ifdef HAVE_STDINT_H -| # include <stdint.h> -| #endif -| #ifdef HAVE_UNISTD_H -| # include <unistd.h> -| #endif -| #include <mach/mach_time.h> -configure:14120: result: no -configure:14124: checking mach/mach_time.h presence -configure:14139: gcc -E conftest.c -conftest.c:41:28: error: mach/mach_time.h: No such file or directory -configure:14146: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| #include <mach/mach_time.h> -configure:14160: result: no -configure:14188: checking for mach/mach_time.h -configure:14197: result: no -configure:14212: checking for hrtime_t -configure:14243: gcc -std=gnu99 -c -g -O2 -pthread conftest.c >&5 -conftest.c: In function 'main': -conftest.c:48: error: 'hrtime_t' undeclared (first use in this function) -conftest.c:48: error: (Each undeclared identifier is reported only once -conftest.c:48: error: for each function it appears in.) -configure:14250: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| #if HAVE_SYS_TIME_H -| #include <sys/time.h> -| #endif -| -| int -| main () -| { -| if (sizeof (hrtime_t)) -| return 0; -| ; -| return 0; -| } -configure:14310: result: no -configure:14328: checking for gethrtime -configure:14384: gcc -std=gnu99 -o conftest -g -O2 -pthread conftest.c >&5 -/tmp/cctCDAqf.o: In function `main': -/home/aidan/quicksched/conftest.c:75: undefined reference to `gethrtime' -collect2: ld returned 1 exit status -configure:14391: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| /* Define gethrtime to an innocuous variant, in case <limits.h> declares gethrtime. -| For example, HP-UX 11i <limits.h> declares gettimeofday. */ -| #define gethrtime innocuous_gethrtime -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char gethrtime (); below. -| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -| <limits.h> exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include <limits.h> -| #else -| # include <assert.h> -| #endif -| -| #undef gethrtime -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char gethrtime (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_gethrtime || defined __stub___gethrtime -| choke me -| #endif -| -| int -| main () -| { -| return gethrtime (); -| ; -| return 0; -| } -configure:14413: result: no -configure:14328: checking for read_real_time -configure:14384: gcc -std=gnu99 -o conftest -g -O2 -pthread conftest.c >&5 -/tmp/ccdCjpNi.o: In function `main': -/home/aidan/quicksched/conftest.c:75: undefined reference to `read_real_time' -collect2: ld returned 1 exit status -configure:14391: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| /* Define read_real_time to an innocuous variant, in case <limits.h> declares read_real_time. -| For example, HP-UX 11i <limits.h> declares gettimeofday. */ -| #define read_real_time innocuous_read_real_time -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char read_real_time (); below. -| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -| <limits.h> exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include <limits.h> -| #else -| # include <assert.h> -| #endif -| -| #undef read_real_time -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char read_real_time (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_read_real_time || defined __stub___read_real_time -| choke me -| #endif -| -| int -| main () -| { -| return read_real_time (); -| ; -| return 0; -| } -configure:14413: result: no -configure:14328: checking for time_base_to_time -configure:14384: gcc -std=gnu99 -o conftest -g -O2 -pthread conftest.c >&5 -/tmp/cc1TtQol.o: In function `main': -/home/aidan/quicksched/conftest.c:75: undefined reference to `time_base_to_time' -collect2: ld returned 1 exit status -configure:14391: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| /* Define time_base_to_time to an innocuous variant, in case <limits.h> declares time_base_to_time. -| For example, HP-UX 11i <limits.h> declares gettimeofday. */ -| #define time_base_to_time innocuous_time_base_to_time -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char time_base_to_time (); below. -| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -| <limits.h> exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include <limits.h> -| #else -| # include <assert.h> -| #endif -| -| #undef time_base_to_time -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char time_base_to_time (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_time_base_to_time || defined __stub___time_base_to_time -| choke me -| #endif -| -| int -| main () -| { -| return time_base_to_time (); -| ; -| return 0; -| } -configure:14413: result: no -configure:14328: checking for clock_gettime -configure:14384: gcc -std=gnu99 -o conftest -g -O2 -pthread conftest.c >&5 -/tmp/ccBoenSn.o: In function `main': -/home/aidan/quicksched/conftest.c:75: undefined reference to `clock_gettime' -collect2: ld returned 1 exit status -configure:14391: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| /* Define clock_gettime to an innocuous variant, in case <limits.h> declares clock_gettime. -| For example, HP-UX 11i <limits.h> declares gettimeofday. */ -| #define clock_gettime innocuous_clock_gettime -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char clock_gettime (); below. -| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -| <limits.h> exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include <limits.h> -| #else -| # include <assert.h> -| #endif -| -| #undef clock_gettime -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char clock_gettime (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_clock_gettime || defined __stub___clock_gettime -| choke me -| #endif -| -| int -| main () -| { -| return clock_gettime (); -| ; -| return 0; -| } -configure:14413: result: no -configure:14328: checking for mach_absolute_time -configure:14384: gcc -std=gnu99 -o conftest -g -O2 -pthread conftest.c >&5 -/tmp/ccvTIZDq.o: In function `main': -/home/aidan/quicksched/conftest.c:75: undefined reference to `mach_absolute_time' -collect2: ld returned 1 exit status -configure:14391: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| /* Define mach_absolute_time to an innocuous variant, in case <limits.h> declares mach_absolute_time. -| For example, HP-UX 11i <limits.h> declares gettimeofday. */ -| #define mach_absolute_time innocuous_mach_absolute_time -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char mach_absolute_time (); below. -| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since -| <limits.h> exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include <limits.h> -| #else -| # include <assert.h> -| #endif -| -| #undef mach_absolute_time -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char mach_absolute_time (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_mach_absolute_time || defined __stub___mach_absolute_time -| choke me -| #endif -| -| int -| main () -| { -| return mach_absolute_time (); -| ; -| return 0; -| } -configure:14413: result: no -configure:14425: checking for _rtc intrinsic -configure:14451: gcc -std=gnu99 -o conftest -g -O2 -pthread conftest.c >&5 -conftest.c: In function 'main': -conftest.c:47: warning: implicit declaration of function '_rtc' -/tmp/ccv3Bp1s.o: In function `main': -/home/aidan/quicksched/conftest.c:47: undefined reference to `_rtc' -collect2: ld returned 1 exit status -configure:14458: $? = 1 -configure: failed program was: -| /* confdefs.h. */ -| #define PACKAGE_NAME "" -| #define PACKAGE_TARNAME "" -| #define PACKAGE_VERSION "" -| #define PACKAGE_STRING "" -| #define PACKAGE_BUGREPORT "" -| #define PACKAGE "QUICKSCHED" -| #define VERSION "VERSION" -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define HAVE_DLFCN_H 1 -| #define LT_OBJDIR ".libs/" -| #define HAVE_POSIX_MEMALIGN 1 -| #define HAVE_MMX /**/ -| #define HAVE_SSE /**/ -| #define HAVE_SSE2 /**/ -| #define HAVE_SSE3 /**/ -| #define HAVE_SSSE3 /**/ -| #define HAVE_SSE41 /**/ -| #define HAVE_SSE42 1 -| #define HAVE_AVX /**/ -| #define STDC_HEADERS 1 -| #define HAVE_PTHREAD 1 -| #define HAVE_OPENMP 1 -| #define TIME_WITH_SYS_TIME 1 -| #define HAVE_SYS_TIME_H 1 -| /* end confdefs.h. */ -| #ifdef HAVE_INTRINSICS_H -| #include <intrinsics.h> -| #endif -| int -| main () -| { -| _rtc() -| ; -| return 0; -| } -configure:14481: result: no -configure:14665: checking for doxygen -configure:14683: found /usr/bin/doxygen -configure:14695: result: /usr/bin/doxygen -configure:14771: checking for perl -configure:14789: found /usr/bin/perl -configure:14801: result: /usr/bin/perl -configure:14947: checking for dot -configure:14965: found /usr/bin/dot -configure:14977: result: /usr/bin/dot -configure:15675: checking for latex -configure:15693: found /usr/bin/latex -configure:15705: result: /usr/bin/latex -configure:15781: checking for makeindex -configure:15799: found /usr/bin/makeindex -configure:15811: result: /usr/bin/makeindex -configure:15887: checking for dvips -configure:15905: found /usr/bin/dvips -configure:15917: result: /usr/bin/dvips -configure:15993: checking for egrep -configure:16011: found /bin/egrep -configure:16023: result: /bin/egrep -configure:16168: checking for pdflatex -configure:16186: found /usr/bin/pdflatex -configure:16198: result: /usr/bin/pdflatex -configure:16274: checking for makeindex -configure:16304: result: /usr/bin/makeindex -configure:16380: checking for egrep -configure:16410: result: /bin/egrep -configure:16812: creating ./config.status - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_build=x86_64-unknown-linux-gnu -ac_cv_c_compiler_gnu=yes -ac_cv_c_inline=inline -ac_cv_env_CC_set= -ac_cv_env_CC_value= -ac_cv_env_CFLAGS_set= -ac_cv_env_CFLAGS_value= -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CPP_set= -ac_cv_env_CPP_value= -ac_cv_env_DOXYGEN_PAPER_SIZE_set= -ac_cv_env_DOXYGEN_PAPER_SIZE_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_LIBS_set= -ac_cv_env_LIBS_value= -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_func_clock_gettime=no -ac_cv_func_gethrtime=no -ac_cv_func_mach_absolute_time=no -ac_cv_func_read_real_time=no -ac_cv_func_time_base_to_time=no -ac_cv_header_c_asm_h=no -ac_cv_header_dlfcn_h=yes -ac_cv_header_intrinsics_h=no -ac_cv_header_inttypes_h=yes -ac_cv_header_mach_mach_time_h=no -ac_cv_header_memory_h=yes -ac_cv_header_minix_config_h=no -ac_cv_header_stdc=yes -ac_cv_header_stdint_h=yes -ac_cv_header_stdlib_h=yes -ac_cv_header_string_h=yes -ac_cv_header_strings_h=yes -ac_cv_header_sys_stat_h=yes -ac_cv_header_sys_time_h=yes -ac_cv_header_sys_types_h=yes -ac_cv_header_time=yes -ac_cv_header_unistd_h=yes -ac_cv_host=x86_64-unknown-linux-gnu -ac_cv_objext=o -ac_cv_path_EGREP='/bin/grep -E' -ac_cv_path_FGREP='/bin/grep -F' -ac_cv_path_GREP=/bin/grep -ac_cv_path_SED=/bin/sed -ac_cv_path_ac_pt_DX_DOT=/usr/bin/dot -ac_cv_path_ac_pt_DX_DOXYGEN=/usr/bin/doxygen -ac_cv_path_ac_pt_DX_DVIPS=/usr/bin/dvips -ac_cv_path_ac_pt_DX_EGREP=/bin/egrep -ac_cv_path_ac_pt_DX_LATEX=/usr/bin/latex -ac_cv_path_ac_pt_DX_MAKEINDEX=/usr/bin/makeindex -ac_cv_path_ac_pt_DX_PDFLATEX=/usr/bin/pdflatex -ac_cv_path_ac_pt_DX_PERL=/usr/bin/perl -ac_cv_path_install='/usr/bin/install -c' -ac_cv_path_mkdir=/bin/mkdir -ac_cv_prog_AWK=gawk -ac_cv_prog_CPP='gcc -E' -ac_cv_prog_ac_ct_AR=ar -ac_cv_prog_ac_ct_CC=gcc -ac_cv_prog_ac_ct_OBJDUMP=objdump -ac_cv_prog_ac_ct_RANLIB=ranlib -ac_cv_prog_ac_ct_STRIP=strip -ac_cv_prog_cc_c89= -ac_cv_prog_cc_c99=-std=gnu99 -ac_cv_prog_cc_g=yes -ac_cv_prog_cc_gcc_c_o=yes -ac_cv_prog_make_make_set=yes -ac_cv_safe_to_define___extensions__=yes -ac_cv_type_hrtime_t=no -am_cv_CC_dependencies_compiler_type=gcc3 -ax_cv_c_flags__march_pentium2=no -ax_cv_c_flags__march_pentiumpro=no -ax_cv_c_flags__mcpu_pentium2=no -ax_cv_c_flags__mcpu_pentiumpro=no -ax_cv_c_flags__mpentium2=no -ax_cv_c_flags__mpentiumpro=no -ax_cv_c_openmp=-fopenmp -ax_cv_check_cflags___mavx=yes -ax_cv_check_cflags___mmmx=yes -ax_cv_check_cflags___msse2=yes -ax_cv_check_cflags___msse3=yes -ax_cv_check_cflags___msse4_1=yes -ax_cv_check_cflags___msse4_2=yes -ax_cv_check_cflags___msse=yes -ax_cv_check_cflags___mssse3=yes -ax_cv_func_posix_memalign_works=yes -ax_cv_gcc_archflag=unknown -ax_cv_gcc_x86_cpuid_0=d:756e6547:6c65746e:49656e69 -ax_cv_gcc_x86_cpuid_0x00000001=306a9:6100800:7f9ae3bf:bfebfbff -ax_cv_gcc_x86_cpuid_1=306a9:6100800:7f9ae3bf:bfebfbff -ax_cv_have_avx_ext=yes -ax_cv_have_mmx_ext=yes -ax_cv_have_sse2_ext=yes -ax_cv_have_sse3_ext=yes -ax_cv_have_sse41_ext=yes -ax_cv_have_sse42_ext=yes -ax_cv_have_sse_ext=yes -ax_cv_have_ssse3_ext=yes -lt_cv_deplibs_check_method=pass_all -lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_ld_reload_flag=-r -lt_cv_nm_interface='BSD nm' -lt_cv_objdir=.libs -lt_cv_path_LD=/usr/bin/ld -lt_cv_path_NM='/usr/bin/nm -B' -lt_cv_prog_compiler_c_o=yes -lt_cv_prog_compiler_pic_works=yes -lt_cv_prog_compiler_rtti_exceptions=no -lt_cv_prog_compiler_static_works=no -lt_cv_prog_gnu_ld=yes -lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\''' -lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"\2", (void *) \&\2},/p'\''' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/ {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/ {"lib\2", (void *) \&\2},/p'\''' -lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\''' -lt_cv_sys_max_cmd_len=1966080 - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -ACLOCAL='${SHELL} /home/aidan/quicksched/missing --run aclocal-1.11' -AMDEPBACKSLASH='\' -AMDEP_FALSE='#' -AMDEP_TRUE='' -AMTAR='${SHELL} /home/aidan/quicksched/missing --run tar' -AR='ar' -AUTOCONF='${SHELL} /home/aidan/quicksched/missing --run autoconf' -AUTOHEADER='${SHELL} /home/aidan/quicksched/missing --run autoheader' -AUTOMAKE='${SHELL} /home/aidan/quicksched/missing --run automake-1.11' -AWK='gawk' -CC='gcc -std=gnu99' -CCDEPMODE='depmode=gcc3' -CFLAGS='-g -O2 -pthread' -CPP='gcc -E' -CPPFLAGS='' -CUDA_CFLAGS='-I/home/aidan/cuda_6.0//include' -CUDA_LIBS='-L/home/aidan/cuda_6.0//lib -L/home/aidan/cuda_6.0//lib64 -lcudart' -CYGPATH_W='echo' -DEFS='-DHAVE_CONFIG_H' -DEPDIR='.deps' -DOXYGEN_PAPER_SIZE='' -DSYMUTIL='' -DUMPBIN='' -DX_COND_chi_FALSE='' -DX_COND_chi_TRUE='#' -DX_COND_chm_FALSE='' -DX_COND_chm_TRUE='#' -DX_COND_doc_FALSE='#' -DX_COND_doc_TRUE='' -DX_COND_dot_FALSE='#' -DX_COND_dot_TRUE='' -DX_COND_html_FALSE='#' -DX_COND_html_TRUE='' -DX_COND_latex_FALSE='#' -DX_COND_latex_TRUE='' -DX_COND_man_FALSE='' -DX_COND_man_TRUE='#' -DX_COND_pdf_FALSE='#' -DX_COND_pdf_TRUE='' -DX_COND_ps_FALSE='#' -DX_COND_ps_TRUE='' -DX_COND_rtf_FALSE='' -DX_COND_rtf_TRUE='#' -DX_COND_xml_FALSE='' -DX_COND_xml_TRUE='#' -DX_CONFIG='doc/Doxyfile' -DX_DOCDIR='doc/' -DX_DOT='/usr/bin/dot' -DX_DOXYGEN='/usr/bin/doxygen' -DX_DVIPS='/usr/bin/dvips' -DX_EGREP='/bin/egrep' -DX_ENV=' SRCDIR='\''.'\'' PROJECT='\''libchebfun'\'' DOCDIR='\''doc/'\'' VERSION='\'''\'' PERL_PATH='\''/usr/bin/perl'\'' HAVE_DOT='\''YES'\'' DOT_PATH='\''/usr/bin'\'' GENERATE_MAN='\''NO'\'' GENERATE_RTF='\''NO'\'' GENERATE_XML='\''NO'\'' GENERATE_HTMLHELP='\''NO'\'' GENERATE_CHI='\''NO'\'' GENERATE_HTML='\''YES'\'' GENERATE_LATEX='\''YES'\''' -DX_FLAG_chi='0' -DX_FLAG_chm='0' -DX_FLAG_doc='1' -DX_FLAG_dot='1' -DX_FLAG_html='1' -DX_FLAG_man='0' -DX_FLAG_pdf='1' -DX_FLAG_ps='1' -DX_FLAG_rtf='0' -DX_FLAG_xml='0' -DX_HHC='' -DX_LATEX='/usr/bin/latex' -DX_MAKEINDEX='/usr/bin/makeindex' -DX_PDFLATEX='/usr/bin/pdflatex' -DX_PERL='/usr/bin/perl' -DX_PROJECT='libchebfun' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -EGREP='/bin/grep -E' -EXEEXT='' -FGREP='/bin/grep -F' -GREP='/bin/grep' -HAVE_CUDA_FALSE='#' -HAVE_CUDA_TRUE='' -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_SCRIPT='${INSTALL}' -INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' -LD='/usr/bin/ld -m elf_x86_64' -LDFLAGS=' ' -LIBOBJS='' -LIBS=' ' -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -LIPO='' -LN_S='ln -s' -LTLIBOBJS='' -MAKEINFO='${SHELL} /home/aidan/quicksched/missing --run makeinfo' -MKDIR_P='/bin/mkdir -p' -NM='/usr/bin/nm -B' -NMEDIT='' -NVCC='/home/aidan/cuda_6.0//bin/nvcc' -OBJDUMP='objdump' -OBJEXT='o' -OPENMP_CFLAGS='-fopenmp' -OTOOL64='' -OTOOL='' -PACKAGE='QUICKSCHED' -PACKAGE_BUGREPORT='' -PACKAGE_NAME='' -PACKAGE_STRING='' -PACKAGE_TARNAME='' -PACKAGE_VERSION='' -PATH_SEPARATOR=':' -PRTDIAG='' -PTHREAD_CC='gcc -std=gnu99' -PTHREAD_CFLAGS='-pthread' -PTHREAD_LIBS='' -RANLIB='ranlib' -SED='/bin/sed' -SET_MAKE='' -SHELL='/bin/sh' -SIMD_FLAGS=' -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx' -STRIP='strip' -VERSION='VERSION' -ac_ct_CC='gcc' -ac_ct_DUMPBIN='' -acx_pthread_config='' -am__EXEEXT_FALSE='' -am__EXEEXT_TRUE='#' -am__fastdepCC_FALSE='#' -am__fastdepCC_TRUE='' -am__include='include' -am__isrc='' -am__leading_dot='.' -am__quote='' -am__tar='${AMTAR} chof - "$$tardir"' -am__untar='${AMTAR} xf -' -bindir='${exec_prefix}/bin' -build='x86_64-unknown-linux-gnu' -build_alias='' -build_cpu='x86_64' -build_os='linux-gnu' -build_vendor='unknown' -datadir='${datarootdir}' -datarootdir='${prefix}/share' -docdir='${datarootdir}/doc/${PACKAGE}' -dvidir='${docdir}' -exec_prefix='${prefix}' -host='x86_64-unknown-linux-gnu' -host_alias='' -host_cpu='x86_64' -host_os='linux-gnu' -host_vendor='unknown' -htmldir='${docdir}' -includedir='${prefix}/include' -infodir='${datarootdir}/info' -install_sh='${SHELL} /home/aidan/quicksched/install-sh' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -localedir='${datarootdir}/locale' -localstatedir='${prefix}/var' -lt_ECHO='echo' -mandir='${datarootdir}/man' -mkdir_p='/bin/mkdir -p' -oldincludedir='/usr/include' -pdfdir='${docdir}' -prefix='/usr/local' -program_transform_name='s,x,x,' -psdir='${docdir}' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target_alias='' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -#define PACKAGE_NAME "" -#define PACKAGE_TARNAME "" -#define PACKAGE_VERSION "" -#define PACKAGE_STRING "" -#define PACKAGE_BUGREPORT "" -#define PACKAGE "QUICKSCHED" -#define VERSION "VERSION" -#define STDC_HEADERS 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_UNISTD_H 1 -#define __EXTENSIONS__ 1 -#define _ALL_SOURCE 1 -#define _GNU_SOURCE 1 -#define _POSIX_PTHREAD_SEMANTICS 1 -#define _TANDEM_SOURCE 1 -#define HAVE_DLFCN_H 1 -#define LT_OBJDIR ".libs/" -#define HAVE_POSIX_MEMALIGN 1 -#define HAVE_MMX /**/ -#define HAVE_SSE /**/ -#define HAVE_SSE2 /**/ -#define HAVE_SSE3 /**/ -#define HAVE_SSSE3 /**/ -#define HAVE_SSE41 /**/ -#define HAVE_SSE42 1 -#define HAVE_AVX /**/ -#define STDC_HEADERS 1 -#define HAVE_PTHREAD 1 -#define HAVE_OPENMP 1 -#define TIME_WITH_SYS_TIME 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_CUDA 1 - -configure: exit 0 - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by config.status, which was -generated by GNU Autoconf 2.63. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on gtx690 - -config.status:1065: creating Makefile -config.status:1065: creating src/Makefile -config.status:1065: creating examples/Makefile -config.status:1065: creating doc/Makefile -config.status:1065: creating config.h -config.status:1287: config.h is unchanged -config.status:1339: executing depfiles commands -config.status:1339: executing libtool commands - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by config.status, which was -generated by GNU Autoconf 2.63. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status config.h - -on gtx690 - -config.status:1065: creating config.h -config.status:1287: config.h is unchanged diff --git a/examples/qr_cuda_test b/examples/qr_cuda_test deleted file mode 100755 index a6518c76f815ad5ee6808e58bf22afa902cdbfff..0000000000000000000000000000000000000000 Binary files a/examples/qr_cuda_test and /dev/null differ diff --git a/examples/simple_cuda_test b/examples/simple_cuda_test deleted file mode 100755 index 37193fa774be2d90eb422f9f0a00341dd0686c36..0000000000000000000000000000000000000000 Binary files a/examples/simple_cuda_test and /dev/null differ diff --git a/examples/test_bh_2 b/examples/test_bh_2 deleted file mode 100755 index 40f0607df2bdbc679ebadc7d15eb1774d1e3ec87..0000000000000000000000000000000000000000 Binary files a/examples/test_bh_2 and /dev/null differ diff --git a/examples/test_bh_2.cu~ b/examples/test_bh_2.cu~ deleted file mode 100644 index eb054a1aae04b1208dfdd621a4f4c65bc69faa60..0000000000000000000000000000000000000000 --- a/examples/test_bh_2.cu~ +++ /dev/null @@ -1,1098 +0,0 @@ -/******************************************************************************* - * This file is part of QuickSched. - * Coypright (c) 2014 Pedro Gonnet (pedro.gonnet@durham.ac.uk), - * Aidan Chalk (aidan.chalk@durham.ac.uk) - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * -* *****************************************************************************/ - - -/* Config parameters. */ -#include "../config.h" - -/* Standard includes. */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <math.h> -#include <float.h> -#include <limits.h> -#include <omp.h> -#include <fenv.h> - -/* Local includes. */ -extern "C"{ -#include "quicksched.h" -#include "res.h" -} -#include "cuda_queue.h" - -/** Task types. */ -enum task_type { - task_type_self = 0, - task_type_pair, - task_type_self_pc, - task_type_com, - task_type_count -}; - -struct cell{ - -double2 loc_xy; -double loc_z; -double h; -int count; -unsigned short int split, sorted; -int parts, firstchild, sibling; -int res, resz, resm, com_tid; - -}__attribute__((aligned(64))); - - -#define const_G 1 -/* Requred variables to obtain cells. */ -#define cell_maxparts 128 -#define CELL_STRETCH 2 -#define INITIAL_CELLS 256 -struct cell *cell_pool = NULL; -int used_cells=0; -int num_cells = 0; -int cell_size = INITIAL_CELLS*sizeof(struct cell); - -/* Device locations for the particle values. */ -__device__ double2 *parts_pos_xy; -__device__ double *parts_pos_z; -__device__ float4 *parts_a_m; -__device__ double2 *com_xy; -__device__ double *com_z; -__device__ float *com_mass; - -__device__ struct cell *cells; - - -/* Host locations for the particle values. */ -double2 *parts_pos_xy_host; -double *parts_pos_z_host; -float4 *parts_a_m_host; -double2 *com_xy_host; -double *com_z_host; -float *com_mass_host; - - - - -__device__ __forceinline__ void iact_pair_direct(struct cell *ci, struct cell *cj) { - int i, j, k; - int count_i = ci->count, count_j = cj->count; - int parts_i = ci->parts, parts_j = cj->parts; - double xi[3]; - float dx[3], ai[3], mi, mj, r2, w, ir; - __shared__ double2 parts_xy[cell_maxparts]; - __shared__ double parts_z[cell_maxparts]; - __shared__ float4 parts_am[cell_maxparts]; - - /* Load particles of cell j into shared memory */ - for(k = parts_j + threadIdx.x, j = threadIdx.x; k < parts_j + count_j; k+= blockDim.x, j += blockDim.x ) { - parts_xy[j] = parts_pos_xy[k]; - parts_z[j] = parts_pos_z[k]; - parts_am[j] = parts_a_m[k]; - } - - /* Loop over cell i.*/ - for(i = parts_i + threadIdx.x; i < parts_i + count_i; i+= blockDim.x) { - xi[0] = parts_xy[i].x; - xi[1] = parts_xy[i].y; - xi[2] = parts_z[i]; - for(k = 0; k < 3; k++) { - ai[k] = 0.0f; - } - mi = parts_a_m[i].w; - - for(j = 0; j < count_j; j++) { - r2 = 0.0f; - dx[0] = xi[0] - parts_xy[j].x; - dx[1] = xi[1] - parts_xy[j].y; - dx[2] = xi[2] - parts_z[j]; - r2 += dx[0] * dx[0]; - r2 += dx[1] * dx[1]; - r2 += dx[2] * dx[2]; - - -// ir = 1.0f / sqrtf(r2); - ir = rsqrtf(r2); - w = const_G * ir * ir * ir; - mj = parts_am[j].w; - for(k = 0; k < 3; k++) { - ai[k] -= dx[k] * mj * w; - } - } - - atomicAdd(&parts_a_m[i].x, ai[0]); - atomicAdd(&parts_a_m[i].y, ai[1]); - atomicAdd(&parts_a_m[i].z, ai[2]); - - } - - /* Load particles of cell i into shared memory */ - for(k = parts_i + threadIdx.x, j = threadIdx.x; k < parts_i + count_i; k+= blockDim.x, j += blockDim.x ) { - parts_xy[j] = parts_pos_xy[k]; - parts_z[j] = parts_pos_z[k]; - parts_am[j] = parts_a_m[k]; - } - /*Loop over cell j. */ - for(i = parts_j + threadIdx.x; i < parts_j + count_j; i+= blockDim.x) { - xi[0] = parts_xy[i].x; - xi[1] = parts_xy[i].y; - xi[2] = parts_z[i]; - for(k = 0; k < 3; k++) { - ai[k] = 0.0f; - } - mi = parts_a_m[i].w; - - for(j = 0; j < count_j; j++) { - r2 = 0.0f; - dx[0] = xi[0] - parts_xy[j].x; - dx[1] = xi[1] - parts_xy[j].y; - dx[2] = xi[2] - parts_z[j]; - r2 += dx[0] * dx[0]; - r2 += dx[1] * dx[1]; - r2 += dx[2] * dx[2]; - - - ir = rsqrtf(r2); - w = const_G * ir * ir * ir; - mj = parts_am[j].w; - for(k = 0; k < 3; k++) { - ai[k] -= dx[k] * mj * w; - } - } - - atomicAdd(&parts_a_m[i].x, ai[0]); - atomicAdd(&parts_a_m[i].y, ai[1]); - atomicAdd(&parts_a_m[i].z, ai[2]); - - } - -} - -/*__device__ void iact_pair(int celli, int cellj) { - - struct cell *ci, *cj; - ci = &cells[celli]; - cj = &cells[cellj]; - - if(Check if neighbours0) - { - if(ci->split && cj->split) { - //Split both cells and do all possible pairs. - - }else { - iact_pair_direct(ci, cj); - } - - } - -}*/ - -__device__ __forceinline__ void make_interact_pc(struct cell *leaf, struct cell *cj) { - - int i, k; - double2 j_com_xy; - double j_com_z; - float j_com_mass; - int count = leaf->count; - int parts = leaf->parts; - int cell_j = cj - cells; - float r2, dx[3], ir, w; - - - /* Init the com's data.*/ - j_com_xy = com_xy[cell_j]; - j_com_z = com_z[cell_j]; - j_com_mass = com_mass[cell_j]; - - for(i = parts; i < parts+count; i++) { - - r2 = 0.0; - dx[0] = j_com_xy.x - parts_pos_xy[i].x; - r2 += dx[0] * dx[0]; - dx[1] = j_com_xy.y - parts_pos_xy[i].y; - r2 += dx[1] * dx[1]; - dx[2] = j_com_z - parts_pos_z[i]; - r2 += dx[2] * dx[2]; - - ir = rsqrtf(r2); - w = j_com_mass * const_G * ir * ir * ir; - - parts_a_m[i].x += w * dx[0]; - parts_a_m[i].y += w * dx[1]; - parts_a_m[i].z += w * dx[2]; - } -} - -/** - * @brief Checks whether the cells are direct neighbours ot not - */ -__device__ __forceinline__ int are_neighbours_different_size(struct cell *ci, struct cell *cj) { - - int k; - float dx[3]; - double cih = ci->h, cjh = cj->h; - - float min_dist = 0.5*(cih+cjh); - - float center_i = ci->loc_xy.x + 0.5*cih; - float center_j = cj->loc_xy.x + 0.5*cjh; - dx[0] = fabsf(center_i - center_j); - center_i = ci->loc_xy.y + 0.5*cih; - center_j = cj->loc_xy.y + 0.5*cjh; - dx[1] = fabsf(center_i - center_j); - center_i = ci->loc_z + 0.5*cih; - center_j = cj->loc_z + 0.5*cjh; - dx[2] = fabsf(center_i - center_j); - return (dx[0] <= min_dist) && (dx[1] <= min_dist) && (dx[2] <= min_dist); -} - -__device__ __forceinline__ int are_neighbours(struct cell *ci, struct cell *cj) { - int k; - float dx[3]; - float min_dist = ci->h; - float center_i = ci->loc_xy.x; - float center_j = cj->loc_xy.x; - dx[0] = fabsf(center_i - center_j); - center_i = ci->loc_xy.y; - center_j = cj->loc_xy.y; - dx[1] = fabsf(center_i - center_j); - center_i = ci->loc_z; - center_j = cj->loc_z; - dx[2] = fabsf(center_i - center_j); - return (dx[0] <= min_dist) && (dx[1] <= min_dist) && (dx[2] <= min_dist); -} - -__device__ __forceinline__ int is_inside(struct cell *leaf, struct cell *c) { - return (leaf->parts >= c->parts) && (leaf->parts < c->parts + c->count); -} - -__device__ void iact_pair_pc(struct cell *ci, struct cell *cj, struct cell *leaf) { - - struct cell *cp ,*cps; - - for(cp = &cells[ci->firstchild]; cp != &cells[ci->sibling]; cp = &cells[cp->sibling]) { - if(is_inside(leaf, cp)) break; - } - - if(are_neighbours_different_size(cp, cj)) { - for(cps = &cells[cj->firstchild]; cps != &cells[ci->sibling]; cps = &cells[cps->sibling]) { - if(are_neighbours(cp, cps)) { - if(cp->split && cps->split) { - iact_pair_pc(cp, cps, leaf); - } - } else { - make_interact_pc(leaf, cps); - } - } - } - - -} - -/** - * @brief Compute the interactions between all particles in a leaf and - * and all the monopoles in the cell c - * - * @param c The #cell containing the monopoles - * @param leaf The #cell containing the particles - */ -__device__ void iact_self_pc(struct cell *c, struct cell *leaf) { - - struct cell *cp, *cps; - - /* Find the subcell of c the leaf is in.*/ - for( cp = &cells[c->firstchild]; cp != &cells[c->sibling]; cp = &cells[cp->sibling]) { - if(is_inside(leaf, cp)) break; - } - - if(cp->split) { - - iact_self_pc(cp, leaf); - - for(cps = &cells[c->firstchild]; cps != &cells[c->sibling]; cps = &cells[cps->sibling]) { - - if(cp != cps && cps->split) iact_pair_pc(cp,cps,leaf); - } - - } -} - - - -/** - * @brief Compute the interactions between all particles in a cell. - * - * @param cellID The cell ID to compute interactions on. - */ -__device__ void iact_self_direct(int cellID) { - struct cell *c = &cells[cellID]; - double xi[3] = {0.0, 0.0, 0.0}; - float ai[3] = {0.0, 0.0, 0.0 }, mi, mj, dx[3] = {0.0,0.0,0.0}, r2, ir, w; - __shared__ double2 parts_xy[cell_maxparts]; - __shared__ double parts_z[cell_maxparts]; - __shared__ float4 parts_am[cell_maxparts]; - int parts; - int count; - int i,j,k; - - - //If cell is split, interact each child with itself, and with each of its siblings. - /*if(c->split) { - //TODO - - } else {*/ - parts = c->parts; - count = c->count; - int z = threadIdx.x; - /* Load particle data into shared memory*/ - for(k = threadIdx.x + parts; k < parts + count; k += blockDim.x , z += blockDim.x) { - parts_xy[z] = parts_pos_xy[k]; - parts_z[z] = parts_pos_z[k]; - parts_am[z] = parts_a_m[k]; - } - __syncthreads(); - for(i = threadIdx.x; i < count; i += blockDim.x) - { - xi[0] = parts_xy[i].x; - xi[1] = parts_xy[i].y; - xi[2] = parts_z[i]; - for(k = 0; k < 3; k++) { - ai[k] = 0.0; - } - mi = parts_a_m[i].w; - - //for(j = i+1; j!= i; j = (j+1)%count) - for(j = 0; j < count; j++) - { - if(i != j){ - - /* Compute the pairwise distance. */ - r2 = 0.0; - dx[0] = xi[0] - parts_pos_xy[j].x; - r2 += dx[0]*dx[0]; - dx[1] = xi[1] - parts_pos_xy[j].y; - r2 += dx[1]*dx[1]; - dx[2] = xi[2] - parts_pos_z[j]; - r2 += dx[2]*dx[2]; - - /* Apply the gravitational acceleration. */ - - //ir = 1.0f / sqrtf(r2); - ir = rsqrtf(r2); - w = const_G * ir * ir * ir; - mj = parts_am[j].w; - for(k = 0; k < 3; k++) { - ai[k] -= w * dx[k] * mj; - } - - } - } - //Update. - atomicAdd(&parts_a_m[i].x,ai[0] ); - atomicAdd(&parts_a_m[i].y,ai[1] ); - atomicAdd(&parts_a_m[i].z,ai[2] ); - } - - -} - - -/** - * @brief Checks whether the cells are direct neighbours ot not. Both cells have - * to be of the same size - */ -static inline int are_neighbours_host(struct cell *ci, struct cell *cj) { - - int k; - float dx[3]; - -#ifdef SANITY_CHECKS - if (ci->h != cj->h) - error(" Cells of different size in distance calculation."); -#endif - - /* Maximum allowed distance */ - float min_dist = ci->h; - - /* (Manhattan) Distance between the cells */ - double2 loc1=ci->loc_xy, loc2=cj->loc_xy; - float center_i = loc1.x; - float center_j = loc2.x; - dx[0] = fabs(center_i - center_j); - center_i = loc1.y; - center_j = loc2.y; - dx[1] = fabs(center_i - center_j); - center_i = ci->loc_z; - center_j = cj->loc_z; - dx[2] = fabs(center_i - center_j); - - return (dx[0] <= min_dist) && (dx[1] <= min_dist) && (dx[2] <= min_dist); -} - - -struct cell *cell_get() -{ - struct cell *res; - - if(num_cells == 0) - { - cell_pool = (struct cell*) calloc(INITIAL_CELLS, sizeof(struct cell)); - if(cell_pool == NULL) - error("Failed to allocate cell_pool"); - com_xy_host = (double2*) calloc(INITIAL_CELLS, sizeof(double2)); - if(com_xy_host == NULL) - error("Failed to allocate cell_pool"); - com_z_host = (double*) calloc(INITIAL_CELLS, sizeof(double)); - if(com_z_host == NULL) - error("Failed to allocate cell_pool"); - com_mass_host = (float*) calloc(INITIAL_CELLS, sizeof(float)); - if(com_mass_host == NULL) - error("Failed to allocate cell_pool"); - num_cells = INITIAL_CELLS; - } - - if(used_cells >= num_cells) - { - /* Stretch */ - struct cell *new_pool; - cell_size *= CELL_STRETCH; - new_pool = (struct cell*) calloc(num_cells*CELL_STRETCH, sizeof(struct cell)); - if(new_pool == NULL) - error("Failed to allocate new_pool"); - if(cell_pool != NULL) - memcpy(new_pool, cell_pool, num_cells*sizeof(struct cell)); - - - - double2 *tempxy = (double2*) calloc(num_cells*CELL_STRETCH, sizeof(double2)); - if(tempxy == NULL) - error("Failed to allocate tempxy"); - memcpy(tempxy, com_xy_host, sizeof(double2)*num_cells); - free(com_xy_host); - com_xy_host = tempxy; - double *tempz = (double*) calloc(num_cells*CELL_STRETCH, sizeof(double)); - if(tempz == NULL) - error("Failed to allocate tempz"); - memcpy(tempz, com_z_host, num_cells*sizeof(double)); - free(com_z_host); - com_z_host = tempz; - float *tempm = (float*) calloc(num_cells*CELL_STRETCH, sizeof(float)); - if(tempm == NULL) - error("Failed to allocate tempm"); - memcpy(tempm, com_mass_host, num_cells*sizeof(float)); - free(com_mass_host); - com_mass_host = tempm; - - num_cells *= CELL_STRETCH; - free(cell_pool); - cell_pool = new_pool; - - message("Increased size of arrays"); - } - used_cells++; - cell_pool[used_cells-1].sibling = -1; - cell_pool[used_cells-1].firstchild = -1; - cell_pool[used_cells-1].res = qsched_res_none; - cell_pool[used_cells-1].resz = qsched_res_none; - cell_pool[used_cells-1].resm = qsched_res_none; - return &cell_pool[used_cells-1]; -} - -void comp_com(struct cell *c){ - - int k, count = c->count; - int cpi; - struct cell *cp; - int parts = c->parts; - double com[3] = {0.0, 0.0, 0.0}, mass = 0.0; - - if(c->split) { - for(cp = &cell_pool[(cpi = c->firstchild)]; cpi != c->sibling; cp = &cell_pool[(cpi = cp->sibling)]) { - float cp_mass = com_mass_host[cpi]; - com[0] += com_xy_host[cpi].x * cp_mass; - com[1] += com_xy_host[cpi].y * cp_mass; - com[2] += com_z_host[cpi] * cp_mass; - mass += cp_mass; - } - - - /* Otherwise collect the multiple from the particles */ - } else { - - for(k = parts; k < parts+count; k++) - { - float p_mass = parts_a_m_host[k].w; - com[0] += parts_pos_xy_host[k].x * p_mass; - com[1] += parts_pos_xy_host[k].y * p_mass; - com[2] += parts_pos_z_host[k] * p_mass; - mass += p_mass; - } - } - - - k = c - cell_pool; - /* Store the COM data, if it was collected. */ - if(mass > 0.0) { - float imass = 1.0f/mass; - com_xy_host[k].x = com[0] * imass; - com_xy_host[k].y = com[1] * imass; - com_z_host[k] = com[2] * imass; - com_mass_host[k] = mass; - }else - { - com_xy_host[k].x = 0.0; - com_xy_host[k].y = 0.0; - com_z_host[k] = 0.0; - com_mass_host[k] = 0.0f; - } - - - -} - -/** - * @brief Sort the parts into eight bins along the given pivots and - * fill the multipoles. Also adds the hierarchical resources - * to the sched (TODO). - * - * @param c The #cell to be split. - * @param N The total number of parts. - * @param s The #sched to store the resources. - */ -void cell_split(int c, struct qsched *s) { - int i, j, k, kk, count = cell_pool[c].count; - int parts = cell_pool[c].parts; - double2 tempxy; - double tempxy1; - float4 tempxy2; - struct cell *cp, *cell; - int left[8], right[8]; - double pivot[3]; - static int root = -1; -// struct cell *progenitors[8]; - int progenitors[8]; - int c1 = c; - double2 *temp_xy; - double *temp_z; - float4 *temp_a_m; - - /* Set the root cell. */ - if (root < 0) { - root = c; - cell_pool[c].sibling = -1; - } - - if(cell_pool[c].res == qsched_res_none) - { - if( cudaHostGetDevicePointer(&temp_xy, &parts_pos_xy_host[cell_pool[c].parts], 0) != cudaSuccess ) - error("Failed to get host device pointer."); - printf("tempxy = %p\n", temp_xy); - cell_pool[c].res = qsched_addres(s, qsched_owner_none, qsched_res_none, temp_xy, - sizeof(double2) * cell_pool[c].count, parts_pos_xy + cell_pool[c].parts); - } - if(cell_pool[c].resz == qsched_res_none) - { - if( cudaHostGetDevicePointer(&temp_z, &parts_pos_z_host[cell_pool[c].parts], 0) != cudaSuccess ) - error("Failed to get host device pointer."); - cell_pool[c].resz = qsched_addres(s, qsched_owner_none, qsched_res_none, temp_z, - sizeof(double) * cell_pool[c].count, parts_pos_z + cell_pool[c].parts); - } - if(cell_pool[c].resm == qsched_res_none) - { - if( cudaHostGetDevicePointer(&temp_a_m, &parts_a_m_host[cell_pool[c].parts], 0) != cudaSuccess ) - error("Failed to get host device pointer."); - cell_pool[c].resm = qsched_addres(s, qsched_owner_none, qsched_res_none, temp_a_m, - sizeof(float4) * cell_pool[c].count, parts_a_m + cell_pool[c].parts); - } - // error("Cell has no resource");*///TODO - - if(count > cell_maxparts ) - { - cell_pool[c].split = 1; - - for(k = 0; k < 8; k++) - { - progenitors[k] = (cp = cell_get()) - cell_pool; - cell = &cell_pool[c]; - cp->loc_xy = cell->loc_xy; - cp->loc_z = cell->loc_z; - cp->h = cell->h*0.5; - if(k & 4) cp->loc_xy.x += cp->h; - if(k & 2) cp->loc_xy.y += cp->h; - if(k & 1) cp->loc_z += cp->h; - } - - /* Init the pivots.*/ - pivot[0] = cell->loc_xy.x + cell->h * 0.5; - pivot[1] = cell->loc_xy.y + cell->h * 0.5; - pivot[2] = cell->loc_z + cell->h * 0.5; - - /* Split along the x axis. */ - i = parts; - j = parts+count-1; - while(i < j) - { - while(i <= parts+count-1 && parts_pos_xy_host[i].x < pivot[0]) i += 1; - while(j >= parts && parts_pos_xy_host[j].x >= pivot[0]) j -= 1; - if(i < j){ - tempxy = parts_pos_xy_host[i]; - tempxy1 = parts_pos_z_host[i]; - tempxy2 = parts_a_m_host[i]; - parts_pos_xy_host[i] = parts_pos_xy_host[j]; - parts_pos_z_host[i] = parts_pos_z_host[j]; - parts_a_m_host[i] = parts_a_m_host[j]; - parts_pos_xy_host[j] = tempxy; - parts_pos_z_host[j] = tempxy1; - parts_a_m_host[j] = tempxy2; - } - } - left[1] = i; - right[1] = parts+count-1; - left[0] = parts; - right[0] = j; - - /* Split along the y axis twice. */ - for (k = 1; k >= 0; k--) { - i = left[k]; - j = right[k]; - while(i <= j){ - while(i <= right[k] && parts_pos_xy_host[i].y < pivot[1]) i += 1; - while(j >= left[k] && parts_pos_xy_host[j].y >= pivot[1]) j -= 1; - if(i < j) - { - tempxy = parts_pos_xy_host[i]; - tempxy1 = parts_pos_z_host[i]; - tempxy2 = parts_a_m_host[i]; - parts_pos_xy_host[i] = parts_pos_xy_host[j]; - parts_pos_z_host[i] = parts_pos_z_host[j]; - parts_a_m_host[i] = parts_a_m_host[j]; - parts_pos_xy_host[j] = tempxy; - parts_pos_z_host[j] = tempxy1; - parts_a_m_host[j] = tempxy2; - } - } - left[2*k+1] = i; - right[2*k+1] = right[k]; - left[2*k] = left[k]; - right[2*k] = j; - } - /* Split along the z axis four times.*/ - for(k = 3; k >=0; k--) - { - i = left[k]; - j = right[k]; - while(i <= j){ - while(i <= right[k] && parts_pos_z_host[i] < pivot[2]) i += 1; - while(j >= left[k] && parts_pos_z_host[j] >= pivot[2]) j -= 1; - if(i < j) - { - tempxy = parts_pos_xy_host[i]; - tempxy1 = parts_pos_z_host[i]; - tempxy2 = parts_a_m_host[i]; - parts_pos_xy_host[i] = parts_pos_xy_host[j]; - parts_pos_z_host[i] = parts_pos_z_host[j]; - parts_a_m_host[i] = parts_a_m_host[j]; - parts_pos_xy_host[j] = tempxy; - parts_pos_z_host[j] = tempxy1; - parts_a_m_host[j] = tempxy2; - } - } - left[2 * k + 1] = i; - right[2 * k + 1] = right[k]; - left[2 * k] = left[k]; - right[2 * k] = j; - } - - /* Store the counts and offsets. */ - for(k = 0; k < 8; k++) - { - cell_pool[progenitors[k]].count = right[k]-left[k]+1; - cell_pool[progenitors[k]].parts = left[k]; - if( cudaHostGetDevicePointer(&temp_xy, &parts_pos_xy_host[cell_pool[progenitors[k]].parts], 0) != cudaSuccess ) - error("Failed to get host device pointer."); - cell_pool[progenitors[k]].res = qsched_addres(s, qsched_owner_none, cell->res, temp_xy, - sizeof(double2) * cell_pool[progenitors[k]].count, parts_pos_xy + cell_pool[progenitors[k]].parts); - if( cudaHostGetDevicePointer(&temp_z, &parts_pos_z_host[cell_pool[progenitors[k]].parts], 0) != cudaSuccess ) - error("Failed to get host device pointer."); - cell_pool[progenitors[k]].resz = qsched_addres(s, qsched_owner_none, cell->resz, temp_z, - sizeof(double) * cell_pool[progenitors[k]].count, parts_pos_z + cell_pool[progenitors[k]].parts); - if( cudaHostGetDevicePointer(&temp_a_m, &parts_a_m_host[cell_pool[progenitors[k]].parts], 0) != cudaSuccess ) - error("Failed to get host device pointer."); - cell_pool[progenitors[k]].resm = qsched_addres(s, qsched_owner_none, cell->resm, temp_a_m, - sizeof(float4) * cell_pool[progenitors[k]].count, parts_a_m + cell_pool[progenitors[k]].parts); - } - - /* Find the first non-empty progenitor */ - for(k = 0; k < 8; k++) - { - if(cell_pool[progenitors[k]].count > 0) - { - cell->firstchild = progenitors[k]; - break; - } - } - - #ifdef SANITY_CHECKS - if(cell->firstchild == -1) - error("Cell has been split but all children have 0 parts"); - #endif - - /*Prepare the pointers*/ - for(k = 0; k < 8; k++) - { - /* Find the next non-empty sibling */ - for(kk = k+1; kk < 8; ++kk){ - if(cell_pool[progenitors[kk]].count > 0){ - cell_pool[progenitors[k]].sibling = progenitors[kk]; - break; - } - } - - /* No non-empty sibling, go back a level.*/ - if(kk == 8) cell_pool[progenitors[k]].sibling = cell->sibling; - - } - - /* Recurse */ - for(k = 0; k < 8; k++) - if(cell_pool[progenitors[k]].count > 0) cell_split(progenitors[k], s); - - /* Otherwise we're at a leaf so we need to make the cell's particle-cell task. */ - } else { - -// struct cell *data[2] = {root, c}; - int data[2] = {root, c}; - int tid = qsched_addtask(s, task_type_self_pc, task_flag_none, data, - 2 * sizeof(int), 1); - qsched_addlock(s, tid, cell_pool[c].res); - qsched_addlock(s, tid, cell_pool[c].resz); - qsched_addlock(s, tid, cell_pool[c].resm); - } - -#ifndef COM_AS_TASK - comp_com(&cell_pool[c]); -#endif -} - -/** - * @brief Create the tasks for the cell pair/self. - * - * @param s The #sched in which to create the tasks. - * @param ci The first #cell. - * @param cj The second #cell. - */ -void create_tasks(struct qsched *s, struct cell *ci, struct cell *cj){ - - qsched_task_t tid; - int data[2]; - struct cell /**data[2],*/ *cp, *cps; - int cpi; - - - if(cj == NULL) - { - if(ci->split) - { - for(cp = &cell_pool[ci->firstchild]; cp != &cell_pool[ci->sibling]; cp = &cell_pool[cp->sibling]) - { - //Self Interaction. - create_tasks(s, cp, NULL); - - for(cps = &cell_pool[cp->sibling]; cps != &cell_pool[ci->sibling]; cps = &cell_pool[cps->sibling]) - create_tasks(s, cp, cps); - } - } - /* Self task */ - else{ - data[0] = ci - cell_pool; - data[1] = -1; - - tid = qsched_addtask(s, task_type_self, task_flag_none, data, sizeof(int)*2, ci->count*ci->count/2); - qsched_addlock(s, tid, ci->res); - qsched_addlock(s, tid, ci->resz); - qsched_addlock(s, tid, ci->resm); - } - } - /* Else its a pair!*/ - else{ - if(are_neighbours_host(ci,cj)){/* Cells are neighbours */ - /*Are both split? */ - if(ci->split && cj->split) - { - /* Recurse over both cells. */ - for(cp = &cell_pool[ci->firstchild]; cp != &cell_pool[ci->sibling]; cp = &cell_pool[cp->sibling]) - for(cps = &cell_pool[cj->firstchild]; cps != &cell_pool[cj->sibling]; cps = &cell_pool[cps->sibling]) - create_tasks(s, cp, cps); - - /* Otherwise, at least one of the cells is not split, build a direct - * interaction. */ - }else{ - data[0] = ci-cell_pool; - data[1] = cj-cell_pool; - - /* Create the task. */ - tid = qsched_addtask(s, task_type_pair, task_flag_none, data, - sizeof(struct cell *) * 2, ci->count * cj->count); - - /* Add the resources. */ - qsched_addlock(s, tid, ci->res); - qsched_addlock(s, tid, ci->resz); - qsched_addlock(s, tid, ci->resm); - qsched_addlock(s, tid, cj->res); - qsched_addlock(s, tid, cj->resz); - qsched_addlock(s, tid, cj->resm); - } - } - - } - - - -} - - -__device__ void runner( int type , void *data ) { - - int *idata = (int *)data; - int i = idata[0]; - int j = idata[1]; - - switch ( type ) { - case task_type_self: - iact_self_direct(i); - break; - case task_type_pair: - iact_pair_direct(&cells[i], &cells[j]); - break; - case task_type_self_pc: - iact_self_pc( &cells[i], &cells[j] ); - break; - default: - asm("trap;"); - } - __syncthreads(); -} - -__device__ qsched_funtype function = runner; - - -qsched_funtype func; -/** - * @brief Set up and run a task-based Barnes-Hutt N-body solver. - * - * @param N The number of random particles to use. - * @param runs Number of force evaluations to use as a benchmark. - * @param fileName Input file name. If @c NULL or an empty string, random - * particle positions will be used. - */ -void test_bh(int N, int runs, char *fileName) { - int i, k; - struct cell *root; - struct part *parts; - FILE *file; - struct qsched s; - ticks tic, toc_run, tot_setup = 0, tot_run = 0; - int countMultipoles = 0, countPairs = 0, countCoMs = 0; - double2 *parts_pos_xy_temp; - double *parts_pos_z_temp; - float4 *parts_a_m_temp; - - cudaFree(0); - if( cudaMemcpyFromSymbol( &func , function , sizeof(qsched_funtype) ) != cudaSuccess) - error("Failed to copy function pointer from device"); - - /* Initialize the scheduler. */ - qsched_init(&s, 1, qsched_flag_none); - - //Create host particle arrays. - if( cudaMallocHost(&parts_pos_xy_host, sizeof(double2) * N) != cudaSuccess) - error("Failed to allocate parts array"); - if( cudaMallocHost(&parts_pos_z_host, sizeof(double) * N) != cudaSuccess) - error("Failed to allocate parts array"); - if( cudaMallocHost( &parts_a_m_host, sizeof(float4) * N) != cudaSuccess ) - error("Failed to allocate parts array"); - - if( cudaMalloc(&parts_pos_xy_temp, sizeof(double2) * N) != cudaSuccess) - error("Failed to allocate device parts array"); - printf("parts_pos_xy_temp = %p\n", parts_pos_xy_temp); - if( cudaMemcpyToSymbol(parts_pos_xy, &parts_pos_xy_temp, sizeof(double2*), 0, cudaMemcpyHostToDevice) != cudaSuccess) - error("Failed to set device symbol for parts array"); - if( cudaMalloc(&parts_pos_z_temp, sizeof(double) * N) != cudaSuccess) - error("Failed to allocate device parts array"); - if( cudaMemcpyToSymbol(parts_pos_z, &parts_pos_z_temp, sizeof(double*), 0, cudaMemcpyHostToDevice) != cudaSuccess) - error("Failed to set device symbol for parts array"); - if( cudaMalloc(&parts_a_m_temp, sizeof(float4) * N) != cudaSuccess) - error("Failed to allocate device parts array"); - if( cudaMemcpyToSymbol(parts_a_m, &parts_a_m_temp, sizeof(float4*), 0, cudaMemcpyHostToDevice) != cudaSuccess) - error("Failed to set device symbol for parts array"); - - - if(fileName == NULL || fileName[0] == 0) { - for(k = 0; k < N; k++) { - parts_pos_xy_host[k].x = ((double)rand())/ RAND_MAX; - parts_pos_xy_host[k].y = ((double)rand())/ RAND_MAX; - parts_pos_z_host[k] = ((double)rand())/ RAND_MAX; - parts_a_m_host[k].w = ((double)rand()) / RAND_MAX; - } - - } else { - file = fopen(fileName, "r"); - int tempxy; - if(file) { - for(k = 0; k < N; k++) { - if(fscanf(file, "%d", &tempxy) != 1) - error("Failed to read ID"); - if(fscanf(file, "%lf%lf%lf", &parts_pos_xy_host[k].x, &parts_pos_xy_host[k].y, &parts_pos_z_host[k]) != 3) - error("Failed to read position of part %i.", k); - if(fscanf(file, "%f", &parts_a_m_host[k].w) != 1) - error("Failed to read mass of part %i.", k); - } - fclose(file); - } - } - - /* Init the cells. */ - root = cell_get(); - root->loc_xy.x = 0.0; - root->loc_xy.y = 0.0; - root->loc_z = 0.0; - root->h = 1.0; - root->count = N; - root->parts = 0; - root->sibling = -1; - int c = root-cell_pool; - cell_split(root - cell_pool, &s); - root = &cell_pool[c]; - int nr_leaves = 0; - int maxparts=0, minparts=1000000; - int number = 0; - while(c >= 0) { - if(cell_pool[c].count > 0) - { - number++; - if(cell_pool[c].res == qsched_res_none) - message("cell %i has no res", c); - if(cell_pool[c].resz == qsched_res_none) - message("cell %i has no resz", c); - if(cell_pool[c].resm == qsched_res_none) - message("cell %i has no resm", c); - } - if(!cell_pool[c].split) { - nr_leaves++; - if(cell_pool[c].count > maxparts) - { - maxparts = cell_pool[c].count; - } - if(cell_pool[c].count < minparts) - { - minparts = cell_pool[c].count; - } - c = cell_pool[c].sibling; - } else { - c = cell_pool[c].firstchild; - } - } - message("root.sibling = %i, root.split = %i", root->sibling, root->split); - printf("nr_leaves = %i\n", nr_leaves); - message("Average number of parts per leaf is %lf.", ((double)N) / ((double)nr_leaves)); - message("Max number of parts in a leaf is %i, min number is %i", maxparts, minparts); - - create_tasks(&s, root, NULL); - - message("total number of tasks: %i.", s.count); - message("total number of cells: %i.", number); - message("total number of deps: %i.", s.count_deps); - message("total number of res: %i.", s.count_res); - message("total number of locks: %i.", s.count_locks); - - for(k = 0; k < runs; k++) { - for(i = 0; i < N; ++i) { - parts_a_m_host[i].x = 0.0; - parts_a_m_host[i].y = 0.0; - parts_a_m_host[i].z = 0.0; - } - - //Run code. - printf("gpu_data = %p\n", (int*)s.res[0].gpu_data); - qsched_run_CUDA( &s , func ); - } -} - - -int main(int argc, char *argv[]) { - int c, nr_threads; - int N = 1000, runs = 1; - char fileName[100] = {0}; - - /* Parse the options */ - while ((c = getopt(argc, argv, "n:r:t:f:c:i:")) != -1) switch (c) { - case 'n': - if (sscanf(optarg, "%d", &N) != 1) - error("Error parsing number of particles."); - break; - case 'r': - if (sscanf(optarg, "%d", &runs) != 1) - error("Error parsing number of runs."); - break; - case 't': - if (sscanf(optarg, "%d", &nr_threads) != 1) - error("Error parsing number of threads."); -// omp_set_num_threads(nr_threads); - break; - case 'f': - if (sscanf(optarg, "%s", &fileName[0]) != 1) - error("Error parsing file name."); - break; - case '?': - fprintf(stderr, "Usage: %s [-t nr_threads] [-n N] [-r runs] [-f file] " - "[-c Nparts] [-i Niterations] \n", - argv[0]); - fprintf(stderr, "Solves the N-body problem using a Barnes-Hut\n" - "tree code with N random particles read from a file in " - "[0,1]^3 using" - "nr_threads threads.\n" - "A test of the neighbouring cells interaction with " - "Nparts per cell is also run Niterations times.\n"); - exit(EXIT_FAILURE); - } - - /* Tree node information */ - printf("Size of cell: %zu bytes.\n", sizeof(struct cell)); - - /* Part information */ -// printf("Size of part: %zu bytes.\n", sizeof(struct part)); - - /* Dump arguments. */ - if (fileName[0] == 0) { - message("Computing the N-body problem over %i random particles using %i " - "threads (%i runs).", - N, nr_threads, runs); - } else { - message("Computing the N-body problem over %i particles read from '%s' " - "using %i threads (%i runs).", - N, fileName, nr_threads, runs); - } - - /* Run the BH test. */ - test_bh(N, runs, fileName); -} diff --git a/examples/test_heirarchy b/examples/test_heirarchy deleted file mode 100755 index 9d1500172d880e0ba0206b1d8dea671b8e4668ea..0000000000000000000000000000000000000000 Binary files a/examples/test_heirarchy and /dev/null differ diff --git a/src/CUDACompile.sh~ b/src/CUDACompile.sh~ deleted file mode 100644 index 7e5a977a490a9e3140e04395573d839fad1f49d8..0000000000000000000000000000000000000000 --- a/src/CUDACompile.sh~ +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -FLAGS2="-Xcompiler=-fsanitize=address -Xcompiler=-fno-omit-frame-pointer" -DEBUG_FLAGS="-G -DDEBUG_GPU" -FLAGS="-O3 -g -DCPU_TPS=3.1e9 -lineinfo -src-in-ptx -Xptxas -dlcm=cg --maxrregcount=32 -gencode arch=compute_30,code=sm_30 -ftz=true -fmad=true -DFPTYPE_SINGLE -lgomp -DWITH_CUDA -DTIMERS -ccbin=/usr/bin/gcc-4.8" -# -DGPU_locks -Xptxas -dlcm=cg -Xptxas="-v"" -# -DNO_LOADS - -CFLAGS="-fsanitize=address -fno-omit-frame-pointer" - -gcc-4.8 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -g -O3 -Wall -Werror -ffast-math -fstrict-aliasing -ftree-vectorize -funroll-loops -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -fopenmp -DTIMERS -DWITH_CUDA -g -O2 -march=native -pthread -MT qsched.lo -MD -MP -MF .deps/qsched.Tpo -c qsched.c -o qsched.o -lprofiler -gcc-4.8 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -g -O3 -Wall -Werror -ffast-math -fstrict-aliasing -ftree-vectorize -funroll-loops -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -fopenmp -DTIMERS -DWITH_CUDA -g -O2 -march=native -pthread -MT qsched.lo -MD -MP -MF .deps/qsched.Tpo -c queue.c -o queue.o -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -dc cuda_queue.cu qsched.o queue.o -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -lib cuda_queue.o qsched.o queue.o -o .libs/libquicksched_cuda.a -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -DGPU_locks -dc cuda_queue.cu qsched.o queue.o -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -lib cuda_queue.o qsched.o queue.o -o .libs/libquicksched_cuda_locks.a -lprofiler - -cd ../examples - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -dc -m64 -I../src -dc -L/home/aidan/cuda_6.0/lib -L/home/aidan/cuda_6.0/lib64 -lcudart -lcuda test_gpu_simple.cu -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -m64 -I../src -L/home/aidan/cuda_6.0/lib -L/home/aidan/cuda_6.0/lib64 -Xnvlink -v test_gpu_simple.o ../src/.libs/libquicksched_cuda.a -o simple_cuda_test -lprofiler - - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -dc -m64 -I../src -dc -lf77blas -lcblas -latlas -lm -L/home/aidan/ATLAS/ATLAS_linux/lib/ -L/home/aidan/cuda_6.0/lib -L/home/aidan/cuda_6.0/lib64 -lcudart -lcuda /usr/lib64/atlas/libcblas.a /usr/lib64/atlas/libptcblas.a test_qr.cu -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -m64 -I../src -lf77blas -lcblas -latlas -lm -L/home/aidan/ATLAS/ATLAS_linux/lib/ -L/home/aidan/cuda_6.0/lib -L/home/aidan/cuda_6.0/lib64 -Xnvlink -v test_qr.o ../src/.libs/libquicksched_cuda.a /usr/lib64/atlas/libcblas.a /usr/lib64/atlas/libptcblas.a -o qr_cuda_test -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -dc -m64 -I../src -dc -L/home/aidan/cuda_6.0/lib -L/home/aidan/cuda_6.0/lib64 -lcudart -lcuda test_hierarchy.cu -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -m64 -I../src -L/home/aidan/cuda_6.0/lib -L/home/aidan/cuda_6.0/lib64 -Xnvlink -v test_hierarchy.o ../src/.libs/libquicksched_cuda.a -o test_heirarchy -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -dc -m64 -I../src -dc -L/home/aidan/cuda_6.0/lib -L/home/aidan/cuda_6.0/lib64 -lcudart -lcuda test_bh_2.cu -lprofiler - -/home/aidan/cuda_6.0/bin/nvcc $FLAGS -m64 -I../src -L/home/aidan/cuda_6.0/lib -L/home/aidan/cuda_6.0/lib64 -Xnvlink -v test_bh_2.o ../src/.libs/libquicksched_cuda.a -o test_bh_2 -lprofiler diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 6fb2eb64d7a874b78ab28a7724ce35355e065d19..0000000000000000000000000000000000000000 --- a/src/Makefile +++ /dev/null @@ -1,659 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# src/Makefile. Generated from Makefile.in by configure. - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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. - - - -# This file is part of Quickqsched. -# Coypright (c) 2013 Pedro Gonnet (pedro.gonnet@durham.ac.uk), -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - - - -pkgdatadir = $(datadir)/QUICKSCHED -pkgincludedir = $(includedir)/QUICKSCHED -pkglibdir = $(libdir)/QUICKSCHED -pkglibexecdir = $(libexecdir)/QUICKSCHED -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -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 = : -build_triplet = x86_64-unknown-linux-gnu -host_triplet = x86_64-unknown-linux-gnu - -# Build a CUDA-enabled version too? -am__append_1 = libquicksched_cuda.la -subdir = src -DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ - $(top_srcdir)/m4/ax_check_compile_flag.m4 \ - $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ - $(top_srcdir)/m4/ax_ext.m4 \ - $(top_srcdir)/m4/ax_func_posix_memalign.m4 \ - $(top_srcdir)/m4/ax_gcc_archflag.m4 \ - $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ - $(top_srcdir)/m4/ax_openmp.m4 \ - $(top_srcdir)/m4/ax_prog_doxygen.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libquicksched_la_LIBADD = -am_libquicksched_la_OBJECTS = qsched.lo queue.lo -libquicksched_la_OBJECTS = $(am_libquicksched_la_OBJECTS) -libquicksched_cuda_la_LIBADD = -am__libquicksched_cuda_la_SOURCES_DIST = qsched.c queue.c \ - cuda_queue.cu -am__objects_1 = libquicksched_cuda_la-qsched.lo \ - libquicksched_cuda_la-queue.lo cuda_queue.lo -am_libquicksched_cuda_la_OBJECTS = $(am__objects_1) -libquicksched_cuda_la_OBJECTS = $(am_libquicksched_cuda_la_OBJECTS) -libquicksched_cuda_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(libquicksched_cuda_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -am_libquicksched_cuda_la_rpath = -rpath $(libdir) -DEFAULT_INCLUDES = -I. -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libquicksched_la_SOURCES) $(libquicksched_cuda_la_SOURCES) -DIST_SOURCES = $(libquicksched_la_SOURCES) \ - $(am__libquicksched_cuda_la_SOURCES_DIST) -HEADERS = $(include_HEADERS) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /home/aidan/quicksched/missing --run aclocal-1.11 -AMTAR = ${SHELL} /home/aidan/quicksched/missing --run tar -AR = ar -AUTOCONF = ${SHELL} /home/aidan/quicksched/missing --run autoconf -AUTOHEADER = ${SHELL} /home/aidan/quicksched/missing --run autoheader -AUTOMAKE = ${SHELL} /home/aidan/quicksched/missing --run automake-1.11 -AWK = gawk -CC = gcc -std=gnu99 -CCDEPMODE = depmode=gcc3 -CFLAGS = -g -O2 -pthread -CPP = gcc -E -CPPFLAGS = -CUDA_CFLAGS = -I/home/aidan/cuda_6.0//include -CUDA_LIBS = -L/home/aidan/cuda_6.0//lib -L/home/aidan/cuda_6.0//lib64 -lcudart -CYGPATH_W = echo -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps -DOXYGEN_PAPER_SIZE = -DSYMUTIL = -DUMPBIN = -DX_CONFIG = doc/Doxyfile -DX_DOCDIR = doc/ -DX_DOT = /usr/bin/dot -DX_DOXYGEN = /usr/bin/doxygen -DX_DVIPS = /usr/bin/dvips -DX_EGREP = /bin/egrep -DX_ENV = SRCDIR='.' PROJECT='libchebfun' DOCDIR='doc/' VERSION='' PERL_PATH='/usr/bin/perl' HAVE_DOT='YES' DOT_PATH='/usr/bin' GENERATE_MAN='NO' GENERATE_RTF='NO' GENERATE_XML='NO' GENERATE_HTMLHELP='NO' GENERATE_CHI='NO' GENERATE_HTML='YES' GENERATE_LATEX='YES' -DX_FLAG_chi = 0 -DX_FLAG_chm = 0 -DX_FLAG_doc = 1 -DX_FLAG_dot = 1 -DX_FLAG_html = 1 -DX_FLAG_man = 0 -DX_FLAG_pdf = 1 -DX_FLAG_ps = 1 -DX_FLAG_rtf = 0 -DX_FLAG_xml = 0 -DX_HHC = -DX_LATEX = /usr/bin/latex -DX_MAKEINDEX = /usr/bin/makeindex -DX_PDFLATEX = /usr/bin/pdflatex -DX_PERL = /usr/bin/perl -DX_PROJECT = libchebfun -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /bin/grep -E -EXEEXT = -FGREP = /bin/grep -F -GREP = /bin/grep -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_STRIP_PROGRAM = $(install_sh) -c -s -LD = /usr/bin/ld -m elf_x86_64 -LDFLAGS = -LIBOBJS = -LIBS = -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIPO = -LN_S = ln -s -LTLIBOBJS = -MAKEINFO = ${SHELL} /home/aidan/quicksched/missing --run makeinfo -MKDIR_P = /bin/mkdir -p -NM = /usr/bin/nm -B -NMEDIT = -NVCC = /home/aidan/cuda_6.0//bin/nvcc -OBJDUMP = objdump -OBJEXT = o -OPENMP_CFLAGS = -fopenmp -OTOOL = -OTOOL64 = -PACKAGE = QUICKSCHED -PACKAGE_BUGREPORT = -PACKAGE_NAME = -PACKAGE_STRING = -PACKAGE_TARNAME = -PACKAGE_VERSION = -PATH_SEPARATOR = : -PRTDIAG = -PTHREAD_CC = gcc -std=gnu99 -PTHREAD_CFLAGS = -pthread -PTHREAD_LIBS = -RANLIB = ranlib -SED = /bin/sed -SET_MAKE = -SHELL = /bin/sh -SIMD_FLAGS = -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -STRIP = strip -VERSION = VERSION -abs_builddir = /home/aidan/quicksched/src -abs_srcdir = /home/aidan/quicksched/src -abs_top_builddir = /home/aidan/quicksched -abs_top_srcdir = /home/aidan/quicksched -ac_ct_CC = gcc -ac_ct_DUMPBIN = -acx_pthread_config = -am__include = include -am__leading_dot = . -am__quote = -am__tar = ${AMTAR} chof - "$$tardir" -am__untar = ${AMTAR} xf - -bindir = ${exec_prefix}/bin -build = x86_64-unknown-linux-gnu -build_alias = -build_cpu = x86_64 -build_os = linux-gnu -build_vendor = unknown -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -docdir = ${datarootdir}/doc/${PACKAGE} -dvidir = ${docdir} -exec_prefix = ${prefix} -host = x86_64-unknown-linux-gnu -host_alias = -host_cpu = x86_64 -host_os = linux-gnu -host_vendor = unknown -htmldir = ${docdir} -includedir = ${prefix}/include -infodir = ${datarootdir}/info -install_sh = ${SHELL} /home/aidan/quicksched/install-sh -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -localedir = ${datarootdir}/locale -localstatedir = ${prefix}/var -lt_ECHO = echo -mandir = ${datarootdir}/man -mkdir_p = /bin/mkdir -p -oldincludedir = /usr/include -pdfdir = ${docdir} -prefix = /usr/local -program_transform_name = s,x,x, -psdir = ${docdir} -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target_alias = -top_build_prefix = ../ -top_builddir = .. -top_srcdir = .. - -# Automake stuff -AUTOMAKE_OPTIONS = gnu - -# Add the debug flag to the whole thing -AM_CFLAGS = -g -O3 -Wall -Werror -ffast-math -fstrict-aliasing -ftree-vectorize \ - -funroll-loops $(SIMD_FLAGS) $(OPENMP_CFLAGS) -DTIMERS \ - #-fsanitize=address -fno-omit-frame-pointer - - -# Assign a "safe" version number -AM_LDFLAGS = -version-info 0:0:0 - -# Build the libquicksched library -lib_LTLIBRARIES = libquicksched.la $(am__append_1) -libquicksched_la_SOURCES = qsched.c queue.c - -# List required headers -include_HEADERS = atomic.h lock.h queue.h qsched.h task.h res.h error.h qsched.h -#SOURCES_CUDA = - -# CUDA sources -SOURCES_CUDA = qsched.c queue.c cuda_queue.cu -CUDA_MYFLAGS = -O3 -g -DCPU_TPS=3.1e9 -Xnvlink -rdc=true -lineinfo -src-in-ptx --maxrregcount=32 -Xptxas="-v" -Xptxas -dlcm=cg -gencode arch=compute_30,code=sm_30 -ftz=true -fmad=true -DFPTYPE_SINGLE -DWITH_CUDA #-fsanitize=address -fno-omit-frame-pointer -libquicksched_cuda_la_SOURCES = $(SOURCES_CUDA) -libquicksched_cuda_la_CFLAGS = -DFPTYPE_SINGLE $(AM_CFLAGS) -DWITH_CUDA $(CUDA_CFLAGS) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .cu .lo .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 ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/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 -$(am__aclocal_m4_deps): -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libquicksched.la: $(libquicksched_la_OBJECTS) $(libquicksched_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libquicksched_la_OBJECTS) $(libquicksched_la_LIBADD) $(LIBS) -libquicksched_cuda.la: $(libquicksched_cuda_la_OBJECTS) $(libquicksched_cuda_la_DEPENDENCIES) - $(libquicksched_cuda_la_LINK) $(am_libquicksched_cuda_la_rpath) $(libquicksched_cuda_la_OBJECTS) $(libquicksched_cuda_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -include ./$(DEPDIR)/libquicksched_cuda_la-qsched.Plo -include ./$(DEPDIR)/libquicksched_cuda_la-queue.Plo -include ./$(DEPDIR)/qsched.Plo -include ./$(DEPDIR)/queue.Plo - -.c.o: - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -# source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` - $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -# source='$<' object='$@' libtool=no \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: - $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< - $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -# source='$<' object='$@' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(LTCOMPILE) -c -o $@ $< - -libquicksched_cuda_la-qsched.lo: qsched.c - $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquicksched_cuda_la_CFLAGS) $(CFLAGS) -MT libquicksched_cuda_la-qsched.lo -MD -MP -MF $(DEPDIR)/libquicksched_cuda_la-qsched.Tpo -c -o libquicksched_cuda_la-qsched.lo `test -f 'qsched.c' || echo '$(srcdir)/'`qsched.c - $(am__mv) $(DEPDIR)/libquicksched_cuda_la-qsched.Tpo $(DEPDIR)/libquicksched_cuda_la-qsched.Plo -# source='qsched.c' object='libquicksched_cuda_la-qsched.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquicksched_cuda_la_CFLAGS) $(CFLAGS) -c -o libquicksched_cuda_la-qsched.lo `test -f 'qsched.c' || echo '$(srcdir)/'`qsched.c - -libquicksched_cuda_la-queue.lo: queue.c - $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquicksched_cuda_la_CFLAGS) $(CFLAGS) -MT libquicksched_cuda_la-queue.lo -MD -MP -MF $(DEPDIR)/libquicksched_cuda_la-queue.Tpo -c -o libquicksched_cuda_la-queue.lo `test -f 'queue.c' || echo '$(srcdir)/'`queue.c - $(am__mv) $(DEPDIR)/libquicksched_cuda_la-queue.Tpo $(DEPDIR)/libquicksched_cuda_la-queue.Plo -# source='queue.c' object='libquicksched_cuda_la-queue.lo' libtool=yes \ -# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ -# $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libquicksched_cuda_la_CFLAGS) $(CFLAGS) -c -o libquicksched_cuda_la-queue.lo `test -f 'queue.c' || echo '$(srcdir)/'`queue.c - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(includedir)" && rm -f $$files - -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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - 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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - 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; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__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)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$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 $(LTLIBRARIES) $(HEADERS) -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; 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) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-libLTLIBRARIES clean-libtool \ - 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 - -html-am: - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -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 \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-includeHEADERS install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES - -.cu: qsched.c queue.c -.cu.o: - $(NVCC) -c $(NVCCFLAGS) $(CUDA_CFLAGS) $(CUDA_MYFLAGS) $< -o $@ -.cu.lo: - $(top_srcdir)/cudalt.py $@ $(NVCC) -c $(NVCCFLAGS) $(CUDA_CFLAGS) $(CUDA_MYFLAGS) $< - -# 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: diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 651c009cffdeb821933117f0d24230cc35aec2d7..0000000000000000000000000000000000000000 --- a/src/Makefile.am +++ /dev/null @@ -1,54 +0,0 @@ - -# This file is part of Quickqsched. -# Coypright (c) 2013 Pedro Gonnet (pedro.gonnet@durham.ac.uk), -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program 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 General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# Automake stuff -AUTOMAKE_OPTIONS=gnu - -# Add the debug flag to the whole thing -AM_CFLAGS = -g -O3 -Wall -Werror -ffast-math -fstrict-aliasing -ftree-vectorize \ - -funroll-loops $(SIMD_FLAGS) $(OPENMP_CFLAGS) -DTIMERS \ - #-fsanitize=address -fno-omit-frame-pointer - -# Assign a "safe" version number -AM_LDFLAGS = -version-info 0:0:0 - -# Build the libquicksched library -lib_LTLIBRARIES = libquicksched.la -libquicksched_la_SOURCES = qsched.c queue.c - -# List required headers -include_HEADERS = atomic.h lock.h queue.h qsched.h task.h res.h error.h qsched.h - -# CUDA sources -if HAVE_CUDA - SOURCES_CUDA = qsched.c queue.c cuda_queue.cu - CUDA_MYFLAGS = -O3 -g -DCPU_TPS=3.1e9 -Xnvlink -rdc=true -lineinfo -src-in-ptx --maxrregcount=32 -Xptxas="-v" -Xptxas -dlcm=cg -gencode arch=compute_30,code=sm_30 -ftz=true -fmad=true -DFPTYPE_SINGLE -DWITH_CUDA #-fsanitize=address -fno-omit-frame-pointer -.cu: qsched.c queue.c -.cu.o: - $(NVCC) -c $(NVCCFLAGS) $(CUDA_CFLAGS) $(CUDA_MYFLAGS) $< -o $@ -.cu.lo: - $(top_srcdir)/cudalt.py $@ $(NVCC) -c $(NVCCFLAGS) $(CUDA_CFLAGS) $(CUDA_MYFLAGS) $< -else - SOURCES_CUDA = -endif - -# Build a CUDA-enabled version too? -if HAVE_CUDA -lib_LTLIBRARIES += libquicksched_cuda.la -libquicksched_cuda_la_SOURCES = $(SOURCES_CUDA) -libquicksched_cuda_la_CFLAGS = -DFPTYPE_SINGLE $(AM_CFLAGS) -DWITH_CUDA $(CUDA_CFLAGS) -endif diff --git a/src/cuda_queue.cu~ b/src/cuda_queue.cu~ deleted file mode 100644 index 63d9bcd45c166efd3357013e5d7f5d680ba669b0..0000000000000000000000000000000000000000 --- a/src/cuda_queue.cu~ +++ /dev/null @@ -1,2297 +0,0 @@ -/******************************************************************************* - * This file is part of QuickSched. - * Coypright (c) 2013 Pedro Gonnet (pedro.gonnet@durham.ac.uk), Aidan Chalk (aidan.chalk@durham.ac.uk) - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - ******************************************************************************/ -/* Config parameters. */ -#include "../config.h" - -/* Standard includes. */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <gperftools/profiler.h> - -extern "C"{ -#include "quicksched.h" -} -#include "cuda_queue.h" -#include "res.h" - -/*Define task types required for GPU */ -#define type_load -100 -#define type_unload -101 -#define type_ghost -102 - - -enum {timers_load_q=0, timers_unload_q, timers_queue, timers_doload, timers_dounload, timers_doother, timers_count}; -#ifdef TIMINGS -#ifdef TIMER_TIC -#undef TIMER_TIC -#endif -#ifdef TIMER_TOC -#undef TIMER_TOC -#endif -#define TIMER_TIC int timer = clock(); -#define TIMER_TOC(N) if(threadIdx.x == 0){atomicAdd( &cuda_timers[N], clock()-timer);} -#define TIMER_TIC_ND timer = clock(); -__device__ unsigned long long int cuda_timers[timers_count]; -#else -#ifdef TIMER_TIC -#undef TIMER_TIC -#endif -#ifdef TIMER_TOC -#undef TIMER_TOC -#endif -#define TIMER_TIC -#define TIMER_TOC(N) -#define TIMER_TIC_ND -#endif - -/*Define if conflicts are enabled or not.*/ -//#define GPU_locks - -/*Declare variables required for the queue*/ -__device__ struct queue_cuda cuda_queues[ cuda_numqueues ]; -__constant__ int cuda_nrqueues; -__constant__ int cuda_queue_size; -__constant__ int cuda_numtasks; - -__device__ struct task *tasks_cuda; -__device__ qsched_res_t *locks_cuda; -__device__ qsched_res_t *uses_cuda; -__device__ qsched_task_t *deps_cuda; -__device__ struct res *res_cuda; -__device__ char *data_cuda; -__device__ int cuda_barrier = 0; -__device__ volatile int tot_num_tasks; - -__device__ qsched_funtype fun; -/** - * @brief Get a task ID from the given queue. - * - */ - - - -__device__ __inline__ int cuda_trymultilock ( volatile int *l ) { - - int res = atomicAdd( (int *)l, 1); - printf("res = %i\n", res); - res = res <= 0; - if( res == 0) - { - atomicAdd( (int *)l, -1); - return 0; - }else - return 1; - -} - -__device__ __inline__ void cuda_multiunlock ( volatile int *l ) { - atomicAdd( (int *)l, -1 ); -} - -__device__ __inline__ int cuda_trylock ( volatile int *l ) { - int res = atomicCAS( (int *)l, 0 , 1 ); - return res; -} - -__device__ __inline__ int cuda_lock ( volatile int *l ) { - while(atomicCAS( (int *)l, 0 , 1 ) != 0 ); - return 0; -} - -__device__ __inline__ int cuda_unlock ( volatile int *l ) { - int res = atomicCAS( (int *)l , 1 , 0) != 1 ; - return res; -} - - -/** - * @brief Copy bulk memory in a strided way. - * - * @param dest Pointer to destination memory. - * @param source Pointer to source memory. - * @param count Number of bytes to copy, must be a multiple of sizeof(int). - */ - -__device__ __inline__ void cuda_memcpy_tasks ( void *dest , void *source , int count , int tid ) { - - int k; - int *idest = (int *)dest, *isource = (int *)source; - int val1, val2, val3, val4; - - /* Copy the data in chunks of sizeof(int). */ - for ( k = threadIdx.x ; k + 4*blockDim.x < count/sizeof(int) ; k += 4*blockDim.x ){ - val1 = isource[k]; - val2 = isource[k+blockDim.x]; - val3 = isource[k+2*blockDim.x]; - val4 = isource[k+3*blockDim.x]; - idest[k] = val1; - idest[k+blockDim.x] = val2; - idest[k+2*blockDim.x] = val3; - idest[k+3*blockDim.x] = val4; - } - for( ; k < count/sizeof(int); k+=blockDim.x) - { - idest[k] = isource[k]; - } - - } - -__device__ int cuda_queue_gettask ( struct queue_cuda *q ) { - - int ind, tid = -1; - - /* Don't even try... */ - if ( q->rec_count == q->count ) - return -1; - - /* Get the index of the next task. */ - ind = atomicAdd( &q->first , 1 ); - - /* Wrap the index. */ - ind %= cuda_queue_size; - /* Loop until there is a valid task at that index. */ - while ( q->rec_count < q->count && ( tid = q->data[ind] ) < 0); - - /* Scratch the task from the queue */ - if ( tid >= 0 ) - { - q->data[ind] = -1; - atomicAdd((int*) &tot_num_tasks, -1); - } - /* Return the acquired task ID. */ - return tid; - - } - - -/** - * @brief Put a task onto the given queue. - * - * @param tid The task ID to add to the end of the queue. - */ - -__device__ void cuda_queue_puttask ( struct queue_cuda *q , int tid ) { - - int ind; - - /* Get the index of the next task. */ - ind = atomicAdd( &q->last , 1 ) % cuda_queue_size; - - /* Wait for the slot in the queue to be empty. */ - while ( q->data[ind] != -1 ); - - /* Write the task back to the queue. */ - q->data[ind] = tid; - - atomicAdd((int*)&q->nr_avail_tasks, 1); - - } - - - - -#ifdef GPU_locks - - -/** - * @brief Unlock a resource and un-hold its parents. - * - * @param s Pointer to the #qsched. - * @param rid The ID of the resource to lock. - */ - -__device__ void cuda_unlockres ( int rid ) { - - int finger; - - /* Unlock the resource. */ - cuda_unlock( &res_cuda[rid].lock ); - - /* Go back up the tree and undo the holds. */ - for ( finger = res_cuda[rid].parent ; finger != qsched_res_none ; finger = res_cuda[finger].parent ) - atomicAdd( (int *) &res_cuda[finger].hold, -1 ); - - } - - -/** - * @brief Lock a resource and hold its parents. - * - * @param rid The ID of the resource to lock. - * - * @return @c 1 if the resource could be locked, @c 0 otherwise. - */ - -__device__ int cuda_lockres ( int rid ) { - - int finger, finger2; - - /* Try to lock the root-level resource. */ - if ( res_cuda[rid].hold || cuda_trylock( &res_cuda[rid].lock ) ) - return 0; - - /* Did the resource get held in the meantime? */ - if ( res_cuda[rid].hold ) { - cuda_unlock( &res_cuda[rid].lock ); - return 0; - } - - /* Follow parents and increase their hold counter, but fail - if any are locked. */ - for ( finger = res_cuda[rid].parent ; finger != qsched_res_none ; finger = res_cuda[finger].parent ) { - if ( cuda_trylock( &res_cuda[finger].lock ) ) - break; - atomicAdd((int *) &res_cuda[finger].hold , 1); - cuda_unlock( &res_cuda[finger].lock ); - } - - /* Did we fail on the way up? */ - if ( finger != qsched_res_none ) { - - /* Unlock the resource. */ - cuda_unlock( &res_cuda[rid].lock ); - - /* Go back up the tree and undo the holds. */ - for ( finger2 = res_cuda[rid].parent ; finger2 != finger ; finger2 = res_cuda[finger2].parent ) - atomicAdd((int *) &res_cuda[finger2].hold, -1 ); - - /* Fail. */ - return 0; - - } - - /* Otherwise, all went well. */ - - else - return 1; - } - - -/** - * @brief Try to get all the locks for a task. - * - * @param tid The ID of the #task to lock. - * - * @return @c 1 if the resources could be locked, @c 0 otherwise. - */ -__device__ int cuda_locktask ( int tid ) { - - - int k; - struct task *t; - - /* Get a pointer on the task. */ - t = &tasks_cuda[tid]; - - /* Try to lock all the task's locks. */ - for ( k = 0 ; k < t->nr_locks ; k++ ) - if ( cuda_lockres( t->locks[k] ) == 0 ) - break; - - /* If I didn't get all the locks... */ - if ( k < t->nr_locks ) { - /* Unroll the locks I got. */ - for ( k -= 1 ; k >= 0 ; k-- ) - cuda_unlockres( t->locks[k] ); - - /* Fail. */ - return 0; - - } - - /* Otherwise, all went well. */ - else { - return 1; - } - -} - -/** - * @brief Tell the #qsched that a task has completed. - * - * @param s Pointer to the #qsched. - * @param t Pointer to the completed #task. - */ - -__device__ void cuda_done ( struct task *t ) { - - int k; - struct task *t2; - - /* Release this task's locks. */ - for ( k = 0 ; k < t->nr_locks ; k++ ) - cuda_unlockres( t->locks[k] ); - - } - -/** - * @brief Get a task from the given task queue. - * - * Picks tasks from the queue sequentially and checks if they - * can be computed. If not, they are returned to the queue. - * - * This version of the routine does not check for conflicts. - * - * This routine blocks until a valid task is picked up, or the - * specified queue is empty. - */ -__device__ int runner_cuda_gettask ( struct queue_cuda *q ) { - - int tid = -1; - if( atomicAdd((int*)&q->nr_avail_tasks, -1) <= 0) - { - atomicAdd((int*)&q->nr_avail_tasks, 1); - return -1; - } - - /* Main loop. */ - while ( ( tid = cuda_queue_gettask( q ) ) >= 0 ) { - if( cuda_locktask(tid) == 1 ) - break; - - atomicAdd((int*)&q->nr_avail_tasks, -1); - cuda_queue_puttask ( q , tid ); - } - - /* Put this task into the recycling queue, if needed. */ - if ( tid >= 0 ) { - q->rec_data[ atomicAdd( (int *)&q->rec_count , 1 ) ] = tid; - } - - - /* Return whatever we got. */ - return tid; - - } -#ifdef PRIQ - - -__device__ int runner_cuda_gettask_priority ( struct queue_cuda *q ) { - - return runner_cuda_gettask(q); - - } -#endif - - -#else - -/** - * @brief Get a task from the given task queue. - * - * Picks tasks from the queue sequentially and checks if they - * can be computed. If not, they are returned to the queue. - * - * This version of the routine does not check for conflicts. - * - * This routine blocks until a valid task is picked up, or the - * specified queue is empty. - */ -__device__ int runner_cuda_gettask ( struct queue_cuda *q ) { - - int tid = -1; - if( atomicAdd((int*)&q->nr_avail_tasks, -1) <= 0) - { - atomicAdd((int*)&q->nr_avail_tasks, 1); - return -1; - } - - /* Main loop. */ - while ( ( tid = cuda_queue_gettask( q ) ) >= 0 ) { - break; - } - - /* Put this task into the recycling queue, if needed. */ - if ( tid >= 0 ) { - q->rec_data[ atomicAdd( (int *)&q->rec_count , 1 ) ] = tid; - } - - - /* Return whatever we got. */ - return tid; - - } - -#ifdef PRIQ - -__device__ int get_best_task(struct queue_cuda *q ) -{ - - int ind1, ind2, tid1 = -1, tid2 = -1; - - /* Don't even try... */ - // if ( q->rec_count == q->count ) - // return -1; - - /* Get the index of the next task. */ - ind1 = atomicAdd( &q->first , 1 ); - - if( atomicAdd((int*)&q->nr_avail_tasks, -1) <=0 ) - { - atomicAdd((int*)&q->nr_avail_tasks, 1); - ind1 %= cuda_queue_size; - /* Loop until there is a valid task at that index. */ - while ( tot_num_tasks > 0 && ( tid1 = q->data[ind1] ) < 0); - - if(tasks_cuda[tid1].type == type_load) - cuda_trymultilock(&res_cuda[tasks_cuda[tid1].locks[0]].lock); - /* Scratch the task from the queue */ - if ( tid1 >= 0 ) - { - q->data[ind1] = -1; - atomicAdd((int*) &tot_num_tasks, -1); - } - /* Return the acquired task ID. */ - return tid1; - } - ind2 = atomicAdd( &q->first, 1); - /* Wrap the index. */ - ind1 %= cuda_queue_size; - ind2 %= cuda_queue_size; - /* Loop until there is a valid task at that index. */ - while ( tot_num_tasks > 0 && ( tid1 = q->data[ind1] ) < 0); - while ( tot_num_tasks > 0 && ( tid2 = q->data[ind2] ) < 0); - - if(tid1 < 0 && tid2 < 0) - return -1; - - int pri1, pri2; - pri1 = tasks_cuda[tid1].weight; - pri2 = tasks_cuda[tid2].weight; - - if(pri1 >= pri2) - { - - q->data[ind1] = -1; - q->data[ind2] = -1; - atomicAdd((int*) &tot_num_tasks, -1); - cuda_queue_puttask( q, tid2); -// atomicAdd((int*)&q->nr_avail_tasks, 1); - - return tid1; - }else - { - q->data[ind1] = -1; - q->data[ind2] = -1; - atomicAdd((int*) &tot_num_tasks, -1); - cuda_queue_puttask( q, tid1); - // atomicAdd((int*)&q->nr_avail_tasks, 1); - return tid2; - } - -} - - -__device__ int runner_cuda_gettask_priority ( struct queue_cuda *q ) { - - int tid = -1; - if( atomicAdd((int*)&q->nr_avail_tasks, -1) <= 0) - { - atomicAdd((int*)&q->nr_avail_tasks, 1); - return -1; - } -// atomicAdd((int*)&q->nr_avail_tasks, -1); - tid = get_best_task(q); - - /* Put this task into the recycling queue, if needed. */ - if ( tid >= 0 ) { - q->rec_data[ atomicAdd( (int *)&q->rec_count , 1 ) ] = tid; - } - /* Return whatever we got. */ - return tid; - - } -#endif - - -#endif - -__global__ void qsched_device_kernel ( ) -{ - volatile __shared__ int tid; - volatile __shared__ int done; - int *src, *dest; - int i; - - - /* Pull a task from the queues*/ - while ( 1 ) { - __syncthreads(); - /*if(threadIdx.x == 0 && blockIdx.x == 0) - { - printf("%i %i %i \n", cuda_queues[0].nr_avail_tasks, cuda_queues[0].data[0], cuda_queues[0].data[1]); - break; - } - else - break;*/ - if ( threadIdx.x == 0 ) { - tid = -1; - /* Highest priority queue, holds the unload tasks. */ -#ifndef NO_LOADS - if(cuda_queues[2].nr_avail_tasks > 0 ) - { - TIMER_TIC - tid = runner_cuda_gettask( &cuda_queues[2] ); - TIMER_TOC(timers_unload_q) - } -#endif - - /* Middle priority queue, contains user-specifed tasks. */ -#ifdef PRIQ - if( tid < 0 && cuda_queues[0].nr_avail_tasks > 0 ) - { - TIMER_TIC - tid = runner_cuda_gettask_priority ( &cuda_queues[0]); - TIMER_TOC(timers_queue) - } -#else - if( tid < 0 && cuda_queues[0].nr_avail_tasks > 0 ) - { - TIMER_TIC - tid = runner_cuda_gettask ( &cuda_queues[0]); - TIMER_TOC(timers_queue) - } -#endif -#ifndef NO_LOADS - /* Low priority queue, contains the load tasks. */ - if( tid < 0 && cuda_queues[1].nr_avail_tasks > 0 /*&& blockIdx.x < 12*/ ) - { - TIMER_TIC - tid = runner_cuda_gettask ( &cuda_queues[1]); - TIMER_TOC(timers_load_q) - } -#endif - } - - /*Everyone wait for us to get a task id*/ - __syncthreads(); - - /* Exit if all tasks have been taken from queues and we don't have work to do. */ - if(tid < 0 && tot_num_tasks == 0) - break; - - #ifdef DEBUG_GPU - if(tid < 0 && cuda_queues[0].nr_avail_tasks == 0 && cuda_queues[1].nr_avail_tasks == 0 && cuda_queues[2].nr_avail_tasks == 0) - break; - #endif - - /* If we couldn't find a task but some are not completed, try again. */ - if(tid < 0) - continue; - - - /*Start the task clock*/ - if( threadIdx.x == 0 ){ - tasks_cuda[tid].blockID = blockIdx.x; - tasks_cuda[tid].tic = clock64(); - } - - /* Pick task type to do, if its not load, unload or ghost use the user supplied function. */ - if( tasks_cuda[tid].type == type_load ) - { - TIMER_TIC - int *d = (int*)&data_cuda[tasks_cuda[tid].data]; - src = (int*)res_cuda[d[0]].data; - dest = (int*)res_cuda[d[0]].gpu_data; - cuda_memcpy_tasks( dest, src , res_cuda[d[0]].size, tid); - TIMER_TOC(timers_doload) - }else if( tasks_cuda[tid].type == type_unload ) - { - TIMER_TIC - int *d = (int*)&data_cuda[tasks_cuda[tid].data]; - src = (int*)res_cuda[d[0]].gpu_data; - dest = (int*)res_cuda[d[0]].data; - cuda_memcpy_tasks( dest, src , res_cuda[d[0]].size, d[0]); - TIMER_TOC(timers_dounload) - }else if (tasks_cuda[tid].type != type_ghost ){ - TIMER_TIC - fun(tasks_cuda[tid].type , &data_cuda[tasks_cuda[tid].data]); - __syncthreads(); - TIMER_TOC(timers_doother) - } - __syncthreads(); - /*Stop the task clock*/ - if( threadIdx.x == 0 ) - tasks_cuda[tid].toc = clock64(); - - /*Unlocks*/ - #ifdef GPU_locks - if(threadIdx.x == 0) - cuda_done( &tasks_cuda[tid] ); - __syncthreads(); - #endif - for(i = threadIdx.x; i < tasks_cuda[tid].nr_unlocks; i += blockDim.x ) - { - if( atomicSub( &tasks_cuda[tasks_cuda[tid].unlocks[i]].wait , 1 ) == 1 && !( tasks_cuda[tasks_cuda[tid].unlocks[i]].flags & task_flag_skip )) - { - /* Place unloads into highest priority queue, any other task goes to normal priority queue. Load tasks are never unlocked.*/ - if(tasks_cuda[tasks_cuda[tid].unlocks[i]].type != type_unload) - { - cuda_queue_puttask( &cuda_queues[0] , tasks_cuda[tid].unlocks[i] ); - } - else - cuda_queue_puttask( &cuda_queues[2] , tasks_cuda[tid].unlocks[i] ); - } - } - } - - -/* Make a notch on the barrier, last one out cleans up the mess... */ - __syncthreads(); - if ( threadIdx.x == 0 ) - done = ( atomicAdd( &cuda_barrier , 1 ) == gridDim.x-1 ); - __syncthreads(); - if ( done ) { - if ( threadIdx.x == 0 ) { - cuda_barrier = 0; - - /* Reset the load task queue so load tasks are ready again.*/ - volatile int *temp = cuda_queues[1].data; cuda_queues[1].data = cuda_queues[1].rec_data; cuda_queues[1].rec_data = temp; - - - /* Reset values.*/ - /*printf("cuda_queues[0].first = %i, nr_avail_tasks = %i, tot_num_tasks = %i, data[first] = %i\n", cuda_queues[0].first, cuda_queues[0].nr_avail_tasks ,tot_num_tasks, cuda_queues[0].data[cuda_queues[0].first] ); - printf("cuda_queues[0].last = %i, data[last-1] = %i\n", cuda_queues[0].last ,cuda_queues[0].data[cuda_queues[0].last] ); - for(tid = cuda_queues[0].first; tid < cuda_queues[0].first + cuda_queues[0].nr_avail_tasks; tid++) - { - printf("task =%i, type = %i\n", cuda_queues[0].data[tid%cuda_queue_size], tasks_cuda[cuda_queues[0].data[tid%cuda_queue_size]].type ); - } */ - cuda_queues[0].first = 0; - cuda_queues[0].last = 0; - cuda_queues[0].rec_count = 0; - /*cuda_queues[1].first = 0; - cuda_queues[1].last = cuda_queues[1].count; - cuda_queues[1].rec_count = 0; - cuda_queues[2].first = 0; - cuda_queues[2].last = 0; - cuda_queues[2].rec_count = 0;*/ - } - - //TODO - /* Resetting waits is done on the CPU at this time. This may be changed in future.*/ - /* for ( int j = threadIdx.x ; j < cuda_nr_tasks ; j+= blockDim.x ) - for ( k = 0 ; k < tasks_cuda[j].nr_unlock ; k++ ) - { - atomicAdd( (int *) &cuda_tasks[ cuda_tasks[j].unlock[k] ].wait , 1 ); - }*/ - - - } - -} - -int maxVal( int *array, int size ) -{ - int i, maxi=-3200000; - for (i=0; i<size; i++) - { - if (array[i]>maxi) - { - maxi=array[i]; - } - } - return maxi ; -} - -int minVal( int *array, int size ) -{ - int i, maxi=3200000; - for (i=0; i<size; i++) - { - if (array[i]<maxi) - { - maxi=array[i]; - } - } - return maxi ; -} - -void qsched_create_loads(struct qsched *s, int ID, int size, int numChildren, int parent, int *res, int *sorted) -{ - int i,j; - int task, utask; - if(numChildren > 0 && size/numChildren > 128*sizeof(int)) - { - /* Create dummy task for this resource and recurse to its children!*/ - task = qsched_addtask( s, type_ghost, task_flag_none, NULL, 0 , 0 ); - qsched_adduse(s, task, ID); - s->res[ID].task = task; - utask = qsched_addtask( s , type_ghost, task_flag_none, NULL, 0 , 0 ); - qsched_adduse(s, task, ID); - s->res[ID].task = utask; - if(parent >= 0) - { - /* Create dependecy to parent. */ - // qsched_addunlock(s, task, s->res[parent].task ); - /// qsched_addunlock(s, s->res[parent].utask, utask ); - } - for(i = sorted[ID]; i < sorted[ID+1]; i++) - { - qsched_create_loads(s, i, s->res[res[i]].size, sorted[i+1]-sorted[i], ID, res, sorted); - } - }else{ - task = qsched_addtask( s , type_load , task_flag_none, &ID, sizeof(int), 0 ); - s->res[ID].task = task; - utask = qsched_addtask( s , type_unload, task_flag_none, &ID, sizeof(int), 0 ); - s->res[ID].utask = utask; - /* Create load task for this resource and set its children to completed with this task.*/ - for( j = sorted[ID]; j < sorted[ID+1]; j++ ) - { - s->res[res[j]].task = task; - } - /* If it has a parent then set the parents ghost task to be dependent on this.*/ - if(parent >= 0) - { - // qsched_addunlock(s, task, s->res[parent].task ); - // qsched_addunlock(s, s->res[parent].utask, utask); - } - } -} - -#define MAX_DEPTH 0 -int transitive_use_unlocks(struct qsched *s, struct task *t, int res, int depth) -{ - int i; - for(i = 0; i < t->nr_uses; i++) - { - if(t->uses[i] == res) - return 1; - } - for(i = 0; i < t->nr_locks; i++) - { - if(t->locks[i] == res) - return 1; - } - if(depth >= MAX_DEPTH) - { -// printf("Max Depth reached\n"); - return 0; - } - for(i = 0; i < t->nr_unlocks; i++) - { - if(transitive_use_unlocks(s, &s->tasks[t->unlocks[i]], res, depth + 1)) - return 1; - } - return 0; -} - -int transitive_use_locks(struct qsched *s, int tid, int res, int depth) -{ - int i,j; - struct task *new_t; - struct task *t = &s->tasks[tid]; - for(i = 0; i < t->nr_uses; i++) - { - if(t->uses[i] == res) - return 1; - } - for(i = 0; i < t->nr_locks; i++) - { - if(t->locks[i] == res) - return 1; - } - if(depth >= MAX_DEPTH) - { -// printf("Max Depth reached\n"); - return 0; - } - for(i = tid-1; i >= 0; i--) - { - new_t = &s->tasks[i]; - for(j = 0; j < new_t->nr_unlocks; j++) - { - if(new_t->unlocks[j] == tid) - { - if(transitive_use_locks(s, i, res , depth + 1)) - return 1; - break; - } - } - } - return 0; -} - -/* -* Not used. -*/ -void qsched_prepare_deps( struct qsched *s ) -{ - int **is_loaded; - int **parents; - int i, k, j, use, usek, usem; - int *num_parents; - is_loaded = (int**)malloc(sizeof(int*) * s->count); - parents = (int**)malloc(sizeof(int*) * s->count); - num_parents = (int*)malloc(sizeof(int) * s->count); - bzero(num_parents, sizeof(int)*s->count); - k = (sizeof(int)*s->count_res)/32 +1; - for(i = 0; i < s->count; i++) - { - is_loaded[i] = (int*)malloc(k); - bzero(is_loaded[i], k); - } - /* Is loaded[i][k] gives the set of k*32 resources for task i*/ - - /* Reset the waits to 0... */ - for( k = 0; k < s->count; k++ ) - { - s->tasks[k].wait = 0; - } - - /* Run through the tasks and set the waits... */ - for ( k = 0 ; k < s->count ; k++ ) { - struct task *t = &s->tasks[k]; - if ( !( t->flags & task_flag_skip ) ) - for ( j = 0 ; j < t->nr_unlocks ; j++ ) - s->tasks[ t->unlocks[j] ].wait += 1; - } - - /* Sort the tasks topologically. */ - int *tid = (int *)malloc( sizeof(int) * s->count ); - for ( j = 0 , k = 0 ; k < s->count ; k++ ) - if ( s->tasks[k].wait == 0 ) { - tid[j] = k; - j += 1; - } - for ( k = 0 ; k < j ; k++ ) { - struct task *t = &s->tasks[ tid[k] ]; - for ( int kk = 0 ; kk < t->nr_unlocks ; kk++ ) - if ( ( s->tasks[ t->unlocks[kk] ].wait -= 1 ) == 0 ) { - tid[j] = t->unlocks[kk]; - j += 1; - } - } - if ( k < s->count ) - { - error( "Circular dependencies detected." ); - } - int max_parents = 0; - for(i = s->count-1; i >= 0; i--) - { - for(j = 0; j < s->tasks[i].nr_unlocks; j++) - { - num_parents[s->tasks[i].unlocks[j]]++; - } - } - for(i = 0; i < s->count; i++) - { - if(num_parents[i] > 0) - parents[i] = (int*)calloc(num_parents[i],sizeof(int)); - else - parents[i] = NULL; - - if(num_parents[i] > max_parents) - { - max_parents = num_parents[i]; - } - - num_parents[i] = 0; - } - - for(i = 0; i < s->count; i++) - { - if(s->tasks[i].type == type_load || s->tasks[i].type == type_unload) - continue; - for(k = 0; k < s->tasks[i].nr_uses; k++) - { - use = s->tasks[i].uses[k]; - usek = use >> 5; // use / 32; - usem = use & 31; // use % 32. - - if((is_loaded[i][usek] & (1 << (31-usem))) == 0 ) - { - qsched_addunlock(s, s->res[use].task , i ) ; - is_loaded[i][usek] |= (1 <<(31-usem)); - } - } - for(k = 0; k < s->tasks[i].nr_unlocks; k++) - { - if(s->tasks[s->tasks[i].unlocks[k]].type == type_load || - s->tasks[s->tasks[i].unlocks[k]].type == type_unload ) - continue; - for(j = 0; j < s->count_res/32 +1; j++) - { - is_loaded[s->tasks[i].unlocks[k]][j] |= is_loaded[i][j]; - } - parents[s->tasks[i].unlocks[k]][num_parents[s->tasks[i].unlocks[k]]] = i; - num_parents[s->tasks[i].unlocks[k]] = num_parents[s->tasks[i].unlocks[k]] + 1; - } - } - max_parents = 0; - for(i = 0; i < s->count; i++) - { - if(s->tasks[i].type == type_load || s->tasks[i].type == type_unload) - continue; - if(num_parents[i] > max_parents) - { - max_parents = num_parents[i]; - } - bzero(is_loaded[i], k); - } - for(i = s->count-1; i >= 0; i--) - { - if(s->tasks[i].type == type_load || s->tasks[i].type == type_unload) - continue; - for(k = 0; k < s->tasks[i].nr_uses; k++) - { - use = s->tasks[i].uses[k]; - usek = use >> 5; // use / 32; - usem = use & 31; // use % 32. - if((is_loaded[i][usek] & (1 << (31-usem))) == 0 ) - { - qsched_addunlock(s, i, s->res[use].utask ); - is_loaded[i][usek] |= (1 << (31-usem)); - } - } - for(k = 0; k < num_parents[i]; k++) - { - for(j = 0; j < s->count_res/32 +1; j++) - { - is_loaded[parents[i][k]][j] |= is_loaded[i][j]; - } - } - } - -} - -void qsched_prepare_loads ( struct qsched *s ) { - -int i, task, unload, j , k , x, unlocked = 0; -struct task *t; -int *sorted, lastindex; -int *res, *res_data; - -if(s->res[0].task != -1) -{ - printf("Tasks already initialised, not redoing load/unload tasks"); - return; -} -double itpms = 1000.0 / CPU_TPS; -ticks tic, toc_run, toc2 ; - tic = getticks(); - -/* Expand the deps array so we can add new dependencies in place. */ -qsched_task_t *deps_new, *deps_new_key; -s->size_deps *= qsched_stretch; - - - -j = 0; -//printf("%i\n", s->tasks[94].unlocks); -// for(k = 0; k < s->tasks[94].nr_unlocks; k++) -// printf("%i ", s->tasks[94].unlocks[k]); -// printf("\n"); - -/* Allocate a new dependency list. */ -if ( ( deps_new = (int*) malloc(s->size_deps * sizeof(int) ) ) == NULL || - ( deps_new_key = (int*) malloc( s->size_deps * sizeof(int) ) ) == NULL ) - error( "Failed to allocate new deps lists." ); -tic = getticks(); -/* Copy the dependency list to the new list, leaving a space between each task to fit unload dependencies in.*/ -for(i = 0; i < s->count; i++) -{ - t = &s->tasks[i]; - /* Its possible we might not fit in weird cases so we need to make sure to expand if needed.*/ - if(j + t->nr_unlocks + t->nr_uses + t->nr_locks > s->size_deps) - { - // printf("\n"); - qsched_task_t *temp1, *temp2; - s->size_deps *= qsched_stretch; - /* Allocate a new task list. */ - if ( ( temp1 = (int*) malloc(s->size_deps * sizeof(int) ) ) == NULL || - ( temp2 = (int*) malloc( s->size_deps * sizeof(int) ) ) == NULL ) - error( "Failed to allocate new deps lists." ); - /* Copy the deps and keys over to the new list. */ - memcpy( temp1 , deps_new , sizeof(int) * /*s->count_deps*/ j); - memcpy( temp2 , deps_new_key , sizeof(int) * /*s->count_deps*/ j ); - int m; - /* Have to update since we aren't resorting later.*/ - for(m = 0; m < i; m++) - { - - t = &s->tasks[m]; - t->unlocks = &temp1[t->unlocks - deps_new]; - } - free(deps_new); - free(deps_new_key); - deps_new = temp1; - deps_new_key = temp2; - // printf("Stretch at line 828. m = %i\n", m); - t = &s->tasks[i]; - } - int start_j = j; - - /*if(i <= 94) -{ - printf("%i\n", s->tasks[94].unlocks); - for(k = 0; k < s->tasks[94].nr_unlocks; k++) - printf("%i ", s->tasks[94].unlocks[k]); - printf(" i = %i\n", i); - printf("%i\n", t->unlocks); -}*/ - for(k = 0; k < t->nr_unlocks; k++) - { - deps_new[j] = t->unlocks[k]; - //if(i == 48) - // printf("%i %i %i %i\n", t->unlocks +k,s->deps_key, s->deps, s->count_deps); - deps_new_key[j] = s->deps_key[&t->unlocks[k] - s->deps]; - j++; - } - t->unlocks = &deps_new[start_j]; - /*if(i == 94) -{ - for(k = 0; k < t->nr_unlocks; k++) - printf("%i ", t->unlocks[k]); - printf("\n"); -}*/ - j+=t->nr_uses + t->nr_locks; -} - -s->count_deps = j; - -toc2 = getticks() - tic; - -/* Store number of children for each resource*/ -sorted = (int*) malloc(sizeof(int) * (s->count_res+1)); -res = (int*) malloc(sizeof(int) * s->count_res); -res_data = (int*) malloc(sizeof(int)* s->count_res); -memset( sorted, 0, sizeof(int) * (s->count_res+1)); -/* Count the children for each parent. Stored in sorted[parent +1]*/ -for(i = 0; i < s->count_res; i++) -{ - if(s->res[i].parent != qsched_res_none) - { - sorted[s->res[i].parent+1]++; - } -} - -/* Run through the sorted array and turn count to indices. Id 0 starts at 0, Id 1 starts at 0+sorted[1] (number of children for resource 0)*/ -sorted[0] = 0; -for(i = 1; i < s->count_res+1; i++ ) -{ - sorted[i] = sorted[i] + sorted[i-1]; -} -lastindex = sorted[s->count_res]; - -for(i = 0; i < s->count_res; i++) -{ - int parent = s->res[i].parent; - if( parent == qsched_res_none ) - { - res[lastindex] = i; - lastindex++; - }else{ - res[sorted[parent]] = i; - sorted[parent]++; - } -} - -/*Initialise the memory address array, already sorted by parents.*/ -int mini=0; -for(i = 0; i < s->count_res; i++) -{ - res_data[i] = ((char *)s->res[res[i]].data) - (char*)s->res[0].data; - if(res_data[i] < mini) - mini = res_data[i]; -// printf("%i ", res_data[i]); -} - -for(i = 0; i < s->count_res; i++) -{ - res_data[i] -= mini; -//printf("%i ", res_data[i]); -} -//printf("\n"); - -/* Sort the children of each parent by memory address. */ -qsched_sort(res, res_data, sorted[0], minVal(res_data, sorted[0]), maxVal(res_data, sorted[0])); -for(i = 1; i < s->count_res; i++) -{ - if(sorted[i] > sorted[i-1]){ - qsched_sort(&res[sorted[i-1]], &res_data[sorted[i-1]], sorted[i]-sorted[i-1], minVal(&res_data[sorted[i-1]], sorted[i]-sorted[i-1]), maxVal(&res_data[sorted[i-1]], sorted[i]-sorted[i-1])); - } -} - -/* Sort super resources by memory address.*/ -qsched_sort(&res[sorted[s->count_res-1]], &res_data[sorted[s->count_res-1]], s->count_res - sorted[s->count_res-1], minVal(&res_data[sorted[s->count_res-1]], s->count_res - sorted[s->count_res-1]), maxVal(&res_data[sorted[s->count_res-1]], s->count_res - sorted[s->count_res-1])); - - -/* -for(i = 0; i < s->count_res; i++) -{ - printf("%i ", res_data[i]); -} -printf("\n"); - -for(i = 0; i < s->count_res; i++) -{ -printf("%i ", res[i]); -} -printf("\n"); - -for(i = 0; i < s->count_res; i++) -{ - printf("%i ", s->res[res[i]].parent); -} -printf("\n");*/ -/*res now contains an array of indices, first sorted by parent, then memory address of data. */ -int size=0; -if(sorted[0] != 0) -{ - /* Check no overlapping resources.*/ - for(i = 0; i < sorted[0]-1; i++) - { - if(res_data[i] + s->res[res[i]].size > res_data[i+1]) - error("Overlapping resources are not allowed."); - } -} - -for(i = 1; i < s->count_res; i++) -{ - if(sorted[i] > sorted[i-1]) - { - for(j = sorted[i-1]; j < sorted[i]-1; j++) - { - if(res_data[j] + (s->res[res[j]].size/sizeof(int)) > res_data[j+1]) - error("Overlapping resources are not allowed."); - } - } -} - -/* Check super resources don't overlap.*/ -for( i = sorted[s->count_res-1]; i < s->count_res-1; i++ ) -{ - if(res_data[i] + (s->res[res[i]].size/sizeof(int)) > res_data[i+1]) - { - /*printf("i=%i, s->count_res=%i, res_data[i] = %i, size = %i, res_data[i]+size = %i, res_data[i+1] = %i\n",i, s->count_res, res_data[i], s->res[res[i]].size, res_data[i] + (s->res[res[i]].size/sizeof(int)), res_data[i+1]);*/ - error("Overlapping resources are not allowed."); - } -} - -/* Reposition sorted pointers so that sorted[i] points to the first child of task ID= i*/ -for(i = sorted[s->count_res]; i >= 0; i-- ) -{ - sorted[i] = sorted[i-1]; -} - -toc_run = getticks(); -// message( "Sorting took %.3f ms" , ((double)(toc_run - tic)) * itpms ); - -tic = getticks(); -/* If nothing overlaps create tasks.*/ -for( i = sorted[s->count_res]; i < s->count_res; i++ ) -{ - /* Start from each parentless task.*/ - int ID = res[i]; - int size = s->res[ID].size; - int numChildren = sorted[ID+1] - sorted[ID]; - int parent = -1; - - qsched_create_loads(s, ID, size, numChildren, parent, res, sorted); - -} - -toc_run = getticks(); -tic = getticks(); -// message( "Creating load tasks took %.3f ms" , ((double)(toc_run - tic)) * itpms ); - - -/* Check all resources have load tasks - if not give parents (recursively)*/ -for(i = 0; i < s->count_res; i++ ) -{ - if( s->res[i].task == -1 ) - { - struct res *t; - for(t = &s->res[s->res[i].parent]; s->res[i].task == -1; t = &s->res[t->parent]) - { - s->res[i].task = t->task; - if((t->parent == qsched_res_none) && s->res[i].task == -1) - error("Somehow load task wasn't initialised"); - } - } - - if( s->res[i].utask == -1 ) - { - struct res *t; - for(t = &s->res[s->res[i].parent]; s->res[i].utask == -1; t = &s->res[t->parent]) - { - s->res[i].utask = t->utask; - if((t->parent == qsched_res_none) && s->res[i].utask == -1) - error("Somehow unload task wasn't initialised"); - } - } -} - -int **usage_list; -int *num_uses; -int *size_uses; -usage_list = (int**)malloc(sizeof(int*) * s->count_res); -num_uses = (int*) malloc(sizeof(int) * s->count_res ); -size_uses = (int*) malloc(sizeof(int) * s->count_res); -for(i = 0; i < s->count_res; i++ ) -{ - usage_list[i] = (int*) malloc(sizeof(int) * (s->count_uses / s->count_res + 1)); - num_uses[i] = 0; - size_uses[i] = s->count_uses / s->count_res + 1; -} - -/* Add deps from tasks to unload tasks. */ -for(i = 0; i < s->count; i++) -{ - t = &s->tasks[i]; - if(t-> type == type_unload || t->type == type_load || t->type == type_ghost ) - continue; - - for(j = 0; j < t->nr_uses; j++) - { - t->unlocks[t->nr_unlocks] = s->res[t->uses[j]].utask; - s->tasks[s->res[t->uses[j]].utask].wait_init +=1 ; - deps_new_key[(t->unlocks - deps_new) + t->nr_unlocks] = i; - t->nr_unlocks++; - if(num_uses[t->uses[j]] == size_uses[t->uses[j]]) - { - /* Stretch. */ - int* temp = (int*) malloc(sizeof(int) * size_uses[t->uses[j]] * 2 ); - memcpy( temp, usage_list[t->uses[j]], sizeof(int) * size_uses[t->uses[j]]); - free(usage_list[t->uses[j]]); - usage_list[t->uses[j]] = temp; - size_uses[t->uses[j]] *=2; - } - usage_list[t->uses[j]][num_uses[t->uses[j]]++] = i; - } - for(j = 0; j < t->nr_locks; j++) - { - t->unlocks[t->nr_unlocks] = s->res[t->locks[j]].utask; - s->tasks[s->res[t->locks[j]].utask].wait_init +=1 ; - deps_new_key[(t->unlocks - deps_new) + t->nr_unlocks] = i; - t->nr_unlocks++; - if(num_uses[t->locks[j]] == size_uses[t->locks[j]]) - { - /* Stretch. */ - int* temp = (int*) malloc(sizeof(int) * size_uses[t->locks[j]] * 2 ); - memcpy( temp, usage_list[t->locks[j]], sizeof(int) * size_uses[t->locks[j]]); - free(usage_list[t->locks[j]]); - usage_list[t->locks[j]] = temp; - size_uses[t->locks[j]] *=2; - } - usage_list[t->locks[j]][num_uses[t->locks[j]]++] = i; - } -} - -/* Loop through resources. */ - -// TODO Make sure to stretch if needed. -for(i = 0; i < s->count_res; i++ ) -{ - int ID = res[i]; - int size = s->res[ID].size; - int numChildren = sorted[ID+1] - sorted[ID]; - int parent = s->res[ID].parent; - struct res *resource = &s->res[ res[i] ]; - - printf("ID = %i, size = %i, numChild = %i, parent = %i\n", ID, size, numChildren, parent); - printf("task = %i, utask = %i\n", s->res[ID].task, s->res[ID].utask); - /* Loop through children if there are any. */ - if(numChildren > 0) - { - /* Do unload task stuff first. */ - s->tasks[resource->utask].unlocks = &deps_new[s->count_deps]; - s->tasks[resource->utask].nr_unlocks = 0; - if(s->count_deps + numChildren > s->size_deps) - { - qsched_task_t *temp1, *temp2; - s->size_deps *= qsched_stretch; - /* Allocate a new task list. */ - if ( ( temp1 = (int*) malloc( sizeof(int) * s->size_deps ) ) == NULL || - ( temp2 = (int*) malloc( sizeof(int) * s->size_deps ) ) == NULL ) - error( "Failed to allocate new deps lists." ); - /* Copy the deps and keys over to the new list. */ - memcpy( temp1 , deps_new , sizeof(int) * s->count_deps ); - memcpy( temp2 , deps_new_key , sizeof(int) * s->count_deps ); - int m; - /* Have to update since we aren't resorting later.*/ - for(m = 0; m < s->count; m++) - { - t = &s->tasks[m]; - t->unlocks = &temp1[t->unlocks - deps_new]; - } - free(deps_new); - free(deps_new_key); - deps_new = temp1; - deps_new_key = temp2; - // printf("Stretch at line 1102, m = %i.\n", m); - } - for(j = 0; j < numChildren; j++) - { - struct res *child = &s->res[ res[sorted[ ID ]+j] ]; - - if( child->utask != resource->utask ) - { - s->tasks[resource->utask].unlocks[ s->tasks[resource->utask].nr_unlocks ] = child->utask; - s->tasks[child->utask].wait_init += 1; - deps_new_key[s->count_deps] = resource->utask; - s->tasks[resource->utask].nr_unlocks += 1; - s->count_deps += 1; - } - } - } - - /* Do load task stuff. */ - - s->tasks[resource->task].unlocks = &deps_new[s->count_deps]; - s->tasks[resource->task].nr_unlocks = 0; - if(numChildren > 0) - { - for(j = 0; j < numChildren; j++) - { - struct res *child = &s->res[ res[sorted[ ID ]+j] ]; - if( child->utask == resource->utask ) - { - if( s->size_deps < s->count_deps + num_uses[res[ sorted[ ID ] + j ] ] ) - { - qsched_task_t *temp1, *temp2; - s->size_deps *= qsched_stretch; - /* Allocate a new task list. */ - if ( ( temp1 = (int*) malloc( sizeof(int) * s->size_deps ) ) == NULL || - ( temp2 = (int*) malloc( sizeof(int) * s->size_deps ) ) == NULL ) - error( "Failed to allocate new deps lists." ); - /* Copy the deps and keys over to the new list. */ - memcpy( temp1 , deps_new , sizeof(int) * s->count_deps ); - memcpy( temp2 , deps_new_key , sizeof(int) * s->count_deps ); - int m; - /* Have to update since we aren't resorting later.*/ - for(m = 0; m < s->count; m++) - { - t = &s->tasks[m]; - t->unlocks = &temp1[t->unlocks - deps_new]; - } - free(deps_new); - free(deps_new_key); - deps_new = temp1; - deps_new_key = temp2; - // printf("Stretch at line 1151.\n"); - } - for(k = 0; k < num_uses[ res[ sorted[ ID ] + j ] ]; k++) - { - s->tasks[resource->task].unlocks[ s->tasks[resource->task].nr_unlocks ] = usage_list[ res[ sorted[ ID ] +j ] ][k]; - s->tasks[ usage_list[ res[ sorted[ ID ] +j ] ][k] ].wait_init += 1; - deps_new_key[s->count_deps] = resource->task; - s->tasks[resource->task].nr_unlocks += 1; - s->count_deps += 1; - } - } - } - } - if( s->size_deps < s->count_deps + 1 + num_uses[ res[ i ] ]) - { - qsched_task_t *temp1, *temp2; - s->size_deps *= qsched_stretch; - /* Allocate a new task list. */ - if ( ( temp1 = (int*) malloc( sizeof(int) * s->size_deps ) ) == NULL || - ( temp2 = (int*) malloc( sizeof(int) * s->size_deps ) ) == NULL ) - error( "Failed to allocate new deps lists." ); - /* Copy the deps and keys over to the new list. */ - memcpy( temp1 , deps_new , sizeof(int) * s->count_deps ); - memcpy( temp2 , deps_new_key , sizeof(int) * s->count_deps ); - int m; - /* Have to update since we aren't resorting later.*/ - for(m = 0; m < s->count; m++) - { - t = &s->tasks[m]; - t->unlocks = &temp1[t->unlocks - deps_new]; - } - free(deps_new); - free(deps_new_key); - deps_new = temp1; - deps_new_key = temp2; - // printf("Stretch at line 1185.\n"); - } - if( parent > 0 ) - { - s->tasks[resource->task].unlocks[ s->tasks[resource->task].nr_unlocks ] = s->res[parent].task; - deps_new_key[s->count_deps] = resource->task; - s->tasks[s->res[parent].task].wait_init += 1; - s->tasks[resource->task].nr_unlocks += 1; - s->count_deps += 1; - } - - for(k = 0; k < num_uses[ res[ i ] ] ; k ++ ) - { - s->tasks[resource->task].unlocks[ s->tasks[resource->task].nr_unlocks ] = usage_list[ res[ i ] ][k]; - deps_new_key[s->count_deps] = resource->task; - s->tasks[usage_list[ res[ i ] ][k]].wait_init += 1; - s->tasks[resource->task].nr_unlocks += 1; - s->count_deps += 1; - } - -} -//printf("s->deps = %i, deps_new = %i\n", s->deps, deps_new); -free(s->deps); -free(s->deps_key); -s->deps = deps_new; -s->deps_key = deps_new_key; -s->flags &= ~qsched_flag_dirty; -toc2 += getticks() - tic; - -//printf("Number tasks = %i\n", s->count); -//printf("Number dependencies = %i\n", s->count_deps); -/* Set up dependencies with the rest of the system.*/ - - - -/*New version*/ - /* Reset the waits to 0... */ -/* for( k = 0; k < s->count; k++ ) - { - s->tasks[k].wait = 0; - } */ - - /* Run through the tasks and set the waits... */ -/* for ( k = 0 ; k < s->count ; k++ ) { - struct task *t = &s->tasks[k]; - if ( !( t->flags & task_flag_skip ) ) - for ( j = 0 ; j < t->nr_unlocks ; j++ ) - s->tasks[ t->unlocks[j] ].wait += 1; - } - */ - /* Sort the tasks topologically. */ -/* int *tid = (int *)malloc( sizeof(int) * s->count ); - for ( j = 0 , k = 0 ; k < s->count ; k++ ) - if ( s->tasks[k].wait == 0 ) { - tid[j] = k; - j += 1; - } - for ( k = 0 ; k < j ; k++ ) { - struct task *t = &s->tasks[ tid[k] ]; - for ( int kk = 0 ; kk < t->nr_unlocks ; kk++ ) - if ( ( s->tasks[ t->unlocks[kk] ].wait -= 1 ) == 0 ) { - tid[j] = t->unlocks[kk]; - j += 1; - } - } - if ( k < s->count ) - { - //printf("k = %i, count = %i\n", k, count); - error( "Circular dependencies detected." ); - } - -*/ -/*Do unlocks */ -/*for(i = 0; i < s->count; i++) -{ - struct task *t = &s->tasks[i]; - int result = 0; - if(t->type == type_ghost || t->type == type_unload || t->type == type_load) - continue; - for(j = 0; j < t->nr_uses; j++) - { - result = 0; - for(k = 0; k < t->nr_unlocks && result == 0; k++) - { - result = transitive_use_unlocks(s, &s->tasks[t->unlocks[k]], t->uses[j],0); - - - } - if( result == 0) - qsched_addunlock(s, i, s->res[t->uses[j]].utask); - } - for(j = 0; j < t->nr_locks; j++) - { - result = 0; - for(k = 0; k < t->nr_unlocks && result == 0; k++) - { - result =transitive_use_unlocks(s, &s->tasks[t->unlocks[k]], t->locks[j],0); - - } - if(result == 0) - qsched_addunlock(s, i, s->res[t->locks[j]].utask); - } -}*/ - -/*Do locks */ -/*for(i = s->count-1; i >= 0; i--) -{ - struct task *t = &s->tasks[i]; - struct task *new_t; - int result = 0; - if(t->type == type_ghost || t->type == type_unload || t->type == type_load) - continue; - for(j = 0; j < t->nr_uses; j++) - { - result = 0; - for(k = i-1; k >= 0; k--) - { - new_t = &s->tasks[k]; - for(x = 0; x < new_t->nr_unlocks && result == 0; x++) - { - if(new_t->unlocks[x] == i) - { - result = transitive_use_locks(s, k, t->uses[j],0); - } - } - } - if(result == 0) - { - qsched_addunlock(s, s->res[t->uses[j]].task, i); - } - } - for(j = 0; j < t->nr_locks; j++) - { - result = 0; - for(k = i-1; k >= 0; k--) - { - new_t = &s->tasks[k]; - for(x = 0; x < new_t->nr_unlocks && result == 0; x++) - { - if(new_t->unlocks[x] == i) - { - result = transitive_use_locks(s, k, t->locks[j],0); - } - } - } - if(result == 0) - { - qsched_addunlock(s, s->res[t->locks[j]].task, i); - } - } - -}*/ - -/* Old version*/ -/*for(i = 0; i < s->count; i++) -{ - struct task *t = &s->tasks[i]; - if(t->type == type_load || t->type == type_unload || t-> type == type_ghost) - continue; - - for(k = 0; k < t->nr_uses; k++) - { - qsched_addunlock(s, s->res[t->uses[k]].task, i); - qsched_addunlock(s, i, s->res[t->uses[k]].utask); - } - - for(k = 0; k < t->nr_locks; k++) - { - qsched_addunlock(s, s->res[t->locks[k]].task, i); - qsched_addunlock(s, i, s->res[t->locks[k]].utask); - } -}*/ -//qsched_prepare_deps( s ); -//printf("Number dependencies = %i\n", s->count_deps); -/*#ifdef PRIQ -int PCI_res; -PCI_res = qsched_addres(s , qsched_owner_none , qsched_res_none , NULL, 0 , NULL); -s->res[PCI_res].lock = PCIEX; -for(i = 0; i < s->count; i++) -{ - if(s->tasks[i].type == type_load) - { - qsched_addlock(s, i, PCI_res); - } -} -#endif*/ -toc_run = getticks(); - //message( "Setting up dependencies took %.3f ms" , toc2 * itpms ); -//error("Got to here"); -} - - - - -void qsched_prepare_loads_old ( struct qsched *s ) { - -int i, task, unload, j, k, unlocked=0; -struct task *t; -/* Create a load task for each resource. */ -for(i = 0; i < s->count_res; i++) -{ - - if(s->res[i].size == 0) - continue; - if(s->res[i].task >= 0) - continue; -// cudaMalloc( &s->res[ i ].gpu_data, s->res[i].size ); - task = qsched_addtask( s , type_load , task_flag_none , &i , sizeof(int) , 0 ); - s->res[i].task = task; - unload = qsched_addtask( s , type_unload, task_flag_none , &i, sizeof(int), 0 ); - /*Load task unlocks each task that uses or locks the specified resource */ - /*Unload task is unlocked by each task that is unlocked by the load task. */ - for(j = 0; j < s->count; j++) - { - t = &s->tasks[j]; - - for(k = 0; k < t->nr_uses; k++) - { - if(t->uses[k] == i){ - qsched_addunlock( s , task, j ); - qsched_addunlock( s , j , unload); - unlocked = 1; - break; - } - } - if(unlocked == 1) - { - unlocked = 0; - continue; - } - for(k = 0; k < t->nr_locks; k++) - { - if(t->locks[k] == i){ - qsched_addunlock( s , task , j ); - qsched_addunlock( s , j , unload); - break; - } - - } - } - // qsched_adduse(s, task , i); - // qsched_adduse(s, unload , i); -} - - - - - -} - - - - - -extern "C" void qsched_prepare_cuda ( struct qsched *s ) { - -int i; -int j, k, count; -struct task *t, *tasks; -struct task *cuda_t, *task, *temp; -qsched_res_t *setup_l, *setup_u; -qsched_task_t *setup_t; -struct res *res_t; -int *data; -char *sdata; - -/* Lock the sched. */ - //lock_lock( &s->lock ); - - /* Get a pointer to the tasks, set the count. */ - tasks = s->tasks; - count = s->count; - - /* If the sched is dirty... */ - if ( s->flags & qsched_flag_dirty ) { - - /* Do the sorts in parallel, if possible. */ - #pragma omp parallel - { - - /* Sort the unlocks. */ - #pragma omp single nowait - qsched_sort( s->deps , s->deps_key , s->count_deps , 0 , count - 1 ); - - /* Sort the locks. */ - #pragma omp single nowait - qsched_sort( s->locks , s->locks_key , s->count_locks , 0 , count - 1 ); - - /* Sort the uses. */ - #pragma omp single nowait - qsched_sort( s->uses , s->uses_key , s->count_uses , 0 , count - 1 ); - - } - - /* Run throught the tasks and link the locks and unlocks. */ - tasks[0].unlocks = s->deps; - tasks[0].locks = s->locks; - tasks[0].uses = s->uses; - for ( k = 1 ; k < count ; k++ ) { - tasks[k].unlocks = &tasks[k-1].unlocks[ tasks[k-1].nr_unlocks ]; - tasks[k].locks = &tasks[k-1].locks[ tasks[k-1].nr_locks ]; - tasks[k].uses = &tasks[k-1].uses[ tasks[k-1].nr_uses ]; - } - - /* All cleaned-up now! */ - //s->flags &= ~qsched_flag_dirty; - - - } - - double itpms = 1000.0 / CPU_TPS; -ticks tic, toc_run ; - tic = getticks(); -//qsched_ensure(s, s->count + 2*s->count_res, s->count_res, s->count_deps + 2*s->count_res, s->count_locks, s->count_uses + 2*s->count_res, s->size_data ); - - for ( k = 0 ; k < count ; k++ ) { - t = &tasks[k]; - if ( !( t->flags & task_flag_skip ) ) - for ( j = 0 ; j < t->nr_unlocks ; j++ ) - { - tasks[ t->unlocks[j] ].wait += 1; - } - } - -#ifndef NO_LOADS -qsched_prepare_loads(s); -#endif -toc_run = getticks(); -// message( "prepare_loads took %.3f ms" , ((double)(toc_run - tic)) * itpms ); - - - - - - /* Get a pointer to the tasks, set the count. */ - tasks = s->tasks; - count = s->count; - - /* If the sched is dirty... */ - if ( 1 /*s->flags & qsched_flag_dirty*/ ) { - - /* Do the sorts in parallel, if possible. */ - // #pragma omp parallel - //{ - - /* Sort the unlocks. */ - //#pragma omp single nowait - // qsched_sort( s->deps , s->deps_key , s->count_deps , 0 , count - 1 ); - - /* Sort the locks. */ - // #pragma omp single nowait - qsched_sort( s->locks , s->locks_key , s->count_locks , 0 , count - 1 ); - - /* Sort the uses. */ - // #pragma omp single nowait - // qsched_sort( s->uses , s->uses_key , s->count_uses , 0 , count - 1 ); - - // } - - /* Run throught the tasks and link the locks and unlocks. */ - tasks[0].unlocks = s->deps; - tasks[0].locks = s->locks; - tasks[0].uses = s->uses; - for ( k = 1 ; k < count ; k++ ) { - tasks[k].unlocks = &tasks[k-1].unlocks[ tasks[k-1].nr_unlocks ]; - tasks[k].locks = &tasks[k-1].locks[ tasks[k-1].nr_locks ]; - tasks[k].uses = &tasks[k-1].uses[ tasks[k-1].nr_uses ]; - } - - /* All cleaned-up now! */ - s->flags &= ~qsched_flag_dirty; - - } - /* Init the queues. */ - for ( k = 0 ; k < s->nr_queues ; k++ ) - queue_init( &s->queues[k] , count ); - - /* Reset the waits to 0... */ - for( k = 0; k < count; k++ ) - { - tasks[k].wait = 0; - } - - /* Run through the tasks and set the waits... */ -/* for ( k = 0 ; k < count ; k++ ) { - t = &tasks[k]; - if ( !( t->flags & task_flag_skip ) ) - for ( j = 0 ; j < t->nr_unlocks ; j++ ) - { - tasks[ t->unlocks[j] ].wait += 1; - } - }*/ - - for( k = 0; k < count; k++ ) - { - t = &tasks[k]; - t->wait = t->wait_init; -// if(t->wait != t->wait_init) - // { - // printf("Task ID %i has wait %i and wait_init %i and type %i\n", k, t->wait, t->wait_init, t->type); - // } - } - - /* Sort the tasks topologically. */ - int *tid = (int *)malloc( sizeof(int) * count ); - for ( j = 0 , k = 0 ; k < count ; k++ ) - { - if ( tasks[k].wait == 0 ) { - tid[j] = k; - j += 1; - } - } - for ( k = 0 ; k < j ; k++ ) { - t = &tasks[ tid[k] ]; - for ( int kk = 0 ; kk < t->nr_unlocks ; kk++ ) - { - if ( ( tasks[ t->unlocks[kk] ].wait -= 1 ) == 0 ) { - tid[j] = t->unlocks[kk]; - j += 1; - } - } - } - - /* Print all dependencies */ - for(i = 0; i < count; i++ ) - { - printf("Task ID: %i, type=%i, ", i, tasks[i].type); - for(j = 0; j < tasks[i].nr_unlocks; j++) - { - printf("%i ", tasks[i].unlocks[j]); - } - printf("\n"); - } - if ( k < count ) - { - printf("k = %i, wait = %i\n", tid[k-1], tasks[tid[k-1]].wait); - for(i = 0; i < count; i++) - { - t = &tasks[i]; - for(j = 0; j < t->nr_unlocks; j++) - { - if(t->unlocks[j] == tid[k-1]) - printf("Task %i is unlocking task %i\n",j, tid[k-1]); - } - } - error( "Circular dependencies detected." ); - } - /* Run through the topologically sorted tasks backwards and - set their weights, re-setting the waits while we're at it. */ -#ifdef PRIQ - for ( k = count-1 ; k >= 0 ; k-- ) { - int maxweight = 0; - t = &tasks[ tid[k] ]; - t->wait = t->wait_init; - for ( j = 0 ; j < t->nr_unlocks ; j++ ) { - if ( tasks[ t->unlocks[j] ].weight > maxweight ) - maxweight = tasks[ t->unlocks[j] ].weight; - } - if(t->type != type_load) - t->weight = t->cost + maxweight; - else - t->weight = t->cost + maxweight - 1000; - -// if(t->weight < -100) - // printf("%i\n", t->weight); - } -#endif -#ifndef PRIQ - for( k = 0; k < count; k++ ) - { - t = &tasks[k]; - t->wait = t->wait_init; -// if(t->wait != t->wait_init) - // { - // printf("Task ID %i has wait %i and wait_init %i and type %i\n", k, t->wait, t->wait_init, t->type); - // } - } -#endif - - -/*Allocate temporary tasks to setup device tasks*/ -temp = (struct task *) malloc(s->count * sizeof(struct task)); -if(temp == NULL) - error("Failed to allocate the temporary task store."); - -memcpy(temp, s->tasks, s->count * sizeof(struct task)); - -/*Copy the qsched data to the device*/ -if(cudaMalloc( &sdata , s->count_data ) != cudaSuccess ) - error("Failed to allocate the qsched data on the device"); -if(cudaMemcpy( sdata , s->data , s->count_data , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy the qsched data to the device."); -if(cudaMemcpyToSymbol( data_cuda , &sdata , sizeof(char *) , 0 ,cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy data pointer to the device."); - - -/*Copy the task data to the device*/ - -if(s->count_locks > 0 ) -{ -if( cudaMalloc( &setup_l , sizeof(qsched_res_t) * s->count_locks ) != cudaSuccess ) - error("Failed to allocate locks array on the device."); -if( cudaMemcpy( setup_l , s->locks , sizeof(qsched_res_t) * s->count_locks, cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy locks to the device."); -if( cudaMemcpyToSymbol ( locks_cuda, &setup_l , sizeof(qsched_res_t *), 0 , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy locks pointer to the device."); -for(i = 0; i < s->count; i++ ) -{ - task = &temp[i]; - task->locks = setup_l + (task->locks - s->locks); -} -} - -if( cudaMalloc( &setup_t , sizeof(qsched_task_t) * s->count_deps ) != cudaSuccess ) - error("Failed to allocate deps array on the device: %s", cudaGetErrorString(cudaPeekAtLastError())); -if( cudaMemcpy( setup_t , s->deps , sizeof(qsched_task_t) * s->count_deps, cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy deps to the device: %s", cudaGetErrorString(cudaPeekAtLastError())); -if( cudaMemcpyToSymbol ( deps_cuda, &setup_t , sizeof(qsched_task_t *) , 0 , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy deps pointer to the device."); - - - -if( cudaMalloc( &setup_u , sizeof(qsched_res_t) * s->count_uses ) != cudaSuccess ) - error("Failed to allocate use array on the device."); -if( cudaMemcpy( setup_u , s->uses , sizeof(qsched_res_t) * s->count_uses, cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy locks to the device."); -if( cudaMemcpyToSymbol ( uses_cuda, &setup_u , sizeof(qsched_res_t *), 0 , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy locks pointer to the device."); - - -if( cudaMalloc( &res_t , sizeof(struct res) * s->count_res ) != cudaSuccess ) - error("Failed to allocated on the device."); - -if( cudaMemcpy( res_t , s->res , sizeof(struct res) * s->count_res , cudaMemcpyHostToDevice) != cudaSuccess ) - error("Failed to copy resources to the device: %s", cudaGetErrorString(cudaPeekAtLastError())); -if( cudaMemcpyToSymbol( res_cuda , &res_t , sizeof(struct res *) , 0 , cudaMemcpyHostToDevice) != cudaSuccess ) - error("Failed to copy res pointer to the device: %s", cudaGetErrorString(cudaPeekAtLastError())); - -for(i = 0; i < s->count; i++ ) -{ - task = &temp[i]; - task->unlocks = setup_t + (task->unlocks - s->deps); -} -for(i = 0; i < s->count; i++ ) -{ - task = &temp[i]; - task->uses = setup_u + (task->uses - s->uses); -} - -if( cudaMalloc( &cuda_t , sizeof(struct task) * s->count ) != cudaSuccess ) - error("Failed to allocate task array on the device."); -if( cudaMemcpy( cuda_t, temp, sizeof(struct task) * s->count , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy tasks to the device."); -if( cudaMemcpyToSymbol ( tasks_cuda, &cuda_t , sizeof(struct task *) , 0 , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy task pointer to the device."); - -/* Initialize the queues. */ -int nr_queues= 3,qsize; -int *data2; -struct queue_cuda queues[ cuda_numqueues ]; - - -/*#ifdef PRIQ -qsize = max(2*s->count, 512); - if ( cudaMemcpyToSymbol( cuda_queue_size , &qsize , sizeof(int) , 0 , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue size to the device."); - - if ( ( data = (int *)malloc( sizeof(int) * qsize ) ) == NULL ) - error("Failed to allocate data buffer."); - if( ( data2 = (int *) malloc( sizeof(int) * qsize ) ) == NULL ) - error("Failed to allocate data2 buffer."); - queues[0].count = 0; - - for(i = 0; i < s->count; i++) - { - if(s->tasks[i].wait == 0) - { - if(s->tasks[i].type != type_load) - { - printf("i = %i\n", i); - for(k = 0; k < s->count; k++) - { - for(j = 0; j < s->tasks[k].nr_unlocks; j++) - { - if(s->tasks[k].unlocks[j] == i) - printf("Should be unlocked by %i\n", k); - } - for(j = 0; j < s->tasks[k].nr_uses; j++) - { - if(s->tasks[k].uses[j] == 256) - printf("Task %i uses resource 256\n", k); - } - for(j = 0; j < s->tasks[k].nr_locks; j++) - { - if(s->tasks[k].locks[j] == 256) - printf("Task %i locks resource 256\n", k); - } - } - for(k = 0; k < s->count_res; k++) - { - if(s->res[k].utask == i) - printf("resource = %i\n", k); - } - printf("%i\n", i); - } - data[queues[0].count++] = i; - data2[queues[0].count-1] = -temp[i].weight; - } - } - qsched_sort(data, data2, queues[0].count, minVal(data2,queues[0].count), maxVal(data2, queues[0].count)); - free(data2); - for ( i = queues[0].count ; i < qsize ; i++ ) - data[i] = -1; - - if ( cudaMalloc( &queues[0].data , sizeof(int) * qsize ) != cudaSuccess ) - error("Failed to allocate queue data on the device."); - if ( cudaMemcpy( (void *)queues[0].data , data , sizeof(int) * qsize , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue data pointer to the device"); - - for ( k = 0; k < qsize; k++ ) - data[k] = -1; - - if ( cudaMalloc( &queues[0].rec_data , sizeof(int) * qsize ) != cudaSuccess ) - error("Failed to allocate queue data on the device."); - if ( cudaMemcpy( (void *)queues[0].rec_data , data , sizeof(int) * qsize , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue data pointer to the device"); - - - queues[0].first = 0; - queues[0].last = queues[0].count; - queues[0].nr_avail_tasks = queues[0].last; - queues[0].rec_count = 0; - queues[0].count = s->count; - - if ( cudaMemcpyToSymbol( cuda_queues , &queues , sizeof(struct queue_cuda) * nr_queues , 0 , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy the queues to the device"); -#else*/ - qsize = max(2*s->count / nr_queues, 256); - if ( cudaMemcpyToSymbol( cuda_queue_size , &qsize , sizeof(int) , 0 , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue size to the device."); - - /* Allocate a temporary buffer for the queue data. */ - if ( ( data = (int *)malloc( sizeof(int) * qsize ) ) == NULL ) - error("Failed to allocate data buffer."); - if( ( data2 = (int *) malloc( sizeof(int) * qsize ) ) == NULL ) - error("Failed to allocate data2 buffer."); - - queues[1].count = 0; - for(i = 0; i < s->count; i++) - { - if(temp[i].type == type_load && temp[i].wait == 0) - { - data[queues[1].count++] = i; - data2[queues[1].count-1] = -temp[i].weight; - } - if(temp[i].type != type_load && temp[i].wait == 0) - { - printf("%i %i\n", temp[i].type, i); - } - - } - qsched_sort(data, data2, queues[1].count, minVal(data2,queues[1].count), maxVal(data2, queues[1].count)); - free(data2); - for ( k = queues[1].count ; k < qsize ; k++ ) - data[k] = -1; - /* Allocate and copy the data. */ - if ( cudaMalloc( &queues[1].data , sizeof(int) * qsize ) != cudaSuccess ) - error("Failed to allocate queue data on the device."); - if ( cudaMemcpy( (void *)queues[1].data , data , sizeof(int) * qsize , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue data pointer to the device"); - - for ( k = 0; k < qsize; k++ ) - data[k] = -1; - - /* Allocate and copy the recyling data. */ - if ( cudaMalloc( &queues[1].rec_data , sizeof(int) * qsize ) != cudaSuccess ) - error("Failed to allocate queue data on the device."); - if ( cudaMemcpy( (void *)queues[1].rec_data , data , sizeof(int) * qsize , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue data pointer to the device"); - /* Allocate and copy the recyling data. */ - if ( cudaMalloc( &queues[0].rec_data , sizeof(int) * qsize ) != cudaSuccess ) - error("Failed to allocate queue data on the device."); - if ( cudaMemcpy( (void *)queues[0].rec_data , data , sizeof(int) * qsize , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue data pointer to the device"); -/* Allocate and copy the recyling data. */ - if ( cudaMalloc( &queues[2].rec_data , sizeof(int) * qsize ) != cudaSuccess ) - error("Failed to allocate queue data on the device."); - if ( cudaMemcpy( (void *)queues[2].rec_data , data , sizeof(int) * qsize , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue data pointer to the device"); - - /* Set some other values. */ - queues[1].first = 0; - queues[1].last = queues[1].count; - queues[1].nr_avail_tasks = queues[1].last; - queues[1].rec_count = 0; - - /* Init queue 2*/ - int num_unload=0; - queues[2].count = 0; - for( k = 0; k < s->count; k++ ) - { - if(temp[k].type == type_unload) - { - num_unload++; - if(temp[k].wait == 0) - data[queues[2].count++] = k; - } - } - queues[2].first = 0; - queues[2].last = queues[2].count; - queues[2].nr_avail_tasks = queues[2].last; - queues[2].count = num_unload; - queues[2].rec_count = 0; - /* Allocate and copy the data. */ - if ( cudaMalloc( &queues[2].data , sizeof(int) * qsize ) != cudaSuccess ) - error("Failed to allocate queue data on the device."); - if ( cudaMemcpy( (void *)queues[2].data , data , sizeof(int) * qsize , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue data pointer to the device"); - - for ( k = 0; k < qsize; k++ ) - data[k] = -1; - - /* Init queue 0*/ - queues[0].count = 0; - for ( k = 0; k < s->count ; k++ ) - { - if(temp[k].type != type_load && temp[k].type != type_unload && temp[k].wait == 0){ - data[queues[0].count++] = k; - } - - } - queues[0].first = 0; - queues[0].last = queues[0].count; - queues[0].nr_avail_tasks = queues[0].last; - queues[0].count = s->count - queues[1].count - queues[2].count; - queues[0].rec_count = 0; - - - /* Allocate and copy the data. */ - if ( cudaMalloc( &queues[0].data , sizeof(int) * qsize ) != cudaSuccess ) - error("Failed to allocate queue data on the device."); - if ( cudaMemcpy( (void *)queues[0].data , data , sizeof(int) * qsize , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy queue data pointer to the device"); - - /* Copy the queue structures to the device. */ - if ( cudaMemcpyToSymbol( cuda_queues , &queues , sizeof(struct queue_cuda) * nr_queues , 0 , cudaMemcpyHostToDevice ) != cudaSuccess ) - error("Failed to copy the queues to the device"); - /* Clean up. */ - free( tid ); - - /* Set the number of waiting tasks. */ - s->waiting = count; - - /* Set the ready flag. */ - s->flags |= qsched_flag_ready; - - free( temp ); - free( data ); - -} - -void qsched_print_cuda_timers(struct qsched *s) -{ -#ifdef TIMINGS -unsigned long long int timers[timers_count]; -int i; -cudaMemcpyFromSymbol(timers,cuda_timers, sizeof(unsigned long long int)*timers_count, 0 ,cudaMemcpyDeviceToHost ); -printf("timers: "); -for(i = 0; i < timers_count; i++) -{ - printf("%llu ", timers[i]); -} -printf("\n"); -#endif -} - - - -struct task* qsched_get_timers( struct qsched *s, int numtasks ) -{ - struct task *gpu_tasks = NULL, *cuda_tasks; - - cuda_tasks = (struct task*)malloc(numtasks * sizeof(struct task)); - if(cuda_tasks == NULL) - error("Failed to allocate cuda_tasks"); - - if( cudaMemcpyFromSymbol(&gpu_tasks, tasks_cuda, sizeof(struct task*), 0 ) != cudaSuccess ) - error("Failed to get symbol from device"); - - if( cudaMemcpy( cuda_tasks, gpu_tasks, sizeof(struct task) * numtasks, cudaMemcpyDeviceToHost) != cudaSuccess ) - error("Failed to copy tasks from device to host"); - - - return cuda_tasks; -} - -/** - * @brief Execute all the tasks in the current scheduler using - * CUDA. - * - * @param s Pointer to the #qsched. - * @param fun User-supplied function that will be called with the - * task type and a pointer to the task data. This must be a __device__ function! - * - * This function is only available if QuickSched was compiled with - * CUDA support. - */ -void qsched_run_CUDA ( struct qsched *s, qsched_funtype func) { - -#ifdef WITH_CUDA - #ifdef TIMINGS - int timers[timers_count]; - int k; - for ( k = 0 ; k < timers_count ; k++ ) - timers[k] = 0; - cudaMemcpyToSymbol(cuda_timers , timers , sizeof(int) * timers_count , 0 , cudaMemcpyHostToDevice); - #endif - cudaEvent_t startEvent, stopEvent; - float time; - //ProfilerStart("/home/aidan/quicksched-code/examples/profiler.out"); - double itpms = 1000.0 / CPU_TPS; - ticks tic, toc_run ; - tic = getticks(); - qsched_prepare_cuda( s ); - toc_run = getticks(); - printf("%.3f ", ((double)(toc_run - tic)) * itpms ); - cudaEventCreate(&startEvent); - cudaEventCreate(&stopEvent); -// message( "prepare_cuda took %.3f ms" , ((double)(toc_run - tic)) * itpms ); - cudaMemcpyToSymbol( fun , &func , sizeof(qsched_funtype)); - tic = getticks(); - // ProfilerStop(); - cudaMemcpyToSymbol( tot_num_tasks, &s->count, sizeof(int) ); - cudaEventRecord(startEvent,0); - qsched_device_kernel<<<128, 128 >>> ( ); - cudaEventRecord(stopEvent,0); - if( cudaDeviceSynchronize() != cudaSuccess ) - error("Failed to execute kernel:%s", cudaGetErrorString(cudaPeekAtLastError())); - toc_run = getticks(); - cudaEventElapsedTime(&time, startEvent, stopEvent); - #ifdef NO_LOADS - printf("%.3f ", time ); - #else - printf("%.3f\n", time ); - #endif - // message( "run_CUDA took %.3f ms" , ((double)(toc_run - tic)) * itpms ); - -#else - error("QuickSched was not compiled with CUDA support."); - -#endif - -} - - -#ifdef TIMER_TIC -#undef TIMER_TIC -#endif -#ifdef TIMER_TOC -#undef TIMER_TOC -#endif -#ifdef TIMER_TIC2 -#undef TIMER_TIC2 -#endif -#ifdef TIMERS - #define TIMER_TIC ticks __tic = getticks(); - #define TIMER_TIC2 __tic = getticks(); - #define TIMER_TOC(s,tid) atomic_add( &s->timers[tid] , getticks() - __tic ); -#else - #define TIMER_TIC - #define TIMER_TIC2 - #define TIMER_TOC -#endif - diff --git a/src/cuda_queue.o b/src/cuda_queue.o deleted file mode 100644 index d5b4f40bba12ac6faba84f4bb0dace53f8e50b23..0000000000000000000000000000000000000000 Binary files a/src/cuda_queue.o and /dev/null differ diff --git a/src/libquicksched.la b/src/libquicksched.la deleted file mode 100644 index 6d1579faefa34857e55567773d58732791f6d514..0000000000000000000000000000000000000000 --- a/src/libquicksched.la +++ /dev/null @@ -1,41 +0,0 @@ -# libquicksched.la - a libtool library file -# Generated by ltmain.sh (GNU libtool) 2.2.6b -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libquicksched.so.0' - -# Names of this library. -library_names='libquicksched.so.0.0.0 libquicksched.so.0 libquicksched.so' - -# The name of the static archive. -old_library='libquicksched.a' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags=' -pthread' - -# Libraries that this one depends upon. -dependency_libs='' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libquicksched. -current=0 -age=0 -revision=0 - -# Is this an already installed library? -installed=no - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/usr/local/lib' diff --git a/src/libquicksched_cuda_la-qsched.lo b/src/libquicksched_cuda_la-qsched.lo deleted file mode 100644 index 24c9b90a65c7005af0c64e984f073dd055f443b0..0000000000000000000000000000000000000000 --- a/src/libquicksched_cuda_la-qsched.lo +++ /dev/null @@ -1,12 +0,0 @@ -# libquicksched_cuda_la-qsched.lo - a libtool object file -# Generated by ltmain.sh (GNU libtool) 2.2.6b -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/libquicksched_cuda_la-qsched.o' - -# Name of the non-PIC object -non_pic_object='libquicksched_cuda_la-qsched.o' - diff --git a/src/libquicksched_cuda_la-qsched.o b/src/libquicksched_cuda_la-qsched.o deleted file mode 100644 index 4e9cb106a74e21f407db6cdb111de58450d22f7e..0000000000000000000000000000000000000000 Binary files a/src/libquicksched_cuda_la-qsched.o and /dev/null differ diff --git a/src/libquicksched_cuda_la-queue.lo b/src/libquicksched_cuda_la-queue.lo deleted file mode 100644 index 10792c77051623ef351876bcab964612d2d3ef78..0000000000000000000000000000000000000000 --- a/src/libquicksched_cuda_la-queue.lo +++ /dev/null @@ -1,12 +0,0 @@ -# libquicksched_cuda_la-queue.lo - a libtool object file -# Generated by ltmain.sh (GNU libtool) 2.2.6b -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/libquicksched_cuda_la-queue.o' - -# Name of the non-PIC object -non_pic_object='libquicksched_cuda_la-queue.o' - diff --git a/src/libquicksched_cuda_la-queue.o b/src/libquicksched_cuda_la-queue.o deleted file mode 100644 index bb73bba17d7de8bc4f669d0e279b777bf35317fd..0000000000000000000000000000000000000000 Binary files a/src/libquicksched_cuda_la-queue.o and /dev/null differ diff --git a/src/qsched.lo b/src/qsched.lo deleted file mode 100644 index f07729d10972c2fa07fee15d637e1ecdea84af83..0000000000000000000000000000000000000000 --- a/src/qsched.lo +++ /dev/null @@ -1,12 +0,0 @@ -# qsched.lo - a libtool object file -# Generated by ltmain.sh (GNU libtool) 2.2.6b -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/qsched.o' - -# Name of the non-PIC object -non_pic_object='qsched.o' - diff --git a/src/qsched.o b/src/qsched.o deleted file mode 100644 index a0f22e50945e28929d4521d2b43676a8bfd122ec..0000000000000000000000000000000000000000 Binary files a/src/qsched.o and /dev/null differ diff --git a/src/queue.lo b/src/queue.lo deleted file mode 100644 index 3f1b6c3d9c030aca142638a013ed409008e24647..0000000000000000000000000000000000000000 --- a/src/queue.lo +++ /dev/null @@ -1,12 +0,0 @@ -# queue.lo - a libtool object file -# Generated by ltmain.sh (GNU libtool) 2.2.6b -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. -pic_object='.libs/queue.o' - -# Name of the non-PIC object -non_pic_object='queue.o' - diff --git a/src/queue.o b/src/queue.o deleted file mode 100644 index 0abac5674662c81bff1f03762e0ea6a758053f82..0000000000000000000000000000000000000000 Binary files a/src/queue.o and /dev/null differ