Giter Site home page Giter Site logo

discopop-project / discopop Goto Github PK

View Code? Open in Web Editor NEW
33.0 5.0 18.0 9.02 MB

DiscoPoP - Discovery of Potential Parallelism

Home Page: http://www.discopop.org

License: BSD 3-Clause "New" or "Revised" License

CMake 0.55% C++ 19.16% Shell 1.89% C 0.41% Python 77.84% Makefile 0.05% Dockerfile 0.07% JavaScript 0.03%
parallelization llvm-pass instrumentation parallel-patterns llvm openmp-parallelization parallel-programming parallelism automatic-parallelization semi-automatic-parallelization

discopop's Introduction

DiscoPoP - Discovery of Potential Parallelism

DiscoPoP is an open-source tool that helps software developers parallelize their programs with threads. It is a joint project of the Laboratory for Parallel Programming @ TU Darmstadt and the Software Analytics and Pervasive Parallelism Lab at Iowa State University.

In a nutshell, DiscoPoP performs the following steps:

  • detect parts of the code (computational units or CUs) with little to no internal parallelization potential,
  • find data dependences among them,
  • identify parallel patterns that can be used to parallelize a code region,
  • and finally, suggest corresponding OpenMP parallelization constructs and clauses to programmers.

DiscoPoP is built on top of LLVM. Therefore, DiscoPoP can perform the above-mentioned steps on any source code that can be transferred into the LLVM IR.

A more comprehensive overview of DiscoPoP can be found on our project website.

Getting started

Follow the steps in setup to install DiscoPoP. To setup the Visual Studio Code Extension (recommended for general use of the framework), please follow these steps.

For a brief introduction to the VSCode Extension, please follow the walk-through example. For a brief introduction to the command line tools, please refer to the tools overview and follow the command-line walk-through example.

For detailed information on the gathered and stored data as well as the tools themselves, please refer to data and the pages of the individual tools in the tools overview.

TL;DR

This example installs DiscoPoP, instruments and builds the provided example, analyzes the results, and prints the identified parallelization suggestions to the console. In case any issues arise during the process, please refer to the detailed setup instructions, contact us via GitHub messages, or get in contact by mail to [email protected].

# setup DiscoPoP
git clone [email protected]:discopop-project/discopop.git
cd discopop
mkdir build && cd build
DP_BUILD=$(pwd)
cmake .. && make 
# instrument and build the example code
cd ../example
mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER=${DP_BUILD}/scripts/CXX_wrapper.sh .. && make
# execute instrumented code
./cmake_example
# identify parallel patterns
cd .discopop
discopop_explorer
# create applicable patches from patterns
discopop_patch_generator
# print patches to the console
for f in $(find patch_generator -maxdepth 1 -type d); do
    echo "SUGGESTION: $f"
    cat $f/1.patch 
    echo ""
done
# apply patch with id 1
discopop_patch_applicator -a 1
# reset code to the original state
discopop_patch_applicator -C

Exemplary output

The following is an automatically generated, exemplary output patch file generated and applicable as shown in the provided examples.

 --- /home/lukas/temp/discopop_tmp/discopop/example/example.cpp	2024-01-09 10:11:50.369555235 +0100
+++ /home/lukas/temp/discopop_tmp/discopop/example/example.cpp.discopop_patch_generator.temp	2024-01-09 11:14:20.904823624 +0100
@@ -20,6 +20,7 @@
         Arr[i] = i % 13;
     }
 
+    #pragma omp parallel for shared(Arr,N) reduction(+:sum) 
     for(int i = 0; i < N; i++){
         sum += Arr[i];
     }

License

© DiscoPoP is available under the terms of the BSD-3-Clause license, as specified in the LICENSE file.

discopop's People

Contributors

aandergr avatar aryamazaheri avatar dependabot[bot] avatar fgewolf avatar goerlibe avatar jannesari2017 avatar lukasrothenberger avatar monoattu avatar wntgd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

discopop's Issues

Add simple Github CI check to enforce Project tag in each file

