Comments (7)
That would be really nice. Passing ompss programs through valgrind is always a very painful process.
from nanox.
While I wouldn't mind to add such support, the Valgrind documentation states this warning about all the three client requests related to stacks:
Warning: Unfortunately, this client request is unreliable and best avoided.
Which makes me think whether this effort is worthwhile.
Have you considered to disable user-level threads when running Valgrind with OmpSs?
(export NX_ARGS+=' --disable-ut'
).
from nanox.
@vlopezh I didn't see these warnings. I have incorporated the Valgrind macros into my own UT runtime and hacked it into OmpSs (because the false positives made using Valgrind impossible).
Have you considered to disable user-level threads when running Valgrind with OmpSs?
(export NX_ARGS+=' --disable-ut').
How does that change the behavior of the runtime? Does that mean task execution is serialized? I cannot find documentation for it right of the hand...
from nanox.
Disabling User Threads (or ULT) does not mean to serialize task execution, but to avoid task migration among threads. It directly means that once a task is started in one thread, it will be tied to this thread and, after suspended (e.g., taskwait) it could not be resumed by another thread.
It corresponds, more or less, to the implementation of a tied task in OpenMP (which, by the way, is the default behaviour in this model).
from nanox.
I have incorporated the Valgrind macros into my own UT runtime and hacked it into OmpSs (because the false positives made using Valgrind impossible).
Could you circulate your implementation to have a clearer idea of the required changes and the parameters used.
from nanox.
It's by far not complete (misses deregistration) but it did the trick for me:
--- ompss-19.06/nanox-0.15/src/arch/smp/smpdd.cpp 2019-06-27 19:00:34.000000000 +0200
+++ ompss-19.06-valgrind/nanox-0.15/src/arch/smp/smpdd.cpp 2020-02-03 13:57:23.675151305 +0100
@@ -25,6 +25,7 @@
#include "taskexecutionexception.hpp"
#include "smpdevice.hpp"
#include "schedule.hpp"
+#include <valgrind/valgrind.h>
#include <string>
using namespace nanos;
@@ -88,6 +89,7 @@
if (isUserLevelThread) {
if (previous == NULL) {
_stack = (void *) NEW char[_stackSize];
+ VALGRIND_STACK_REGISTER(_stack, (void*)(((uintptr_t)_stack)+_stackSize));
verbose0(" new stack created: " << _stackSize << " bytes");
} else {
verbose0(" reusing stacks");
I didn't bother wrapping the valgrind calls in some nanox macros to disable them if needed. It could be sufficient to add another configure flag --enable-valgrind
that needs to be explicitly added.
from nanox.
Added feature in e4b5dbe.
Thank you.
from nanox.
Related Issues (10)
- build fails when chapel is set HOT 1
- nanox cluster runtime error
- --without configure options not respected HOT 1
- error: ‘TaskExecutionException’ does not name a type HOT 1
- jemalloc check not needed HOT 1
- error: non-static data member initializers only available with ‘-std=c++11’ or ‘-std=gnu++11’ [-Werror] HOT 1
- fatal error: stdlib.h: No such file or directory HOT 2
- Files with w+x sections
- test test/03_api/api_slicer_for.c hang
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanox.