<div class="gmail_quote">On Wed, Jun 13, 2012 at 9:38 AM, <span dir="ltr"><<a href="mailto:dnystrom1@comcast.net" target="_blank">dnystrom1@comcast.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:Arial">I understand the issue of some uses of blas being too small to justify shipping to the gpu.<br>So I was thinking maybe petsc could choose at runtime based on problem size whether<br>
to use a cpu implementation of the blas or a gpu implementation of the blas. Seems like<br>that should be feasible but more complex than just having a petsc interface to substitute<br>use of cublas for everything.<br></div>
</div></blockquote><div><br></div><div>This shouldn't be our responsibility, especially considering that dense BLAS is basically only used by external packages (rather than by PETSc itself). We would welcome contributions in this regard, but there are thousands of better things for us to spend our time on.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:Arial"><br>Yes, I will back off tonight and try to work with a petsc example problem. I had to add<br>
an additional library to CHOLMOD.py to satisfy an unstatisfied external. I think it was<br>named libsuitesparseconfig.a and was needed to resolve the SuiteSparse_time symbol.<br>Would probably be good to have a SuiteSparse.py module. I'll send more info if I can<br>
reproduce the problem with a petsc example.<br></div></div></blockquote><div><br></div><div>I suggest copying either cholmod.py or umfpack.py to suitesparse.py. Make it install all the SuiteSparse packages. There are so many component inter-dependencies in SuiteSparse that I don't see any reason to install each component separately. It's easier to install the whole thing anyway.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:Arial"><br>Thanks,<br><br>Dave<br><br><hr><b>From: </b>"Jed Brown" <<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>><div class="im">
<br><b>To: </b>"Dave Nystrom" <<a href="mailto:dnystrom1@comcast.net" target="_blank">dnystrom1@comcast.net</a>><br><b>Cc: </b>"For users of the development version of PETSc" <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>><br>
</div><b>Sent: </b>Wednesday, June 13, 2012 7:41:05 AM<div class="im"><br><b>Subject: </b>Re: [petsc-dev] SuiteSparse 4.0<br><br></div><div><div class="h5"><p>You can't use cublas everywhere because it's better to do small sizes on the CPU and different threads need to be able to operate independently (without multiple devices).</p>
<p>Yes, try a PETSc example before your own code. Did petsc build without any changes to the cholmod interface? ALWAYS send the error message/stack trace---even if we don't have an answer, it usually tells us how difficult the problem is likely to be to fix.</p>
<div class="gmail_quote">On Jun 13, 2012 8:09 AM, "Dave Nystrom" <<a href="mailto:dnystrom1@comcast.net" target="_blank">dnystrom1@comcast.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Well, I tried it last night but without success. I got a memory corruption<br>
error when I tried running my app. I suppose I should try first to get it<br>
working with a petsc example. I'm building SuiteSparse but only using<br>
cholmod out of that package. Several of the SuiteSparse packages use blas<br>
but cholmod is the only one so far that has the option to use cublas. Tim<br>
gets about a 10x speedup over the single core result when using cublas on an<br>
example problem that spends a lot of time in blas. So seems worth trying.<br>
Anyway, I think I must be doing something wrong so far. But for the same<br>
problem, Tim gets about a 20+ percent speedup over using multi-threaded Goto<br>
blas.<br>
<br>
Probably a better solution for petsc would be support for using cublas for<br>
all of the petsc blas needs. Why should just one petsc blas client have<br>
access to cublas? But not sure how much work is involved for that - I see it<br>
is on the petsc ToDo list. I will try again tonight but would welcome advice<br>
or experiences from anyone else who has tried the new cholmod.<br>
<br>
Dave<br>
<br>
Jed Brown writes:<br>
> Nope, why don't you try it and send us a patch if you get it working.<br>
><br>
> On Wed, Jun 13, 2012 at 12:49 AM, Dave Nystrom <<a href="mailto:dnystrom1@comcast.net" target="_blank">dnystrom1@comcast.net</a>>wrote:<br>
><br>
> > Has anyone tried building petsc-dev to use cholmod-2.0 which is part of<br>
> > SuiteSparse-4.0 with the cholmod support for using cublas enabled? I am<br>
> > interested in trying the cublas support for cholmod to see how it compares<br>
> > with mkl and goto for my solves.<br>
> ><br>
> > Thanks,<br>
> ><br>
> > Dave<br>
> ><br>
</blockquote></div>
</div></div></div></div></blockquote></div><br>