Community
cancel
Showing results for 
Search instead for 
Did you mean: 
pkalozoum
Beginner
59 Views

dss problem with complex matrix

Hello everybody,

I' m trying to execute a .f90 code to solve a sparsed complex matrix. As far as I checked matrices rowindex, columns, cvalues cRhsValues etc. are created correctly. When I run the code I receive

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libc.so.6 00499190 Unknown Unknown Unknown
libc.so.6 0049AF9C Unknown Unknown Unknown
libmkl_core.so 00377DF2 Unknown Unknown Unknown

Stack trace terminated abnormally.

Does anybody has an idea about what is wrong in the code.

P.S. I link the program to the routines in the following manner: ifort my_prog.f90 -mkl

Thanks a lot

Panayotis
0 Kudos
7 Replies
Gennady_F_Intel
Moderator
59 Views

Hello Panayotis,
I 'd recommend to use the Linker Adviser at the top of this forum. It will give You a suggestion how to link your application appropriate to yourconditions( platform, OS, threading and etc).
--Gennady

pkalozoum
Beginner
59 Views

Gennady thank you for your quick responce. I tried what you said and indeed I do not get that error any more. But the dss returns "Solver returned error code 0" and the results are not correct. Is the DSS meant to give this error if it works properly? Is it a problem of not writing correctly my matrices? Moreover, if I change the matrix dimension (and consequently rowindex etc) I receive:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
a.out 081166CC Unknown Unknown Unknown
a.out 080CA570 Unknown Unknown Unknown
a.out 080B6554 Unknown Unknown Unknown
a.out 0808A63F Unknown Unknown Unknown
a.out 08066A44 Unknown Unknown Unknown

in case of static linking.

And another question: Is there a difference in accuracy between pardiso and DSS? My program is written sequentially.
Sergey_Solovev__Inte
New Contributor I
59 Views

Hello Panayotis,
Could you provide us with some info:
What structure of matrix do you use? Type of matrix? Real or Complex?
What routine is crashed dss_create, dss_definite_structure, ?

DSS and PARDISO results can be a bit different. PARDISO has additional option to improve solution. Also, PARDISO has matrix checker iparm(27) which can check the input matrix (integer arrays ia() and ja()).

pkalozoum
Beginner
59 Views

Hello Sergey,
the system I try to solve is Ax=B, where A is N x N complex matrix and B is a complex column vector with every element equal to zero except one and I use static linking. I use the folowing:

.............................................................................................................................................................................................
!---------------------------------------------------------------------------
!Initialize the solver
!---------------------------------------------------------------------------

error = dss_create(handle, MKL_DSS_DEFAULTS)
IF (error.NE.MKL_DSS_SUCCESS ) GOTO 999

!---------------------------------------------------------------------------
! Define the non-zero structure of the matrix
!---------------------------------------------------------------------------

error = dss_define_structure(handle, MKL_DSS_NON_SYMMETRIC_COMPLEX ,rowIndex, nRows, nCols, columns, nNonZeros )
IF (error.NE.MKL_DSS_SUCCESS ) GOTO 999

!---------------------------------------------------------------------------
! Reorder the matrix
!---------------------------------------------------------------------------
error = dss_reorder(handle, MKL_DSS_DEFAULTS, perm)
IF (error.NE.MKL_DSS_SUCCESS ) GOTO 999
!---------------------------------------------------------------------------
! Factor the matrix
!---------------------------------------------------------------------------
error = dss_factor_complex(handle, MKL_DSS_POSITIVE_DEFINITE, values)
IF (error.NE.MKL_DSS_SUCCESS) GOTO 999
!---------------------------------------------------------------------------
! Get the solution vector
!---------------------------------------------------------------------------
error = dss_solve_complex(handle,MKL_DSS_DEFAULTS,rhs, nRhs, solution)
IF (error.NE.MKL_DSS_SUCCESS ) GOTO 999
!---------------------------------------------------------------------------
! Deallocate solver storage
!---------------------------------------------------------------------------
error = dss_delete(handle, MKL_DSS_DEFAULTS)
IF (error.NE.MKL_DSS_SUCCESS ) GOTO 999


999 WRITE(*,*) "Solver returned error code ", error
.................................................................................................................................................................................................


Also I have set perm()=0 and I have tried options MKL_DSS_DEFINITE and MKL_DSS_INDEFINITE

I do not know which routine is crashed since I receive the message imediatly.

P.S. After correcting an error in a matrix element I do not receive any more "Solver returned error code 0", but only the second case.


thanks

Panayotis
Sergey_Solovev__Inte
New Contributor I
59 Views

If you solve non-symmetric system, you cannot use the MKL_DSS_POSITIVE_DEFINITE option. Anyway, seems to me, the problem is in input matrix.

Could you localize the crash? For example, insert before each call dss_*** the write(*,*)dss_***'. If crash happens in dss_define_structure() or dss_reorder() then the problem can be in arrays rowIndex(),columns(). If dss_factor_complex() crashes, so values() could be a reason of it.

Gennady_F_Intel
Moderator
59 Views

Panayotis,
It will be better if you give us the test case whichreproducesthe problem.
You can use the private thread if there is any confidential issue.
--Gennady
pkalozoum
Beginner
59 Views

Hello again,

I managed to implenent the DSS solver and it seems to work fine. But I have a question. I run the same problem using simply the routine ZGESV and gives almost identical results with the DSS. Ofcourse DSS is about 15 times faster. Is this normal or DSS should be more accurate?
Moreover, for large values of a specific parameter which divides positive and negative exponents in EXP() the program returns NaN. Could this happen because the problem becomes ill-conditioned? Should in a case like that DSS give better results than ZGESV? And last... is there another solver which would deal better with an ill-conditioned problem (pardiso, ISS etc)?

thank you very much

Panayotis