[ADOL-C] using adolc with openmp
washinid at mcmaster.ca
Wed Mar 19 15:30:36 EDT 2014
Correct, I would need to create independent tapes of the same function
on one thread and, using a shared memory environment via openmp, select
the corresponding tape tag for the particular thread evaluating the
This now seems straightforward using shared memory, but what about in a
distributed memory situation via MPI? As you mention below, I guess this
is not possible yet to communicate the tape to different processes, and
thus I would need to re-tape the function for each process.
My actual application is a nonlinear program (NLP) which requires
independent DAE solves (solved in parallel) to evaluate the NLP
constraints. So, in the re-taping approach for each process, I would be
re-generating the tape for each constraint evaluation of the NLP
iterates over each processor (to get the Jacobian of the DAE system used
in a BDF algorithm). This seems very inefficient, particular for a large
DAE models on the order of 1000 equations and a large number of NLP
Possibly the tapeless forward AD tools of ADOLC are better suited to my
application; however, I need to generate sparse Jacobian matrices and it
is unclear from documentation how to do this. It seems only dense
derivatives via the tapeless forward mode are possible?
On 03/19/2014 03:15 AM, Andrea Walther wrote:
> Hi Ian,
>> Is it possible to only trace the function on one thread and then
>> simultaneously evaluate the derivatives (at different values) using
>> multiple threads?
> so far, it is not possible to create the tape only on thread and
> to distribute it subsequently.
> However, what does work is the following scenario:
> You create the tape one each threat like in the example libprpar.cpp
> in the examples directory of ADOL-C.
> Subsequently you can then change the values of the variables on each
> thread to evaluate the different instances of your problem.
> Hope this helps.
> Best regards
More information about the ADOL-C