Add a CI Rule to ensure that each file starts with the DiscoPoP project tag:

 * This file is part of the DiscoPoP software (http://www.discopop.tu-darmstadt.de)
 *
 * Copyright (c) 2020, Technische Universitaet Darmstadt, Germany
 *
 * This software may be modified and distributed under the terms of
 * the 3-Clause BSD License. See the LICENSE file in the package base
 * directory for details.

Missing nodes in generated Data.xml

Hello everyone,
there is an issue with the generation of the Data.xml file for some applications, especially from the BOTS and Starbench benchmark. For example the node with the ID 8:67 of the sort application from the BOTS benchmark is missing. This leads to an error when running the CU pattern detector, which requires the Data.xml file of an application. Mohammad has sent me a Python script to fix faulty Data.xml files by simply adding dummy nodes for missing nodes, but that leads to further problems when creating the dependencies for the PET.

@lukasrothenberger

Endings of header files (.h -> .hpp)

Some header files have .hpp endings and some have .h endings.
If there is no explicit reason for the .h endings (like actual C code), use .hpp for all headers.

Rely on pip to install discopop_explorer, _profiler and later _wizard

As of right now the documentation does not make use of the published "discopop" PyPI repository.

To change that, we should update the documentation to use it.

Additional effects:
The installation via pip allows to execute e.g. the discopop_explorer via the simple command discopop_explorer <flags> instead of the currently used version python -m discopop_explorer <flags>.

Segmentation fault when running CU Generation

When attempting to run CU Generation on current develop (e4251c3) on the codes in test/, I get a segmentation fault error with the following outputs:

mergesort:

$ clang++-8 -g -O0 -fno-discard-value-names -Xclang -load -Xclang /tmp/discopop-debug/libi/LLVMCUGeneration.so -mllvm -fm-path -mllvm ./FileMapping.txt -c mergesort.cpp 
Stack dump:
0.	Program arguments: /usr/lib/llvm-8/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name mergesort.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/ich/discopop/test/mergesort/mergesort.gcno -resource-dir /usr/lib/llvm-8/lib/clang/8.0.1 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -fdeprecated-macro -fdebug-compilation-dir /home/ich/discopop/test/mergesort -ferror-limit 19 -fmessage-length 237 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -load /tmp/discopop-debug/libi/LLVMCUGeneration.so -mllvm -fm-path -mllvm ./FileMapping.txt -o mergesort.o -x c++ mergesort.cpp -faddrsig 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'Function Pass Manager' on module 'mergesort.cpp'.
4.	Running pass 'CUGeneration' on function '@_Z5mergePiiii'
 #0 0x00007f6b19c4309f llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa9409f)
 #1 0x00007f6b19c414f0 llvm::sys::RunSignalHandlers() (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa924f0)
 #2 0x00007f6b19c434a8 (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa944a8)
 #3 0x00007f6b1cf4a730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
 #4 0x00007f6b189e27b8 llvm::DISubprogram::getLine() const /usr/lib/llvm-8/include/llvm/IR/DebugInfoMetadata.h:1780:37
 #5 0x00007f6b189d66a1 (anonymous namespace)::CUGeneration::createCUs(llvm::Region*, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> >&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> > > > >&, (anonymous namespace)::Node_struct*, llvm::LoopInfo&) /home/ich/discopop/CUGeneration/CUGenerationPass.cpp:931:79
 #6 0x00007f6b189d7ecb (anonymous namespace)::CUGeneration::runOnFunction(llvm::Function&) /home/ich/discopop/CUGeneration/CUGenerationPass.cpp:1213:14
 #7 0x00007f6b19d356e0 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb866e0)
 #8 0x00007f6b19d35953 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb86953)
 #9 0x00007f6b19d35d1e llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb86d1e)
#10 0x0000000000703ce1 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/lib/llvm-8/bin/clang+0x703ce1)
#11 0x0000000000d8782f (/usr/lib/llvm-8/bin/clang+0xd8782f)
#12 0x0000000001204873 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-8/bin/clang+0x1204873)
#13 0x0000000000b1013f clang::FrontendAction::Execute() (/usr/lib/llvm-8/bin/clang+0xb1013f)
#14 0x0000000000acdd38 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-8/bin/clang+0xacdd38)
#15 0x0000000000b965c6 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-8/bin/clang+0xb965c6)
#16 0x00000000006cb44a cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-8/bin/clang+0x6cb44a)
#17 0x00000000006c9946 main (/usr/lib/llvm-8/bin/clang+0x6c9946)
#18 0x00007f6b18cf109b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
#19 0x00000000006c703a _start (/usr/lib/llvm-8/bin/clang+0x6c703a)
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 8.0.1-3~bpo10+1 (tags/RELEASE_801/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

reduction:

$ clang++-8 -g -O0 -fno-discard-value-names -Xclang -load -Xclang /tmp/discopop-debug/libi/LLVMCUGeneration.so -mllvm -fm-path -mllvm ./FileMapping.txt -c reduction_test.c 
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
Stack dump:
0.	Program arguments: /usr/lib/llvm-8/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name reduction_test.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/ich/discopop/test/reduction/reduction_test.gcno -resource-dir /usr/lib/llvm-8/lib/clang/8.0.1 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -fdeprecated-macro -fdebug-compilation-dir /home/ich/discopop/test/reduction -ferror-limit 19 -fmessage-length 237 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -load /tmp/discopop-debug/libi/LLVMCUGeneration.so -mllvm -fm-path -mllvm ./FileMapping.txt -o reduction_test.o -x c++ reduction_test.c -faddrsig 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'Function Pass Manager' on module 'reduction_test.c'.
4.	Running pass 'CUGeneration' on function '@_Z9reductionv'
 #0 0x00007f592dff809f llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa9409f)
 #1 0x00007f592dff64f0 llvm::sys::RunSignalHandlers() (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa924f0)
 #2 0x00007f592dff84a8 (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa944a8)
 #3 0x00007f59312ff730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
 #4 0x00007f592cd977b8 llvm::DISubprogram::getLine() const /usr/lib/llvm-8/include/llvm/IR/DebugInfoMetadata.h:1780:37
 #5 0x00007f592cd8b6a1 (anonymous namespace)::CUGeneration::createCUs(llvm::Region*, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> >&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> > > > >&, (anonymous namespace)::Node_struct*, llvm::LoopInfo&) /home/ich/discopop/CUGeneration/CUGenerationPass.cpp:931:79
 #6 0x00007f592cd8cecb (anonymous namespace)::CUGeneration::runOnFunction(llvm::Function&) /home/ich/discopop/CUGeneration/CUGenerationPass.cpp:1213:14
 #7 0x00007f592e0ea6e0 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb866e0)
 #8 0x00007f592e0ea953 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb86953)
 #9 0x00007f592e0ead1e llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb86d1e)
#10 0x0000000000703ce1 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/lib/llvm-8/bin/clang+0x703ce1)
#11 0x0000000000d8782f (/usr/lib/llvm-8/bin/clang+0xd8782f)
#12 0x0000000001204873 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-8/bin/clang+0x1204873)
#13 0x0000000000b1013f clang::FrontendAction::Execute() (/usr/lib/llvm-8/bin/clang+0xb1013f)
#14 0x0000000000acdd38 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-8/bin/clang+0xacdd38)
#15 0x0000000000b965c6 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-8/bin/clang+0xb965c6)
#16 0x00000000006cb44a cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-8/bin/clang+0x6cb44a)
#17 0x00000000006c9946 main (/usr/lib/llvm-8/bin/clang+0x6c9946)
#18 0x00007f592d0a609b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
#19 0x00000000006c703a _start (/usr/lib/llvm-8/bin/clang+0x6c703a)
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 8.0.1-3~bpo10+1 (tags/RELEASE_801/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

simple_pipeline:

$ clang++-8 -g -O0 -fno-discard-value-names -Xclang -load -Xclang /tmp/discopop-debug/libi/LLVMCUGeneration.so -mllvm -fm-path -mllvm ./FileMapping.txt -c SimplePipeline.c 
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
free(): double free detected in tcache 2
Stack dump:
0.	Program arguments: /usr/lib/llvm-8/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name SimplePipeline.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-notes-file /home/ich/discopop/test/simple_pipeline/SimplePipeline.gcno -resource-dir /usr/lib/llvm-8/lib/clang/8.0.1 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -fdeprecated-macro -fdebug-compilation-dir /home/ich/discopop/test/simple_pipeline -ferror-limit 19 -fmessage-length 237 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -load /tmp/discopop-debug/libi/LLVMCUGeneration.so -mllvm -fm-path -mllvm ./FileMapping.txt -o SimplePipeline.o -x c++ SimplePipeline.c -faddrsig 
1.	<eof> parser at end of file
2.	Per-module optimization passes
3.	Running pass 'Function Pass Manager' on module 'SimplePipeline.c'.
4.	Running pass 'CUGeneration' on function '@_Z3fooii'
 #0 0x00007f0a4abb109f llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa9409f)
 #1 0x00007f0a4abaf4f0 llvm::sys::RunSignalHandlers() (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa924f0)
 #2 0x00007f0a4abb14a8 (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xa944a8)
 #3 0x00007f0a4deb8730 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
 #4 0x00007f0a49c727bb gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x377bb)
 #5 0x00007f0a49c5d535 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22535)
 #6 0x00007f0a49cb4508 (/lib/x86_64-linux-gnu/libc.so.6+0x79508)
 #7 0x00007f0a49cbac1a (/lib/x86_64-linux-gnu/libc.so.6+0x7fc1a)
 #8 0x00007f0a49cbc6fd (/lib/x86_64-linux-gnu/libc.so.6+0x816fd)
 #9 0x00007f0a49945319 (anonymous namespace)::CUGeneration::fillCUVariables(llvm::Region*, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> >&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<(anonymous namespace)::CU_struct*, std::allocator<(anonymous namespace)::CU_struct*> > > > >&) /home/ich/discopop/CUGeneration/CUGenerationPass.cpp:973:21
#10 0x00007f0a49945efa (anonymous namespace)::CUGeneration::runOnFunction(llvm::Function&) /home/ich/discopop/CUGeneration/CUGenerationPass.cpp:1217:28
#11 0x00007f0a4aca36e0 llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb866e0)
#12 0x00007f0a4aca3953 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb86953)
#13 0x00007f0a4aca3d1e llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib/x86_64-linux-gnu/libLLVM-8.so.1+0xb86d1e)
#14 0x0000000000703ce1 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/usr/lib/llvm-8/bin/clang+0x703ce1)
#15 0x0000000000d8782f (/usr/lib/llvm-8/bin/clang+0xd8782f)
#16 0x0000000001204873 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/llvm-8/bin/clang+0x1204873)
#17 0x0000000000b1013f clang::FrontendAction::Execute() (/usr/lib/llvm-8/bin/clang+0xb1013f)
#18 0x0000000000acdd38 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/llvm-8/bin/clang+0xacdd38)
#19 0x0000000000b965c6 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/llvm-8/bin/clang+0xb965c6)
#20 0x00000000006cb44a cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-8/bin/clang+0x6cb44a)
#21 0x00000000006c9946 main (/usr/lib/llvm-8/bin/clang+0x6c9946)
#22 0x00007f0a49c5f09b __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
#23 0x00000000006c703a _start (/usr/lib/llvm-8/bin/clang+0x6c703a)
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 8.0.1-3~bpo10+1 (tags/RELEASE_801/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Variable names not reported in CUs

The Data.xml file is lacking global variable names:

<globalVariables>
    <global type="i32*" defLine="1:5"></global>
</globalVariables> 

Expected:

<globalVariables>
    <global type="i32*" defLine="1:5">sum</global>
</globalVariables> 

It may well be the case that the same is true for the regular variables.

I suspect, that this problem occurs because no name can be retrieved from the return values of determineVariableName in DiscoPoP/DiscoPoP.cpp.

Move configuration options from source code to the build system

DiscoPoP allows some configuration of the built system.
However, this configuration is mostly done through variables within the source code.
Example:
#define DP_DEBUG false, located in discopop/DPInstrumentation/DPInstrumentation.cpp.

The configuration of the built system should not be done by modifying variables in the source code, but rather by setting respective flags during the build process.
Example:
cmake -D CMAKE_CXXFLAGS='-DP_DEBUG

Improve integration of the task parallelism detection

Currently, the task parallelism detection is not well integrated into the project and the execution is not trivial.
For this reason, it is excluded from the documentation at the moment.
To fix this issue, integrate the task parallelism detection better into the project and re-include it into the documentation.

Include optional loop-counting into DiscoPoP pass

Loop counting has happened as part of the Reduction pass previously.
Since this is not the case anymore, loop counting is not enabled at the moment and it may become relevant in the future, loop counting should become an optional part of the DiscoPoP pass.

10-Minute-Example

After merging #101 and potentially #105, a new, simple work-through example should be created.
The purpose of this example is to allow a user to execute DiscoPoP within roughly 10 Minutes, starting with the initial setup and ending with a set of created suggestions.
The following steps should be included in the example:

  • Setup (install packages + Python dependencies + CMake build)
  • Apply DiscoPoP to the provided example code
  • Display and interpret suggestions (Not in detail. Link to a Wiki page which describes the suggestions instead)
  • Implement suggestion (in a provided, parallelized copy of the source code)
  • Compile sequential and parallel version of the code
  • Execute sequential and parallel version of the code and compare execution times (example should result in a significant difference)

Incorporate generation of file mapping into the passes

As of right now it is necessary to execute scripts/dp-fmap prior to any other step in order to generate the required FileMapping.txt.

To further simplify the execution process and in particular the list of program arguments, it would be nice to incorporate the generation of the file mapping into the passes themselves and remove the FileMapping.txt entirely.

Note: Do not start working on this feature before the different passes have been merged.

Wiki: automatically create an archived version for each release

The Wiki should allow it to access a version created on the basis of a previous release.
This should allow to maintain a Wiki which is coherent with the current state of the master branch as well as previous releases.

An other option would be to append the Wiki to the assets which are created during the release.

Add Wiki entry: How to edit the Wiki

Since the wiki will be automatically overwritten on every push to the master branch, editing the wiki should not be done manually but rather through merge requests to the master branch.

This information needs to be added into the "How to contribute" section of the wiki

Wait for #111 before starting with this issue.

Split CI Actions

The current CI Actions perform multiple, independent tasks.
For an improved maintainability of the Actions, each should focus one or as small set of belonging aspects only.

Cleanup Readme.md

The README.md file should be short and only contain a brief description of DiscoPoP.
It's main purpose should be to link to the actual documentation.

Function call not recognized

i noticed there is no child dependency between main and function.
the function call refers to dummy in main, although the function name seems to be correct

#include <stdio.h>

int foo()
{
    return 42;
}


int main()
{
    foo();
    return 0;
}

Closest code to produce correct result is if you add any argument to the function

copy scripts during cmake build

    > @lukasrothenberger what do you think about copying the script during the cmake build into the build directory?
     It makes things easier for the user. The same applies to dp-fmap.

Probably a good idea, especially with out-of-source builds in mind.
Maybe this is a step towards being able to "discard" the source code after build.

Originally posted by @lukasrothenberger in #176 (comment)

  • copy dp-fmap script (8bcaf74)
  • copy runDiscoPoP script (8bcaf74)
  • update documentation (da884d5)
  • update invocation in GUI

Requirement for effective use of #238.

dummy issue

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Broken console output order

Commit: "pattern info serializable"
Commit ID: 0c1ef83

The order of the console output was broken by the mentioned commit.
Console output looks as follows:

===DETECTING REDUCTION===
===DETECTING DO ALL===
===DETECTING PIPELINE===
===DETECTING GEOMETRIC DECOMPOSITION===
===DETECTING TASK PARALLELISM===

etc.

Implement dynamic loop counting

Currently, the output of loop_counter_output.txt is filled with dummys (1000).
Since the loop counting will most probably become a relevant feature for the upcoming pattern filtering / ranking, this should be fixed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.