├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── common ├── Makefile ├── Makefile.common ├── bots.h ├── bots_common.c ├── bots_common.h ├── bots_main.c ├── bots_main.h ├── omp-tasks-app.h ├── ompss-app.h └── serial-app.h ├── config └── classes │ ├── alignment │ ├── fft │ ├── fib │ ├── floorplan │ ├── health │ ├── knapsack │ ├── nqueens │ ├── sort │ ├── sparselu │ ├── strassen │ └── uts ├── configure ├── inputs ├── alignment │ ├── prot.100.aa │ └── prot.20.aa ├── floorplan │ ├── input.15 │ ├── input.20 │ └── input.5 ├── health │ ├── large.input │ ├── medium.input │ ├── small.input │ └── test.input ├── knapsack │ ├── knapsack-012.input │ ├── knapsack-016.input │ ├── knapsack-020.input │ ├── knapsack-024.input │ ├── knapsack-032.input │ ├── knapsack-036.input │ ├── knapsack-040.input │ ├── knapsack-044.input │ ├── knapsack-048.input │ ├── knapsack-064.input │ ├── knapsack-096.input │ └── knapsack-128.input └── uts │ ├── huge.input │ ├── large.input │ ├── medium.input │ ├── small.input │ ├── test.input │ └── tiny.input ├── omp-tasks ├── Makefile ├── Makefile.version ├── alignment │ ├── Makefile │ ├── alignment_for │ │ ├── Makefile │ │ ├── alignment.c │ │ ├── alignment.h │ │ ├── app-desc.h │ │ ├── param.h │ │ ├── sequence.c │ │ ├── sequence.h │ │ └── sequence_extern.h │ └── alignment_single │ │ ├── Makefile │ │ ├── alignment.c │ │ ├── alignment.h │ │ ├── app-desc.h │ │ ├── param.h │ │ ├── sequence.c │ │ ├── sequence.h │ │ └── sequence_extern.h ├── concom │ ├── Makefile │ ├── app-desc.h │ └── concom.c ├── fft │ ├── Makefile │ ├── app-desc.h │ ├── fft.c │ └── fft.h ├── fib │ ├── Makefile │ ├── app-desc.h │ ├── fib.c │ └── fib.h ├── floorplan │ ├── Makefile │ ├── app-desc.h │ └── floorplan.c ├── health │ ├── Makefile │ ├── app-desc.h │ ├── health.c │ └── health.h ├── knapsack │ ├── Makefile │ ├── app-desc.h │ └── knapsack.c ├── nqueens │ ├── Makefile │ ├── app-desc.h │ └── nqueens.c ├── sort │ ├── Makefile │ ├── app-desc.h │ └── sort.c ├── sparselu │ ├── Makefile │ ├── sparselu_for │ │ ├── Makefile │ │ ├── app-desc.h │ │ ├── sparselu.c │ │ └── sparselu.h │ └── sparselu_single │ │ ├── Makefile │ │ ├── app-desc.h │ │ ├── sparselu.c │ │ └── sparselu.h ├── strassen │ ├── Makefile │ ├── app-desc.h │ ├── strassen.c │ └── strassen.h └── uts │ ├── Makefile │ ├── app-desc.h │ ├── brg_endian.h │ ├── brg_sha1.c │ ├── brg_sha1.h │ ├── brg_types.h │ ├── uts.c │ └── uts.h ├── ompss ├── Makefile ├── Makefile.version ├── fft │ ├── Makefile │ ├── app-desc.h │ ├── fft.c │ └── fft.h ├── fib │ ├── Makefile │ ├── app-desc.h │ ├── fib.c │ └── fib.h ├── floorplan │ ├── Makefile │ ├── app-desc.h │ └── floorplan.c ├── health │ ├── Makefile │ ├── app-desc.h │ ├── health.c │ └── health.h ├── nqueens │ ├── Makefile │ ├── app-desc.h │ └── nqueens.c ├── sort │ ├── Makefile │ ├── app-desc.h │ └── sort.c ├── strassen │ ├── Makefile │ ├── app-desc.h │ ├── strassen.c │ └── strassen.h └── uts │ ├── Makefile │ ├── app-desc.h │ ├── brg_endian.h │ ├── brg_sha1.c │ ├── brg_sha1.h │ ├── brg_types.h │ ├── uts.c │ └── uts.h ├── pack.sh ├── run ├── run-alignment.sh ├── run-all.sh ├── run-fft.sh ├── run-fib.sh ├── run-floorplan.sh ├── run-health.sh ├── run-knapsack.sh ├── run-nqueens.sh ├── run-sort.sh ├── run-sparselu.sh ├── run-strassen.sh ├── run-uts.sh └── run.common ├── serial ├── Makefile ├── Makefile.version ├── alignment │ ├── Makefile │ ├── alignment.c │ ├── alignment.h │ ├── app-desc.h │ ├── param.h │ ├── sequence.c │ ├── sequence.h │ └── sequence_extern.h ├── fft │ ├── Makefile │ ├── app-desc.h │ ├── fft.c │ └── fft.h ├── fib │ ├── Makefile │ ├── app-desc.h │ ├── fib.c │ └── fib.h ├── floorplan │ ├── Makefile │ ├── app-desc.h │ └── floorplan.c ├── health │ ├── Makefile │ ├── app-desc.h │ ├── health.c │ └── health.h ├── knapsack │ ├── Makefile │ ├── app-desc.h │ └── knapsack.c ├── nqueens │ ├── Makefile │ ├── app-desc.h │ └── nqueens.c ├── sort │ ├── Makefile │ ├── app-desc.h │ └── sort.c ├── sparselu │ ├── Makefile │ ├── app-desc.h │ ├── sparselu.c │ └── sparselu.h ├── strassen │ ├── Makefile │ ├── app-desc.h │ └── strassen.c └── uts │ ├── Makefile │ ├── app-desc.h │ ├── brg_endian.h │ ├── brg_sha1.c │ ├── brg_sha1.h │ ├── brg_types.h │ ├── uts.c │ └── uts.h └── templates └── template.c /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | bin/* 3 | config/make.config 4 | bots-*.tar.gz 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guide 2 | 3 | ## Issue contributions 4 | 5 | For either questions or bugs, submit a new issue in our GitHub repostiory. 6 | First, **ensure the bug was not already reported** by searching on GitHub 7 | under [Issues][issues]. If you're unable to find an open issue addressing 8 | the problem or answering the question [open a new one][open-issue]. 9 | 10 | Describe the issue including all the necessary steps to reproduce it when 11 | reporting a bug. Be sure to include a **title and clear description** and 12 | as much relevant information as possible. When reporting a bug it is very 13 | useful to include an **example code** demonstrating the expected behavior 14 | that is not occurring. 15 | 16 | ## Code contributions 17 | 18 | If you want to contribute in this repository you will need to follow these 19 | steps: 20 | 1. Fork this project in your personal GitHub space. 21 | 2. Make your changes in this repository. Try to: 22 | * Follow our [coding guidelines][coding]. 23 | * Branch from the master branch and, if needed, rebase to the current master 24 | branch before submitting your pull request (step 3). If it doesn't merge 25 | cleanly with master you may be asked to rebase your changes. 26 | * Commits should be as small as possible, while ensuring that each commit 27 | is correct independently (i.e., each commit should compile and pass 28 | tests). Write [good commit messages][commit]. 29 | * Add tests relevant to the fixed bug or new feature which allow to verify 30 | your changes (if needed). 31 | 3. Obtain, fill and sign the [contribution agreement document][contribute]. 32 | Then fax a signed copy to (+34) 93 413 77 21 or email a scanned copy of a 33 | signed agreement to pm-contributions[^1] 34 | 4. Make a pull request. If your patch is not getting reviewed you can ask for 35 | it by sending an email to pm-tools[^1]. 36 | 37 | [issues]: https://github.com/bsc-pm/bots/issues 38 | [open-issue]: https://github.com/bsc-pm/bots/issues/new 39 | [coding]: doc/coding-guidelines.md 40 | [commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html 41 | [contribute]: doc/contribution-agreement-bots.pdf 42 | [^1]: All email addreses are hosted at the bsc.es domain. 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | DIRS=common omp-tasks serial 2 | 3 | RECURSIVE=all-recursive clean-recursive dist-clean-recursive 4 | 5 | all: all-recursive 6 | clean: clean-recursive 7 | dist-clean: dist-clean-recursive 8 | 9 | $(RECURSIVE): $(DIRS) 10 | @failcom='exit 1';\ 11 | target=`echo $@ | sed s/-recursive//`; \ 12 | for subdir in $(DIRS); do \ 13 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ 14 | || eval $$failcom; \ 15 | done; 16 | 17 | dist: dist-clean 18 | echo "TODO" 19 | 20 | wipe: dist-clean-recursive 21 | rm -f bin/* 22 | -------------------------------------------------------------------------------- /common/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | BASE_DIR=../ 22 | VERSION=common 23 | 24 | all: bots_common.o 25 | 26 | include $(BASE_DIR)/common/Makefile.common 27 | 28 | 29 | -------------------------------------------------------------------------------- /common/bots_common.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #ifndef _COMMON_H 22 | #define _COMMON_H 23 | 24 | #ifndef CC 25 | #define CC "" 26 | #endif 27 | #ifndef CFLAGS 28 | #define CFLAGS "" 29 | #endif 30 | #ifndef LD 31 | #define LD "" 32 | #endif 33 | #ifndef LDFLAGS 34 | #define LDFLAGS "" 35 | #endif 36 | #ifndef CDATE 37 | #define CDATE "" 38 | #endif 39 | #ifndef CMESSAGE 40 | #define CMESSAGE "" 41 | #endif 42 | 43 | #define BOTS_ERROR 0 44 | #define BOTS_ERROR_NOT_ENOUGH_MEMORY 1 45 | #define BOTS_ERROR_UNRECOGNIZED_PARAMETER 2 46 | 47 | #define BOTS_WARNING 0 48 | 49 | void bots_get_date(char *str); 50 | void bots_get_architecture(char *str); 51 | void bots_get_load_average(char *str); 52 | void bots_print_results(void); 53 | 54 | #define BOTS_TMP_STR_SZ 256 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /common/bots_main.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #define BOTS_PARAM_TYPE_NONE 0 22 | #define BOTS_PARAM_TYPE_INT 1 23 | #define BOTS_PARAM_TYPE_BOOL 2 24 | #define BOTS_PARAM_TYPE_STR 3 25 | 26 | #ifdef _OPENMP 27 | # include 28 | #else 29 | # define omp_get_max_threads() 1 30 | # define omp_get_thread_num() 0 31 | # define omp_set_num_threads(x) 32 | #endif 33 | 34 | void bots_print_usage(void); 35 | void bots_print_usage_option(char opt, int type, char* description, char *val, int subc, char **subv); 36 | 37 | /*********************************************************************** 38 | * BENCHMARK HEADERS 39 | *********************************************************************/ 40 | void bots_initialize(); 41 | void bots_finalize(); 42 | void bots_sequential_ini(); 43 | long bots_sequential(); 44 | void bots_sequential_fini(); 45 | int bots_check_result(); 46 | void bots_print_usage_specific(); 47 | void bots_get_params_specific(int argc, char **argv); 48 | void bots_set_info(); 49 | 50 | void bots_get_params_common(int argc, char **argv); 51 | void bots_get_params(int argc, char **argv); 52 | -------------------------------------------------------------------------------- /common/omp-tasks-app.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include 22 | 23 | #define MODEL OMP-TASKS 24 | 25 | #ifdef FORCE_TIED_TASKS 26 | #define BOTS_MODEL_DESC "OpenMP (using tied tasks)" 27 | #else 28 | #define BOTS_MODEL_DESC "OpenMP (using tasks)" 29 | #endif 30 | 31 | 32 | -------------------------------------------------------------------------------- /common/ompss-app.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include 22 | 23 | #define MODEL OMPSS 24 | 25 | #ifdef FORCE_TIED_TASKS 26 | #define BOTS_MODEL_DESC "OmpSs (using tied tasks)" 27 | #else 28 | #define BOTS_MODEL_DESC "OmpSs (using tasks)" 29 | #endif 30 | 31 | 32 | -------------------------------------------------------------------------------- /common/serial-app.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #define MODEL SERIAL 22 | #define BOTS_MODEL_DESC "Serial" 23 | 24 | 25 | -------------------------------------------------------------------------------- /config/classes/alignment: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=prot.20.aa 3 | 4 | [small] 5 | inputs=prot.20.aa 6 | 7 | [medium] 8 | inputs=prot.100.aa 9 | 10 | -------------------------------------------------------------------------------- /config/classes/fft: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=8388608 3 | 4 | [small] 5 | inputs=33554432 6 | 7 | [medium] 8 | inputs=134217728 9 | 10 | [large] 11 | inputs=268435456 12 | 13 | -------------------------------------------------------------------------------- /config/classes/fib: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=35 3 | 4 | [small] 5 | inputs=10 6 | cutoff=5 7 | 8 | [t40] 9 | inputs=40 10 | cutoff=10 11 | 12 | [medium] 13 | inputs=50 14 | cutoff=10 15 | 16 | [large] 17 | inputs=53 18 | cutoff=20 19 | 20 | -------------------------------------------------------------------------------- /config/classes/floorplan: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=input.5 3 | 4 | [small] 5 | inputs=input.15 6 | 7 | [medium] 8 | inputs=input.20 9 | 10 | -------------------------------------------------------------------------------- /config/classes/health: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=test.input 3 | 4 | [small] 5 | inputs=small.input 6 | 7 | [medium] 8 | inputs=medium.input 9 | 10 | [large] 11 | inputs=large.input 12 | 13 | -------------------------------------------------------------------------------- /config/classes/knapsack: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=knapsack-016.input 3 | 4 | [small] 5 | inputs=knapsack-036.input 6 | 7 | [medium] 8 | inputs=knapsack-040.input 9 | 10 | [large] 11 | inputs=knapsack-044.input 12 | 13 | -------------------------------------------------------------------------------- /config/classes/nqueens: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=10 3 | cutoff=5 4 | 5 | [small] 6 | inputs=13 7 | 8 | [medium] 9 | inputs=14 10 | cutoff=8 11 | 12 | [large] 13 | inputs=15 14 | 15 | [huge] 16 | inputs=16 17 | 18 | -------------------------------------------------------------------------------- /config/classes/sort: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=8388608 3 | 4 | [small] 5 | inputs=33554432 6 | 7 | [medium] 8 | inputs=134217728 9 | 10 | [large] 11 | inputs=536870912 12 | -------------------------------------------------------------------------------- /config/classes/sparselu: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=25x25 3 | 4 | [small] 5 | inputs=25x100 6 | 7 | [medium] 8 | inputs=75x100 9 | 10 | [large] 11 | inputs=100x100 12 | 13 | -------------------------------------------------------------------------------- /config/classes/strassen: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=512 3 | 4 | [small] 5 | inputs=2048 6 | 7 | [medium] 8 | inputs=8192 9 | 10 | -------------------------------------------------------------------------------- /config/classes/uts: -------------------------------------------------------------------------------- 1 | [test] 2 | inputs=test.input 3 | ompenv=OMP_STACKSIZE="2M" 4 | 5 | [small] 6 | inputs=small.input 7 | ompenv=OMP_STACKSIZE="16M" 8 | 9 | [medium] 10 | inputs=medium.input 11 | ompenv=OMP_STACKSIZE="55M" 12 | 13 | [large] 14 | inputs=large.input 15 | ompenv=OMP_STACKSIZE="150M" 16 | 17 | -------------------------------------------------------------------------------- /inputs/floorplan/input.15: -------------------------------------------------------------------------------- 1 | 15 2 | 3 | 2 4 | 3 10 5 | 6 5 6 | 0 -1 7 | 2 8 | 9 | 3 10 | 2 12 11 | 3 8 12 | 4 6 13 | -1 1 14 | 3 15 | 16 | 2 17 | 5 12 18 | 6 10 19 | 2 1 20 | 4 21 | 22 | 3 23 | 3 8 24 | 4 6 25 | 8 3 26 | -1 3 27 | 5 28 | 29 | 4 30 | 4 10 31 | 5 8 32 | 8 5 33 | 10 4 34 | -1 2 35 | 6 36 | 37 | 1 38 | 3 3 39 | -1 5 40 | 7 41 | 42 | 3 43 | 2 16 44 | 4 8 45 | 8 4 46 | 6 5 47 | 8 48 | 49 | 3 50 | 2 6 51 | 3 4 52 | 4 3 53 | -1 4 54 | 9 55 | 56 | 1 57 | 3 3 58 | 8 4 59 | 10 60 | 61 | 2 62 | 5 6 63 | 6 5 64 | 9 4 65 | 11 66 | 67 | 1 68 | 4 4 69 | -1 6 70 | 12 71 | 72 | 4 73 | 2 12 74 | 4 6 75 | 6 4 76 | 12 2 77 | 7 8 78 | 13 79 | 80 | 3 81 | 4 9 82 | 6 6 83 | 9 4 84 | -1 9 85 | 14 86 | 87 | 1 88 | 3 9 89 | 13 10 90 | 15 91 | 92 | 2 93 | 3 22 94 | 6 11 95 | 11 13 96 | 0 97 | 98 | 713 99 | -------------------------------------------------------------------------------- /inputs/floorplan/input.20: -------------------------------------------------------------------------------- 1 | 20 2 | 3 | 2 4 | 3 10 5 | 6 5 6 | 0 -1 7 | 2 8 | 9 | 3 10 | 2 12 11 | 3 8 12 | 4 6 13 | -1 1 14 | 3 15 | 16 | 2 17 | 5 12 18 | 6 10 19 | 2 1 20 | 4 21 | 22 | 3 23 | 3 8 24 | 4 6 25 | 8 3 26 | -1 3 27 | 5 28 | 29 | 4 30 | 4 10 31 | 5 8 32 | 8 5 33 | 10 4 34 | -1 2 35 | 6 36 | 37 | 1 38 | 3 3 39 | -1 5 40 | 7 41 | 42 | 3 43 | 2 16 44 | 4 8 45 | 8 4 46 | 6 5 47 | 8 48 | 49 | 3 50 | 2 6 51 | 3 4 52 | 4 3 53 | -1 4 54 | 9 55 | 56 | 1 57 | 3 3 58 | 8 4 59 | 10 60 | 61 | 2 62 | 5 6 63 | 6 5 64 | 9 4 65 | 11 66 | 67 | 1 68 | 4 4 69 | -1 6 70 | 12 71 | 72 | 4 73 | 2 12 74 | 4 6 75 | 6 4 76 | 12 2 77 | 7 8 78 | 13 79 | 80 | 3 81 | 4 9 82 | 6 6 83 | 9 4 84 | -1 9 85 | 14 86 | 87 | 1 88 | 3 9 89 | 13 10 90 | 15 91 | 92 | 2 93 | 3 22 94 | 6 11 95 | 11 13 96 | 16 97 | 98 | 4 99 | 3 8 100 | 4 6 101 | 6 4 102 | 8 3 103 | -1 14 104 | 17 105 | 106 | 2 107 | 4 10 108 | 5 8 109 | -1 15 110 | 18 111 | 112 | 4 113 | 2 6 114 | 6 2 115 | 3 4 116 | 4 3 117 | 17 15 118 | 19 119 | 120 | 2 121 | 3 8 122 | 2 12 123 | 18 15 124 | 20 125 | 126 | 1 127 | 5 5 128 | -1 16 129 | 0 130 | 131 | 896 132 | -------------------------------------------------------------------------------- /inputs/floorplan/input.5: -------------------------------------------------------------------------------- 1 | 5 2 | 3 | 2 4 | 3 10 5 | 6 5 6 | 0 -1 7 | 2 8 | 9 | 3 10 | 2 12 11 | 3 8 12 | 4 6 13 | -1 1 14 | 3 15 | 16 | 2 17 | 5 12 18 | 6 10 19 | 2 1 20 | 4 21 | 22 | 3 23 | 3 8 24 | 4 6 25 | 8 3 26 | -1 3 27 | 5 28 | 29 | 4 30 | 4 10 31 | 5 8 32 | 8 5 33 | 10 4 34 | -1 2 35 | 0 36 | 37 | 216 38 | -------------------------------------------------------------------------------- /inputs/health/large.input: -------------------------------------------------------------------------------- 1 | 5 24 10 365 2 12 23 0.002 0.100 0.150 7238720 346201 723872 5267413 7121156 73923 28969 14672 5.230891 2 | -------------------------------------------------------------------------------- /inputs/health/medium.input: -------------------------------------------------------------------------------- 1 | 4 36 10 365 2 12 23 0.002 0.100 0.150 988000 47989 98800 721934 971855 10249 3901 1995 5.156507 2 | -------------------------------------------------------------------------------- /inputs/health/small.input: -------------------------------------------------------------------------------- 1 | 4 18 10 365 2 12 23 0.002 0.100 0.150 131200 6175 13120 96718 128997 1406 525 272 5.167470 2 | -------------------------------------------------------------------------------- /inputs/health/test.input: -------------------------------------------------------------------------------- 1 | 3 18 10 365 2 12 23 0.002 0.100 0.150 7280 343 728 5531 7160 80 26 14 5.259341 2 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-012.input: -------------------------------------------------------------------------------- 1 | 12 255 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 15 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-016.input: -------------------------------------------------------------------------------- 1 | 16 405 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 19 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-020.input: -------------------------------------------------------------------------------- 1 | 20 505 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 23 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-024.input: -------------------------------------------------------------------------------- 1 | 24 605 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 27 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-032.input: -------------------------------------------------------------------------------- 1 | 32 810 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 7 16 27 | 21 44 28 | 10 20 29 | 18 37 30 | 19 39 31 | 15 32 32 | 11 20 33 | 22 47 34 | 35 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-036.input: -------------------------------------------------------------------------------- 1 | 36 915 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 7 16 27 | 21 44 28 | 10 20 29 | 18 37 30 | 19 39 31 | 15 32 32 | 11 20 33 | 22 47 34 | 22 46 35 | 17 35 36 | 16 31 37 | 5 13 38 | 39 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-040.input: -------------------------------------------------------------------------------- 1 | 40 1025 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 7 16 27 | 21 44 28 | 10 20 29 | 18 37 30 | 19 39 31 | 15 32 32 | 11 20 33 | 22 47 34 | 22 46 35 | 17 35 36 | 16 31 37 | 5 13 38 | 7 16 39 | 13 26 40 | 5 9 41 | 22 45 42 | 43 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-044.input: -------------------------------------------------------------------------------- 1 | 44 1130 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 7 16 27 | 21 44 28 | 10 20 29 | 18 37 30 | 19 39 31 | 15 32 32 | 11 20 33 | 22 47 34 | 22 46 35 | 17 35 36 | 16 31 37 | 5 13 38 | 7 16 39 | 13 26 40 | 5 9 41 | 22 45 42 | 6 11 43 | 16 35 44 | 13 28 45 | 10 22 46 | 47 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-048.input: -------------------------------------------------------------------------------- 1 | 48 1245 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 7 16 27 | 21 44 28 | 10 20 29 | 18 37 30 | 19 39 31 | 15 32 32 | 11 20 33 | 22 47 34 | 22 46 35 | 17 35 36 | 16 31 37 | 5 13 38 | 7 16 39 | 13 26 40 | 5 9 41 | 22 45 42 | 6 11 43 | 16 35 44 | 13 28 45 | 10 22 46 | 5 10 47 | 14 27 48 | 9 16 49 | 21 43 50 | 51 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-064.input: -------------------------------------------------------------------------------- 1 | 64 1650 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 7 16 27 | 21 44 28 | 10 20 29 | 18 37 30 | 19 39 31 | 15 32 32 | 11 20 33 | 22 47 34 | 22 46 35 | 17 35 36 | 16 31 37 | 5 13 38 | 7 16 39 | 13 26 40 | 5 9 41 | 22 45 42 | 6 11 43 | 16 35 44 | 13 28 45 | 10 22 46 | 5 10 47 | 14 27 48 | 9 16 49 | 21 43 50 | 6 11 51 | 16 35 52 | 17 34 53 | 21 43 54 | 10 21 55 | 9 16 56 | 9 20 57 | 20 42 58 | 6 12 59 | 8 16 60 | 14 26 61 | 14 27 62 | 8 14 63 | 7 13 64 | 20 43 65 | 9 18 66 | 67 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-096.input: -------------------------------------------------------------------------------- 1 | 96 2490 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 7 16 27 | 21 44 28 | 10 20 29 | 18 37 30 | 19 39 31 | 15 32 32 | 11 20 33 | 22 47 34 | 22 46 35 | 17 35 36 | 16 31 37 | 5 13 38 | 7 16 39 | 13 26 40 | 5 9 41 | 22 45 42 | 6 11 43 | 16 35 44 | 13 28 45 | 10 22 46 | 5 10 47 | 14 27 48 | 9 16 49 | 21 43 50 | 6 11 51 | 16 35 52 | 17 34 53 | 21 43 54 | 10 21 55 | 9 16 56 | 9 20 57 | 20 42 58 | 6 12 59 | 8 16 60 | 14 26 61 | 14 27 62 | 8 14 63 | 7 13 64 | 20 43 65 | 9 18 66 | 14 28 67 | 14 28 68 | 15 30 69 | 14 28 70 | 6 12 71 | 12 25 72 | 16 34 73 | 6 13 74 | 7 17 75 | 11 21 76 | 11 20 77 | 10 19 78 | 13 25 79 | 21 43 80 | 12 24 81 | 6 15 82 | 22 42 83 | 17 36 84 | 10 20 85 | 22 45 86 | 5 9 87 | 8 18 88 | 19 39 89 | 6 14 90 | 9 19 91 | 20 41 92 | 19 40 93 | 16 35 94 | 19 41 95 | 6 13 96 | 8 17 97 | 15 30 98 | 99 | -------------------------------------------------------------------------------- /inputs/knapsack/knapsack-128.input: -------------------------------------------------------------------------------- 1 | 128 3335 2 | 5 9 3 | 18 35 4 | 16 34 5 | 24 48 6 | 12 27 7 | 16 33 8 | 6 11 9 | 7 13 10 | 17 35 11 | 8 18 12 | 8 18 13 | 13 26 14 | 24 48 15 | 24 46 16 | 15 29 17 | 11 23 18 | 10 21 19 | 20 40 20 | 21 42 21 | 23 44 22 | 18 34 23 | 11 25 24 | 15 33 25 | 7 14 26 | 7 16 27 | 21 44 28 | 10 20 29 | 18 37 30 | 19 39 31 | 15 32 32 | 11 20 33 | 22 47 34 | 22 46 35 | 17 35 36 | 16 31 37 | 5 13 38 | 7 16 39 | 13 26 40 | 5 9 41 | 22 45 42 | 6 11 43 | 16 35 44 | 13 28 45 | 10 22 46 | 5 10 47 | 14 27 48 | 9 16 49 | 21 43 50 | 6 11 51 | 16 35 52 | 17 34 53 | 21 43 54 | 10 21 55 | 9 16 56 | 9 20 57 | 20 42 58 | 6 12 59 | 8 16 60 | 14 26 61 | 14 27 62 | 8 14 63 | 7 13 64 | 20 43 65 | 9 18 66 | 14 28 67 | 14 28 68 | 15 30 69 | 14 28 70 | 6 12 71 | 12 25 72 | 16 34 73 | 6 13 74 | 7 17 75 | 11 21 76 | 11 20 77 | 10 19 78 | 13 25 79 | 21 43 80 | 12 24 81 | 6 15 82 | 22 42 83 | 17 36 84 | 10 20 85 | 22 45 86 | 5 9 87 | 8 18 88 | 19 39 89 | 6 14 90 | 9 19 91 | 20 41 92 | 19 40 93 | 16 35 94 | 19 41 95 | 6 13 96 | 8 17 97 | 15 30 98 | 21 43 99 | 6 11 100 | 24 46 101 | 19 41 102 | 9 17 103 | 16 32 104 | 12 24 105 | 8 15 106 | 21 43 107 | 16 33 108 | 19 38 109 | 24 50 110 | 8 15 111 | 16 35 112 | 15 31 113 | 20 39 114 | 10 18 115 | 16 34 116 | 11 24 117 | 21 45 118 | 21 42 119 | 12 27 120 | 19 39 121 | 24 46 122 | 21 45 123 | 23 49 124 | 13 25 125 | 10 18 126 | 20 43 127 | 13 26 128 | 19 40 129 | 13 25 130 | 131 | -------------------------------------------------------------------------------- /inputs/uts/huge.input: -------------------------------------------------------------------------------- 1 | 2000 0.4999995 2 559 1 157063495159 758577 78531748579 2 | #-----------------------------------------------------------------------------# 3 | # Sample UTS Workloads: 4 | # 5 | # This file contains sample workloads for UTS, along with the tree statistics 6 | # for verifying correct output from the benchmark. 7 | # 8 | #-----------------------------------------------------------------------------# 9 | # Wicked Large Workload (~160 billion nodes): 10 | #-----------------------------------------------------------------------------# 11 | #----------------------------------- inputs ----------------------------------# 12 | # root branching factor: 2000 13 | # probability of non-leaf node: 0.4999995 14 | # number of children for non-leaf node: 2 15 | # root seed 0 <= r < 2^31: 559 16 | # compute granularity: 1 17 | #---------------------------------- outputs ----------------------------------# 18 | # Binomial Tree size = T3WL: Tree size = 157063495159, tree depth = 758577, num leaves = 78531748579 (50.00%) 19 | #-----------------------------------------------------------------------------# 20 | 21 | 22 | -------------------------------------------------------------------------------- /inputs/uts/large.input: -------------------------------------------------------------------------------- 1 | 2000 0.499999995 2 0 1 10612052303 216370 5306027151 2 | #-----------------------------------------------------------------------------# 3 | # Sample UTS Workloads: 4 | # 5 | # This file contains sample workloads for UTS, along with the tree statistics 6 | # for verifying correct output from the benchmark. 7 | # 8 | #-----------------------------------------------------------------------------# 9 | # Large Workload (~10 billion nodes): 10 | #-----------------------------------------------------------------------------# 11 | #----------------------------------- inputs ----------------------------------# 12 | # root branching factor: 2000 13 | # probability of non-leaf node: 0.4999995 14 | # number of children for non-leaf node: 2 15 | # root seed 0 <= r < 2^31: 0 16 | # compute granularity: 1 17 | #---------------------------------- outputs ----------------------------------# 18 | # Binomial Tree size = 10612052303, tree depth = 216370, num leaves = 5306027151 (50.00%) 19 | #-----------------------------------------------------------------------------# 20 | 21 | 22 | -------------------------------------------------------------------------------- /inputs/uts/medium.input: -------------------------------------------------------------------------------- 1 | 2000 0.333344 3 23 1 1606963542 1 1 2 | #-----------------------------------------------------------------------------# 3 | # Sample UTS Workloads: 4 | # 5 | # This file contains sample workloads for UTS, along with the tree statistics 6 | # for verifying correct output from the benchmark. 7 | # 8 | #-----------------------------------------------------------------------------# 9 | # Medium Workload (~1.5 billion nodes): 10 | #-----------------------------------------------------------------------------# 11 | #----------------------------------- inputs ----------------------------------# 12 | # root branching factor: 2000 13 | # probability of non-leaf node: 0.333344 14 | # number of children for non-leaf node: 3 15 | # root seed 0 <= r < 2^31: 23 16 | # compute granularity: 1 17 | #---------------------------------- outputs ----------------------------------# 18 | # Binomial Tree size = 1606963584 ? 1606963542, tree depth = ?, num leaves = ? (??.??%) 19 | #-----------------------------------------------------------------------------# 20 | 21 | -------------------------------------------------------------------------------- /inputs/uts/small.input: -------------------------------------------------------------------------------- 1 | 2000 0.200014 5 7 1 111345631 17844 89076904 2 | #-----------------------------------------------------------------------------# 3 | # Sample UTS Workloads: 4 | # 5 | # This file contains sample workloads for UTS, along with the tree statistics 6 | # for verifying correct output from the benchmark. 7 | # 8 | #-----------------------------------------------------------------------------# 9 | # Small Workload (~100 million nodes): 10 | #-----------------------------------------------------------------------------# 11 | #----------------------------------- inputs ----------------------------------# 12 | # root branching factor: 2000 13 | # probability of non-leaf node: 0.200014 14 | # number of children for non-leaf node: 5 15 | # root seed 0 <= r < 2^31: 7 16 | # compute granularity: 1 17 | #---------------------------------- outputs ----------------------------------# 18 | # (T3S) Binomial Tree size = 111345631, tree depth = 17844, num leaves = 89076904 (80.00%) 19 | #-----------------------------------------------------------------------------# 20 | 21 | 22 | -------------------------------------------------------------------------------- /inputs/uts/test.input: -------------------------------------------------------------------------------- 1 | 2000 0.124875 8 42 1 4112897 1572 3599034 2 | #-----------------------------------------------------------------------------# 3 | # Sample UTS Workloads: 4 | # 5 | # This file contains sample workloads for UTS, along with the tree statistics 6 | # for verifying correct output from the benchmark. 7 | # 8 | #-----------------------------------------------------------------------------# 9 | # Test Workload (~4 million nodes): 10 | #-----------------------------------------------------------------------------# 11 | #----------------------------------- inputs ----------------------------------# 12 | # root branching factor: 2000 13 | # probability of non-leaf node: 0.124875 14 | # number of children for non-leaf node: 8 15 | # root seed 0 <= r < 2^31: 42 16 | # compute granularity: 1 17 | #---------------------------------- outputs ----------------------------------# 18 | # Binomial Tree size = 4112897, tree depth = 1572, num leaves = 3599034 (87.51%) 19 | #-----------------------------------------------------------------------------# 20 | 21 | 22 | -------------------------------------------------------------------------------- /inputs/uts/tiny.input: -------------------------------------------------------------------------------- 1 | 2000 0.333332 3 8 1 30399117 1 1 2 | #-----------------------------------------------------------------------------# 3 | # Sample UTS Workloads: 4 | # 5 | # This file contains sample workloads for UTS, along with the tree statistics 6 | # for verifying correct output from the benchmark. 7 | # 8 | #-----------------------------------------------------------------------------# 9 | # Tiny Workload (~30 million nodes): 10 | #-----------------------------------------------------------------------------# 11 | #----------------------------------- inputs ----------------------------------# 12 | # root branching factor: 2000 13 | # probability of non-leaf node: 0.333332 14 | # number of children for non-leaf node: 3 15 | # root seed 0 <= r < 2^31: 8 16 | # compute granularity: 1 17 | #---------------------------------- outputs ----------------------------------# 18 | # Binomial Tree size = 30399116, tree depth = ?, num leaves = ? (??.??%) 19 | #-----------------------------------------------------------------------------# 20 | 21 | 22 | -------------------------------------------------------------------------------- /omp-tasks/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | DIRS=fib alignment nqueens sort strassen sparselu fft floorplan health uts 22 | 23 | RECURSIVE=all-recursive clean-recursive dist-clean-recursive 24 | 25 | all: all-recursive 26 | clean: clean-recursive 27 | dist-clean: dist-clean-recursive 28 | 29 | $(RECURSIVE): 30 | @failcom='exit 1';\ 31 | target=`echo $@ | sed s/-recursive//`; \ 32 | for subdir in $(DIRS); do \ 33 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ 34 | || eval $$failcom; \ 35 | done; 36 | 37 | dist: dist-clean 38 | echo "TODO" 39 | 40 | -------------------------------------------------------------------------------- /omp-tasks/Makefile.version: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | VERSION=omp-tasks 22 | -------------------------------------------------------------------------------- /omp-tasks/alignment/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | DIRS=alignment_single alignment_for 22 | 23 | RECURSIVE=all-recursive clean-recursive dist-clean-recursive 24 | 25 | all: all-recursive 26 | clean: clean-recursive 27 | dist-clean: dist-clean-recursive 28 | 29 | $(RECURSIVE): 30 | @failcom='exit 1';\ 31 | target=`echo $@ | sed s/-recursive//`; \ 32 | for subdir in $(DIRS); do \ 33 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ 34 | || eval $$failcom; \ 35 | done; 36 | 37 | dist: dist-clean 38 | echo "TODO" 39 | 40 | -------------------------------------------------------------------------------- /omp-tasks/alignment/alignment_for/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | BASE_DIR = ../../../ 22 | LIBS= -lm 23 | TIED_VERSIONS=yes 24 | PROGRAM_OBJS=alignment.o sequence.o 25 | 26 | # 27 | # Don't change below here 28 | # 29 | 30 | include ../../Makefile.version 31 | include $(BASE_DIR)/common/Makefile.common 32 | 33 | 34 | -------------------------------------------------------------------------------- /omp-tasks/alignment/alignment_for/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "omp-tasks-app.h" 22 | 23 | #define BOTS_APP_NAME "Protein alignment (For version)" 24 | #define BOTS_APP_PARAMETERS_DESC "%s" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 26 | 27 | #define BOTS_APP_USES_ARG_FILE 28 | #define BOTS_APP_DESC_ARG_FILE "Protein sequences file (mandatory)" 29 | 30 | void pairalign_init(char *); 31 | void align_init (); 32 | void align (); 33 | void align_end (); 34 | void align_seq_init (); 35 | void align_seq (); 36 | int align_verify (); 37 | 38 | 39 | #define BOTS_APP_INIT pairalign_init(bots_arg_file) 40 | 41 | #define KERNEL_INIT align_init() 42 | #define KERNEL_CALL align() 43 | #define KERNEL_FINI align_end() 44 | 45 | #define KERNEL_SEQ_INIT align_seq_init() 46 | #define KERNEL_SEQ_CALL align_seq() 47 | //#define KERNEL_SEQ_FINI 48 | 49 | #define KERNEL_CHECK align_verify() 50 | #define BOTS_APP_CHECK_USES_SEQ_RESULT 51 | 52 | -------------------------------------------------------------------------------- /omp-tasks/alignment/alignment_for/sequence.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | 22 | /* Original code from the Application Kernel Matrix by Cray */ 23 | /* that was based on the ClustalW application */ 24 | 25 | #ifndef SEQUENCE_H 26 | #define SEQUENCE_H 27 | 28 | size_t strlcpy(char *dst, const char *src, size_t size); 29 | void fill_chartab(char *chartab); 30 | void encode(char *seq, char *naseq, int l); 31 | void alloc_aln(int nseqs); 32 | char * get_seq(char *sname, int *len, char *chartab, FILE *fin); 33 | int readseqs(char *filename); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /omp-tasks/alignment/alignment_for/sequence_extern.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | /* Original code from the Application Kernel Matrix by Cray */ 22 | /* that was based on the ClustalW application */ 23 | 24 | #ifndef SEQUENCE_EXTERN_H 25 | #define SEQUENCE_EXTERN_H 26 | 27 | extern int *seqlen_array; 28 | extern int nseqs, gap_pos2; 29 | extern char **args, **names, **seq_array, *amino_acid_codes; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /omp-tasks/alignment/alignment_single/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | BASE_DIR = ../../../ 22 | LIBS= -lm 23 | TIED_VERSIONS=yes 24 | PROGRAM_OBJS=alignment.o sequence.o 25 | 26 | # 27 | # Don't change below here 28 | # 29 | 30 | include ../../Makefile.version 31 | include $(BASE_DIR)/common/Makefile.common 32 | 33 | 34 | -------------------------------------------------------------------------------- /omp-tasks/alignment/alignment_single/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "omp-tasks-app.h" 22 | 23 | #define BOTS_APP_NAME "Protein alignment (Single version)" 24 | #define BOTS_APP_PARAMETERS_DESC "%s" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 26 | 27 | #define BOTS_APP_USES_ARG_FILE 28 | #define BOTS_APP_DESC_ARG_FILE "Protein sequences file (mandatory)" 29 | 30 | void pairalign_init(char *); 31 | void align_init (); 32 | void align (); 33 | void align_end (); 34 | void align_seq_init (); 35 | void align_seq (); 36 | int align_verify (); 37 | 38 | 39 | #define BOTS_APP_INIT pairalign_init(bots_arg_file) 40 | 41 | #define KERNEL_INIT align_init() 42 | #define KERNEL_CALL align() 43 | #define KERNEL_FINI align_end() 44 | 45 | #define KERNEL_SEQ_INIT align_seq_init() 46 | #define KERNEL_SEQ_CALL align_seq() 47 | //#define KERNEL_SEQ_FINI 48 | 49 | #define KERNEL_CHECK align_verify() 50 | #define BOTS_APP_CHECK_USES_SEQ_RESULT 51 | 52 | -------------------------------------------------------------------------------- /omp-tasks/alignment/alignment_single/sequence.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | /* Original code from the Application Kernel Matrix by Cray */ 22 | /* that was based on the ClustalW application */ 23 | 24 | #ifndef SEQUENCE_H 25 | #define SEQUENCE_H 26 | 27 | size_t strlcpy(char *dst, const char *src, size_t size); 28 | void fill_chartab(char *chartab); 29 | void encode(char *seq, char *naseq, int l); 30 | void alloc_aln(int nseqs); 31 | char * get_seq(char *sname, int *len, char *chartab, FILE *fin); 32 | int readseqs(char *filename); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /omp-tasks/alignment/alignment_single/sequence_extern.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | /* Original code from the Application Kernel Matrix by Cray */ 22 | /* that was based on the ClustalW application */ 23 | 24 | #ifndef SEQUENCE_EXTERN_H 25 | #define SEQUENCE_EXTERN_H 26 | 27 | extern int *seqlen_array; 28 | extern int nseqs, gap_pos2; 29 | extern char **args, **names, **seq_array, *amino_acid_codes; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /omp-tasks/concom/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | TIED_VERSIONS = yes 25 | 26 | BASE_DIR = ../../ 27 | 28 | # 29 | # Don't change below here 30 | # 31 | 32 | include ../Makefile.version 33 | include $(BASE_DIR)/common/Makefile.common 34 | 35 | 36 | -------------------------------------------------------------------------------- /omp-tasks/fft/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | #PROGRAM_OBJS= 23 | 24 | TIED_VERSIONS = yes 25 | 26 | BASE_DIR = ../../ 27 | 28 | # 29 | # Don't change below here 30 | # 31 | 32 | include ../Makefile.version 33 | include $(BASE_DIR)/common/Makefile.common 34 | 35 | 36 | -------------------------------------------------------------------------------- /omp-tasks/fib/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause final 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /omp-tasks/fib/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "omp-tasks-app.h" 22 | 23 | #define BOTS_APP_NAME "Fibonacci" 24 | #define BOTS_APP_PARAMETERS_DESC "N=%d" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size 26 | 27 | #define BOTS_APP_USES_ARG_SIZE 28 | #define BOTS_APP_DEF_ARG_SIZE 10 29 | #define BOTS_APP_DESC_ARG_SIZE "Number to compute" 30 | 31 | int fib_verify(int); 32 | void fib0 (int); 33 | void fib0_seq (int); 34 | 35 | //#define KERNEL_INIT 36 | #define KERNEL_CALL fib0(bots_arg_size) 37 | //#define KERNEL_FINI 38 | 39 | //#define KERNEL_SEQ_INIT 40 | #define KERNEL_SEQ_CALL fib0_seq(bots_arg_size) 41 | //#define KERNEL_SEQ_FINI 42 | 43 | 44 | #define KERNEL_CHECK fib_verify(bots_arg_size) 45 | 46 | #define BOTS_CUTOFF_DEF_VALUE 10 47 | 48 | -------------------------------------------------------------------------------- /omp-tasks/fib/fib.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | #ifndef FIB_H 21 | #define FIB_H 22 | #if defined(IF_CUTOFF) 23 | long long fib (int n,int d); 24 | #elif defined(FINAL_CUTOFF) 25 | long long fib (int n,int d); 26 | #elif defined(MANUAL_CUTOFF) 27 | long long fib (int n,int d); 28 | #else 29 | long long fib (int n); 30 | #endif 31 | 32 | long long fib_seq (int n); 33 | 34 | void fib0 (int n); 35 | void fib0_seq (int n); 36 | 37 | int fib_verify (int n); 38 | long long fib_verify_value(int n); 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /omp-tasks/floorplan/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause final 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /omp-tasks/floorplan/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "omp-tasks-app.h" 22 | 23 | #define BOTS_APP_NAME "Floorplan" 24 | #define BOTS_APP_PARAMETERS_DESC "%s" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 26 | 27 | #define BOTS_APP_USES_ARG_FILE 28 | #define BOTS_APP_DESC_ARG_FILE "Cell description file (mandatory)" 29 | 30 | #define BOTS_CUTOFF_DEF_VALUE 5 31 | 32 | void floorplan_init(char *); 33 | void floorplan_end (void); 34 | void compute_floorplan(void); 35 | int floorplan_verify(void); 36 | 37 | #define KERNEL_INIT floorplan_init(bots_arg_file) 38 | #define KERNEL_CALL compute_floorplan() 39 | #define KERNEL_FINI floorplan_end() 40 | 41 | #define KERNEL_CHECK floorplan_verify() 42 | 43 | 44 | -------------------------------------------------------------------------------- /omp-tasks/health/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = YES 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /omp-tasks/health/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "omp-tasks-app.h" 22 | #include "health.h" 23 | 24 | #define BOTS_APP_NAME "Health" 25 | #define BOTS_APP_PARAMETERS_DESC "%s" 26 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 27 | 28 | //#define BOTS_APP_SELF_TIMING 29 | 30 | #define BOTS_APP_USES_ARG_FILE 31 | #define BOTS_APP_DEF_ARG_FILE "Input filename" 32 | #define BOTS_APP_DESC_ARG_FILE "Health input file (mandatory)" 33 | 34 | #define BOTS_CUTOFF_DEF_VALUE 2 35 | 36 | #define BOTS_APP_INIT \ 37 | struct Village *top;\ 38 | read_input_data(bots_arg_file); 39 | 40 | #define KERNEL_INIT \ 41 | allocate_village(&top, NULL, NULL, sim_level, 0); 42 | 43 | #define KERNEL_CALL sim_village_main_par(top); 44 | 45 | #define KERNEL_FINI 46 | 47 | //#define KERNEL_SEQ_INIT 48 | //#define KERNEL_SEQ_CALL 49 | //#define KERNEL_SEQ_FINI 50 | 51 | #define KERNEL_CHECK check_village(top); 52 | 53 | -------------------------------------------------------------------------------- /omp-tasks/knapsack/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /omp-tasks/nqueens/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause final 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /omp-tasks/nqueens/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "omp-tasks-app.h" 22 | 23 | #define BOTS_APP_NAME "N Queens" 24 | #define BOTS_APP_PARAMETERS_DESC "N=%d" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size 26 | 27 | #define BOTS_APP_USES_ARG_SIZE 28 | #define BOTS_APP_DEF_ARG_SIZE 14 29 | #define BOTS_APP_DESC_ARG_SIZE "Board size" 30 | 31 | int ok(int n, char *a); 32 | 33 | #ifndef FORCE_TIED_TASKS 34 | void nqueens(int n, int j, char *a, int *solutions, int depth); 35 | #else 36 | void nqueens(int n, int j, char *a, int depth); 37 | #endif 38 | 39 | #ifndef FORCE_TIED_TASKS 40 | void nqueens_ser (int n, int j, char *a, int *solutions); 41 | #else 42 | void nqueens_ser (int n, int j, char *a); 43 | #endif 44 | 45 | int verify_queens(int); 46 | void find_queens (int); 47 | 48 | #define KERNEL_CALL find_queens(bots_arg_size) 49 | #define KERNEL_CHECK verify_queens(bots_arg_size) 50 | 51 | #define BOTS_CUTOFF_DEF_VALUE 3 52 | -------------------------------------------------------------------------------- /omp-tasks/sort/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | TIED_VERSIONS = yes 25 | 26 | BASE_DIR = ../../ 27 | 28 | # 29 | # Don't change below here 30 | # 31 | 32 | include ../Makefile.version 33 | include $(BASE_DIR)/common/Makefile.common 34 | 35 | 36 | -------------------------------------------------------------------------------- /omp-tasks/sparselu/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | DIRS=sparselu_single sparselu_for 22 | 23 | RECURSIVE=all-recursive clean-recursive dist-clean-recursive 24 | 25 | all: all-recursive 26 | clean: clean-recursive 27 | dist-clean: dist-clean-recursive 28 | 29 | $(RECURSIVE): 30 | @failcom='exit 1';\ 31 | target=`echo $@ | sed s/-recursive//`; \ 32 | for subdir in $(DIRS); do \ 33 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ 34 | || eval $$failcom; \ 35 | done; 36 | 37 | dist: dist-clean 38 | echo "TODO" 39 | 40 | -------------------------------------------------------------------------------- /omp-tasks/sparselu/sparselu_for/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | TIED_VERSIONS = yes 25 | 26 | BASE_DIR = ../../../ 27 | 28 | # 29 | # Don't change below here 30 | # 31 | 32 | include ../../Makefile.version 33 | include $(BASE_DIR)/common/Makefile.common 34 | 35 | 36 | -------------------------------------------------------------------------------- /omp-tasks/sparselu/sparselu_for/sparselu.h: -------------------------------------------------------------------------------- 1 | #ifndef SPARSELU_H 2 | #define SPARSELU_H 3 | 4 | #define EPSILON 1.0E-6 5 | 6 | int checkmat (float *M, float *N); 7 | void genmat (float *M[]); 8 | void print_structure(char *name, float *M[]); 9 | float * allocate_clean_block(); 10 | void lu0(float *diag); 11 | void bdiv(float *diag, float *row); 12 | void bmod(float *row, float *col, float *inner); 13 | void fwd(float *diag, float *col); 14 | 15 | void sparselu_init (float ***pBENCH, char *pass); 16 | void sparselu(float **BENCH); 17 | void sparselu_fini (float **BENCH, char *pass); 18 | 19 | void sparselu_seq_call(float **BENCH); 20 | void sparselu_par_call(float **BENCH); 21 | 22 | int sparselu_check(float **SEQ, float **BENCH); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /omp-tasks/sparselu/sparselu_single/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | TIED_VERSIONS = yes 25 | 26 | BASE_DIR = ../../../ 27 | 28 | # 29 | # Don't change below here 30 | # 31 | 32 | include ../../Makefile.version 33 | include $(BASE_DIR)/common/Makefile.common 34 | 35 | 36 | -------------------------------------------------------------------------------- /omp-tasks/sparselu/sparselu_single/sparselu.h: -------------------------------------------------------------------------------- 1 | #ifndef SPARSELU_H 2 | #define SPARSELU_H 3 | 4 | #define EPSILON 1.0E-6 5 | 6 | int checkmat (float *M, float *N); 7 | void genmat (float *M[]); 8 | void print_structure(char *name, float *M[]); 9 | float * allocate_clean_block(); 10 | void lu0(float *diag); 11 | void bdiv(float *diag, float *row); 12 | void bmod(float *row, float *col, float *inner); 13 | void fwd(float *diag, float *col); 14 | 15 | void sparselu_init (float ***pBENCH, char *pass); 16 | void sparselu(float **BENCH); 17 | void sparselu_fini (float **BENCH, char *pass); 18 | 19 | void sparselu_seq_call(float **BENCH); 20 | void sparselu_par_call(float **BENCH); 21 | 22 | int sparselu_check(float **SEQ, float **BENCH); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /omp-tasks/strassen/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /omp-tasks/uts/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | PROGRAM_OBJS=uts.o brg_sha1.o 23 | 24 | #CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = YES 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /omp-tasks/uts/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | #include "omp-tasks-app.h" 21 | #include "uts.h" 22 | 23 | #define BOTS_APP_NAME "Unbalance Tree Search" 24 | #define BOTS_APP_PARAMETERS_DESC "%s" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 26 | 27 | #define BOTS_APP_USES_ARG_FILE 28 | #define BOTS_APP_DEF_ARG_FILE "Input filename" 29 | #define BOTS_APP_DESC_ARG_FILE "UTS input file (mandatory)" 30 | 31 | #define BOTS_APP_INIT \ 32 | Node root; \ 33 | uts_read_file(bots_arg_file); 34 | 35 | #define KERNEL_INIT uts_initRoot(&root); 36 | 37 | unsigned long long parallel_uts ( Node *); 38 | 39 | #define KERNEL_CALL bots_number_of_tasks = parallel_uts(&root); 40 | 41 | #define KERNEL_FINI uts_show_stats(); 42 | 43 | #define KERNEL_CHECK uts_check_result(); 44 | 45 | 46 | -------------------------------------------------------------------------------- /omp-tasks/uts/uts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ---- The Unbalanced Tree Search (UTS) Benchmark ---- 3 | * 4 | * This file is part of the unbalanced tree search benchmark. This 5 | * project is licensed under the MIT Open Source license. See the LICENSE 6 | * file for copyright and licensing information. 7 | * 8 | * UTS is a collaborative project between researchers at the University of 9 | * Maryland, the University of North Carolina at Chapel Hill, and the Ohio 10 | * State University. See AUTHORS file for more information. 11 | * 12 | * ** THIS IS A PRE-RELEASE VERSION OF UTS. ** 13 | */ 14 | 15 | #ifndef _UTS_H 16 | #define _UTS_H 17 | 18 | #include "brg_sha1.h" 19 | 20 | #define UTS_VERSION "2.1" 21 | 22 | /*********************************************************** 23 | * Tree node descriptor and statistics * 24 | ***********************************************************/ 25 | 26 | #define MAXNUMCHILDREN 100 // cap on children (BIN root is exempt) 27 | 28 | struct node_t { 29 | int height; // depth of this node in the tree 30 | int numChildren; // number of children, -1 => not yet determined 31 | 32 | /* for RNG state associated with this node */ 33 | struct state_t state; 34 | }; 35 | 36 | typedef struct node_t Node; 37 | 38 | /* Tree type 39 | * Trees are generated using a Galton-Watson process, in 40 | * which the branching factor of each node is a random 41 | * variable. 42 | * 43 | * The random variable can follow a binomial distribution 44 | * or a geometric distribution. Hybrid tree are 45 | * generated with geometric distributions near the 46 | * root and binomial distributions towards the leaves. 47 | */ 48 | /* Tree parameters */ 49 | extern double b_0; 50 | extern int rootId; 51 | extern int nonLeafBF; 52 | extern double nonLeafProb; 53 | 54 | /* Benchmark parameters */ 55 | extern int computeGranularity; 56 | extern int debug; 57 | extern int verbose; 58 | 59 | /* Utility Functions */ 60 | #define max(a,b) (((a) > (b)) ? (a) : (b)) 61 | #define min(a,b) (((a) < (b)) ? (a) : (b)) 62 | 63 | unsigned long long parTreeSearch(int depth, Node *parent, int numChildren); 64 | 65 | int uts_paramsToStr(char *strBuf, int ind); 66 | void uts_read_file(char *file); 67 | void uts_print_params(); 68 | 69 | double rng_toProb(int n); 70 | 71 | /* Common tree routines */ 72 | void uts_initRoot(Node * root); 73 | int uts_numChildren(Node *parent); 74 | int uts_numChildren_bin(Node * parent); 75 | int uts_numChildren_geo(Node * parent); 76 | int uts_childType(Node *parent); 77 | 78 | void uts_show_stats( void ); 79 | int uts_check_result ( void ); 80 | 81 | #endif /* _UTS_H */ 82 | -------------------------------------------------------------------------------- /ompss/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #DIRS=fib alignment nqueens sort strassen sparselu fft floorplan health uts 22 | DIRS=fib 23 | 24 | RECURSIVE=all-recursive clean-recursive dist-clean-recursive 25 | 26 | all: all-recursive 27 | clean: clean-recursive 28 | dist-clean: dist-clean-recursive 29 | 30 | $(RECURSIVE): 31 | @failcom='exit 1';\ 32 | target=`echo $@ | sed s/-recursive//`; \ 33 | for subdir in $(DIRS); do \ 34 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ 35 | || eval $$failcom; \ 36 | done; 37 | 38 | dist: dist-clean 39 | echo "TODO" 40 | 41 | -------------------------------------------------------------------------------- /ompss/Makefile.version: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | VERSION=ompss 22 | -------------------------------------------------------------------------------- /ompss/fft/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | #PROGRAM_OBJS= 23 | 24 | TIED_VERSIONS = yes 25 | 26 | BASE_DIR = ../../ 27 | 28 | # 29 | # Don't change below here 30 | # 31 | 32 | include ../Makefile.version 33 | include $(BASE_DIR)/common/Makefile.common 34 | 35 | 36 | -------------------------------------------------------------------------------- /ompss/fft/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "ompss-app.h" 22 | #include "fft.h" 23 | 24 | #define BOTS_APP_NAME "FFT" 25 | #define BOTS_APP_PARAMETERS_DESC "Size=%d" 26 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size 27 | 28 | #define BOTS_APP_USES_ARG_SIZE 29 | #define BOTS_APP_DEF_ARG_SIZE 32*1024*1024 30 | #define BOTS_APP_DESC_ARG_SIZE "Matrix Size" 31 | 32 | #define BOTS_APP_INIT int i;\ 33 | COMPLEX *in, *out1=NULL, *out2=NULL;\ 34 | in = malloc(bots_arg_size * sizeof(COMPLEX));\ 35 | 36 | #define KERNEL_INIT\ 37 | out1 = malloc(bots_arg_size * sizeof(COMPLEX));\ 38 | for (i = 0; i < bots_arg_size; ++i) {\ 39 | c_re(in[i]) = 1.0;\ 40 | c_im(in[i]) = 1.0;\ 41 | } 42 | #define KERNEL_CALL fft(bots_arg_size, in, out1); 43 | #define KERNEL_FINI 44 | 45 | #define KERNEL_SEQ_INIT\ 46 | out2 = malloc(bots_arg_size * sizeof(COMPLEX));\ 47 | for (i = 0; i < bots_arg_size; ++i) {\ 48 | c_re(in[i]) = 1.0;\ 49 | c_im(in[i]) = 1.0;\ 50 | } 51 | #define KERNEL_SEQ_CALL fft_seq(bots_arg_size, in, out2); 52 | #define KERNEL_SEQ_FINI 53 | 54 | #define BOTS_APP_CHECK_USES_SEQ_RESULT 55 | #define KERNEL_CHECK test_correctness(bots_arg_size, out1, out2) 56 | 57 | -------------------------------------------------------------------------------- /ompss/fib/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause final 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /ompss/fib/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "ompss-app.h" 22 | 23 | #define BOTS_APP_NAME "Fibonacci" 24 | #define BOTS_APP_PARAMETERS_DESC "N=%d" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size 26 | 27 | #define BOTS_APP_USES_ARG_SIZE 28 | #define BOTS_APP_DEF_ARG_SIZE 10 29 | #define BOTS_APP_DESC_ARG_SIZE "Number to compute" 30 | 31 | int fib_verify(int); 32 | void fib0 (int); 33 | void fib0_seq (int); 34 | 35 | //#define KERNEL_INIT 36 | #define KERNEL_CALL fib0(bots_arg_size) 37 | //#define KERNEL_FINI 38 | 39 | //#define KERNEL_SEQ_INIT 40 | #define KERNEL_SEQ_CALL fib0_seq(bots_arg_size) 41 | //#define KERNEL_SEQ_FINI 42 | 43 | 44 | #define KERNEL_CHECK fib_verify(bots_arg_size) 45 | 46 | #define BOTS_CUTOFF_DEF_VALUE 10 47 | 48 | -------------------------------------------------------------------------------- /ompss/fib/fib.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | #ifndef FIB_H 21 | #define FIB_H 22 | #if defined(IF_CUTOFF) 23 | long long fib (int n,int d); 24 | #elif defined(FINAL_CUTOFF) 25 | long long fib (int n,int d); 26 | #elif defined(MANUAL_CUTOFF) 27 | long long fib (int n,int d); 28 | #else 29 | long long fib (int n); 30 | #endif 31 | 32 | long long fib_seq (int n); 33 | 34 | void fib0 (int n); 35 | void fib0_seq (int n); 36 | 37 | int fib_verify (int n); 38 | long long fib_verify_value(int n); 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /ompss/floorplan/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause final 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /ompss/floorplan/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "ompss-app.h" 22 | 23 | #define BOTS_APP_NAME "Floorplan" 24 | #define BOTS_APP_PARAMETERS_DESC "%s" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 26 | 27 | #define BOTS_APP_USES_ARG_FILE 28 | #define BOTS_APP_DESC_ARG_FILE "Cell description file (mandatory)" 29 | 30 | #define BOTS_CUTOFF_DEF_VALUE 5 31 | 32 | void floorplan_init(char *); 33 | void floorplan_end (void); 34 | void compute_floorplan(void); 35 | int floorplan_verify(void); 36 | 37 | #define KERNEL_INIT floorplan_init(bots_arg_file) 38 | #define KERNEL_CALL compute_floorplan() 39 | #define KERNEL_FINI floorplan_end() 40 | 41 | #define KERNEL_CHECK floorplan_verify() 42 | 43 | 44 | -------------------------------------------------------------------------------- /ompss/health/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = YES 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /ompss/health/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "ompss-app.h" 22 | #include "health.h" 23 | 24 | #define BOTS_APP_NAME "Health" 25 | #define BOTS_APP_PARAMETERS_DESC "%s" 26 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 27 | 28 | //#define BOTS_APP_SELF_TIMING 29 | 30 | #define BOTS_APP_USES_ARG_FILE 31 | #define BOTS_APP_DEF_ARG_FILE "Input filename" 32 | #define BOTS_APP_DESC_ARG_FILE "Health input file (mandatory)" 33 | 34 | #define BOTS_CUTOFF_DEF_VALUE 2 35 | 36 | #define BOTS_APP_INIT \ 37 | struct Village *top;\ 38 | read_input_data(bots_arg_file); 39 | 40 | #define KERNEL_INIT \ 41 | allocate_village(&top, NULL, NULL, sim_level, 0); 42 | 43 | #define KERNEL_CALL sim_village_main_par(top); 44 | 45 | #define KERNEL_FINI 46 | 47 | //#define KERNEL_SEQ_INIT 48 | //#define KERNEL_SEQ_CALL 49 | //#define KERNEL_SEQ_FINI 50 | 51 | #define KERNEL_CHECK check_village(top); 52 | 53 | -------------------------------------------------------------------------------- /ompss/nqueens/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause final 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /ompss/nqueens/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "ompss-app.h" 22 | 23 | #define BOTS_APP_NAME "N Queens" 24 | #define BOTS_APP_PARAMETERS_DESC "N=%d" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size 26 | 27 | #define BOTS_APP_USES_ARG_SIZE 28 | #define BOTS_APP_DEF_ARG_SIZE 14 29 | #define BOTS_APP_DESC_ARG_SIZE "Board size" 30 | 31 | int ok(int n, char *a); 32 | 33 | void nqueens(int n, int j, char *a, int *solutions, int depth); 34 | 35 | void nqueens_ser (int n, int j, char *a, int *solutions); 36 | 37 | int verify_queens(int); 38 | void find_queens (int); 39 | 40 | #define KERNEL_CALL find_queens(bots_arg_size) 41 | #define KERNEL_CHECK verify_queens(bots_arg_size) 42 | 43 | #define BOTS_CUTOFF_DEF_VALUE 3 44 | -------------------------------------------------------------------------------- /ompss/sort/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | TIED_VERSIONS = yes 25 | 26 | BASE_DIR = ../../ 27 | 28 | # 29 | # Don't change below here 30 | # 31 | 32 | include ../Makefile.version 33 | include $(BASE_DIR)/common/Makefile.common 34 | 35 | 36 | -------------------------------------------------------------------------------- /ompss/strassen/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /ompss/uts/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | PROGRAM_OBJS=uts.o brg_sha1.o 23 | 24 | #CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = YES 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /ompss/uts/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | #include "ompss-app.h" 21 | #include "uts.h" 22 | 23 | #define BOTS_APP_NAME "Unbalance Tree Search" 24 | #define BOTS_APP_PARAMETERS_DESC "%s" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 26 | 27 | #define BOTS_APP_USES_ARG_FILE 28 | #define BOTS_APP_DEF_ARG_FILE "Input filename" 29 | #define BOTS_APP_DESC_ARG_FILE "UTS input file (mandatory)" 30 | 31 | #define BOTS_APP_INIT \ 32 | Node root; \ 33 | uts_read_file(bots_arg_file); 34 | 35 | #define KERNEL_INIT uts_initRoot(&root); 36 | 37 | unsigned long long parallel_uts ( Node *); 38 | 39 | #define KERNEL_CALL bots_number_of_tasks = parallel_uts(&root); 40 | 41 | #define KERNEL_FINI uts_show_stats(); 42 | 43 | #define KERNEL_CHECK uts_check_result(); 44 | 45 | 46 | -------------------------------------------------------------------------------- /ompss/uts/uts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ---- The Unbalanced Tree Search (UTS) Benchmark ---- 3 | * 4 | * This file is part of the unbalanced tree search benchmark. This 5 | * project is licensed under the MIT Open Source license. See the LICENSE 6 | * file for copyright and licensing information. 7 | * 8 | * UTS is a collaborative project between researchers at the University of 9 | * Maryland, the University of North Carolina at Chapel Hill, and the Ohio 10 | * State University. See AUTHORS file for more information. 11 | * 12 | * ** THIS IS A PRE-RELEASE VERSION OF UTS. ** 13 | */ 14 | 15 | #ifndef _UTS_H 16 | #define _UTS_H 17 | 18 | #include "brg_sha1.h" 19 | 20 | #define UTS_VERSION "2.1" 21 | 22 | /*********************************************************** 23 | * Tree node descriptor and statistics * 24 | ***********************************************************/ 25 | 26 | #define MAXNUMCHILDREN 100 // cap on children (BIN root is exempt) 27 | 28 | struct node_t { 29 | int height; // depth of this node in the tree 30 | int numChildren; // number of children, -1 => not yet determined 31 | 32 | /* for RNG state associated with this node */ 33 | struct state_t state; 34 | }; 35 | 36 | typedef struct node_t Node; 37 | 38 | /* Tree type 39 | * Trees are generated using a Galton-Watson process, in 40 | * which the branching factor of each node is a random 41 | * variable. 42 | * 43 | * The random variable can follow a binomial distribution 44 | * or a geometric distribution. Hybrid tree are 45 | * generated with geometric distributions near the 46 | * root and binomial distributions towards the leaves. 47 | */ 48 | /* Tree parameters */ 49 | extern double b_0; 50 | extern int rootId; 51 | extern int nonLeafBF; 52 | extern double nonLeafProb; 53 | 54 | /* Benchmark parameters */ 55 | extern int computeGranularity; 56 | extern int debug; 57 | extern int verbose; 58 | 59 | /* Utility Functions */ 60 | #define max(a,b) (((a) > (b)) ? (a) : (b)) 61 | #define min(a,b) (((a) < (b)) ? (a) : (b)) 62 | 63 | unsigned long long parTreeSearch(int depth, Node *parent, int numChildren); 64 | 65 | int uts_paramsToStr(char *strBuf, int ind); 66 | void uts_read_file(char *file); 67 | void uts_print_params(); 68 | 69 | double rng_toProb(int n); 70 | 71 | /* Common tree routines */ 72 | void uts_initRoot(Node * root); 73 | int uts_numChildren(Node *parent); 74 | int uts_numChildren_bin(Node * parent); 75 | int uts_numChildren_geo(Node * parent); 76 | int uts_childType(Node *parent); 77 | 78 | void uts_show_stats( void ); 79 | int uts_check_result ( void ); 80 | 81 | #endif /* _UTS_H */ 82 | -------------------------------------------------------------------------------- /pack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | VERSION=1.1.2 4 | 5 | make clean 6 | mkdir bots 7 | cp -ar common/ config inputs/ omp-tasks/ serial run/ bots 8 | cp -a configure Makefile bots 9 | rm -fr bots/omp-tasks/concom/ bots/omp-tasks/knapsack/ bots/inputs/knapsack/ bots/config/make.config 10 | rm -fr bots/run/run-knapsack.sh 11 | find bots -type f -print0 | xargs -0 chmod a-w 12 | tar --exclude=*svn* -zcf bots-$VERSION.tar.gz bots 13 | rm -fr bots 14 | -------------------------------------------------------------------------------- /run/run-alignment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=prot.100.aa 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_files 14 | 15 | -------------------------------------------------------------------------------- /run/run-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | BASE_DIR=$(dirname $0)/.. 5 | RUN_DIR=$BASE_DIR/run 6 | 7 | for script in $RUN_DIR/run-*.sh; do 8 | script=$(basename $script) 9 | 10 | app=${script%*.sh} 11 | app=${app#run-} 12 | 13 | [ "$app" = "all" ] && continue; 14 | 15 | 16 | $RUN_DIR/$script $* 17 | done 18 | 19 | 20 | -------------------------------------------------------------------------------- /run/run-fft.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=$((32*1024*1024)) 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_sizes 14 | 15 | -------------------------------------------------------------------------------- /run/run-fib.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=20 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_sizes 14 | 15 | -------------------------------------------------------------------------------- /run/run-floorplan.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=input.20 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_files 14 | 15 | -------------------------------------------------------------------------------- /run/run-health.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=medium.input 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_files 14 | 15 | -------------------------------------------------------------------------------- /run/run-knapsack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=knapsack-036.input 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_files 14 | 15 | -------------------------------------------------------------------------------- /run/run-nqueens.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=14 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_sizes 14 | 15 | -------------------------------------------------------------------------------- /run/run-sort.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=$((32*1024*1024)) 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_sizes 14 | 15 | -------------------------------------------------------------------------------- /run/run-sparselu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=25x25 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_pairs 14 | 15 | -------------------------------------------------------------------------------- /run/run-strassen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=1024 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_sizes 14 | 15 | -------------------------------------------------------------------------------- /run/run-uts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #defaults 3 | 4 | DEF_INPUTS=medium.input 5 | 6 | #don't modify from here 7 | 8 | BASE_DIR=$(dirname $0)/.. 9 | source $BASE_DIR/run/run.common 10 | 11 | parse_args $* 12 | set_values 13 | exec_all_files 14 | 15 | -------------------------------------------------------------------------------- /serial/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | DIRS=fib alignment nqueens sort strassen sparselu fft floorplan health uts 22 | 23 | RECURSIVE=all-recursive clean-recursive dist-clean-recursive 24 | 25 | all: all-recursive 26 | clean: clean-recursive 27 | dist-clean: dist-clean-recursive 28 | 29 | $(RECURSIVE): 30 | @failcom='exit 1';\ 31 | target=`echo $@ | sed s/-recursive//`; \ 32 | for subdir in $(DIRS); do \ 33 | (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \ 34 | || eval $$failcom; \ 35 | done; 36 | 37 | dist: dist-clean 38 | echo "TODO" 39 | 40 | -------------------------------------------------------------------------------- /serial/Makefile.version: -------------------------------------------------------------------------------- 1 | VERSION=serial 2 | -------------------------------------------------------------------------------- /serial/alignment/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | BASE_DIR = ../../ 22 | LIBS= -lm 23 | PROGRAM_OBJS=alignment.o sequence.o 24 | 25 | # 26 | # Don't change below here 27 | # 28 | 29 | include ../Makefile.version 30 | include $(BASE_DIR)/common/Makefile.common 31 | 32 | 33 | -------------------------------------------------------------------------------- /serial/alignment/alignment.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | /* Original code from the Application Kernel Matrix by Cray */ 22 | /* that was based on the ClustalW application */ 23 | 24 | #ifndef ALIGNMENT_H 25 | #define ALIGNMENT_H 26 | 27 | #define EOS '\0' 28 | #define MAXLINE 512 29 | 30 | #define NUMRES 32 /* max size of comparison matrix */ 31 | #define MAXNAMES 30 /* max chars read for seq. names */ 32 | #define FILENAMELEN 256 /* max file name length */ 33 | 34 | void del(int k, int *print_ptr, int *last_print, int *displ); 35 | void add(int v, int *print_ptr, int *last_print, int *displ); 36 | int calc_score(int iat, int jat, int v1, int v2, int seq1, int seq2); 37 | int get_matrix(int *matptr, int *xref, int scale); 38 | void forward_pass(char *ia, char *ib, int n, int m, int *se1, int *se2, int *maxscore, int g, int gh); 39 | void reverse_pass(char *ia, char *ib, int se1, int se2, int *sb1, int *sb2, int maxscore, int g, int gh); 40 | int diff(int A, int B, int M, int N, int tb, int te, int *pr_ptr, int *last_print, int *displ, int seq1, int seq2, int g, int gh); 41 | double tracepath(int tsb1, int tsb2, int *print_ptr, int *displ, int seq1, int seq2); 42 | 43 | void init_matrix(void); 44 | void pairalign_init(char *filename); 45 | int pairalign(); 46 | void align_init(); 47 | void align(); 48 | void align_seq_init(); 49 | void align_seq(); 50 | void align_end(); 51 | int align_verify(); 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /serial/alignment/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "serial-app.h" 22 | 23 | #define BOTS_APP_NAME "Protein alignment" 24 | #define BOTS_APP_PARAMETERS_DESC "%s" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 26 | 27 | #define BOTS_APP_USES_ARG_FILE 28 | #define BOTS_APP_DESC_ARG_FILE "Protein sequences file (mandatory)" 29 | 30 | void pairalign_init(char *); 31 | void align_init (); 32 | void align (); 33 | void align_end (); 34 | int align_verify (); 35 | 36 | 37 | #define BOTS_APP_INIT pairalign_init(bots_arg_file) 38 | 39 | #define KERNEL_INIT align_init() 40 | #define KERNEL_CALL align() 41 | #define KERNEL_FINI align_end() 42 | 43 | //#define KERNEL_SEQ_INIT 44 | //#define KERNEL_SEQ_CALL 45 | //#define KERNEL_SEQ_FINI 46 | 47 | #define KERNEL_CHECK BOTS_RESULT_NA 48 | 49 | -------------------------------------------------------------------------------- /serial/alignment/param.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | /* Original code from the Application Kernel Matrix by Cray */ 22 | /* that was based on the ClustalW application */ 23 | 24 | char *amino_acid_order = "ABCDEFGHIKLMNPQRSTVWXYZ"; 25 | char *amino_acid_codes = "ABCDEFGHIKLMNPQRSTUVWXYZ-"; 26 | 27 | int gon250mt[]={ 28 | 24, 29 | 0, 0, 30 | 5, 0, 115, 31 | -3, 0, -32, 47, 32 | 0, 0, -30, 27, 36, 33 | -23, 0, -8, -45, -39, 70, 34 | 5, 0, -20, 1, -8, -52, 66, 35 | -8, 0, -13, 4, 4, -1, -14, 60, 36 | -8, 0, -11, -38, -27, 10, -45, -22, 40, 37 | -4, 0, -28, 5, 12, -33, -11, 6, -21, 32, 38 | -12, 0, -15, -40, -28, 20, -44, -19, 28, -21, 40, 39 | -7, 0, -9, -30, -20, 16, -35, -13, 25, -14, 28, 43, 40 | -3, 0, -18, 22, 9, -31, 4, 12, -28, 8, -30, -22, 38, 41 | 3, 0, -31, -7, -5, -38, -16, -11, -26, -6, -23, -24, -9, 76, 42 | -2, 0, -24, 9, 17, -26, -10, 12, -19, 15, -16, -10, 7, -2, 27, 43 | -6, 0, -22, -3, 4, -32, -10, 6, -24, 27, -22, -17, 3, -9, 15, 47, 44 | 11, 0, 1, 5, 2, -28, 4, -2, -18, 1, -21, -14, 9, 4, 2, -2, 22, 45 | 6, 0, -5, 0, -1, -22, -11, -3, -6, 1, -13, -6, 5, 1, 0, -2, 15, 25, 46 | 1, 0, 0, -29, -19, 1, -33, -20, 31, -17, 18, 16, -22, -18, -15, -20, -10, 0, 34, 47 | -36, 0, -10, -52, -43, 36, -40, -8, -18, -35, -7, -10, -36, -50, -27, -16, -33, -35, -26, 142, 48 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49 | -22, 0, -5, -28, -27, 51, -40, 22, -7, -21, 0, -2, -14, -31, -17, -18, -19, -19, -11, 41, 0, 78, 50 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 51 | -------------------------------------------------------------------------------- /serial/alignment/sequence.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | /* Original code from the Application Kernel Matrix by Cray */ 22 | /* that was based on the ClustalW application */ 23 | 24 | #ifndef SEQUENCE_H 25 | #define SEQUENCE_H 26 | 27 | size_t strlcpy(char *dst, const char *src, size_t size); 28 | void fill_chartab(char *chartab); 29 | void encode(char *seq, char *naseq, int l); 30 | void alloc_aln(int nseqs); 31 | char * get_seq(char *sname, int *len, char *chartab, FILE *fin); 32 | int readseqs(char *filename); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /serial/alignment/sequence_extern.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | /* Original code from the Application Kernel Matrix by Cray */ 22 | /* that was based on the ClustalW application */ 23 | 24 | #ifndef SEQUENCE_EXTERN_H 25 | #define SEQUENCE_EXTERN_H 26 | 27 | extern int *seqlen_array; 28 | extern int nseqs, gap_pos2; 29 | extern char **args, **names, **seq_array, *amino_acid_codes; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /serial/fft/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | #PROGRAM_OBJS= 23 | 24 | TIED_VERSIONS = yes 25 | 26 | BASE_DIR = ../../ 27 | 28 | # 29 | # Don't change below here 30 | # 31 | 32 | include ../Makefile.version 33 | include $(BASE_DIR)/common/Makefile.common 34 | 35 | 36 | -------------------------------------------------------------------------------- /serial/fft/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "serial-app.h" 22 | #include "fft.h" 23 | 24 | #define BOTS_APP_NAME "FFT" 25 | #define BOTS_APP_PARAMETERS_DESC "Size=%d" 26 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size 27 | 28 | #define BOTS_APP_USES_ARG_SIZE 29 | #define BOTS_APP_DEF_ARG_SIZE 32*1024*1024 30 | #define BOTS_APP_DESC_ARG_SIZE "Matrix Size" 31 | 32 | void fft(int n, COMPLEX * in, COMPLEX * out); 33 | 34 | #define BOTS_APP_INIT int i;\ 35 | COMPLEX *in, *out1;\ 36 | in = (COMPLEX *)malloc(bots_arg_size * sizeof(COMPLEX));\ 37 | 38 | #define KERNEL_INIT\ 39 | out1 = (COMPLEX *)malloc(bots_arg_size * sizeof(COMPLEX));\ 40 | for (i = 0; i < bots_arg_size; ++i) {\ 41 | c_re(in[i]) = 1.0;\ 42 | c_im(in[i]) = 1.0;\ 43 | } 44 | #define KERNEL_CALL fft(bots_arg_size, in, out1); 45 | #define KERNEL_FINI 46 | 47 | #define KERNEL_CHECK BOTS_RESULT_NA; 48 | 49 | -------------------------------------------------------------------------------- /serial/fib/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /serial/fib/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "serial-app.h" 22 | 23 | #define BOTS_APP_NAME "Fibonacci" 24 | #define BOTS_APP_PARAMETERS_DESC "N=%d" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size 26 | 27 | 28 | #define BOTS_APP_USES_ARG_SIZE 29 | #define BOTS_APP_DEF_ARG_SIZE 10 30 | #define BOTS_APP_DESC_ARG_SIZE "Number to compute" 31 | 32 | void fib (int); 33 | void fib0 (int); 34 | 35 | //#define KERNEL_INIT 36 | #define KERNEL_CALL fib0(bots_arg_size) 37 | //#define KERNEL_FINI 38 | 39 | //#define KERNEL_SEQ_INIT 40 | //#define KERNEL_SEQ_CALL 41 | //#define KERNEL_SEQ_FINI 42 | 43 | 44 | #define KERNEL_CHECK BOTS_RESULT_NA 45 | -------------------------------------------------------------------------------- /serial/fib/fib.c: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "bots.h" 22 | #include "fib.h" 23 | 24 | static long long res; 25 | 26 | long long fib (int n) 27 | { 28 | long long x, y; 29 | if (n < 2) return n; 30 | 31 | x = fib(n - 1); 32 | y = fib(n - 2); 33 | 34 | return x + y; 35 | } 36 | 37 | void fib0 (int n) 38 | { 39 | res = fib(n); 40 | bots_message("Fibonacci result for %d is %lld\n",n,res); 41 | } 42 | 43 | -------------------------------------------------------------------------------- /serial/fib/fib.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | #ifndef FIB_H 21 | #define FIB_H 22 | long long fib (int n); 23 | void fib0 (int n); 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /serial/floorplan/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | CUTOFF_VERSIONS = manual if_clause 25 | TIED_VERSIONS = yes 26 | 27 | BASE_DIR = ../../ 28 | 29 | # 30 | # Don't change below here 31 | # 32 | 33 | include ../Makefile.version 34 | include $(BASE_DIR)/common/Makefile.common 35 | 36 | 37 | -------------------------------------------------------------------------------- /serial/floorplan/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "serial-app.h" 22 | 23 | #define BOTS_APP_NAME "Floorplan" 24 | #define BOTS_APP_PARAMETERS_DESC "%s" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 26 | 27 | #define BOTS_APP_USES_ARG_FILE 28 | #define BOTS_APP_DESC_ARG_FILE "Cell description file (mandatory)" 29 | 30 | #define BOTS_CUTOFF_DEF_VALUE 5 31 | 32 | void floorplan_init(char *); 33 | void floorplan_end (void); 34 | void compute_floorplan(void); 35 | int floorplan_verify(void); 36 | 37 | #define KERNEL_INIT floorplan_init(bots_arg_file) 38 | #define KERNEL_CALL compute_floorplan() 39 | #define KERNEL_FINI floorplan_end() 40 | 41 | #define KERNEL_CHECK floorplan_verify() 42 | 43 | 44 | -------------------------------------------------------------------------------- /serial/health/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | #PROGRAM_OBJS= 23 | 24 | BASE_DIR = ../../ 25 | 26 | # 27 | # Don't change below here 28 | # 29 | 30 | include ../Makefile.version 31 | include $(BASE_DIR)/common/Makefile.common 32 | 33 | 34 | -------------------------------------------------------------------------------- /serial/health/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "serial-app.h" 22 | #include "health.h" 23 | 24 | #define BOTS_APP_NAME "Health" 25 | #define BOTS_APP_PARAMETERS_DESC "%s" 26 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 27 | 28 | #define BOTS_APP_USES_ARG_FILE 29 | #define BOTS_APP_DEF_ARG_FILE "Input filename" 30 | #define BOTS_APP_DESC_ARG_FILE "Health input file (mandatory)" 31 | 32 | #define BOTS_APP_INIT \ 33 | struct Village *top;\ 34 | read_input_data(bots_arg_file); 35 | 36 | #define KERNEL_INIT \ 37 | allocate_village(&top, NULL, NULL, sim_level, 0); 38 | 39 | #define KERNEL_CALL sim_village_main(top); 40 | #define KERNEL_FINI 41 | 42 | #define KERNEL_CHECK check_village(top); 43 | 44 | -------------------------------------------------------------------------------- /serial/knapsack/Makefile: -------------------------------------------------------------------------------- 1 | #LIBS = 2 | #PROGRAM_OBJS= 3 | 4 | BASE_DIR = ../../ 5 | 6 | # 7 | # Don't change below here 8 | # 9 | 10 | include ../Makefile.version 11 | include $(BASE_DIR)/common/Makefile.common 12 | 13 | 14 | -------------------------------------------------------------------------------- /serial/knapsack/app-desc.h: -------------------------------------------------------------------------------- 1 | #include "serial-app.h" 2 | 3 | #define BOTS_APP_NAME "Knapsack" 4 | #define BOTS_APP_PARAMETERS_DESC "%s" 5 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 6 | 7 | #define BOTS_APP_USES_ARG_FILE 8 | #define BOTS_APP_DEF_ARG_FILE "Input filename" 9 | #define BOTS_APP_DESC_ARG_FILE 10 | 11 | /* every item in the knapsack has a weight and a value */ 12 | #define MAX_ITEMS 256 13 | 14 | struct item { 15 | int value; 16 | int weight; 17 | }; 18 | 19 | int compare(struct item *a, struct item *b); 20 | int read_input(const char *filename, struct item *items, int *capacity, int *n); 21 | void knapsack(struct item *e, int c, int n, int v, int *sol); 22 | void knapsack_main (struct item *e, int c, int n, int *sol); 23 | 24 | #define BOTS_APP_INIT\ 25 | struct item items[MAX_ITEMS];\ 26 | int n, capacity;\ 27 | int sol = 0;\ 28 | read_input(bots_arg_file, items, &capacity, &n); 29 | 30 | #define KERNEL_INIT 31 | #define KERNEL_CALL knapsack_main(items, capacity, n, &sol); 32 | #define KERNEL_FINI 33 | 34 | //#define KERNEL_SEQ_INIT 35 | //#define KERNEL_SEQ_CALL 36 | //#define KERNEL_SEQ_FINI 37 | 38 | #define KERNEL_CHECK BOTS_RESULT_NA 39 | 40 | -------------------------------------------------------------------------------- /serial/nqueens/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | BASE_DIR = ../../ 25 | 26 | # 27 | # Don't change below here 28 | # 29 | 30 | include ../Makefile.version 31 | include $(BASE_DIR)/common/Makefile.common 32 | 33 | 34 | -------------------------------------------------------------------------------- /serial/nqueens/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "serial-app.h" 22 | 23 | #define BOTS_APP_NAME "N Queens" 24 | #define BOTS_APP_PARAMETERS_DESC "N=%d" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size 26 | 27 | #define BOTS_APP_USES_ARG_SIZE 28 | #define BOTS_APP_DEF_ARG_SIZE 14 29 | #define BOTS_APP_DESC_ARG_SIZE "Board size" 30 | 31 | int ok(int n, char *a); 32 | void nqueens (int n, int j, char *a, int *solutions); 33 | int verify_queens(int); 34 | void find_queens (int); 35 | 36 | #define KERNEL_CALL find_queens(bots_arg_size) 37 | 38 | #define KERNEL_CHECK verify_queens(bots_arg_size) 39 | 40 | -------------------------------------------------------------------------------- /serial/sort/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | BASE_DIR = ../../ 25 | 26 | # 27 | # Don't change below here 28 | # 29 | 30 | include ../Makefile.version 31 | include $(BASE_DIR)/common/Makefile.common 32 | 33 | 34 | -------------------------------------------------------------------------------- /serial/sparselu/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | BASE_DIR = ../../ 25 | 26 | # 27 | # Don't change below here 28 | # 29 | 30 | include ../Makefile.version 31 | include $(BASE_DIR)/common/Makefile.common 32 | 33 | 34 | -------------------------------------------------------------------------------- /serial/sparselu/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "serial-app.h" 22 | 23 | #define BOTS_APP_NAME "SparseLU" 24 | #define BOTS_APP_PARAMETERS_DESC "S1=%dx%d, S2=%dx%d" 25 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_size,bots_arg_size,bots_arg_size_1,bots_arg_size_1 26 | 27 | #define BOTS_APP_USES_ARG_SIZE 28 | #define BOTS_APP_DEF_ARG_SIZE 50 29 | #define BOTS_APP_DESC_ARG_SIZE "Matrix Size" 30 | 31 | #define BOTS_APP_USES_ARG_SIZE_1 32 | #define BOTS_APP_DEF_ARG_SIZE_1 100 33 | #define BOTS_APP_DESC_ARG_SIZE_1 "Submatrix Size" 34 | 35 | #define BOTS_APP_INIT float **SEQ; 36 | 37 | void sparselu_init(float ***pM, char *pass); 38 | void sparselu_fini(float **M, char *pass); 39 | void sparselu(float **SEQ); 40 | 41 | #define KERNEL_INIT sparselu_init(&SEQ,"serial"); 42 | #define KERNEL_CALL sparselu(SEQ); 43 | #define KERNEL_FINI sparselu_fini(SEQ,"serial"); 44 | 45 | #define KERNEL_CHECK BOTS_RESULT_NA; 46 | 47 | -------------------------------------------------------------------------------- /serial/sparselu/sparselu.h: -------------------------------------------------------------------------------- 1 | #ifndef SPARSELU_H 2 | #define SPARSELU_H 3 | 4 | #define EPSILON 1.0E-6 5 | 6 | int checkmat (float *M, float *N); 7 | void genmat (float *M[]); 8 | void print_structure(char *name, float *M[]); 9 | float * allocate_clean_block(); 10 | void lu0(float *diag); 11 | void bdiv(float *diag, float *row); 12 | void bmod(float *row, float *col, float *inner); 13 | void fwd(float *diag, float *col); 14 | 15 | void sparselu_init (float ***pBENCH, char *pass); 16 | void sparselu(float **BENCH); 17 | void sparselu_fini (float **BENCH, char *pass); 18 | 19 | #endif 20 | 21 | -------------------------------------------------------------------------------- /serial/strassen/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | #LIBS = 22 | #PROGRAM_OBJS= 23 | 24 | BASE_DIR = ../../ 25 | 26 | # 27 | # Don't change below here 28 | # 29 | 30 | include ../Makefile.version 31 | include $(BASE_DIR)/common/Makefile.common 32 | 33 | 34 | -------------------------------------------------------------------------------- /serial/uts/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################################################## 2 | # This program is part of the Barcelona OpenMP Tasks Suite # 3 | # Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion # 4 | # Copyright (C) 2009 Universitat Politecnica de Catalunya # 5 | # # 6 | # This program is free software; you can redistribute it and/or modify # 7 | # it under the terms of the GNU General Public License as published by # 8 | # the Free Software Foundation; either version 2 of the License, or # 9 | # (at your option) any later version. # 10 | # # 11 | # This program is distributed in the hope that it will be useful, # 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 14 | # GNU General Public License for more details. # 15 | # # 16 | # You should have received a copy of the GNU General Public License # 17 | # along with this program; if not, write to the Free Software # 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # 19 | ############################################################################################## 20 | 21 | LIBS = -lm 22 | PROGRAM_OBJS=uts.o brg_sha1.o 23 | 24 | BASE_DIR = ../../ 25 | 26 | # 27 | # Don't change below here 28 | # 29 | 30 | include ../Makefile.version 31 | include $(BASE_DIR)/common/Makefile.common 32 | 33 | 34 | -------------------------------------------------------------------------------- /serial/uts/app-desc.h: -------------------------------------------------------------------------------- 1 | /**********************************************************************************************/ 2 | /* This program is part of the Barcelona OpenMP Tasks Suite */ 3 | /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ 4 | /* Copyright (C) 2009 Universitat Politecnica de Catalunya */ 5 | /* */ 6 | /* This program is free software; you can redistribute it and/or modify */ 7 | /* it under the terms of the GNU General Public License as published by */ 8 | /* the Free Software Foundation; either version 2 of the License, or */ 9 | /* (at your option) any later version. */ 10 | /* */ 11 | /* This program is distributed in the hope that it will be useful, */ 12 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 13 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 14 | /* GNU General Public License for more details. */ 15 | /* */ 16 | /* You should have received a copy of the GNU General Public License */ 17 | /* along with this program; if not, write to the Free Software */ 18 | /* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | /**********************************************************************************************/ 20 | 21 | #include "serial-app.h" 22 | #include "uts.h" 23 | 24 | #define BOTS_APP_NAME "Unbalance Tree Search" 25 | #define BOTS_APP_PARAMETERS_DESC "%s" 26 | #define BOTS_APP_PARAMETERS_LIST ,bots_arg_file 27 | 28 | #define BOTS_APP_USES_ARG_FILE 29 | #define BOTS_APP_DEF_ARG_FILE "Input filename" 30 | #define BOTS_APP_DESC_ARG_FILE "UTS input file (mandatory)" 31 | 32 | #define BOTS_APP_INIT \ 33 | Node root; \ 34 | uts_read_file(bots_arg_file); 35 | 36 | #define KERNEL_INIT uts_initRoot(&root); 37 | 38 | unsigned long long serial_uts ( Node * ); 39 | 40 | #define KERNEL_CALL bots_number_of_tasks = serial_uts(&root); 41 | 42 | #define KERNEL_FINI uts_show_stats(); 43 | 44 | #define KERNEL_CHECK uts_check_result(); 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /serial/uts/uts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ---- The Unbalanced Tree Search (UTS) Benchmark ---- 3 | * 4 | * This file is part of the unbalanced tree search benchmark. This 5 | * project is licensed under the MIT Open Source license. See the LICENSE 6 | * file for copyright and licensing information. 7 | * 8 | * UTS is a collaborative project between researchers at the University of 9 | * Maryland, the University of North Carolina at Chapel Hill, and the Ohio 10 | * State University. See AUTHORS file for more information. 11 | * 12 | * ** THIS IS A PRE-RELEASE VERSION OF UTS. ** 13 | */ 14 | 15 | #ifndef _UTS_H 16 | #define _UTS_H 17 | 18 | #include "brg_sha1.h" 19 | 20 | #define UTS_VERSION "2.1" 21 | 22 | /*********************************************************** 23 | * Tree node descriptor and statistics * 24 | ***********************************************************/ 25 | 26 | #define MAXNUMCHILDREN 100 // cap on children (BIN root is exempt) 27 | 28 | struct node_t { 29 | int height; // depth of this node in the tree 30 | int numChildren; // number of children, -1 => not yet determined 31 | 32 | /* for RNG state associated with this node */ 33 | struct state_t state; 34 | }; 35 | 36 | typedef struct node_t Node; 37 | 38 | /* Tree parameters */ 39 | extern double b_0; 40 | extern int rootId; 41 | extern int nonLeafBF; 42 | extern double nonLeafProb; 43 | 44 | /* Benchmark parameters */ 45 | extern int computeGranularity; 46 | extern int debug; 47 | extern int verbose; 48 | 49 | /* Utility Functions */ 50 | #define max(a,b) (((a) > (b)) ? (a) : (b)) 51 | #define min(a,b) (((a) < (b)) ? (a) : (b)) 52 | 53 | unsigned long long serTreeSearch(int depth, Node *parent, int numChildren); 54 | 55 | int uts_paramsToStr(char *strBuf, int ind); 56 | void uts_read_file(char *file); 57 | void uts_print_params(); 58 | 59 | /* Common tree routines */ 60 | void uts_initRoot(Node * root); 61 | int uts_numChildren(Node *parent); 62 | int uts_numChildren_bin(Node * parent); 63 | int uts_numChildren_geo(Node * parent); 64 | int uts_childType(Node *parent); 65 | 66 | void uts_show_stats( void ); 67 | int uts_check_result ( void ); 68 | 69 | #endif /* _UTS_H */ 70 | --------------------------------------------------------------------------------