Thank you for your help.

Using h5py I finally wrote a 10 lines python script that translates a real
hdf5 file to a complex one.

On Sun, Mar 18, 2012 at 8:57 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Sun, Mar 18, 2012 at 14:52, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>>  Just run your single code in complex numbers (where the nonlinear part
>> may have zero imaginary part). You are introducing a complicated work flow
>> (saving to files ...) (that is also not well supported in PETSc) just to
>> save some work on the nonlinear part when generally most nonlinear solvers
>> spend much more time in the linear solve than the nonlinear computations.
>> Make your life easy, just use complex numbers; your time is much more
>> valuable than the computers.
>
>
> Also, if the nonlinear function is very expensive, you can read the state
> from the Vec into PetscReal locally (e.g. one stencil at a time) and
> compute with reals.
>
> Writing to files creates a _serious_ bottleneck that will likely take
> orders of magnitude longer than everything else your code does if you scale
> it to large problems/computers.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120319/40622dc4/attachment.htm>

Reply via email to