35 #include "qrm_common.h"
99 character(len=30) :: sub=
''
102 integer,
dimension(5) :: i_err_data=0
104 character(len=40) :: a_err_data=
''
120 integer,
parameter :: qrm_abort_=0, qrm_return_=1
122 integer :: qrm_err_act=qrm_abort_
130 err_act = qrm_err_act
131 qrm_err_act = qrm_return_
140 if((err_act .ne. qrm_abort_) .and. &
141 & (err_act .ne. qrm_return_))
then
142 call
qrm_err_push(26,
'qrm_err_act_save',ied=(/err_act,0,0,0,0/))
145 qrm_err_act = err_act
157 qrm_err_act = err_act
175 character(len=*),
optional :: sub
176 integer,
dimension(5),
optional :: ied
177 character(len=*),
optional :: aed
185 if(present(sub)) new_err%sub = sub
186 if(present(ied)) new_err%i_err_data = ied
187 if(present(aed)) new_err%a_err_data = aed
189 new_err%next => qrm_err_stack%top
190 qrm_err_stack%top => new_err
191 qrm_err_stack%nelem = qrm_err_stack%nelem+1
213 character(len=*),
optional :: sub
214 integer,
dimension(5),
optional :: ied
215 character(len=*),
optional :: aed
237 curr => qrm_err_stack%top
239 do i=1, qrm_err_stack%nelem-1
243 if(
associated(curr)) info = curr%code
257 if(qrm_err_stack%nelem .gt. 0)
then
259 __qrm_prnt_err(
'(" ")')
260 __qrm_prnt_err(
'("==================== Error detected in qr_mumps ====================")')
262 __qrm_prnt_err(
'("====================================================================")')
276 logical,
optional :: prnt
281 if(present(prnt))
then
287 curr => qrm_err_stack%top
289 do while (
associated(curr))
294 qrm_err_stack%nelem = qrm_err_stack%nelem-1
297 qrm_err_stack%top => null()
315 __qrm_prnt_err(
'("Error in subroutine ",a30 " :")')msg%sub
316 select case(msg%code)
318 __qrm_prnt_err(
'("Generic error")')
320 __qrm_prnt_err(
'("Sparse matrix format ",a3," is not (yet) supported.")')msg%a_err_data(1:3)
322 __qrm_prnt_err(
'("Symmetric matrices are not supported.")')
324 __qrm_prnt_err(
'("qrm_spmat%cntl is not associated/valid.")')
326 __qrm_prnt_err(
'("Trying to allocate an already allocated array.")')
328 __qrm_prnt_err(
'("Memory allocation problem. Size required: ",i30)')msg%i_err_data(1)
330 __qrm_prnt_err(
'("Trying to deallocate an unallocated array.")')
332 __qrm_prnt_err(
'("Memory deallocation problem. ",i30)')msg%i_err_data(1)
334 __qrm_prnt_err(
'("Input column permutation not provided/valid")')
336 __qrm_prnt_err(
'("Requested ordering method unknown: ",i3)')msg%i_err_data(1)
338 __qrm_prnt_err(
'("Insufficient size for array: ",a20)')msg%a_err_data(1:20)
340 __qrm_prnt_err(
'("Error in lapack routine: ",i3)')msg%i_err_data(1)
342 __qrm_prnt_err(
'("No more memory available")')
344 __qrm_prnt_err(
'("The analysis must be done before the factorization")')
346 __qrm_prnt_err(
'("The factorization must be done before the solve")')
348 __qrm_prnt_err(
'("This type of norm is not implemented.")')
350 __qrm_prnt_err(
'("Requested ordering method not available: ",a20)')msg%a_err_data
352 __qrm_prnt_err(
'("Error from call to subroutine ",a30)')msg%a_err_data
354 __qrm_prnt_err(
'("COLAMD error ")')
356 __qrm_prnt_err(
'("SCOTCH error ")')
358 __qrm_prnt_err(
'("Factorization error ")')
360 __qrm_prnt_err(
'("Apply error ")')
362 __qrm_prnt_err(
'("Solve error ")')
364 __qrm_prnt_err(
'("Incorrect argument to qrm_set/qrm_get ",a30)')msg%a_err_data
366 __qrm_prnt_err(
'("Problem opening file ",a30)')msg%a_err_data
368 __qrm_prnt_err(
'("Unknown error action ",i10)')msg%i_err_data(1)
370 __qrm_prnt_err(
'("Incompatible values in qrm_spmat%icntl ",i2,2x,i2)')msg%i_err_data(1:2)
372 __qrm_prnt_err(
'("Incorrect value for qrm_nb_/qrm_ib_ ",i2,2x,i2)')msg%i_err_data(1)
374 __qrm_prnt_err(
'("Incorrect value for qrm_spmat%m/n/nz ",i6,2x,i6,2x,i16)')msg%i_err_data(1:3)
376 __qrm_prnt_err(
'("qrm_apply cannot be called if the H matrix is discarded.")')
378 __qrm_prnt_err(
'("Unknown error code",i4)')msg%code
381 __qrm_prnt_err(
'(" ")')
This module contains all the error management routines and data.
subroutine qrm_err_act_restore(err_act)
Restores the value of the qrm_err_act variable.
subroutine qrm_err_get(info)
This subroutine return the code of the first error on the stack or zero if the stack is empty...
subroutine qrm_err_act_set(err_act)
Sets the default error action.
subroutine qrm_err_check()
This subroutine checks the errors stack. If something is found all the entries in the stack are poppe...
This type is to represent the errors stack.
subroutine qrm_process_msg(msg)
This routine prints out a message on the error unit.
subroutine qrm_flush_err_stack(prnt)
This subroutine flushes the errors stack optionally printing all the messages on the eunit output uni...
subroutine qrm_err_raise(code, sub, ied, aed)
Pushes an error on the stack and the flushes the stack itself. Basically does err_push and err_check ...
subroutine qrm_err_push(code, sub, ied, aed)
This subroutine pushes an error on top of the stack.
This is the basic type for error message.
subroutine qrm_err_act_save(err_act)
Saves a copy of the qrm_err_act variable.