-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ADOL-C thread-save #36
base: master
Are you sure you want to change the base?
Conversation
Christoph Hansknecht seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Hi @chrhansk, can you please provide kind of a minimal example serving as use case? Best regards |
@mflehmig: I added a test case which hopefully demonstrates the desired functionality. It does not work yet, there are apparently still some race conditions in the code. |
@chrhansk Thanks for the work. This is a very desired functionality. Do you have any update on that? |
@vryy: Admittedly, I lost interest a bit over the last years. I was interested in the functionality for multiple shooting approaches for ODEs, which of course permit parallelization easily enough. The problem is nontrivial due to the number of global variables used by ADOL-C. Every If you run the I think that the changes will be hard to make without anyone who knows the code well. So far however, this issues does not seem to have raised much interest so far. Do you need the functionality for a project yourself? |
Hi, currently nobody from the ADOL-C developer team works in the area of parallelization. Therefore, for us it is difficult to support improvements in this direction. I am sorry for that but happy to support anybody working in this direction! Best regards Andrea |
The code I'm working on performs element assembly & solve in parallel hence setting the thread to 1 slows everything down. I work around it by setting the number of threads for the solver in the code. Still, the assembly is pretty slow. Therefore, it would be nice to have this feature. |
nice work! |
Well, to reiterate, this was some initial draft. It does not work correctly. |
I ran into this, too, when trying to use ADOL-C with c++ As a first step it would be nice if one could at least evaluate functions/derivatives in parallel from a tape that has been recorded sequentially before. Unfortunately, this still fails for me with a segfault, although I would guess that this should conceptually not manipulate global/shared state. |
This is in response to #35 . My idea would be to make the current tape information
thread_local
and add synchronization based on standard C++ constructs, so there are no other libraries required.The key difference is that the OpenMP parallel functions are executed within ADOL-C itslef, whereas I would like to execute ADOL-C from several different threads created elsewhere...
This is not yet finished, there still seem to be some issues when running ADOL-C in parallel code...