[petsc-users] eps_target malloc issue

Jose E. Roman jroman at dsic.upv.es
Sat Jul 26 12:35:38 CDT 2014


The problem is that your stiffness and mass matrices have different nonzero pattern.

The -eps_target configuration computes a MatAXPY on the first matrix (stiffness), so MatSetOption(mat, MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE) could be called on this matrix, as Barry suggests.

Another workaround would be to force both of them having the same nonzero pattern, maybe using MatSetOption(mat,MAT_IGNORE_ZERO_ENTRIES,PETSC_FALSE).

Also, this problem would not appear with target=0.0.

See details on section 3.4.2 of SLEPc's users guide.

Jose



El 26/07/2014, a las 19:04, Barry Smith escribió:

> 
>  We need the entire error message. A matrix is being formed that wasn’t fully preallocated for so you need to determine which matrix and make sure either 1) it gets fully preallocated or 2) MatSetOption(mat, MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE) is called on the matrix
> 
>  Barry
> 
> On Jul 26, 2014, at 10:34 AM, jifeng zhao <jifengzhao2015 at u.northwestern.edu> wrote:
> 
>> Hello all,
>> 
>> I am trying to use ex7 to solve series of generalized problem. The running commands are:
>> 
>> ./ex7 -f1 petsc_stiff19.dat -f2 petsc_mass19.dat -mat_type sbaij -eps_gen_hermitian -eps_type krylovschur -eps_smallest_magnitude. -eps_monitor_conv -st_k    sp_type bcgs -st_pc_type bjacobi -st_sub_pc_type icc -st_ksp_rtol 1.e-4 -eps_tol 1.e-4 -eps_nev 40 -st_type sinvert
>> 
>> It works fine, but when my problem contains zero eigenvalue, it fails to converge.
>> 
>> Supposedly, I should use eps_target -0.1 instead of eps_smallest_magnitude. However if eps_target is used, I run into a memory issue:
>> 
>> PETSC ERROR: --------------------- Error Message ------------------------------------
>> PETSC ERROR: Argument out of range!
>> PETSC ERROR: New nonzero at (0,6) caused a malloc!
>> PETSC ERROR: ------------------------------------------------------------------------
>> 
>> Does anybody know how to solve this? Thanks! 
>> 
>> Jifeng Zhao
>> PhD candidate at Northwestern University, US
>> Theoretical and Applied Mechanics Program
> 



More information about the petsc-users mailing list