[CppAD] Using Colpack

Brad Bell bradbell at seanet.com
Sun Jun 8 19:19:46 EDT 2014


Thanks for the heads up.

I added the ability to do multiple forward sweeps at the same time
     http://www.coin-or.org/CppAD/Doc/forward_dir.xml
because the forward sparse Jacobian speed test
     http://www.coin-or.org/CppAD/Doc/cppad_sparse_jacobian.cpp.xml
showed improvement with this option.

It appears that this is not always the case. In your copy of the file
https://projects.coin-or.org/CppAD/browser/trunk/cppad/local/sparse_jacobian.hpp
please try using the option
      # define CPPAD_SPARSE_JACOBIAN_MAX_MULTIPLE_DIRECTION 1
instead of
     # define CPPAD_SPARSE_JACOBIAN_MAX_MULTIPLE_DIRECTION 64
and see if this improves the speed for your case.



On 6/8/2014 8:58 AM, Braun, Michael wrote:
> I haven’t had a chance to do a formal test, but for my use cases, the newer version is substantially slower for gradients and sparse Hessians.  This is using the CppAD coloring, and not Colpack.  I’m not sure why that is, but there is clearly a difference when I include thelatest version.
>
> One thing I am sure would speed things up is not reallocating storage at each call to the sparse Hessian drivers.  Maybe it would be better to pass in the output array as an argument, or use C++11 moves when returning the sparse Hessian.
>
>
> On Jun 6, 2014, at 8:38 PM, Brad Bell <bradbell at seanet.com> wrote:
>
>> Sorry for the delay in replying. I am working on making large sparse calculations faster.  In doing so I have been trying different ideas. Using Colpack is one of them. The coloring does not seem to be much better, but perhaps the coloring algorithm is faster. Perhaps if one needs to retape for each evaulation it would be better ?
>>
>> The new speed test output how good the coloring is; see n_sweep at
>> http://www.coin-or.org/CppAD/Doc/link_sparse_jacobian.xml#n_sweep
>>
>>
>> On 6/4/2014 6:06 AM, Braun, Michael wrote:
>>> Is it possible (or even useful) to use Colpack with calls to ForSparseJac and RevSparseHes?  I see how I can use it for calls to the SparseJacobian drivers, but not the calls that generate only the sparsity patterns.
>>>
>>> Thanks.
>>>
>>>
>>> --------------------------------------------
>>> Michael Braun, Ph.D.
>>> Associate Professor of Marketing
>>> Cox School of Business
>>> Southern Methodist University
>>> braunm at smu.edu
>>>
>>>
>>>
>>> _______________________________________________
>>> CppAD mailing list
>>> CppAD at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/cppad
>>>
> --------------------------------------------
> Michael Braun, Ph.D.
> Associate Professor of Marketing
> Cox School of Business
> Southern Methodist University
> braunm at smu.edu
>
>
>



More information about the CppAD mailing list