[petsc-users] viewers and nohup (unrelated questions)

Gianluca Meneghello gianmail at gmail.com
Fri Sep 16 07:17:21 CDT 2011


Hi,

I would like to ask you 2 unrelated questions.

#_1 The first one concerns PETSc viewer. In my code I'm writing
outputs with PETSC_VIEWER_ASCII_VTK, more precisely

    PetscViewer viewer;
    PetscViewerASCIIOpen(PETSC_COMM_SELF,filename.c_str(),&viewer);
    PetscViewerSetFormat(viewer,PETSC_VIEWER_ASCII_VTK);
    DMView(dau,viewer);
    VecView(foou,viewer);
    VecView(foop,viewer);
    PetscViewerDestroy(&viewer);

where foou and foop (velocity and pressure respectively) are vectors
extracted from the vector containing the full solution of my problem.
The VTK so obtained nicely contains a vector field — from foou — and a
scalar field — foop — and can be read by Paraview.

Nonetheless, I guess writing (and reading from Paraview) ASCII files
is not the best choice. Are there better possibilities in PETSc? Is
there a PETSC_VIEWER_BINARY_VTK or equivalent?

#_2 The second is about the nohup command. If I run my code with
"nohup ./main <opts> &" and then exit the console, the program dies as
if there was no nohup command in front of it. The same is true for
some examples I've tested from the PETSc library. I guess this is
related to the machine I'm using more than to the library but... has
anyone of you already experienced a similar issue? Any advice is
welcome and please let me know if you need any information that can
help.

Thanks

Gianluca

-- 
"[Je pense que] l'homme est un monde qui vaut des fois les mondes et
que les plus ardentes ambitions sont celles qui ont eu l'orgueil de
l'Anonymat" -- Non omnibus, sed mihi et tibi
Amedeo Modigliani


More information about the petsc-users mailing list