Changeset 1171 for palm/trunk
- Timestamp:
- May 30, 2013 11:27:45 AM (11 years ago)
- Location:
- palm/trunk
- Files:
-
- 6 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palm_simple_run
r1047 r1171 19 19 # Current revisions: 20 20 # ----------------- 21 # new option -e which defines the execution command to be used to run PALM 21 22 # 22 23 # Former revisions: … … 26 27 # 1046 2012-11-09 14:38:45Z maronga 27 28 # code put under GPL (PALM 3.9) 29 # 30 # 29/08/11 - BjornW - Adapted for lcflow (ForWind cluster in Oldenburg) 31 # 18/03/10 - Siggi - Some comments changed 32 # 25/01/10 - Siggi - Generating the first version 28 33 34 35 #--------------------------------------------------------------------------------# 29 36 # palm_simple_run - a simple method for running the palm code without 30 37 # using the mrun script 31 # This script runs the palm code in a unique subdirectory (OUTPUT..., 32 # current time/date and number of processors are part of the subdirectory 33 # name). 34 # It requires that palm has been installed with command 35 # palm_simple_install and that the executable palm has been created 36 # with make in directory ...../MAKE_DEPOSITORY_simple 37 38 # Last changes: 39 # 25/01/10 - Siggi - Generating the first version 40 # 18/03/10 - Siggi - Some comments changed 41 # 29/08/11 - BjornW - Adapted for lcflow (ForWind cluster in Oldenburg) 38 # 39 # This script runs the palm code in a unique subdirectory (OUTPUT..., 40 # current time/date and number of processors are part of the subdirectory 41 # name). 42 # It requires that palm has been installed with command 43 # palm_simple_install and that the executable palm has been created 44 # with make in directory ...../MAKE_DEPOSITORY_simple 45 #--------------------------------------------------------------------------------# 42 46 43 47 … … 45 49 case=example_cbl 46 50 cpumax=999999 51 execute_for=unknown 47 52 localhost=unknown 48 53 localhost_realname=$(hostname) … … 55 60 56 61 # Read shellscript options 57 while getopts :c: l:n:p:t: option62 while getopts :c:e:l:n:p:t: option 58 63 do 59 64 case $option in 60 65 (c) case=$OPTARG;; 66 (e) execute_for=$OPTARG;; 61 67 (l) localhost=$OPTARG;; 62 68 (n) mpi_procs_per_node=$OPTARG;; … … 64 70 (t) openmp_threads=$OPTARG;; 65 71 (\?) printf "\n +++ unknown option $OPTARG \n" 66 printf "\n allowed option are - d, -f, -l, -s\n"72 printf "\n allowed option are -c, -e, -l, -n, -p, -t \n" 67 73 exit;; 68 74 esac … … 122 128 cat > ENVPAR << %%END%% 123 129 &envpar run_identifier = '$case', host = '$localhost', 124 write_binary = false, tasks_per_node = $mpi_procs_per_node,130 write_binary = 'false', tasks_per_node = $mpi_procs_per_node, 125 131 maximum_cpu_time_allowed = ${cpumax}., 126 132 revision = '$global_revision', … … 151 157 echo "*** palm will be run: MPI tasks: $mpi_procs OpenMP thread: $OMP_NUM_THREADS" 152 158 153 # IMUK: 154 mpiexec -machinefile hostfile -n $mpi_procs ./palm < runfile_atmos 159 case $execute_for in 155 160 156 # SGI-MPT HLRN: 157 # mpiexec_mpt -np $mpi_procs ./palm < runfile_atmos 161 (imuk) mpiexec -machinefile hostfile -n $mpi_procs ./palm < runfile_atmos;; 162 (sgi-mpt) mpiexec_mpt -np $mpi_procs ./palm < runfile_atmos;; 163 (hpc-flow) mpiexec -machinefile $TMPDIR/machines -n $mpi_procs -env I_MPI_FABRICS shm:ofa ./palm < runfile_atmos;; 164 (pgi-openacc) ./palm;; 165 (*) echo "+++ -e option to define execution command is missing";; 158 166 159 # HPC-FLOW (ForWind): 160 # mpiexec -machinefile $TMPDIR/machines -n $mpi_procs -env I_MPI_FABRICS shm:ofa ./palm < runfile_atmos 161 167 esac 162 168 163 169 echo "*** palm finished" -
palm/trunk/SOURCE/buoyancy.f90
r1154 r1171 20 20 ! Currrent revisions: 21 21 ! ----------------- 22 ! 22 ! openacc statements added to use_reference-case in accelerator version 23 23 ! 24 24 ! Former revisions: … … 225 225 !-- Normal case: horizontal surface 226 226 IF ( use_reference ) THEN 227 !$acc kernels present( nzb_s_inner, hom, tend, var ) 228 !$acc loop 227 229 DO i = i_left, i_right 228 230 DO j = j_south, j_north 231 !$acc loop independent vector(32) 229 232 DO k = nzb_s_inner(j,i)+1, nzt-1 230 233 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * & … … 236 239 ENDDO 237 240 ENDDO 241 !$acc end kernels 238 242 ELSE 239 243 !$acc kernels present( nzb_s_inner, hom, tend, var ) -
palm/trunk/SOURCE/diffusion_e.f90
r1132 r1171 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! use_reference-case activated in accelerator version 23 23 ! 24 24 ! Former revisions: … … 317 317 !-- runtime errors occur with -C hopt on NEC 318 318 IF ( use_reference ) THEN 319 STOP '+++ use_reference not implemented in diffusion_e_acc' 320 ! DO i = nxl, nxr 321 ! DO j = nys, nyn 322 ! DO k = nzb_s_inner(j,i)+1, nzt 323 ! 324 !-- Calculate the mixing length (for dissipation) 325 ! dvar_dz = atmos_ocean_sign * & 326 ! ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) 327 ! IF ( dvar_dz > 0.0 ) THEN 328 ! l_stable = 0.76 * SQRT( e(k,j,i) ) / & 329 ! SQRT( g / var_reference * dvar_dz ) + 1E-5 330 ! ELSE 331 ! l_stable = l_grid(k) 332 ! ENDIF 333 ! 334 !-- Adjustment of the mixing length 335 ! IF ( wall_adjustment ) THEN 336 ! l(k,j) = MIN( wall_adjustment_factor * & 337 ! ( zu(k) - zw(nzb_s_inner(j,i)) ), & 338 ! l_grid(k), l_stable ) 339 ! ll(k,j) = MIN( wall_adjustment_factor * & 340 ! ( zu(k) - zw(nzb_s_inner(j,i)) ), & 341 ! l_grid(k) ) 342 ! ELSE 343 ! l(k,j) = MIN( l_grid(k), l_stable ) 344 ! ll(k,j) = l_grid(k) 345 ! ENDIF 346 ! 347 ! ENDDO 348 ! ENDDO 349 ! 350 ! 351 !-- Calculate the tendency terms 352 ! DO j = nys, nyn 353 ! DO k = nzb_s_inner(j,i)+1, nzt 354 ! 355 ! dissipation(k,j) = ( 0.19 + 0.74 * l(k,j) / ll(k,j) ) * & 356 ! e(k,j,i) * SQRT( e(k,j,i) ) / l(k,j) 357 ! 358 ! tend(k,j,i) = tend(k,j,i) & 359 ! + ( & 360 ! ( km(k,j,i)+km(k,j,i+1) ) * ( e(k,j,i+1)-e(k,j,i) ) & 361 ! - ( km(k,j,i)+km(k,j,i-1) ) * ( e(k,j,i)-e(k,j,i-1) ) & 362 ! ) * ddx2 & 363 ! + ( & 364 ! ( km(k,j,i)+km(k,j+1,i) ) * ( e(k,j+1,i)-e(k,j,i) ) & 365 ! - ( km(k,j,i)+km(k,j-1,i) ) * ( e(k,j,i)-e(k,j-1,i) ) & 366 ! ) * ddy2 & 367 ! + ( & 368 ! ( km(k,j,i)+km(k+1,j,i) ) * ( e(k+1,j,i)-e(k,j,i) ) * ddzu(k+1) & 369 ! - ( km(k,j,i)+km(k-1,j,i) ) * ( e(k,j,i)-e(k-1,j,i) ) * ddzu(k) & 370 ! ) * ddzw(k) & 371 ! - dissipation(k,j) 372 ! 373 ! ENDDO 374 ! ENDDO 375 ! 376 ! 377 !-- Store dissipation if needed for calculating the sgs particle 378 !-- velocities 379 ! IF ( use_sgs_for_particles .OR. wang_kernel ) THEN 380 ! DO j = nys, nyn 381 ! DO k = nzb_s_inner(j,i)+1, nzt 382 ! diss(k,j,i) = dissipation(k,j) 383 ! ENDDO 384 ! ENDDO 385 ! ENDIF 386 ! 387 ! ENDDO 388 ! 319 320 !$acc kernels present( ddzu, ddzw, dd2zu, diss, e, km, l_grid ) & 321 !$acc present( nzb_s_inner, rif, tend, var, zu, zw ) 322 !$acc loop 323 DO i = i_left, i_right 324 DO j = j_south, j_north 325 !$acc loop vector( 32 ) 326 DO k = 1, nzt 327 328 IF ( k > nzb_s_inner(j,i) ) THEN 329 ! 330 !-- Calculate the mixing length (for dissipation) 331 dvar_dz = atmos_ocean_sign * & 332 ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) 333 IF ( dvar_dz > 0.0 ) THEN 334 l_stable = 0.76 * SQRT( e(k,j,i) ) / & 335 SQRT( g / var_reference * dvar_dz ) + 1E-5 336 ELSE 337 l_stable = l_grid(k) 338 ENDIF 339 ! 340 !-- Adjustment of the mixing length 341 IF ( wall_adjustment ) THEN 342 l = MIN( wall_adjustment_factor * & 343 ( zu(k) - zw(nzb_s_inner(j,i)) ), & 344 l_grid(k), l_stable ) 345 ll = MIN( wall_adjustment_factor * & 346 ( zu(k) - zw(nzb_s_inner(j,i)) ), & 347 l_grid(k) ) 348 ELSE 349 l = MIN( l_grid(k), l_stable ) 350 ll = l_grid(k) 351 ENDIF 352 ! 353 !-- Calculate the tendency terms 354 dissipation = ( 0.19 + 0.74 * l / ll ) * & 355 e(k,j,i) * SQRT( e(k,j,i) ) / l 356 357 tend(k,j,i) = tend(k,j,i) & 358 + ( & 359 ( km(k,j,i)+km(k,j,i+1) ) * ( e(k,j,i+1)-e(k,j,i) ) & 360 - ( km(k,j,i)+km(k,j,i-1) ) * ( e(k,j,i)-e(k,j,i-1) ) & 361 ) * ddx2 & 362 + ( & 363 ( km(k,j,i)+km(k,j+1,i) ) * ( e(k,j+1,i)-e(k,j,i) ) & 364 - ( km(k,j,i)+km(k,j-1,i) ) * ( e(k,j,i)-e(k,j-1,i) ) & 365 ) * ddy2 & 366 + ( & 367 ( km(k,j,i)+km(k+1,j,i) ) * ( e(k+1,j,i)-e(k,j,i) ) * ddzu(k+1) & 368 - ( km(k,j,i)+km(k-1,j,i) ) * ( e(k,j,i)-e(k-1,j,i) ) * ddzu(k) & 369 ) * ddzw(k) & 370 - dissipation 371 372 ! 373 !-- Store dissipation if needed for calculating the sgs particle 374 !-- velocities 375 IF ( use_sgs_for_particles .OR. wang_kernel .OR. & 376 turbulence ) THEN 377 diss(k,j,i) = dissipation 378 ENDIF 379 380 ENDIF 381 382 ENDDO 383 ENDDO 384 ENDDO 385 !$acc end kernels 386 389 387 ELSE 390 388 … … 439 437 - ( km(k,j,i)+km(k-1,j,i) ) * ( e(k,j,i)-e(k-1,j,i) ) * ddzu(k) & 440 438 ) * ddzw(k) & 441 - dissipation439 - dissipation 442 440 443 441 ! -
palm/trunk/SOURCE/init_3d_model.f90
r1160 r1171 23 23 ! Current revisions: 24 24 ! ------------------ 25 ! 25 ! diss array is allocated with full size if accelerator boards are used 26 26 ! 27 27 ! Former revisions: … … 34 34 ! 1153 2013-05-10 14:33:08Z raasch 35 35 ! diss array is allocated with dummy elements even if it is not needed 36 ! (required by PGI 1 2.3/ CUDA 5.0)36 ! (required by PGI 13.4 / CUDA 5.0) 37 37 ! 38 38 ! 1115 2013-03-26 18:16:16Z hoffmann … … 507 507 !-- 3D-array for storing the dissipation, needed for calculating the sgs 508 508 !-- particle velocities 509 IF ( use_sgs_for_particles .OR. wang_kernel .OR. turbulence ) THEN 509 IF ( use_sgs_for_particles .OR. wang_kernel .OR. turbulence .OR. & 510 num_acc_per_node > 0 ) THEN 511 print*, '*** allocating diss' 510 512 ALLOCATE( diss(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 511 ELSE512 ALLOCATE( diss(2,2,2) )513 513 ENDIF 514 514 -
palm/trunk/SOURCE/time_integration.f90
r1132 r1171 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! split of prognostic_equations deactivated (comment lines) 23 23 ! 24 24 ! Former revisions: … … 245 245 CALL prognostic_equations_vector 246 246 ELSEIF ( loop_optimization == 'acc' ) THEN 247 ! i_left = nxl; i_right = nxr 247 i_left = nxl; i_right = nxr 248 j_south = nys; j_north = nyn 249 CALL prognostic_equations_acc 250 251 ! i_left = nxl; i_right = nxl+nbgp-1 248 252 ! j_south = nys; j_north = nyn 249 253 ! CALL prognostic_equations_acc 250 251 i_left = nxl; i_right = nxl+nbgp-1 252 j_south = nys; j_north = nyn 253 CALL prognostic_equations_acc 254 i_left = nxr-nbgp+1; i_right = nxr 255 j_south = nys; j_north = nyn 256 CALL prognostic_equations_acc 254 ! i_left = nxr-nbgp+1; i_right = nxr 255 ! j_south = nys; j_north = nyn 256 ! CALL prognostic_equations_acc 257 257 258 258 ! … … 310 310 ENDIF 311 311 312 i_left = nxl+nbgp; i_right = nxr-nbgp313 j_south = nys; j_north = nys+nbgp-1314 CALL prognostic_equations_acc315 i_left = nxl+nbgp; i_right = nxr-nbgp316 j_south = nyn-nbgp+1; j_north = nyn317 CALL prognostic_equations_acc312 ! i_left = nxl+nbgp; i_right = nxr-nbgp 313 ! j_south = nys; j_north = nys+nbgp-1 314 ! CALL prognostic_equations_acc 315 ! i_left = nxl+nbgp; i_right = nxr-nbgp 316 ! j_south = nyn-nbgp+1; j_north = nyn 317 ! CALL prognostic_equations_acc 318 318 319 319 IF ( background_communication ) THEN … … 374 374 ENDIF 375 375 376 i_left = nxl+nbgp; i_right = nxr-nbgp377 j_south = nys+nbgp; j_north = nyn-nbgp378 CALL prognostic_equations_acc376 ! i_left = nxl+nbgp; i_right = nxr-nbgp 377 ! j_south = nys+nbgp; j_north = nyn-nbgp 378 ! CALL prognostic_equations_acc 379 379 380 380 IF ( background_communication ) THEN
Note: See TracChangeset
for help on using the changeset viewer.