- Timestamp:
- Feb 14, 2018 5:34:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/pmc_particle_interface.f90
r2807 r2808 26 26 ! ----------------- 27 27 ! 28 ! Bugfixes gfortran c_sizeof 28 ! Bugfixes gfortran C_SIZEOF(zero_particle) 29 ! 30 ! 29 31 ! 30 32 ! … … 312 314 INTEGER(iwp) :: nr !< number of particles to receive from a parent box 313 315 316 INTEGER(KIND=MPI_ADDRESS_KIND) :: parsize !< 314 317 INTEGER(KIND=MPI_ADDRESS_KIND) :: target_disp !< 315 318 316 319 TYPE(pedef), POINTER :: ape !< TO_DO Klaus: give a description and better name of the variable 317 318 TYPE(particle_type) :: dummy_part !<319 320 320 321 IF ( cpl_id > 1 ) THEN … … 344 345 345 346 CALL check_and_alloc_coarse_particle (i, j, nr) 346 347 #if defined( __gfortran ) 348 ! 349 !-- For the gfortran compiler the function c_sizeof produces strange erros 350 !-- which can probably be attributed to an error in the gfortran compiler. 351 !-- Therefore the particle size in bytes is set manually. Attention: A 352 !-- change of the size of the particle type requires an adjustment of 353 !-- this value 354 parsize = 184 355 #else 356 parsize = C_SIZEOF (zero_particle) 357 #endif 347 358 target_disp = part_adrc(j,i) - 1 348 359 CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip - 1, 0, particle_win_child, ierr ) 349 360 CALL MPI_GET( coarse_particles(j,i)%parent_particles, & 350 nr * C_SIZEOF(dummy_part), MPI_BYTE, ip - 1, &351 target_disp, nr * C_SIZEOF(dummy_part), &361 nr * parsize, MPI_BYTE, ip - 1, & 362 target_disp, nr * parsize, & 352 363 MPI_BYTE, particle_win_child, ierr ) 353 364 CALL MPI_WIN_UNLOCK( ip - 1, particle_win_child, ierr ) … … 386 397 INTEGER(iwp) :: pe_offset !< offset index of the current PE 387 398 399 INTEGER(KIND=MPI_ADDRESS_KIND) :: parsize !< 388 400 INTEGER(KIND=MPI_ADDRESS_KIND) :: target_disp !< 389 401 … … 435 447 max_nr_particle_per_pe = max_nr_particle_in_rma_win / ( n * n ) 436 448 disp_offset = pe_offset * max_nr_particle_per_pe 437 449 #if defined( __gfortran ) 450 ! 451 !-- For the gfortran compiler the function c_sizeof produces strange erros 452 !-- which can probably be attributed to an error in the gfortran compiler. 453 !-- Therefore the particle size in bytes is set manually. Attention: A 454 !-- change of the size of the particle type requires an adjustment of 455 !-- this value 456 parsize = 184 457 #else 458 parsize = C_SIZEOF (zero_particle) 459 #endif 438 460 DO ip = 1, me%inter_npes 439 461 … … 455 477 CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip - 1, 0, particle_win_child, ierr ) 456 478 CALL MPI_PUT( coarse_particles(j,i)%parent_particles, & 457 nr * C_SIZEOF(zero_particle), MPI_BYTE, ip - 1, &458 target_disp, nr * C_SIZEOF(zero_particle), &479 nr * parsize, MPI_BYTE, ip - 1, & 480 target_disp, nr * parsize , & 459 481 MPI_BYTE, particle_win_child, ierr ) 460 482 CALL MPI_WIN_UNLOCK( ip - 1, particle_win_child, ierr )
Note: See TracChangeset
for help on using the changeset viewer.