Changes in src/mpi_mod.f90 [6ecb30a:aa8c34a] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mpi_mod.f90
r6ecb30a raa8c34a 59 59 ! * 60 60 !***************************************************************************** 61 ! *62 ! Modification by DJM, 2017-05-09 - added #ifdef USE_MPIINPLACE cpp *63 ! directive to mpif_tm_reduce_grid() to insure that MPI_IN_PLACE is *64 ! used in the MPI_Reduce() only if specifically compiled with that *65 ! directive. *66 ! *67 !*****************************************************************************68 61 69 62 use mpi … … 1658 1651 write(*,*) "#### mpi_mod::mpif_gf_send_vars_async> ERROR: & 1659 1652 & invalid memstat" 1653 mind=-1 1654 stop 1660 1655 end if 1661 1656 … … 2033 2028 write(*,*) "#### mpi_mod::mpif_gf_send_vars_nest_async> ERROR: & 2034 2029 & invalid memstat" 2030 mind=-1 2031 stop 2035 2032 end if 2036 2033 … … 2428 2425 2429 2426 ! 2) Using in-place reduction 2430 2431 !!!--------------------------------------------------------------------2432 !!! DJM - 2017-05-09 change - MPI_IN_PLACE option for MPI_Reduce() causes2433 !!! severe numerical problems in some cases. I'm guessing there are memory2434 !!! overrun issues in this complex code, but have so far failed to identify2435 !!! a specific problem. And/or, when one searches the Internet for this2436 !!! issue, there is "some" hint that the implementation may be buggy.2437 !!!2438 !!! At this point, with the following CPP USE_MPIINPLACE directive, the2439 !!! default behaviour will be to not use the MPI_IN_PLACE option.2440 !!! Users will have to compile with -DUSE_MPIINPLACE if they want that option.2441 !!! Introduction of the CPP directives also requires that the code be compiled2442 !!! with the "-x f95-cpp-input" option.2443 !!!2444 !!! Modification of this section requires the addition of array gridunc0, which2445 !!! requires an allocation in outgrid_init.f90 and initial declaration in2446 !!! unc_mod.f90.2447 !!!--------------------------------------------------------------------2448 2449 #ifdef USE_MPIINPLACE2450 2451 2427 if (lroot) then 2452 2428 call MPI_Reduce(MPI_IN_PLACE, gridunc, grid_size3d, mp_sp, MPI_SUM, id_root, & … … 2457 2433 & mp_comm_used, mp_ierr) 2458 2434 end if 2459 2460 #else2461 2462 call MPI_Reduce(gridunc, gridunc0, grid_size3d, mp_sp, MPI_SUM, id_root, &2463 & mp_comm_used, mp_ierr)2464 if (lroot) gridunc = gridunc02465 2466 #endif2467 2435 2468 2436 if ((WETDEP).and.(ldirect.gt.0)) then
Note: See TracChangeset
for help on using the changeset viewer.