Commit 67be7503 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Fix name clash with reservered symbol 'mpi_status'

Apparently in some compiler/MPI combinations (gcc with impi 5.1.3) the
identifier 'mpi_status' is defined and exporeted in their MPI fortran
module and it is thus not allowed to name one of your local variables
also 'mpi_status'.

The confusing error message I got was

  ../src/elpa2_compute.F90:5780:37:

                  call mpi_wait(ireq_hv,mpi_status,mpierr)
                                       1
  Error: Invalid procedure argument at (1)

even though everything seemed to be defined correctly
parent e25a7554
...@@ -1617,7 +1617,7 @@ module ELPA1_compute ...@@ -1617,7 +1617,7 @@ module ELPA1_compute
integer(kind=ik) :: np_off, nprocs integer(kind=ik) :: np_off, nprocs
integer(kind=ik) :: np1, np2, noff, nlen, nmid, n integer(kind=ik) :: np1, np2, noff, nlen, nmid, n
#ifdef WITH_MPI #ifdef WITH_MPI
integer(kind=ik) :: mpi_status(mpi_status_size) integer(kind=ik) :: my_mpi_status(mpi_status_size)
#endif #endif
logical, intent(in) :: wantDebug logical, intent(in) :: wantDebug
logical, intent(out) :: success logical, intent(out) :: success
...@@ -1654,7 +1654,7 @@ module ELPA1_compute ...@@ -1654,7 +1654,7 @@ module ELPA1_compute
if (my_pcol>=np_off+np1 .and. my_pcol<np_off+nprocs) then if (my_pcol>=np_off+np1 .and. my_pcol<np_off+nprocs) then
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_recv(d(noff+1),nmid,MPI_REAL8,np_off,1,mpi_comm_cols,mpi_status,mpierr) call mpi_recv(d(noff+1),nmid,MPI_REAL8,np_off,1,mpi_comm_cols,my_mpi_status,mpierr)
#else #else
d(noff+1:noff+1+nmid-1) = d(noff+1:noff+1+nmid-1) d(noff+1:noff+1+nmid-1) = d(noff+1:noff+1+nmid-1)
#endif #endif
...@@ -1669,7 +1669,7 @@ module ELPA1_compute ...@@ -1669,7 +1669,7 @@ module ELPA1_compute
endif endif
if (my_pcol>=np_off .and. my_pcol<np_off+np1) then if (my_pcol>=np_off .and. my_pcol<np_off+np1) then
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_recv(d(noff+nmid+1),nlen-nmid,MPI_REAL8,np_off+np1,1,mpi_comm_cols,mpi_status,mpierr) call mpi_recv(d(noff+nmid+1),nlen-nmid,MPI_REAL8,np_off+np1,1,mpi_comm_cols,my_mpi_status,mpierr)
#else #else
d(noff+nmid+1:noff+nmid+1+nlen-nmid-1) = d(noff+nmid+1:noff+nmid+1+nlen-nmid-1) d(noff+nmid+1:noff+nmid+1+nlen-nmid-1) = d(noff+nmid+1:noff+nmid+1+nlen-nmid-1)
#endif #endif
...@@ -2066,7 +2066,7 @@ module ELPA1_compute ...@@ -2066,7 +2066,7 @@ module ELPA1_compute
integer(kind=ik) :: my_proc, n_procs, my_prow, my_pcol, np_rows, & integer(kind=ik) :: my_proc, n_procs, my_prow, my_pcol, np_rows, &
np_cols, mpierr np_cols, mpierr
#ifdef WITH_MPI #ifdef WITH_MPI
integer(kind=ik) :: mpi_status(mpi_status_size) integer(kind=ik) :: my_mpi_status(mpi_status_size)
#endif #endif
integer(kind=ik) :: np_next, np_prev, np_rem integer(kind=ik) :: np_next, np_prev, np_rem
integer(kind=ik) :: idx(na), idx1(na), idx2(na) integer(kind=ik) :: idx(na), idx1(na), idx2(na)
...@@ -2623,7 +2623,7 @@ module ELPA1_compute ...@@ -2623,7 +2623,7 @@ module ELPA1_compute
#ifdef WITH_MPI #ifdef WITH_MPI
call MPI_Sendrecv_replace(qtmp1, l_rows*max_local_cols, MPI_REAL8, & call MPI_Sendrecv_replace(qtmp1, l_rows*max_local_cols, MPI_REAL8, &
np_next, 1111, np_prev, 1111, & np_next, 1111, np_prev, 1111, &
mpi_comm_cols, mpi_status, mpierr) mpi_comm_cols, my_mpi_status, mpierr)
#endif #endif
endif endif
...@@ -2810,7 +2810,7 @@ module ELPA1_compute ...@@ -2810,7 +2810,7 @@ module ELPA1_compute
endif endif
else if (pc2==my_pcol) then else if (pc2==my_pcol) then
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_recv(qtmp(1,nc),l_rows,MPI_REAL8,pc1,mod(i,4096),mpi_comm_cols,mpi_status,mpierr) call mpi_recv(qtmp(1,nc),l_rows,MPI_REAL8,pc1,mod(i,4096),mpi_comm_cols,my_mpi_status,mpierr)
#else #else
qtmp(1:l_rows,nc) = q(l_rqs:l_rqe,nc) qtmp(1:l_rows,nc) = q(l_rqs:l_rqe,nc)
#endif #endif
...@@ -2863,7 +2863,7 @@ module ELPA1_compute ...@@ -2863,7 +2863,7 @@ module ELPA1_compute
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_sendrecv(q(l_rqs,lc1),l_rows,MPI_REAL8,pc2,1, & call mpi_sendrecv(q(l_rqs,lc1),l_rows,MPI_REAL8,pc2,1, &
tmp,l_rows,MPI_REAL8,pc2,1, & tmp,l_rows,MPI_REAL8,pc2,1, &
mpi_comm_cols,mpi_status,mpierr) mpi_comm_cols,my_mpi_status,mpierr)
#else #else
tmp(1:l_rows) = q(l_rqs:l_rqe,lc1) tmp(1:l_rows) = q(l_rqs:l_rqe,lc1)
#endif #endif
...@@ -2873,7 +2873,7 @@ module ELPA1_compute ...@@ -2873,7 +2873,7 @@ module ELPA1_compute
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_sendrecv(q(l_rqs,lc2),l_rows,MPI_REAL8,pc1,1, & call mpi_sendrecv(q(l_rqs,lc2),l_rows,MPI_REAL8,pc1,1, &
tmp,l_rows,MPI_REAL8,pc1,1, & tmp,l_rows,MPI_REAL8,pc1,1, &
mpi_comm_cols,mpi_status,mpierr) mpi_comm_cols,my_mpi_status,mpierr)
#else #else
tmp(1:l_rows) = q(l_rqs:l_rqe,lc2) tmp(1:l_rows) = q(l_rqs:l_rqe,lc2)
#endif #endif
...@@ -2925,7 +2925,7 @@ module ELPA1_compute ...@@ -2925,7 +2925,7 @@ module ELPA1_compute
z(:) = z(:) + tmp(:) z(:) = z(:) + tmp(:)
#ifdef WITH_MPI #ifdef WITH_MPI
call MPI_Sendrecv_replace(z, n, MPI_REAL8, np_next, 1111, np_prev, 1111, & call MPI_Sendrecv_replace(z, n, MPI_REAL8, np_next, 1111, np_prev, 1111, &
mpi_comm_cols, mpi_status, mpierr) mpi_comm_cols, my_mpi_status, mpierr)
#endif #endif
enddo enddo
...@@ -2973,7 +2973,7 @@ module ELPA1_compute ...@@ -2973,7 +2973,7 @@ module ELPA1_compute
z(1:n) = tmp(1:n) z(1:n) = tmp(1:n)
do np = npc_0+1, npc_0+npc_n-1 do np = npc_0+1, npc_0+npc_n-1
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_recv(tmp,n,MPI_REAL8,np,1111,mpi_comm_cols,mpi_status,mpierr) call mpi_recv(tmp,n,MPI_REAL8,np,1111,mpi_comm_cols,my_mpi_status,mpierr)
#else #else
tmp(1:n) = z(1:n) tmp(1:n) = z(1:n)
#endif #endif
...@@ -2987,7 +2987,7 @@ module ELPA1_compute ...@@ -2987,7 +2987,7 @@ module ELPA1_compute
else else
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_send(tmp,n,MPI_REAL8,npc_0,1111,mpi_comm_cols,mpierr) call mpi_send(tmp,n,MPI_REAL8,npc_0,1111,mpi_comm_cols,mpierr)
call mpi_recv(z ,n,MPI_REAL8,npc_0,1111,mpi_comm_cols,mpi_status,mpierr) call mpi_recv(z ,n,MPI_REAL8,npc_0,1111,mpi_comm_cols,my_mpi_status,mpierr)
#else #else
z(1:n) = tmp(1:n) z(1:n) = tmp(1:n)
#endif #endif
......
...@@ -1007,7 +1007,7 @@ module ELPA2_compute ...@@ -1007,7 +1007,7 @@ module ELPA2_compute
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
integer(kind=ik) :: max_threads, my_thread, my_block_s, my_block_e, iter integer(kind=ik) :: max_threads, my_thread, my_block_s, my_block_e, iter
#ifdef WITH_MPI #ifdef WITH_MPI
integer(kind=ik) :: mpi_status(MPI_STATUS_SIZE) integer(kind=ik) :: my_mpi_status(MPI_STATUS_SIZE)
#endif #endif
integer(kind=ik), allocatable :: mpi_statuses(:,:), global_id_tmp(:,:) integer(kind=ik), allocatable :: mpi_statuses(:,:), global_id_tmp(:,:)
integer(kind=ik), allocatable :: omp_block_limits(:) integer(kind=ik), allocatable :: omp_block_limits(:)
...@@ -1233,7 +1233,7 @@ module ELPA2_compute ...@@ -1233,7 +1233,7 @@ module ELPA2_compute
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call mpi_recv(hv,nb,mpi_real8,my_pe-1,2,mpi_comm,MPI_STATUS,mpierr) call mpi_recv(hv,nb,mpi_real8,my_pe-1,2,mpi_comm,my_mpi_status,mpierr)
#else #else
call mpi_recv(hv,nb,mpi_real8,my_pe-1,2,mpi_comm,MPI_STATUS_IGNORE,mpierr) call mpi_recv(hv,nb,mpi_real8,my_pe-1,2,mpi_comm,MPI_STATUS_IGNORE,mpierr)
#endif #endif
...@@ -1391,7 +1391,7 @@ module ELPA2_compute ...@@ -1391,7 +1391,7 @@ module ELPA2_compute
! Send our first column to previous PE ! Send our first column to previous PE
if (my_pe>0 .and. na_s <= na) then if (my_pe>0 .and. na_s <= na) then
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_wait(ireq_ab,mpi_status,mpierr) call mpi_wait(ireq_ab,my_mpi_status,mpierr)
#endif #endif
ab_s(1:nb+1) = ab(1:nb+1,na_s-n_off) ab_s(1:nb+1) = ab(1:nb+1,na_s-n_off)
#ifdef WITH_MPI #ifdef WITH_MPI
...@@ -1403,7 +1403,7 @@ module ELPA2_compute ...@@ -1403,7 +1403,7 @@ module ELPA2_compute
ne = na_s + nblocks*nb - (max_threads-1) - 1 ne = na_s + nblocks*nb - (max_threads-1) - 1
#ifdef WITH_MPI #ifdef WITH_MPI
if (istep>=max_threads .and. ne <= na) then if (istep>=max_threads .and. ne <= na) then
call mpi_recv(ab(1,ne-n_off),nb+1,mpi_real8,my_pe+1,1,mpi_comm,mpi_status,mpierr) call mpi_recv(ab(1,ne-n_off),nb+1,mpi_real8,my_pe+1,1,mpi_comm,my_mpi_status,mpierr)
endif endif
#else #else
if (istep>=max_threads .and. ne <= na) then if (istep>=max_threads .and. ne <= na) then
...@@ -1417,7 +1417,7 @@ module ELPA2_compute ...@@ -1417,7 +1417,7 @@ module ELPA2_compute
ne = na_s + nblocks*nb - (max_threads-1) - 1 ne = na_s + nblocks*nb - (max_threads-1) - 1
if (istep>=max_threads .and. ne < na) then if (istep>=max_threads .and. ne < na) then
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_wait(ireq_hv,mpi_status,mpierr) call mpi_wait(ireq_hv,my_mpi_status,mpierr)
#endif #endif
hv_s(1) = tau_t(max_threads) hv_s(1) = tau_t(max_threads)
hv_s(2:) = hv_t(2:,max_threads) hv_s(2:) = hv_t(2:,max_threads)
...@@ -1511,7 +1511,7 @@ module ELPA2_compute ...@@ -1511,7 +1511,7 @@ module ELPA2_compute
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call mpi_recv(ab(1,ne),nb+1,mpi_real8,my_pe+1,1,mpi_comm,MPI_STATUS,mpierr) call mpi_recv(ab(1,ne),nb+1,mpi_real8,my_pe+1,1,mpi_comm,my_mpi_status,mpierr)
#else #else
call mpi_recv(ab(1,ne),nb+1,mpi_real8,my_pe+1,1,mpi_comm,MPI_STATUS_IGNORE,mpierr) call mpi_recv(ab(1,ne),nb+1,mpi_real8,my_pe+1,1,mpi_comm,MPI_STATUS_IGNORE,mpierr)
#endif #endif
...@@ -1564,7 +1564,7 @@ module ELPA2_compute ...@@ -1564,7 +1564,7 @@ module ELPA2_compute
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call mpi_wait(ireq_hv,MPI_STATUS,mpierr) call mpi_wait(ireq_hv,my_mpi_status,mpierr)
#else #else
call mpi_wait(ireq_hv,MPI_STATUS_IGNORE,mpierr) call mpi_wait(ireq_hv,MPI_STATUS_IGNORE,mpierr)
#endif #endif
...@@ -1594,7 +1594,7 @@ module ELPA2_compute ...@@ -1594,7 +1594,7 @@ module ELPA2_compute
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call mpi_wait(ireq_ab,MPI_STATUS,mpierr) call mpi_wait(ireq_ab,my_mpi_status,mpierr)
#else #else
call mpi_wait(ireq_ab,MPI_STATUS_IGNORE,mpierr) call mpi_wait(ireq_ab,MPI_STATUS_IGNORE,mpierr)
#endif #endif
...@@ -1647,7 +1647,7 @@ module ELPA2_compute ...@@ -1647,7 +1647,7 @@ module ELPA2_compute
if (hh_cnt(iblk) == snd_limits(hh_dst(iblk)+1,iblk)-snd_limits(hh_dst(iblk),iblk)) then if (hh_cnt(iblk) == snd_limits(hh_dst(iblk)+1,iblk)-snd_limits(hh_dst(iblk),iblk)) then
! Wait for last transfer to finish ! Wait for last transfer to finish
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_wait(ireq_hhs(iblk), mpi_status, mpierr) call mpi_wait(ireq_hhs(iblk), my_mpi_status, mpierr)
#endif #endif
! Copy vectors into send buffer ! Copy vectors into send buffer
hh_send(:,1:hh_cnt(iblk),iblk) = hh_gath(:,1:hh_cnt(iblk),iblk) hh_send(:,1:hh_cnt(iblk),iblk) = hh_gath(:,1:hh_cnt(iblk),iblk)
...@@ -1674,8 +1674,8 @@ module ELPA2_compute ...@@ -1674,8 +1674,8 @@ module ELPA2_compute
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_wait(ireq_ab,MPI_STATUS,mpierr) call mpi_wait(ireq_ab,my_mpi_status,mpierr)
call mpi_wait(ireq_hv,MPI_STATUS,mpierr) call mpi_wait(ireq_hv,my_mpi_status,mpierr)
allocate(mpi_statuses(MPI_STATUS_SIZE,max(nblocks,num_chunks))) allocate(mpi_statuses(MPI_STATUS_SIZE,max(nblocks,num_chunks)))
call mpi_waitall(nblocks, ireq_hhs, MPI_STATUSES, mpierr) call mpi_waitall(nblocks, ireq_hhs, MPI_STATUSES, mpierr)
...@@ -1772,7 +1772,7 @@ module ELPA2_compute ...@@ -1772,7 +1772,7 @@ module ELPA2_compute
integer(kind=ik) :: mpierr, src, src_offset, dst, offset, nfact, num_blk integer(kind=ik) :: mpierr, src, src_offset, dst, offset, nfact, num_blk
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
#ifdef WITH_MPI #ifdef WITH_MPI
integer(kind=ik) :: mpi_status(MPI_STATUS_SIZE) integer(kind=ik) :: my_mpi_status(MPI_STATUS_SIZE)
#endif #endif
#endif #endif
logical :: flag logical :: flag
...@@ -1957,7 +1957,7 @@ module ELPA2_compute ...@@ -1957,7 +1957,7 @@ module ELPA2_compute
if (src < my_prow) then if (src < my_prow) then
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
#ifdef WITH_MPI #ifdef WITH_MPI
call MPI_Recv(row, l_nev, MPI_REAL8, src, 0, mpi_comm_rows, MPI_STATUS, mpierr) call MPI_Recv(row, l_nev, MPI_REAL8, src, 0, mpi_comm_rows, my_mpi_status, mpierr)
#else #else
row(1:l_nev) = row(1:l_nev) row(1:l_nev) = row(1:l_nev)
#endif #endif
...@@ -2040,7 +2040,7 @@ module ELPA2_compute ...@@ -2040,7 +2040,7 @@ module ELPA2_compute
if (src == ip) then if (src == ip) then
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
#ifdef WITH_MPI #ifdef WITH_MPI
call MPI_Recv(row, l_nev, MPI_REAL8, src, 0, mpi_comm_rows, MPI_STATUS, mpierr) call MPI_Recv(row, l_nev, MPI_REAL8, src, 0, mpi_comm_rows, my_mpi_status, mpierr)
#else #else
row(1:l_nev) = row(1:l_nev) row(1:l_nev) = row(1:l_nev)
#endif #endif
...@@ -2234,7 +2234,7 @@ module ELPA2_compute ...@@ -2234,7 +2234,7 @@ module ELPA2_compute
if (current_n_end < current_n) then if (current_n_end < current_n) then
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
#ifdef WITH_MPI #ifdef WITH_MPI
call MPI_Wait(bottom_recv_request(i), MPI_STATUS, mpierr) call MPI_Wait(bottom_recv_request(i), my_mpi_status, mpierr)
#endif #endif
#ifdef HAVE_DETAILED_TIMINGS #ifdef HAVE_DETAILED_TIMINGS
call timer%start("OpenMP parallel") call timer%start("OpenMP parallel")
...@@ -2293,7 +2293,7 @@ module ELPA2_compute ...@@ -2293,7 +2293,7 @@ module ELPA2_compute
if (top_msg_length>0) then if (top_msg_length>0) then
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call MPI_Wait(top_recv_request(i), MPI_STATUS, mpierr) call MPI_Wait(top_recv_request(i), my_mpi_status, mpierr)
#else #else
call MPI_Wait(top_recv_request(i), MPI_STATUS_IGNORE, mpierr) call MPI_Wait(top_recv_request(i), MPI_STATUS_IGNORE, mpierr)
a(:,a_off+1:a_off+top_msg_length,i) = top_border_recv_buffer(:,1:top_msg_length,i) a(:,a_off+1:a_off+top_msg_length,i) = top_border_recv_buffer(:,1:top_msg_length,i)
...@@ -2335,7 +2335,7 @@ module ELPA2_compute ...@@ -2335,7 +2335,7 @@ module ELPA2_compute
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
#ifdef WITH_MPI #ifdef WITH_MPI
call MPI_Wait(bottom_send_request(i), mpi_status, mpierr) call MPI_Wait(bottom_send_request(i), my_mpi_status, mpierr)
#endif #endif
if (bottom_msg_length>0) then if (bottom_msg_length>0) then
n_off = current_local_n+nbw-bottom_msg_length+a_off n_off = current_local_n+nbw-bottom_msg_length+a_off
...@@ -2393,7 +2393,7 @@ current_local_n - bottom_msg_length, bottom_msg_length, i, my_thread, thread_wid ...@@ -2393,7 +2393,7 @@ current_local_n - bottom_msg_length, bottom_msg_length, i, my_thread, thread_wid
!send_b !send_b
#ifdef WITH_MPI #ifdef WITH_MPI
call MPI_Wait(bottom_send_request(i), mpi_status, mpierr) call MPI_Wait(bottom_send_request(i), my_mpi_status, mpierr)
#endif #endif
if (bottom_msg_length > 0) then if (bottom_msg_length > 0) then
n_off = current_local_n+nbw-bottom_msg_length+a_off n_off = current_local_n+nbw-bottom_msg_length+a_off
...@@ -2464,7 +2464,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -2464,7 +2464,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
if (top_msg_length>0) then if (top_msg_length>0) then
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call MPI_Wait(top_recv_request(i), mpi_status, mpierr) call MPI_Wait(top_recv_request(i), my_mpi_status, mpierr)
#else #else
call MPI_Wait(top_recv_request(i), MPI_STATUS_IGNORE, mpierr) call MPI_Wait(top_recv_request(i), MPI_STATUS_IGNORE, mpierr)
a(:,a_off+1:a_off+top_msg_length,i) = top_border_recv_buffer(:,1:top_msg_length,i) a(:,a_off+1:a_off+top_msg_length,i) = top_border_recv_buffer(:,1:top_msg_length,i)
...@@ -2534,7 +2534,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -2534,7 +2534,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
#ifdef WITH_MPI #ifdef WITH_MPI
call MPI_Wait(top_send_request(i), mpi_status, mpierr) call MPI_Wait(top_send_request(i), my_mpi_status, mpierr)
#endif #endif
b_len = csw*nbw*max_threads b_len = csw*nbw*max_threads
top_border_send_buffer(1:b_len,i) = reshape(a(1:csw,a_off+1:a_off+nbw,i,:), (/ b_len /)) top_border_send_buffer(1:b_len,i) = reshape(a(1:csw,a_off+1:a_off+nbw,i,:), (/ b_len /))
...@@ -2578,7 +2578,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -2578,7 +2578,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
if (i>1) then if (i>1) then
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call MPI_Wait(top_recv_request(i-1), MPI_STATUS, mpierr) call MPI_Wait(top_recv_request(i-1), my_mpi_status, mpierr)
#else #else
call MPI_Wait(top_recv_request(i-1), MPI_STATUS_IGNORE, mpierr) call MPI_Wait(top_recv_request(i-1), MPI_STATUS_IGNORE, mpierr)
#endif #endif
...@@ -2586,7 +2586,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -2586,7 +2586,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
else else
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call MPI_Wait(top_recv_request(stripe_count), MPI_STATUS, mpierr) call MPI_Wait(top_recv_request(stripe_count), my_mpi_status, mpierr)
#else #else
call MPI_Wait(top_recv_request(stripe_count), MPI_STATUS_IGNORE, mpierr) call MPI_Wait(top_recv_request(stripe_count), MPI_STATUS_IGNORE, mpierr)
#endif #endif
...@@ -2601,7 +2601,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -2601,7 +2601,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
#ifdef WITH_MPI #ifdef WITH_MPI
do i = 1, stripe_count do i = 1, stripe_count
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call MPI_Wait(top_send_request(i), MPI_STATUS, mpierr) call MPI_Wait(top_send_request(i), my_mpi_status, mpierr)
#else #else
call MPI_Wait(top_send_request(i), MPI_STATUS_IGNORE, mpierr) call MPI_Wait(top_send_request(i), MPI_STATUS_IGNORE, mpierr)
#endif #endif
...@@ -2622,7 +2622,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -2622,7 +2622,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
nbuf = mod(num_blk, num_result_buffers) + 1 ! buffer number to get this block nbuf = mod(num_blk, num_result_buffers) + 1 ! buffer number to get this block
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call MPI_Wait(result_send_request(nbuf), MPI_STATUS, mpierr) call MPI_Wait(result_send_request(nbuf), my_mpi_status, mpierr)
#else #else
call MPI_Wait(result_send_request(nbuf), MPI_STATUS_IGNORE, mpierr) call MPI_Wait(result_send_request(nbuf), MPI_STATUS_IGNORE, mpierr)
#endif #endif
...@@ -2680,7 +2680,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -2680,7 +2680,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
if (next_local_n > 0) then if (next_local_n > 0) then
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call MPI_Test(result_recv_request(nbuf), flag, MPI_STATUS, mpierr) call MPI_Test(result_recv_request(nbuf), flag, my_mpi_status, mpierr)
#else #else
call MPI_Test(result_recv_request(nbuf), flag, MPI_STATUS_IGNORE, mpierr) call MPI_Test(result_recv_request(nbuf), flag, MPI_STATUS_IGNORE, mpierr)
...@@ -2694,7 +2694,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -2694,7 +2694,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
else else
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call MPI_Wait(result_recv_request(nbuf), MPI_STATUS, mpierr) call MPI_Wait(result_recv_request(nbuf), my_mpi_status, mpierr)
#else #else
call MPI_Wait(result_recv_request(nbuf), MPI_STATUS_IGNORE, mpierr) call MPI_Wait(result_recv_request(nbuf), MPI_STATUS_IGNORE, mpierr)
#endif #endif
...@@ -3464,7 +3464,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -3464,7 +3464,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
integer(kind=ik) :: max_threads, my_thread, my_block_s, my_block_e, iter integer(kind=ik) :: max_threads, my_thread, my_block_s, my_block_e, iter
integer(kind=ik) :: omp_get_max_threads integer(kind=ik) :: omp_get_max_threads
#ifdef WITH_MPI #ifdef WITH_MPI
integer(kind=ik) :: mpi_status(MPI_STATUS_SIZE) integer(kind=ik) :: my_mpi_status(MPI_STATUS_SIZE)
#endif #endif
complex(kind=ck), allocatable :: hv_t(:,:), tau_t(:) complex(kind=ck), allocatable :: hv_t(:,:), tau_t(:)
#endif #endif
...@@ -3674,7 +3674,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -3674,7 +3674,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call mpi_recv(hv,nb,MPI_COMPLEX16,my_pe-1,2,mpi_comm,mpi_status,mpierr) call mpi_recv(hv,nb,MPI_COMPLEX16,my_pe-1,2,mpi_comm,my_mpi_status,mpierr)
#else #else
call mpi_recv(hv,nb,MPI_COMPLEX16,my_pe-1,2,mpi_comm,MPI_STATUS_IGNORE,mpierr) call mpi_recv(hv,nb,MPI_COMPLEX16,my_pe-1,2,mpi_comm,MPI_STATUS_IGNORE,mpierr)
#endif #endif
...@@ -3830,7 +3830,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -3830,7 +3830,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
! Send our first column to previous PE ! Send our first column to previous PE
if (my_pe>0 .and. na_s <= na) then if (my_pe>0 .and. na_s <= na) then
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_wait(ireq_ab,mpi_status,mpierr) call mpi_wait(ireq_ab,my_mpi_status,mpierr)
#endif #endif
ab_s(1:nb+1) = ab(1:nb+1,na_s-n_off) ab_s(1:nb+1) = ab(1:nb+1,na_s-n_off)
#ifdef WITH_MPI #ifdef WITH_MPI
...@@ -3842,7 +3842,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -3842,7 +3842,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
ne = na_s + nblocks*nb - (max_threads-1) - 1 ne = na_s + nblocks*nb - (max_threads-1) - 1
#ifdef WITH_MPI #ifdef WITH_MPI
if (istep>=max_threads .and. ne <= na) then if (istep>=max_threads .and. ne <= na) then
call mpi_recv(ab(1,ne-n_off),nb+1,MPI_COMPLEX16,my_pe+1,1,mpi_comm,mpi_status,mpierr) call mpi_recv(ab(1,ne-n_off),nb+1,MPI_COMPLEX16,my_pe+1,1,mpi_comm,my_mpi_status,mpierr)
endif endif
#else #else
if (istep>=max_threads .and. ne <= na) then if (istep>=max_threads .and. ne <= na) then
...@@ -3856,7 +3856,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -3856,7 +3856,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
ne = na_s + nblocks*nb - (max_threads-1) - 1 ne = na_s + nblocks*nb - (max_threads-1) - 1
if (istep>=max_threads .and. ne < na) then if (istep>=max_threads .and. ne < na) then
#ifdef WITH_MPI #ifdef WITH_MPI
call mpi_wait(ireq_hv,mpi_status,mpierr) call mpi_wait(ireq_hv,my_mpi_status,mpierr)
#endif #endif
hv_s(1) = tau_t(max_threads) hv_s(1) = tau_t(max_threads)
hv_s(2:) = hv_t(2:,max_threads) hv_s(2:) = hv_t(2:,max_threads)
...@@ -3954,7 +3954,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -3954,7 +3954,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call mpi_recv(ab(1,ne),nb+1,MPI_COMPLEX16,my_pe+1,1,mpi_comm,mpi_status,mpierr) call mpi_recv(ab(1,ne),nb+1,MPI_COMPLEX16,my_pe+1,1,mpi_comm,my_mpi_status,mpierr)
#else #else
call mpi_recv(ab(1,ne),nb+1,MPI_COMPLEX16,my_pe+1,1,mpi_comm,MPI_STATUS_IGNORE,mpierr) call mpi_recv(ab(1,ne),nb+1,MPI_COMPLEX16,my_pe+1,1,mpi_comm,MPI_STATUS_IGNORE,mpierr)
...@@ -4006,7 +4006,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -4006,7 +4006,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
if (iblk==nblocks) then if (iblk==nblocks) then
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call mpi_wait(ireq_hv,mpi_status,mpierr) call mpi_wait(ireq_hv,my_mpi_status,mpierr)
#else #else
call mpi_wait(ireq_hv,MPI_STATUS_IGNORE,mpierr) call mpi_wait(ireq_hv,MPI_STATUS_IGNORE,mpierr)
#endif #endif
...@@ -4035,7 +4035,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, & ...@@ -4035,7 +4035,7 @@ top_msg_length, current_local_n-top_msg_length-bottom_msg_length, i, &
! ... send it away ... ! ... send it away ...
#ifdef WITH_MPI #ifdef WITH_MPI
#ifdef WITH_OPENMP #ifdef WITH_OPENMP
call mpi_wait(ireq_ab,mpi_status,mpierr) call mpi_wait(ireq_ab,my_mpi_status,mpierr)
#else #else
call mpi_wait(ireq_ab,MPI_STATUS_IGNORE,mpierr) call mpi_wait(ireq_ab,MPI_STATUS_IGNORE,mpierr)