Commit 1a25c787 authored by Andreas Marek's avatar Andreas Marek
Browse files

Better abort messages

parent 056612c7
......@@ -196,18 +196,18 @@ function elpa_solve_evp_&
call obj%get("mpi_comm_rows",mpi_comm_rows,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_rows. Aborting..."
stop
endif
call obj%get("mpi_comm_cols",mpi_comm_cols,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_cols. Aborting..."
stop
endif
call obj%get("gpu",gpu,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu. Aborting..."
stop
endif
if (gpu .eq. 1) then
......@@ -218,7 +218,7 @@ function elpa_solve_evp_&
call obj%get("is_skewsymmetric",skewsymmetric,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for skewsymmetric. Aborting..."
stop
endif
......@@ -242,7 +242,7 @@ function elpa_solve_evp_&
call obj%get("debug", debug,error)
if (error .ne. ELPA_OK) then
print *,"Problem setting option. Aborting..."
print *,"Problem setting option for debug. Aborting..."
stop
endif
wantDebug = debug == 1
......@@ -253,7 +253,7 @@ function elpa_solve_evp_&
call obj%timer%start("check_for_gpu")
call obj%get("mpi_comm_parent", mpi_comm_all,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_parent. Aborting..."
stop
endif
call mpi_comm_rank(int(mpi_comm_all,kind=MPI_KIND), my_peMPI, mpierr)
......@@ -286,21 +286,21 @@ function elpa_solve_evp_&
if(do_useGPU) then
call obj%get("gpu_tridiag", gpu, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu_tridiag. Aborting..."
stop
endif
do_useGPU_tridiag = (gpu == 1)
call obj%get("gpu_solve_tridi", gpu, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu_solve_tridi. Aborting..."
stop
endif
do_useGPU_solve_tridi = (gpu == 1)
call obj%get("gpu_trans_ev", gpu, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu_trans_ev. Aborting..."
stop
endif
do_useGPU_trans_ev = (gpu == 1)
......@@ -409,7 +409,7 @@ function elpa_solve_evp_&
else
call obj%get("check_pd",check_pd,error)
if (error .ne. ELPA_OK) then
print *,"Problem setting option. Aborting..."
print *,"Problem setting option for check_pd. Aborting..."
stop
endif
if (check_pd .eq. 1) then
......
......@@ -107,7 +107,7 @@ call prmat(na,useGpu,a_mat,a_dev,lda,matrixCols,nblk,my_prow,my_pcol,np_rows,np_
implicit none
#include "../general/precision_kinds.F90"
class(elpa_abstract_impl_t), intent(inout) :: obj
class(elpa_abstract_impl_t), intent(inout) :: obj
integer(kind=ik), intent(in) :: na, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols
logical, intent(in) :: useGPU, wantDebug
integer(kind=c_int) :: skewsymmetric
......@@ -155,8 +155,11 @@ call prmat(na,useGpu,a_mat,a_dev,lda,matrixCols,nblk,my_prow,my_pcol,np_rows,np_
complex(kind=rck) :: aux3(1)
#endif
integer(kind=c_intptr_t) :: num
MATH_DATATYPE(kind=rck), allocatable :: tmp(:)
MATH_DATATYPE(kind=rck), allocatable :: v_row(:), & ! used to store calculated Householder Vector
MATH_DATATYPE(kind=rck), allocatable :: v_row(:) ! used to store calculated Householder Vector
MATH_DATATYPE(kind=rck), allocatable :: & ! used to store calculated Householder Vector
v_col(:), & ! the same Vector, but transposed
! - differently distributed among MPI tasks
u_row(:), &
......@@ -185,7 +188,7 @@ call prmat(na,useGpu,a_mat,a_dev,lda,matrixCols,nblk,my_prow,my_pcol,np_rows,np_
&MATH_DATATYPE
call obj%get("is_skewsymmetric",skewsymmetric,istat)
if (istat .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for skewsymmetric settings. Aborting..."
stop
endif
isSkewsymmetric = (skewsymmetric == 1)
......@@ -202,7 +205,6 @@ call prmat(na,useGpu,a_mat,a_dev,lda,matrixCols,nblk,my_prow,my_pcol,np_rows,np_
PRECISION_SUFFIX // &
gpuString )
if (wantDebug) call obj%timer%start("mpi_communication")
call mpi_comm_rank(int(mpi_comm_rows,kind=MPI_KIND), my_prowMPI, mpierr)
call mpi_comm_size(int(mpi_comm_rows,kind=MPI_KIND), np_rowsMPI, mpierr)
......@@ -244,7 +246,7 @@ call prmat(na,useGpu,a_mat,a_dev,lda,matrixCols,nblk,my_prow,my_pcol,np_rows,np_
! it can, however, be set by the user
call obj%get("min_tile_size", min_tile_size ,error)
if (error .ne. ELPA_OK) then
print *,"Problem setting option. Aborting..."
print *,"Problem setting option for min_tile_size. Aborting..."
stop
endif
if(min_tile_size == 0) then
......@@ -356,11 +358,13 @@ call prmat(na,useGpu,a_mat,a_dev,lda,matrixCols,nblk,my_prow,my_pcol,np_rows,np_
if (useGPU) then
! allocate memmory for matrix A on the device and than copy the matrix
successCUDA = cuda_malloc(a_dev, lda * matrixCols * size_of_datatype)
num = lda * matrixCols * size_of_datatype
successCUDA = cuda_malloc(a_dev, num)
check_alloc_cuda("tridiag: a_dev", successCUDA)
successCUDA = cuda_memcpy(a_dev, int(loc(a_mat(1,1)),kind=c_intptr_t), &
lda * matrixCols * size_of_datatype, cudaMemcpyHostToDevice)
num, cudaMemcpyHostToDevice)
check_memcpy_cuda("tridiag: a_dev", successCUDA)
endif
......@@ -1046,6 +1050,7 @@ call prmat(na,useGpu,a_mat,a_dev,lda,matrixCols,nblk,my_prow,my_pcol,np_rows,np_
stop 1
endif
call obj%timer%stop("tridiag_&
&MATH_DATATYPE&
&" // &
......
......@@ -100,18 +100,18 @@
call obj%get("mpi_comm_rows",mpi_comm_rows,error )
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_rows. Aborting..."
stop
endif
call obj%get("mpi_comm_cols",mpi_comm_cols,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_cols. Aborting..."
stop
endif
call obj%get("debug",debug,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for debug settings. Aborting..."
stop
endif
if (debug == 1) then
......
......@@ -93,18 +93,18 @@
call obj%get("mpi_comm_rows",mpi_comm_rows,error)
if (error .ne. ELPA_OK) then
print *,"Error getting option. Aborting..."
print *,"Error getting option for mpi_comm_rows. Aborting..."
stop
endif
call obj%get("mpi_comm_cols",mpi_comm_cols,error)
if (error .ne. ELPA_OK) then
print *,"Error getting option. Aborting..."
print *,"Error getting option for mpi_comm_cols. Aborting..."
stop
endif
call obj%get("debug", debug,error)
if (error .ne. ELPA_OK) then
print *,"Error getting option. Aborting..."
print *,"Error getting option for debug. Aborting..."
stop
endif
if (debug == 1) then
......
......@@ -111,7 +111,7 @@
! GPU settings
call obj%get("gpu", gpu,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu. Aborting..."
stop
endif
......@@ -136,17 +136,17 @@
call obj%get("mpi_comm_rows",mpi_comm_rows,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_rows. Aborting..."
stop
endif
call obj%get("mpi_comm_cols",mpi_comm_cols,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_cols. Aborting..."
stop
endif
call obj%get("mpi_comm_parent",mpi_comm_all,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_parent. Aborting..."
stop
endif
......
......@@ -106,18 +106,18 @@
call obj%get("mpi_comm_rows", mpi_comm_rows,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_rows. Aborting..."
stop
endif
call obj%get("mpi_comm_cols", mpi_comm_cols,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_cols. Aborting..."
stop
endif
call obj%get("debug",debug,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for debug. Aborting..."
stop
endif
if (debug == 1) then
......
......@@ -206,7 +206,7 @@
call obj%get("is_skewsymmetric",skewsymmetric,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for skewsymmetric settings. Aborting..."
stop
endif
isSkewsymmetric = (skewsymmetric == 1)
......@@ -314,7 +314,7 @@
! it can, however, be set by the user
call obj%get("min_tile_size", min_tile_size ,error)
if (error .ne. ELPA_OK) then
print *,"Problem setting option. Aborting..."
print *,"Problem setting option for min_tile_size. Aborting..."
stop
endif
if(min_tile_size == 0) then
......
......@@ -193,17 +193,17 @@
call obj%get("mpi_comm_rows",mpi_comm_rows,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_rows. Aborting..."
stop
endif
call obj%get("mpi_comm_cols",mpi_comm_cols,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_cols. Aborting..."
stop
endif
call obj%get("mpi_comm_parent",mpi_comm_all,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for mpi_comm_parent. Aborting..."
stop
endif
......@@ -259,13 +259,13 @@
call obj%get(KERNEL_STRING,kernel,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for kernel settings. Aborting..."
stop
endif
call obj%get("is_skewsymmetric",skewsymmetric,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for skewsymmetric settings. Aborting..."
stop
endif
......@@ -273,7 +273,7 @@
call obj%get("debug",debug,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for debug settings. Aborting..."
stop
endif
wantDebug = debug == 1
......@@ -281,7 +281,7 @@
! GPU settings
call obj%get("gpu", gpu,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option gpu settings. Aborting..."
stop
endif
......@@ -332,35 +332,35 @@
if(do_useGPU) then
call obj%get("gpu_bandred", gpu, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option gpu_bandred settings. Aborting..."
stop
endif
do_useGPU_bandred = (gpu == 1)
call obj%get("gpu_tridiag_band", gpu, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu_tridiag_band settings. Aborting..."
stop
endif
do_useGPU_tridiag_band = (gpu == 1)
call obj%get("gpu_solve_tridi", gpu, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu_solve_tridi settings. Aborting..."
stop
endif
do_useGPU_solve_tridi = (gpu == 1)
call obj%get("gpu_trans_ev_tridi_to_band", gpu, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu_trans_ev_tridi_to_band settings. Aborting..."
stop
endif
do_useGPU_trans_ev_tridi_to_band = (gpu == 1)
call obj%get("gpu_trans_ev_band_to_full", gpu, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for gpu_trans_ev_band_to_full settings. Aborting..."
stop
endif
do_useGPU_trans_ev_band_to_full = (gpu == 1)
......@@ -437,14 +437,14 @@
! we change it above? This is a mess and should be cleaned up
call obj%get(KERNEL_STRING,kernelByUser,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for user kernel settings. Aborting..."
stop
endif
if (kernelByUser .ne. kernel) then
call obj%set(KERNEL_STRING, kernel, error)
if (error .ne. ELPA_OK) then
print *,"Problem setting option. Aborting..."
print *,"Problem setting kernel. Aborting..."
stop
endif
endif
......@@ -461,7 +461,7 @@
! compare user chosen kernel with possible kernels
call obj%get(KERNEL_STRING,kernelByUser,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for user kernel settings. Aborting..."
stop
endif
......@@ -503,7 +503,7 @@
if (obj%can_set(KERNEL_STRING, kernel) == ELPA_OK) then
call obj%set(KERNEL_STRING, kernel, error)
if (error .ne. ELPA_OK) then
print *,"Problem setting option. Aborting..."
print *,"Problem setting kernel. Aborting..."
stop
endif
if (my_pe == 0 ) write(error_unit,*) "ELPA decided to use ",elpa_int_value_to_string(KERNEL_STRING, kernel)
......@@ -519,7 +519,7 @@
#if REALCASE == 1
call obj%get("qr",qr,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for qr settings. Aborting..."
stop
endif
if (qr .eq. 1) then
......@@ -612,7 +612,7 @@
!first check if the intermediate bandwidth was set by the user
call obj%get("intermediate_bandwidth", nbw, error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for intermediate_bandwidth. Aborting..."
stop
endif
......@@ -771,7 +771,7 @@
call obj%get("check_pd",check_pd,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for check_pd. Aborting..."
stop
endif
if (check_pd .eq. 1) then
......
......@@ -166,7 +166,7 @@
#ifdef BAND_TO_FULL_BLOCKING
call obj%get("blocking_in_band_to_full",blocking_factor,error)
if (error .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for blocking_in_band_to_full. Aborting..."
stop
endif
#else
......
......@@ -144,7 +144,7 @@
call obj%get("is_skewsymmetric",skewsymmetric,istat)
if (istat .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting option for skewsymmetric settings. Aborting..."
stop
endif
isSkewsymmetric = (skewsymmetric == 1)
......
......@@ -49,7 +49,7 @@
call self%get("solver", solver,error2)
if (error2 .ne. ELPA_OK) then
print *,"Problem setting option. Aborting..."
print *,"Problem setting solver. Aborting..."
#ifdef USE_FORTRAN2008
if (present(error)) then
error = error2
......@@ -214,7 +214,7 @@
call self%get("solver", solver,error2)
call self%set("is_skewsymmetric",1)
if (error2 .ne. ELPA_OK) then
print *,"Problem setting option. Aborting..."
print *,"Problem setting is_skewsymmetric. Aborting..."
#ifdef USE_FORTRAN2008
if (present(error)) then
error = error2
......@@ -354,7 +354,7 @@
call self%get("solver", solver,error2)
if (error2 .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting solver option. Aborting..."
#ifdef USE_FORTRAN2008
if (present(error)) then
error = error2
......@@ -505,7 +505,7 @@
call self%get("solver", solver,error2)
call self%set("is_skewsymmetric",1)
if (error2 .ne. ELPA_OK) then
print *,"Problem getting option. Aborting..."
print *,"Problem getting solver option. Aborting..."
#ifdef USE_FORTRAN2008
if (present(error)) then
error = error2
......
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