cannot find -lustdio with matlab on
Barry Smith
bsmith at mcs.anl.gov
Mon Aug 10 22:44:55 CDT 2009
You should really use the PetscViewerBinaryOpen() then use bin/
matlab/PetscBinaryRead() to read the matrices and vectors into
Matlab.
Barry
On Aug 10, 2009, at 10:10 PM, Weiwei Wang wrote:
> Thanks a lot, it's ok using the code
> PetscViewer viewer;
> PetscViewerASCIIOpen(PETSC_COMM_WORLD, "K1.m", &viewer);
> PetscViewerSetFormat(viewer, PETSC_VIEWER_ASCII_MATLAB);
> MatView(data->K1, viewer);
> but failed with the code
> MatView(data->K1, PETSC_VIEWER_MATLAB_WORLD);
> as the document say "Note: Currently can only save PETSc vectors
> to .mat files, not matrices"
>
> weiwei wang
>
> Hong Zhang wrote:
>>
>> weiwei,
>>
>> The easist way is run your petsc code with the option
>> '-mat_view_matlab', and dump it into a file.
>> Then use Matlab to load it for whatever you want to investigate.
>> See petsc user manual on "Using Matlab with PETSc".
>>
>> Hong
>>
>> On Mon, 10 Aug 2009, Weiwei Wang wrote:
>>
>>> Dear All,
>>> I want to check the determinant of some sparse matrix in petsc
>>> but I didn't know how to do it using petsc directly so I try to
>>> save the sparse matrix in Matlab format, then calculate the
>>> determinant in Matlab, so I reinstalled petsc with the opinion "--
>>> with-matlab-dir=...", but the following error appeared:
>>>
>>> /usr/bin/ld: cannot find -lustdio
>>> collect2: ld returned 1 exit status
>>> make[2]: [shared_linux] Error 1 (ignored)
>>>
>>> I don't know where I can find the lib "ustdio" or other ways to
>>> calculate the determinant, the system of my box is debian 5, so
>>> any suggestion is appreciated.
>>>
>>> Thanks,
>>> weiwei wang
>>>
>>
>
More information about the petsc-users
mailing list