Commit 44c809f5 authored by Serhiy Mochalskyy's avatar Serhiy Mochalskyy
Browse files

corrected few uninitialized variables

parent 61332ccc
Pipeline #1811 skipped
......@@ -12,7 +12,7 @@ subroutine input
! Namelist with input parameters
namelist / params / i_response, n_harm, n_tor, nv, delta, n_points, nwall, iwall, nu_coil
namelist / params_scalapack / NB, ORFAC
namelist / params_scalapack / NB, ORFAC, lwork_cooficient
! --- Output code information
if(rank==0) write(outp,*) '-------------------------------------------'
if(rank==0) write(outp,*) 'STARWALL-JOREK vacuum response code'
......@@ -29,7 +29,9 @@ subroutine input
iwall = 1
nu_coil = 0
n_harm = 11
ncoil=0
ntri_c=0
if(n_harm>1) then
do i=1,n_harm
n_tor(i)=i
......@@ -70,10 +72,11 @@ subroutine input
! Only one task read data from input file and send them after to all tasks
if(rank==0) read(inp, params_scalapack) ! Read namelist from STDIN
!==========================================================================
call MPI_BCAST(NB, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ier)
call MPI_BCAST(ORFAC, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ier)
!==========================================================================
!==================================================================================
call MPI_BCAST(NB, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ier)
call MPI_BCAST(ORFAC, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ier)
call MPI_BCAST(lwork_cooficient, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ier)
!===================================================================================
if(rank==0) write(outp,*) ' ScaLAPACK Input parameters:'
if(rank==0) write(outp,'(A,I4)') ' NB =', NB
......@@ -101,8 +104,15 @@ subroutine input
if ( ( iwall < 1 ) .or. ( iwall > 3 ) ) then
write(outp,*) 'ERROR: iwall must have a value between 1 and 3'
stop 1
end if
if ( lwork_cooficient<1) then
write(outp,*) 'ERROR: lwork_cooficient must have a value between >1'
stop 1
end if
! --- Output additional information
if(i_response.le.1 .AND. rank==0) &
write(outp,*)'response matrix without wall will be computed'
......
......@@ -23,7 +23,7 @@ integer :: j,jt,k,k1,ku,kv,nuv,m
write(6,*) 'compute matrix_ec'
pi2 = 4.*asin(1.)
nv = 1./float(nv)
fnv = 1./float(nv)
alv = pi2*fnv
nuv = nu*nv
......
......@@ -10,5 +10,5 @@ module sca
integer :: DESCA(9),DESCB(9),DESCZ(9),DESCC(9)
integer :: INFO,INFO_A,INFO_B,INFO_Z,INFO_C
real :: ORFAC
integer :: lwork_cooficient
end module sca
......@@ -100,7 +100,7 @@
! lwork =2*INT(ABS(work(1)))
lwork =5*INT(ABS(work(1)))+1
lwork =lwork_cooficient*INT(ABS(work(1)))+1
if(rank==0) write(6,*) " Need to allocate = ", REAL(lwork*8.0/1024.0/1024.0/1024.0), "GB workspace array"
DEALLOCATE(work)
......@@ -110,7 +110,7 @@
STOP
END IF
liwork =5*INT (ABS(iwork(1)))
liwork =lwork_cooficient*INT (ABS(iwork(1)))
DEALLOCATE(iwork)
ALLOCATE(iwork(liwork),stat=ier)
IF (IER /= 0) THEN
......
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