Skip to content

Commit

Permalink
Merge branch 'refs/heads/Ver.2.0_alpha' into Ver.2.0_w_PVR
Browse files Browse the repository at this point in the history
  • Loading branch information
hiromatsui committed Apr 10, 2024
2 parents e1e4f50 + 7167766 commit d38d412
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ set_vr_rtm_sym_mat_tsmp.o: $(SPH_COMMDIR)/set_vr_rtm_sym_mat_tsmp.f90 m_precisio
$(F90) -c $(F90OPTFLAGS) $<
small_matmul_leg_trans_krin.o: $(SPH_COMMDIR)/small_matmul_leg_trans_krin.F90 m_precision.o m_constants.o matmul_for_legendre_trans.o
$(F90) -c $(F90OPTFLAGS) $(F90CPPFLAGS) $<
sph_prt_FFTPACK5.o: $(SPH_COMMDIR)/sph_prt_FFTPACK5.f90 m_precision.o m_constants.o m_machine_parameter.o m_elapsed_labels_SPH_TRNS.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFT.o t_sph_FFTPACK5.o calypso_mpi.o set_comm_table_prt_FFTPACK.o copy_rtp_data_to_FFTPACK.o
sph_prt_FFTPACK5.o: $(SPH_COMMDIR)/sph_prt_FFTPACK5.f90 m_precision.o m_constants.o m_machine_parameter.o m_elapsed_labels_SPH_TRNS.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFT.o t_sph_FFTPACK5.o calypso_mpi.o set_comm_table_prt_FFTPACK.o copy_field_smp.o copy_rtp_data_to_FFTPACK.o
$(F90) -c $(F90OPTFLAGS) $<
sph_prt_FFTW.o: $(SPH_COMMDIR)/sph_prt_FFTW.f90 m_precision.o m_constants.o m_machine_parameter.o m_fftw_parameters.o m_elapsed_labels_SPH_TRNS.o calypso_mpi.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFTW.o t_sph_field_FFTW.o set_comm_table_prt_FFTW.o copy_rtp_data_to_FFTPACK.o
sph_prt_FFTW.o: $(SPH_COMMDIR)/sph_prt_FFTW.f90 m_precision.o m_constants.o m_machine_parameter.o m_fftw_parameters.o m_elapsed_labels_SPH_TRNS.o calypso_mpi.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFTW.o t_sph_field_FFTW.o set_comm_table_prt_FFTW.o copy_field_smp.o copy_rtp_data_to_FFTPACK.o
$(F90) -c $(F90OPTFLAGS) $<
sph_prt_domain_FFTPACK5.o: $(SPH_COMMDIR)/sph_prt_domain_FFTPACK5.f90 m_precision.o m_constants.o m_machine_parameter.o m_elapsed_labels_SPH_TRNS.o calypso_mpi.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFT.o t_sph_domain_FFTPACK5.o set_comm_table_prt_FFTPACK.o copy_rtp_data_to_FFTPACK.o
sph_prt_domain_FFTPACK5.o: $(SPH_COMMDIR)/sph_prt_domain_FFTPACK5.f90 m_precision.o m_constants.o m_machine_parameter.o m_elapsed_labels_SPH_TRNS.o calypso_mpi.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFT.o t_sph_domain_FFTPACK5.o set_comm_table_prt_FFTPACK.o copy_field_smp.o copy_rtp_data_to_FFTPACK.o
$(F90) -c $(F90OPTFLAGS) $<
sph_prt_domain_FFTW.o: $(SPH_COMMDIR)/sph_prt_domain_FFTW.f90 m_precision.o m_constants.o m_machine_parameter.o m_fftw_parameters.o m_elapsed_labels_SPH_TRNS.o calypso_mpi.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFTW.o t_sph_field_FFTW.o set_comm_table_prt_FFTW.o copy_rtp_data_to_FFTPACK.o
sph_prt_domain_FFTW.o: $(SPH_COMMDIR)/sph_prt_domain_FFTW.f90 m_precision.o m_constants.o m_machine_parameter.o m_fftw_parameters.o m_elapsed_labels_SPH_TRNS.o calypso_mpi.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFTW.o t_sph_field_FFTW.o set_comm_table_prt_FFTW.o copy_field_smp.o copy_rtp_data_to_FFTPACK.o
$(F90) -c $(F90OPTFLAGS) $<
sph_rtp_FFTPACK5.o: $(SPH_COMMDIR)/sph_rtp_FFTPACK5.f90 m_precision.o m_constants.o m_machine_parameter.o m_elapsed_labels_SPH_TRNS.o t_spheric_rtp_data.o t_sph_trans_comm_tbl.o t_sph_comm_table_from_FFT.o t_sph_FFTPACK5.o calypso_mpi.o set_comm_table_rtp_FFTPACK.o copy_rtp_data_to_FFTPACK.o
$(F90) -c $(F90OPTFLAGS) $<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
!! & irt_rtp_smp_stack, X_FFT, X_rtp)
!! subroutine copy_FFTPACK_from_rtp_comp(nnod_rtp, nidx_rtp, &
!! & irt_rtp_smp_stack, X_rtp, X_FFT)
!!
!! subroutine copy_FFTPACK_to_prt_field &
!! & (nnod_rtp, ncomp_bwd, X_FFT, X_prt)
!! subroutine copy_FFTPACK_from_prt_field &
!! & (nnod_rtp, ncomp_fwd, X_prt, X_FFT)
!!
!! subroutine copy_FFTPACK_to_prt_comp(nnod_rtp, X_prt, X_FFT)
!!@endverbatim
!!
module copy_rtp_data_to_FFTPACK
Expand Down Expand Up @@ -128,20 +121,18 @@ subroutine copy_FFTPACK_to_rtp_comp(nnod_rtp, nidx_rtp, &
& :: X_rtp(irt_rtp_smp_stack(np_smp),nidx_rtp(3))
!
!
integer(kind = kint) :: m, j, ip, ist, num
integer(kind = kint) :: m, ip, ist, num
integer(kind = kint) :: inod_c, ist_fft
!
!
!$omp parallel do private(ip,m,j,ist,num,inod_c,ist_fft)
!$omp parallel do private(ip,m,ist,num,inod_c,ist_fft)
do ip = 1, np_smp
ist = irt_rtp_smp_stack(ip-1)
num = irt_rtp_smp_stack(ip) - irt_rtp_smp_stack(ip-1)
ist_fft = irt_rtp_smp_stack(ip-1) * nidx_rtp(3)
do m = 1, nidx_rtp(3)
inod_c = (m-1)*num + ist_fft
do j = 1, num
X_rtp(j+ist,m) = X_FFT(j+inod_c)
end do
X_rtp(1+ist:num+ist,m) = X_FFT(1+inod_c:num+inod_c)
end do
end do
!$omp end parallel do
Expand All @@ -162,95 +153,25 @@ subroutine copy_FFTPACK_from_rtp_comp(nnod_rtp, nidx_rtp, &
!
real(kind = kreal), intent(inout) :: X_FFT(nnod_rtp)
!
integer(kind = kint) :: m, j, ip, ist, num
integer(kind = kint) :: m, ip, ist, num
integer(kind = kint) :: inod_c, ist_fft
!
!
!$omp parallel do private(m,j,ist,num,inod_c,ist_fft)
!$omp parallel do private(m,ist,num,inod_c,ist_fft)
do ip = 1, np_smp
ist = irt_rtp_smp_stack(ip-1)
num = irt_rtp_smp_stack(ip) - irt_rtp_smp_stack(ip-1)
ist_fft = irt_rtp_smp_stack(ip-1) * nidx_rtp(3)
!
do m = 1, nidx_rtp(3)
inod_c = (m-1)*num + ist_fft
do j = 1, num
X_FFT(j+inod_c) = X_rtp(j+ist,m)
end do
X_FFT(1+inod_c:num+inod_c) = X_rtp(1+ist:num+ist,m)
end do
end do
!$omp end parallel do
!
end subroutine copy_FFTPACK_from_rtp_comp
!
! ------------------------------------------------------------------
! ------------------------------------------------------------------
!
subroutine copy_FFTPACK_to_prt_field &
& (nnod_rtp, ncomp_bwd, X_FFT, X_prt)
!
integer(kind = kint), intent(in) :: nnod_rtp
!
integer(kind = kint), intent(in) :: ncomp_bwd
real(kind = kreal), intent(in) :: X_FFT(ncomp_bwd*nnod_rtp)
!
real(kind = kreal), intent(inout) :: X_prt(nnod_rtp,ncomp_bwd)
!
integer(kind = kint) :: nd, inod_c, inod
!
!
!$omp parallel do private(inod,nd,inod_c)
do inod = 1, nnod_rtp
do nd = 1, ncomp_bwd
inod_c = nd + (inod-1) * ncomp_bwd
X_prt(inod_c,nd) = X_FFT(inod_c)
end do
end do
!$omp end parallel do
!
end subroutine copy_FFTPACK_to_prt_field
!
! ------------------------------------------------------------------
!
subroutine copy_FFTPACK_from_prt_field &
& (nnod_rtp, ncomp_fwd, X_prt, X_FFT)
!
integer(kind = kint), intent(in) :: nnod_rtp
!
integer(kind = kint), intent(in) :: ncomp_fwd
real(kind = kreal), intent(in) :: X_prt(nnod_rtp,ncomp_fwd)
!
real(kind = kreal), intent(inout) :: X_FFT(ncomp_fwd*nnod_rtp)
!
integer(kind = kint) :: inod, inod_c
!
!
!$omp parallel do private(inod,inod_c)
do inod = 1, nnod_rtp
inod_c = (inod-1) * ncomp_fwd
X_FFT(inod_c+1:inod_c+ncomp_fwd) = X_prt(inod,1:ncomp_fwd)
end do
!$omp end parallel do
!
end subroutine copy_FFTPACK_from_prt_field
!
! ------------------------------------------------------------------
! ------------------------------------------------------------------
!
subroutine copy_FFTPACK_to_prt_comp(nnod_rtp, X_prt, X_FFT)
!
integer(kind = kint), intent(in) :: nnod_rtp
real(kind = kreal), intent(in):: X_prt(nnod_rtp)
!
real(kind = kreal), intent(inout) :: X_FFT(nnod_rtp)
!
!
!$omp parallel workshare
X_FFT(1:nnod_rtp) = X_prt(1:nnod_rtp)
!$omp end parallel workshare
!
end subroutine copy_FFTPACK_to_prt_comp
!
! ------------------------------------------------------------------
!
end module copy_rtp_data_to_FFTPACK
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ end subroutine verify_prt_FFTPACK5
subroutine prt_RFFTMF_to_send &
& (sph_rtp, ncomp_fwd, n_WS, X_rtp, WS, fftpack_t)
!
use copy_field_smp
use copy_rtp_data_to_FFTPACK
use set_comm_table_prt_FFTPACK
!
Expand All @@ -177,7 +178,9 @@ subroutine prt_RFFTMF_to_send &
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+4)
nsize = ncomp_fwd * sph_rtp%nnod_rtp
call copy_FFTPACK_to_prt_comp(nsize, X_rtp(1,1), fftpack_t%X(1))
!$omp parallel
call copy_nod_scalar_smp(nsize, X_rtp(1,1), fftpack_t%X(1))
!$omp end parallel
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+4)
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+5)
Expand Down Expand Up @@ -208,6 +211,7 @@ end subroutine prt_RFFTMF_to_send
subroutine prt_RFFTMB_from_recv(sph_rtp, comm_rtp, ncomp_bwd, &
& n_WR, WR, X_rtp, fftpack_t)
!
use copy_field_smp
use copy_rtp_data_to_FFTPACK
use set_comm_table_prt_FFTPACK
!
Expand Down Expand Up @@ -251,8 +255,10 @@ subroutine prt_RFFTMB_from_recv(sph_rtp, comm_rtp, ncomp_bwd, &
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+3)
nsize = ncomp_bwd * sph_rtp%nnod_rtp
call copy_FFTPACK_to_prt_comp(nsize, fftpack_t%X(1), X_rtp(1,1))
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+3)
!$omp parallel
call copy_nod_scalar_smp(nsize, fftpack_t%X(1), X_rtp(1,1))
!$omp end parallel
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+3)
!
end subroutine prt_RFFTMB_from_recv
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ end subroutine verify_prt_FFTW
subroutine prt_fwd_FFTW_to_send &
& (sph_rtp, comm_rtp, ncomp_fwd, n_WS, X_rtp, WS, FFTW_f)
!
use copy_field_smp
use set_comm_table_prt_FFTW
use copy_rtp_data_to_FFTPACK
!
Expand All @@ -201,7 +202,9 @@ subroutine prt_fwd_FFTW_to_send &
!
ntot = sph_rtp%nnod_rtp * ncomp_fwd
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+4)
call copy_FFTPACK_to_prt_comp(ntot, X_rtp(1,1), FFTW_f%X(1))
!$omp parallel
call copy_nod_scalar_smp(ntot, X_rtp(1,1), FFTW_f%X(1))
!$omp end parallel
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+4)
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+5)
Expand Down Expand Up @@ -234,6 +237,7 @@ end subroutine prt_fwd_FFTW_to_send
subroutine prt_back_FFTW_from_recv &
& (sph_rtp, comm_rtp, ncomp_bwd, n_WR, WR, X_rtp, FFTW_f)
!
use copy_field_smp
use set_comm_table_prt_FFTW
use copy_rtp_data_to_FFTPACK
!
Expand Down Expand Up @@ -274,7 +278,9 @@ subroutine prt_back_FFTW_from_recv &
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+3)
ntot = sph_rtp%nnod_rtp * ncomp_bwd
call copy_FFTPACK_to_prt_comp(ntot, FFTW_f%X(1), X_rtp(1,1))
!$omp parallel
call copy_nod_scalar_smp(ntot, FFTW_f%X(1), X_rtp(1,1))
!$omp end parallel
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+3)
!
end subroutine prt_back_FFTW_from_recv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ end subroutine verify_prt_domain_FFTPACK5
subroutine prt_domain_RFFTMF_to_send &
& (sph_rtp, ncomp_fwd, n_WS, X_rtp, WS, fftpack_d)
!
use copy_field_smp
use copy_rtp_data_to_FFTPACK
use set_comm_table_prt_FFTPACK
!
Expand All @@ -168,8 +169,10 @@ subroutine prt_domain_RFFTMF_to_send &
!
do nd = 1, ncomp_fwd
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+4)
call copy_FFTPACK_to_prt_comp &
!$omp parallel
call copy_nod_scalar_smp &
& (sph_rtp%nnod_rtp, X_rtp(1,nd), fftpack_d%X(1))
!$omp end parallel
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+4)
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+5)
Expand Down Expand Up @@ -200,6 +203,7 @@ end subroutine prt_domain_RFFTMF_to_send
subroutine prt_domain_RFFTMB_from_recv(sph_rtp, comm_rtp, &
& ncomp_bwd, n_WR, WR, X_rtp, fftpack_d)
!
use copy_field_smp
use copy_rtp_data_to_FFTPACK
use set_comm_table_prt_FFTPACK
!
Expand Down Expand Up @@ -241,8 +245,10 @@ subroutine prt_domain_RFFTMB_from_recv(sph_rtp, comm_rtp, &
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+2)
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+3)
call copy_FFTPACK_to_prt_comp &
!$omp parallel
call copy_nod_scalar_smp &
& (sph_rtp%nnod_rtp, fftpack_d%X(1), X_rtp(1,nd))
!$omp end parallel
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+3)
end do
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ end subroutine verify_prt_field_FFTW
subroutine prt_field_fwd_FFTW_to_send &
& (sph_rtp, comm_rtp, ncomp_fwd, n_WS, X_rtp, WS, FFTW_f)
!
use copy_field_smp
use set_comm_table_prt_FFTW
use copy_rtp_data_to_FFTPACK
!
Expand All @@ -193,8 +194,10 @@ subroutine prt_field_fwd_FFTW_to_send &
!
do nd = 1, ncomp_fwd
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+4)
call copy_FFTPACK_to_prt_comp &
!$omp parallel
call copy_nod_scalar_smp &
& (sph_rtp%nnod_rtp, X_rtp(1,nd), FFTW_f%X(1))
!$omp end parallel
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+4)
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+5)
Expand Down Expand Up @@ -228,6 +231,7 @@ end subroutine prt_field_fwd_FFTW_to_send
subroutine prt_field_back_FFTW_from_recv &
& (sph_rtp, comm_rtp, ncomp_bwd, n_WR, WR, X_rtp, FFTW_f)
!
use copy_field_smp
use set_comm_table_prt_FFTW
use copy_rtp_data_to_FFTPACK
!
Expand Down Expand Up @@ -267,8 +271,10 @@ subroutine prt_field_back_FFTW_from_recv &
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+2)
!
if(iflag_FFT_time) call start_elapsed_time(ist_elapsed_FFT+3)
call copy_FFTPACK_to_prt_comp &
!$omp parallel
call copy_nod_scalar_smp &
& (sph_rtp%nnod_rtp, FFTW_f%X(1), X_rtp(1,nd))
!$omp end parallel
if(iflag_FFT_time) call end_elapsed_time(ist_elapsed_FFT+3)
end do
!
Expand Down

0 comments on commit d38d412

Please sign in to comment.