Changeset bb579a9 in flexpart.git for src/mpi_mod.f90
- Timestamp:
- Sep 13, 2017, 11:55:16 AM (7 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug, univie
- Children:
- 08a38b5
- Parents:
- aa8c34a (diff), dd6a4aa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mpi_mod.f90
raa8c34a rbb579a9 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 !***************************************************************************** 61 68 62 69 use mpi … … 2425 2432 2426 2433 ! 2) Using in-place reduction 2434 2435 !!!-------------------------------------------------------------------- 2436 !!! DJM - 2017-05-09 change - MPI_IN_PLACE option for MPI_Reduce() causes 2437 !!! severe numerical problems in some cases. I'm guessing there are memory 2438 !!! overrun issues in this complex code, but have so far failed to identify 2439 !!! a specific problem. And/or, when one searches the Internet for this 2440 !!! issue, there is "some" hint that the implementation may be buggy. 2441 !!! 2442 !!! At this point, with the following CPP USE_MPIINPLACE directive, the 2443 !!! default behaviour will be to not use the MPI_IN_PLACE option. 2444 !!! Users will have to compile with -DUSE_MPIINPLACE if they want that option. 2445 !!! Introduction of the CPP directives also requires that the code be compiled 2446 !!! with the "-x f95-cpp-input" option. 2447 !!! 2448 !!! Modification of this section requires the addition of array gridunc0, which 2449 !!! requires an allocation in outgrid_init.f90 and initial declaration in 2450 !!! unc_mod.f90. 2451 !!!-------------------------------------------------------------------- 2452 2453 #ifdef USE_MPIINPLACE 2454 2427 2455 if (lroot) then 2428 2456 call MPI_Reduce(MPI_IN_PLACE, gridunc, grid_size3d, mp_sp, MPI_SUM, id_root, & … … 2433 2461 & mp_comm_used, mp_ierr) 2434 2462 end if 2463 2464 #else 2465 2466 call MPI_Reduce(gridunc, gridunc0, grid_size3d, mp_sp, MPI_SUM, id_root, & 2467 & mp_comm_used, mp_ierr) 2468 if (lroot) gridunc = gridunc0 2469 2470 #endif 2435 2471 2436 2472 if ((WETDEP).and.(ldirect.gt.0)) then
Note: See TracChangeset
for help on using the changeset viewer.