Commit 483bf8c8 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Return early on errors

parent 7010d391
...@@ -1937,7 +1937,6 @@ subroutine solve_tridi( na, nev, d, e, q, ldq, nblk, mpi_comm_rows, mpi_comm_col ...@@ -1937,7 +1937,6 @@ subroutine solve_tridi( na, nev, d, e, q, ldq, nblk, mpi_comm_rows, mpi_comm_col
call timer%stop("solve_tridi") call timer%stop("solve_tridi")
#endif #endif
if (wantDebug) write(error_unit,*) 'ELPA1_solve_tridi: ERROR: Problem contains processor column with zero width' if (wantDebug) write(error_unit,*) 'ELPA1_solve_tridi: ERROR: Problem contains processor column with zero width'
! call MPI_Abort(MPI_COMM_WORLD,1,mpierr)
success = .false. success = .false.
return return
endif endif
...@@ -2049,7 +2048,6 @@ recursive subroutine merge_recursive(np_off, nprocs, wantDebug, success) ...@@ -2049,7 +2048,6 @@ recursive subroutine merge_recursive(np_off, nprocs, wantDebug, success)
if (nprocs<=1) then if (nprocs<=1) then
! Safety check only ! Safety check only
if (wantDebug) write(error_unit,*) "ELPA1_merge_recursive: INTERNAL error merge_recursive: nprocs=",nprocs if (wantDebug) write(error_unit,*) "ELPA1_merge_recursive: INTERNAL error merge_recursive: nprocs=",nprocs
! call mpi_abort(MPI_COMM_WORLD,1,mpierr)
success = .false. success = .false.
return return
endif endif
...@@ -2343,7 +2341,6 @@ subroutine solve_tridi_single(nlen, d, e, q, ldq, wantDebug, success) ...@@ -2343,7 +2341,6 @@ subroutine solve_tridi_single(nlen, d, e, q, ldq, wantDebug, success)
if (info /= 0) then if (info /= 0) then
if (wantDebug) & if (wantDebug) &
write(error_unit,'(a,i8,a)') 'ELPA1_solve_tridi_single: ERROR: Lapack routine DSTEQR failed, info= ',info,', Aborting!' write(error_unit,'(a,i8,a)') 'ELPA1_solve_tridi_single: ERROR: Lapack routine DSTEQR failed, info= ',info,', Aborting!'
! call mpi_abort(mpi_comm_world,0,mpierr)
success = .false. success = .false.
return return
endif endif
...@@ -3262,7 +3259,6 @@ subroutine check_monotony(n,d,text, wantDebug, success) ...@@ -3262,7 +3259,6 @@ subroutine check_monotony(n,d,text, wantDebug, success)
if (wantDebug) write(error_unit,'(a,a,i8,2g25.17)') 'ELPA1_check_monotony: Monotony error on ',text,i,d(i),d(i+1) if (wantDebug) write(error_unit,'(a,a,i8,2g25.17)') 'ELPA1_check_monotony: Monotony error on ',text,i,d(i),d(i+1)
success = .false. success = .false.
return return
! call mpi_abort(mpi_comm_world,0,mpierr)
endif endif
enddo enddo
...@@ -3618,7 +3614,6 @@ subroutine cholesky_real(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, wantDeb ...@@ -3618,7 +3614,6 @@ subroutine cholesky_real(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, wantDeb
call dpotrf('U',na-n+1,a(l_row1,l_col1),lda,info) call dpotrf('U',na-n+1,a(l_row1,l_col1),lda,info)
if(info/=0) then if(info/=0) then
if (wantDebug) write(error_unit,*) "ELPA1_cholesky_real: Error in dpotrf" if (wantDebug) write(error_unit,*) "ELPA1_cholesky_real: Error in dpotrf"
! call MPI_Abort(MPI_COMM_WORLD,1,mpierr)
success = .false. success = .false.
return return
endif endif
...@@ -3642,7 +3637,6 @@ subroutine cholesky_real(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, wantDeb ...@@ -3642,7 +3637,6 @@ subroutine cholesky_real(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, wantDeb
if (wantDebug) write(error_unit,*) "ELPA1_cholesky_real: Error in dpotrf" if (wantDebug) write(error_unit,*) "ELPA1_cholesky_real: Error in dpotrf"
success = .false. success = .false.
return return
! call MPI_Abort(MPI_COMM_WORLD,1,mpierr)
endif endif
nc = 0 nc = 0
...@@ -3797,7 +3791,6 @@ subroutine invert_trm_real(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, wantD ...@@ -3797,7 +3791,6 @@ subroutine invert_trm_real(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, wantD
if (wantDebug) write(error_unit,*) "ELPA1_invert_trm_real: Error in DTRTRI" if (wantDebug) write(error_unit,*) "ELPA1_invert_trm_real: Error in DTRTRI"
success = .false. success = .false.
return return
! call MPI_Abort(MPI_COMM_WORLD,1,mpierr)
endif endif
nc = 0 nc = 0
...@@ -3952,7 +3945,6 @@ subroutine cholesky_complex(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, want ...@@ -3952,7 +3945,6 @@ subroutine cholesky_complex(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, want
if (wantDebug) write(error_unit,*) "ELPA1_cholesky_complex: Error in zpotrf" if (wantDebug) write(error_unit,*) "ELPA1_cholesky_complex: Error in zpotrf"
success = .false. success = .false.
return return
! call MPI_Abort(MPI_COMM_WORLD,1,mpierr)
endif endif
endif endif
...@@ -3974,7 +3966,6 @@ subroutine cholesky_complex(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, want ...@@ -3974,7 +3966,6 @@ subroutine cholesky_complex(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, want
if (wantDebug) write(error_unit,*) "ELPA1_cholesky_complex: Error in zpotrf" if (wantDebug) write(error_unit,*) "ELPA1_cholesky_complex: Error in zpotrf"
success = .false. success = .false.
return return
! call MPI_Abort(MPI_COMM_WORLD,1,mpierr)
endif endif
nc = 0 nc = 0
...@@ -4129,7 +4120,6 @@ subroutine invert_trm_complex(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, wa ...@@ -4129,7 +4120,6 @@ subroutine invert_trm_complex(na, a, lda, nblk, mpi_comm_rows, mpi_comm_cols, wa
if (wantDebug) write(error_unit,*) "ELPA1_invert_trm_complex: Error in ZTRTRI" if (wantDebug) write(error_unit,*) "ELPA1_invert_trm_complex: Error in ZTRTRI"
success = .false. success = .false.
return return
! call MPI_Abort(MPI_COMM_WORLD,1,mpierr)
endif endif
nc = 0 nc = 0
......
...@@ -632,7 +632,7 @@ subroutine bandred_real(na, a, lda, nblk, nbw, mpi_comm_rows, mpi_comm_cols, & ...@@ -632,7 +632,7 @@ subroutine bandred_real(na, a, lda, nblk, nbw, mpi_comm_rows, mpi_comm_cols, &
write(error_unit,*) 'ELPA2_bandred_real: ELPA2 works only for nbw==n*nblk' write(error_unit,*) 'ELPA2_bandred_real: ELPA2 works only for nbw==n*nblk'
endif endif
success = .false. success = .false.
! call mpi_abort(mpi_comm_world,0,mpierr) return
endif endif
endif endif
...@@ -1984,7 +1984,7 @@ subroutine trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, & ...@@ -1984,7 +1984,7 @@ subroutine trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, &
write(error_unit,*) 'ELPA2_trans_ev_tridi_to_band_real: band backtransform works only for nbw==n*nblk' write(error_unit,*) 'ELPA2_trans_ev_tridi_to_band_real: band backtransform works only for nbw==n*nblk'
endif endif
success = .false. success = .false.
! call mpi_abort(mpi_comm_world,0,mpierr) return
endif endif
endif endif
...@@ -2648,7 +2648,7 @@ subroutine trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, & ...@@ -2648,7 +2648,7 @@ subroutine trans_ev_tridi_to_band_real(na, nev, nblk, nbw, q, ldq, &
if (offset<0) then if (offset<0) then
if (wantDebug) write(error_unit,*) 'ELPA2_trans_ev_tridi_to_band_real: internal error, offset for shifting = ',offset if (wantDebug) write(error_unit,*) 'ELPA2_trans_ev_tridi_to_band_real: internal error, offset for shifting = ',offset
success = .false. success = .false.
! call MPI_Abort(MPI_COMM_WORLD, 1, mpierr) return
endif endif
a_off = a_off + offset a_off = a_off + offset
...@@ -3302,7 +3302,7 @@ subroutine bandred_complex(na, a, lda, nblk, nbw, mpi_comm_rows, mpi_comm_cols, ...@@ -3302,7 +3302,7 @@ subroutine bandred_complex(na, a, lda, nblk, nbw, mpi_comm_rows, mpi_comm_cols,
write(error_unit,*) 'ELPA2_bandred_complex: ELPA2 works only for nbw==n*nblk' write(error_unit,*) 'ELPA2_bandred_complex: ELPA2 works only for nbw==n*nblk'
endif endif
success = .false. success = .false.
! call mpi_abort(mpi_comm_world,0,mpierr) return
endif endif
endif endif
...@@ -4508,8 +4508,8 @@ subroutine trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, & ...@@ -4508,8 +4508,8 @@ subroutine trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, &
write(error_unit,*) 'ELPA2_trans_ev_tridi_to_band_complex: band backtransform works only for nbw==n*nblk' write(error_unit,*) 'ELPA2_trans_ev_tridi_to_band_complex: band backtransform works only for nbw==n*nblk'
endif endif
! call mpi_abort(mpi_comm_world,0,mpierr)
success = .false. success = .false.
return
endif endif
endif endif
...@@ -5203,9 +5203,11 @@ subroutine trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, & ...@@ -5203,9 +5203,11 @@ subroutine trans_ev_tridi_to_band_complex(na, nev, nblk, nbw, q, ldq, &
offset = nbw - top_msg_length offset = nbw - top_msg_length
if (offset<0) then if (offset<0) then
if (wantDebug) write(error_unit,*) 'ELPA2_trans_ev_tridi_to_band_complex: internal error, offset for shifting = ',offset if (wantDebug) then
! call MPI_Abort(MPI_COMM_WORLD, 1, mpierr) write(error_unit,*) 'ELPA2_trans_ev_tridi_to_band_complex: internal error, offset for shifting = ',offset
endif
success = .false. success = .false.
return
endif endif
a_off = a_off + offset a_off = a_off + offset
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment