47 |
|
!! |
48 |
|
!! @author Charles F. Vardeman II |
49 |
|
!! @author Matthew Meineke |
50 |
< |
!! @version $Id: simParallel.F90,v 1.6 2006-04-03 15:37:43 chuckv Exp $, $Date: 2006-04-03 15:37:43 $, $Name: not supported by cvs2svn $, $Revision: 1.6 $ |
50 |
> |
!! @version $Id: simParallel.F90,v 1.7 2006-05-17 19:54:27 gezelter Exp $, $Date: 2006-05-17 19:54:27 $, $Name: not supported by cvs2svn $, $Revision: 1.7 $ |
51 |
|
|
52 |
|
module mpiSimulation |
53 |
|
use definitions |
87 |
|
public :: mpi_integer |
88 |
|
public :: mpi_lor |
89 |
|
public :: mpi_logical |
90 |
+ |
public :: mpi_real |
91 |
|
public :: mpi_double_precision |
92 |
|
public :: mpi_sum |
93 |
|
public :: mpi_max |
603 |
|
#ifdef PROFILE |
604 |
|
call cpu_time(commTimeInitial) |
605 |
|
#endif |
606 |
+ |
#ifdef SINGLE_PRECISION |
607 |
+ |
call mpi_allgatherv(sbuffer,this_plan%gsPlanSize, mpi_real, & |
608 |
+ |
rbuffer,this_plan%counts,this_plan%displs,mpi_real, & |
609 |
+ |
this_plan%myPlanComm, mpi_err) |
610 |
+ |
#else |
611 |
|
call mpi_allgatherv(sbuffer,this_plan%gsPlanSize, mpi_double_precision, & |
612 |
|
rbuffer,this_plan%counts,this_plan%displs,mpi_double_precision, & |
613 |
|
this_plan%myPlanComm, mpi_err) |
614 |
+ |
#endif |
615 |
|
#ifdef PROFILE |
616 |
|
call cpu_time(commTimeFinal) |
617 |
|
commTime = commTime + commTimeFinal - commTimeInitial |
640 |
|
call cpu_time(commTimeInitial) |
641 |
|
#endif |
642 |
|
|
643 |
+ |
#ifdef SINGLE_PRECISION |
644 |
+ |
call mpi_allgatherv(sbuffer,this_plan%gsPlanSize, mpi_real, & |
645 |
+ |
rbuffer,this_plan%counts,this_plan%displs,mpi_real, & |
646 |
+ |
this_plan%myPlanComm, mpi_err) |
647 |
+ |
#else |
648 |
|
call mpi_allgatherv(sbuffer,this_plan%gsPlanSize, mpi_double_precision, & |
649 |
|
rbuffer,this_plan%counts,this_plan%displs,mpi_double_precision, & |
650 |
|
this_plan%myPlanComm, mpi_err) |
651 |
+ |
#endif |
652 |
|
|
653 |
|
#ifdef PROFILE |
654 |
|
call cpu_time(commTimeFinal) |
674 |
|
#ifdef PROFILE |
675 |
|
call cpu_time(commTimeInitial) |
676 |
|
#endif |
677 |
+ |
#ifdef SINGLE_PRECISION |
678 |
|
call mpi_reduce_scatter(sbuffer,rbuffer, this_plan%counts, & |
679 |
+ |
mpi_real, MPI_SUM, this_plan%myPlanComm, mpi_err) |
680 |
+ |
#else |
681 |
+ |
call mpi_reduce_scatter(sbuffer,rbuffer, this_plan%counts, & |
682 |
|
mpi_double_precision, MPI_SUM, this_plan%myPlanComm, mpi_err) |
683 |
+ |
#endif |
684 |
|
#ifdef PROFILE |
685 |
|
call cpu_time(commTimeFinal) |
686 |
|
commTime = commTime + commTimeFinal - commTimeInitial |
704 |
|
#ifdef PROFILE |
705 |
|
call cpu_time(commTimeInitial) |
706 |
|
#endif |
707 |
< |
|
707 |
> |
#ifdef SINGLE_PRECISION |
708 |
|
call mpi_reduce_scatter(sbuffer,rbuffer, this_plan%counts, & |
709 |
+ |
mpi_real, MPI_SUM, this_plan%myPlanComm, mpi_err) |
710 |
+ |
#else |
711 |
+ |
call mpi_reduce_scatter(sbuffer,rbuffer, this_plan%counts, & |
712 |
|
mpi_double_precision, MPI_SUM, this_plan%myPlanComm, mpi_err) |
713 |
+ |
#endif |
714 |
|
#ifdef PROFILE |
715 |
|
call cpu_time(commTimeFinal) |
716 |
|
commTime = commTime + commTimeFinal - commTimeInitial |