- Timestamp:
- Mar 14, 2018 8:33:20 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/pmc_particle_interface.f90
r2841 r2884 26 26 ! -----------------! 27 27 ! $Id$ 28 ! B: corrected KIND of variable "parsize" for some MPI calls 29 ! 30 ! 2841 2018-02-27 15:02:57Z knoop 28 31 ! Bugfix: wrong placement of include 'mpif.h' corrected 29 32 ! … … 233 236 INTEGER(iwp) :: nr_childs !< Number of child models of the current model 234 237 235 INTEGER(KIND=MPI_ADDRESS_KIND) :: parsize !< 238 INTEGER :: parsize !< 239 INTEGER(KIND=MPI_ADDRESS_KIND) :: parsize_mpi_address_kind !< 236 240 INTEGER(KIND=MPI_ADDRESS_KIND) :: winsize !< 237 241 TYPE(C_PTR), SAVE :: ptr !< … … 245 249 IF ( cpl_id > 1 ) THEN 246 250 247 parsize = STORAGE_SIZE(zero_particle)/8 248 249 CALL MPI_ALLOC_MEM( parsize , MPI_INFO_NULL, ptr, ierr ) 251 parsize_mpi_address_kind = STORAGE_SIZE(zero_particle)/8 252 253 CALL MPI_ALLOC_MEM( parsize_mpi_address_kind , MPI_INFO_NULL, ptr, ierr ) 254 parsize = parsize_mpi_address_kind 250 255 buf_shape(1) = 1 251 256 CALL C_F_POINTER( ptr, win_buffer, buf_shape ) 252 CALL MPI_WIN_CREATE( win_buffer, parsize , parsize, &257 CALL MPI_WIN_CREATE( win_buffer, parsize_mpi_address_kind, parsize, & 253 258 MPI_INFO_NULL, me%intra_comm, particle_win_child, & 254 259 ierr ) … … 261 266 jcn = coarse_bound(4) 262 267 263 !ALLOCATE( coarse_particles(jcs:jcn, icl:icr) )268 ALLOCATE( coarse_particles(jcs:jcn, icl:icr) ) 264 269 265 270 coarse_particles(:,:)%nr_particle = 0 … … 274 279 DO m = 1, nr_childs 275 280 child_id = get_childid(m) 276 parsize = STORAGE_SIZE(zero_particle)/8 277 278 winsize = max_nr_particle_in_rma_win * parsize 281 parsize_mpi_address_kind = STORAGE_SIZE(zero_particle)/8 282 parsize = parsize_mpi_address_kind 283 284 winsize = max_nr_particle_in_rma_win * parsize_mpi_address_kind 279 285 CALL MPI_ALLOC_MEM( winsize , MPI_INFO_NULL, buf_ptr(m), ierr ) 280 286 buf_shape(1) = max_nr_particle_in_rma_win 281 287 CALL C_F_POINTER( buf_ptr(m), win_buffer, buf_shape ) 282 CALL MPI_WIN_CREATE( win_buffer, winsize, parsize, &283 MPI_INFO_NULL, children(child_id)%intra_comm,&288 CALL MPI_WIN_CREATE( win_buffer, winsize, parsize, MPI_INFO_NULL, & 289 children(child_id)%intra_comm, & 284 290 particle_win_parent(m), ierr ) 285 291 ENDDO … … 306 312 INTEGER(iwp) :: nr !< number of particles to receive from a parent box 307 313 308 INTEGER(KIND=MPI_ADDRESS_KIND) :: parsize !< 314 INTEGER :: parsize !< 315 INTEGER(KIND=MPI_ADDRESS_KIND) :: parsize_mpi_address_kind !< 309 316 INTEGER(KIND=MPI_ADDRESS_KIND) :: target_disp !< 310 317 … … 337 344 338 345 CALL check_and_alloc_coarse_particle (i, j, nr) 339 parsize = STORAGE_SIZE(zero_particle)/8 346 parsize_mpi_address_kind = STORAGE_SIZE(zero_particle)/8 347 parsize = parsize_mpi_address_kind 340 348 target_disp = part_adrc(j,i) - 1 341 CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip - 1, 0, particle_win_child, ierr ) 349 CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip - 1, 0, & 350 particle_win_child, ierr ) 342 351 CALL MPI_GET( coarse_particles(j,i)%parent_particles, & 343 nr * parsize, MPI_BYTE, ip - 1, & 344 target_disp, nr * parsize, & 345 MPI_BYTE, particle_win_child, ierr ) 352 nr * parsize, MPI_BYTE, ip - 1, target_disp, & 353 nr * parsize, MPI_BYTE, particle_win_child, ierr ) 346 354 CALL MPI_WIN_UNLOCK( ip - 1, particle_win_child, ierr ) 347 355 ENDIF … … 379 387 INTEGER(iwp) :: pe_offset !< offset index of the current PE 380 388 381 INTEGER(KIND=MPI_ADDRESS_KIND) :: parsize !< 389 INTEGER :: parsize !< 390 INTEGER(KIND=MPI_ADDRESS_KIND) :: parsize_mpi_address_kind !< 382 391 INTEGER(KIND=MPI_ADDRESS_KIND) :: target_disp !< 383 392 … … 429 438 max_nr_particle_per_pe = max_nr_particle_in_rma_win / ( n * n ) 430 439 disp_offset = pe_offset * max_nr_particle_per_pe 431 parsize = STORAGE_SIZE(zero_particle)/8 440 parsize_mpi_address_kind = STORAGE_SIZE(zero_particle)/8 441 parsize = parsize_mpi_address_kind 432 442 DO ip = 1, me%inter_npes 433 443 … … 447 457 CALL message( 'pmci_create_child_arrays', 'PA0480', 3, 2, 0, 6, 0 ) ! PA number has to be adjusted 448 458 ENDIF 449 CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip - 1, 0, particle_win_child, ierr ) 459 CALL MPI_WIN_LOCK( MPI_LOCK_SHARED , ip - 1, 0, & 460 particle_win_child, ierr ) 450 461 CALL MPI_PUT( coarse_particles(j,i)%parent_particles, & 451 nr * parsize, MPI_BYTE, ip - 1, & 452 target_disp, nr * parsize , & 453 MPI_BYTE, particle_win_child, ierr ) 462 nr * parsize, MPI_BYTE, ip - 1, target_disp, & 463 nr * parsize, MPI_BYTE, particle_win_child, ierr ) 454 464 CALL MPI_WIN_UNLOCK( ip - 1, particle_win_child, ierr ) 455 465 part_adrc(j,i) = target_disp + 1
Note: See TracChangeset
for help on using the changeset viewer.