Changeset 4536 for palm/trunk
- Timestamp:
- May 17, 2020 5:24:13 PM (5 years ago)
- Location:
- palm/trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmrun
r4481 r4536 27 27 # ----------------- 28 28 # $Id$ 29 # handling of single restart files (created with MPI-I/O) added 30 # 31 # 4481 2020-03-31 18:55:54Z maronga 29 32 # add cycle number to initial files too (000), 30 33 # remove compatibility for cycle numbers which are less than three digits wide … … 2045 2048 files_for_cores=true; filetype=files 2046 2049 actionin[$i]="ln" 2050 # FILE HAS BEEN FOUND INSTEAD OF DIRECTORY 2051 if [[ -f "${absnamein[$i]}" ]] 2052 then 2053 files_for_cores=false; filetype=file 2054 fi 2047 2055 elif [[ "${actionin[$i]}" = lnpe && ! -n $cores ]] 2048 2056 then … … 2572 2580 link_local_output=true 2573 2581 actionout[$i]="" 2582 # FILE HAS BEEN FOUND INSTEAD OF DIRECTORY 2583 if [[ -f ${localout[$i]} ]] 2584 then 2585 files_for_cores=false; filetype=file 2586 fi 2574 2587 elif [[ "${actionout[$i]}" = lnpe && ! -n $cores ]] 2575 2588 then 2576 link_local_output 2589 link_local_output=true 2577 2590 actionout[$i]="" 2578 2591 elif [[ "${actionout[$i]}" = trpe && -n $cores ]] … … 2697 2710 printf "\n >>> OUTPUT: ${localout[$i]} to" 2698 2711 printf "\n ${pathout[$i]}.${extout[$i]}\n" 2699 if [[ $link_local_output = true ]] 2700 then 2701 printf " file will be linked\n" 2702 ln -f ${localout[$i]} ${pathout[$i]}.${extout[$i]} 2703 fi 2704 # If "ln -f" fails of if "$link_local_output = false" do a normal "cp" 2705 if [[ ! -f "${pathout[$i]}.${extout[$i]}" ]] 2712 if [[ $link_local_output = true ]] 2706 2713 then 2707 if [[ $link_local_output = true ]] 2708 then 2714 printf " file will be linked\n" 2715 ln -f ${localout[$i]} ${pathout[$i]}.${extout[$i]} 2716 fi 2717 # If "ln -f" fails of if "$link_local_output = false" do a normal "cp" 2718 if [[ ! -f "${pathout[$i]}.${extout[$i]}" ]] 2719 then 2720 if [[ $link_local_output = true ]] 2721 then 2709 2722 printf " --- WARNING: ln failed, using cp instead (might be time consuming...)\n" 2710 fi 2711 cp ${localout[$i]} ${pathout[$i]}.${extout[$i]} 2712 else 2713 printf "+++ no copy because file ${pathout[$i]}.${extout[$i]} exists\n" 2723 fi 2724 cp ${localout[$i]} ${pathout[$i]}.${extout[$i]} 2714 2725 fi 2715 2726 else 2716 2727 printf "\n >>> OUTPUT: ${localout[$i]} to" 2717 2728 printf "\n ${pathout[$i]}\n" 2718 if [[ $link_local_output = true ]] 2719 then 2720 printf " file will be linked\n" 2721 ln -f ${localout[$i]} ${pathout[$i]} 2722 fi 2723 # If "ln -f" fails of if "$link_local_output = false" do a normal "cp" 2724 if [[ ! -f "${pathout[$i]}" ]] 2729 if [[ $link_local_output = true ]] 2725 2730 then 2726 if [[ $link_local_output = true ]] 2727 then 2731 printf " file will be linked\n" 2732 ln -f ${localout[$i]} ${pathout[$i]} 2733 fi 2734 # If "ln -f" fails of if "$link_local_output = false" do a normal "cp" 2735 if [[ ! -f "${pathout[$i]}" ]] 2736 then 2737 if [[ $link_local_output = true ]] 2738 then 2728 2739 printf " --- WARNING: ln failed, using cp instead (might be time consuming...)\n" 2729 fi 2730 cp ${localout[$i]} ${pathout[$i]} 2731 else 2732 printf "+++ no copy because file ${pathout[$i]} exists\n" 2740 fi 2741 cp ${localout[$i]} ${pathout[$i]} 2733 2742 fi 2734 2743 fi … … 2741 2750 printf "\n >>> OUTPUT: ${localout[$i]}/_.... to" 2742 2751 printf "\n ${pathout[$i]}\n" 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2752 if [[ $link_local_output = true ]] 2753 then 2754 printf " files will be linked\n" 2755 mkdir -p ${pathout[$i]} 2756 cd ${localout[$i]} 2757 for file in $(ls *) 2758 do 2759 ln -f $file ${pathout[$i]} 2760 done >|/dev/null 2>&1 2761 cd $tempdir 2762 fi 2754 2763 2755 2764 # IF "ln -f" HAS FAILED OR IF "$link_local_output = false" DO A NORMAL COPY "cp -r" 2756 2765 if [[ ! -f "${pathout[$i]}/_000000" ]] 2757 2766 then 2758 2759 2767 if [[ $link_local_output = true ]] 2768 then 2760 2769 printf " --- WARNING: ln failed, using cp instead (might be time consuming...)\n" 2761 2762 2763 2770 fi 2771 [[ ! -d "${pathout[$i]}" ]] && mkdir ${pathout[$i]} 2772 cp -r ${localout[$i]}/* ${pathout[$i]} 2764 2773 fi 2765 2774 -
palm/trunk/SOURCE/check_parameters.f90
r4535 r4536 265 265 TRIM( restart_data_format ) /= 'mpi_shared_memory' ) THEN 266 266 message_string = 'illegal restart data format "' // TRIM( restart_data_format ) // '"' 267 CALL message( 'check_parameters', 'PA ....', 1, 2, 0, 6, 0 )267 CALL message( 'check_parameters', 'PA0724', 1, 2, 0, 6, 0 ) 268 268 ENDIF 269 269 … … 278 278 TRIM( restart_data_format_input ) /= 'mpi' .AND. & 279 279 TRIM( restart_data_format_input ) /= 'mpi_shared_memory' ) THEN 280 message_string = 'illegal restart data inputformat "' // &280 message_string = 'illegal restart input data format "' // & 281 281 TRIM( restart_data_format_input ) // '"' 282 CALL message( 'check_parameters', 'PA ....', 1, 2, 0, 6, 0 )282 CALL message( 'check_parameters', 'PA0725', 1, 2, 0, 6, 0 ) 283 283 ENDIF 284 284 IF ( TRIM( restart_data_format_output ) /= 'fortran_binary' .AND. & 285 285 TRIM( restart_data_format_output ) /= 'mpi' .AND. & 286 286 TRIM( restart_data_format_output ) /= 'mpi_shared_memory' ) THEN 287 message_string = 'illegal restart data outputformat "' // &287 message_string = 'illegal restart output data format "' // & 288 288 TRIM( restart_data_format_output ) // '"' 289 CALL message( 'check_parameters', 'PA ....', 1, 2, 0, 6, 0 )289 CALL message( 'check_parameters', 'PA0726', 1, 2, 0, 6, 0 ) 290 290 ENDIF 291 291 -
palm/trunk/SOURCE/cpulog_mod.f90
r4429 r4536 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart I/O transfer speed added 28 ! 29 ! 4429 2020-02-27 15:24:30Z raasch 27 30 ! bugfix: cpp-directives added for serial mode 28 31 ! … … 94 97 95 98 USE control_parameters, & 96 ONLY: message_string, nr_timesteps_this_run, run_description_header, synchronous_exchange 99 ONLY: message_string, nr_timesteps_this_run, restart_data_format_output, & 100 restart_file_size, run_description_header, synchronous_exchange, write_binary 97 101 98 102 USE indices, & … … 499 503 WRITE ( 18, 106 ) 500 504 ENDIF 501 502 ! 503 !-- Empty lines in order to create a gap to the results of the model 504 !-- continuation runs 505 WRITE ( 18, 107 ) 505 ! 506 !-- Output of restart data transfer speed 507 IF ( write_binary .AND. restart_data_format_output(1:3) == 'mpi' ) THEN 508 WRITE ( 18, 107 ) restart_file_size, restart_file_size / log_point(22)%sum 509 ENDIF 510 ! 511 !-- Empty lines in order to create a gap to the results from the next restart run 512 WRITE ( 18, 108 ) 506 513 507 514 ! … … 529 536 105 FORMAT (/'Exchange of ghostpoints via MPI_SENDRCV') 530 537 106 FORMAT (/'Exchange of ghostpoints via MPI_ISEND/MPI_IRECV') 531 107 FORMAT (//) 538 107 FORMAT (/'Restart file size: ',F12.1,' MByte'/ & 539 &'I/O transfer speed: ',F12.1,' MByte / sec') 540 108 FORMAT (//) 532 541 110 FORMAT ('------------------------------------------------------------', & 533 542 &'----------'// & -
palm/trunk/SOURCE/header.f90
r4473 r4536 25 25 ! ----------------- 26 26 ! $Id$ 27 ! output of restart data format added 28 ! 29 ! 4473 2020-03-25 21:04:07Z gronemeier 27 30 ! revised message if wall_adjustment is used 28 31 ! … … 1492 1495 ENDIF 1493 1496 WRITE ( io, 341 ) dt_dots 1497 ENDIF 1498 1499 ! 1500 !-- Restart data formats 1501 IF ( TRIM( initializing_actions ) == 'read_restart_data' .OR. write_binary ) THEN 1502 WRITE ( io, 355 ) 1503 IF ( TRIM( initializing_actions ) == 'read_restart_data' ) THEN 1504 WRITE ( io, 356 ) TRIM( restart_data_format_input ) 1505 ENDIF 1506 IF ( write_binary ) THEN 1507 WRITE ( io, 357 ) TRIM( restart_data_format_output ) 1508 ENDIF 1494 1509 ENDIF 1495 1510 … … 1829 1844 353 FORMAT (/' Number of output time levels allowed: unlimited' /) 1830 1845 354 FORMAT (' Output format: ',A, ' compressed with level: ',I1/) 1846 355 FORMAT (/' Restart data format(s):') 1847 356 FORMAT (' Input format: ',A) 1848 357 FORMAT (' Output format: ',A) 1831 1849 400 FORMAT (//' Physical quantities:'/ & 1832 1850 ' -------------------'/) -
palm/trunk/SOURCE/message.f90
r4360 r4536 25 25 ! ----------------- 26 26 ! $Id$ 27 ! location message format changed 28 ! 29 ! 4360 2020-01-07 11:25:50Z suehring 27 30 ! Corrected "Former revisions" section 28 31 ! … … 264 267 ! 265 268 !-- Write and flush debug location or info message to file 266 WRITE( OUTPUT_UNIT, 200 ) TRIM( message_type_string ), location_string, TRIM( system_time ) 269 WRITE( OUTPUT_UNIT, 200 ) TRIM( system_time ), TRIM( message_type_string ), & 270 TRIM( location_string ) 267 271 FLUSH( OUTPUT_UNIT ) 268 272 ! 269 273 !-- Message formats 270 200 FORMAT ( 3X, A, ' ', A60, ' | System time: ', A )274 200 FORMAT ( 3X, A, 3x, A, 2X, A ) 271 275 272 276 ENDIF -
palm/trunk/SOURCE/modules.f90
r4514 r4536 949 949 REAL(wp) :: recycling_width = 9999999.9_wp !< namelist parameter 950 950 REAL(wp) :: residual_limit = 1.0E-4_wp !< namelist parameter 951 REAL(wp) :: restart_file_size !< size of restart file in mbyte 951 952 REAL(wp) :: restart_time = 9999999.9_wp !< namelist parameter 952 953 REAL(wp) :: rho_reference !< reference state of density -
palm/trunk/SOURCE/parin.f90
r4535 r4536 517 517 TRIM( restart_data_format ) /= 'mpi_shared_memory' ) THEN 518 518 message_string = 'illegal restart data format "' // TRIM( restart_data_format ) // '"' 519 CALL message( 'parin', 'PA ....', 1, 2, 0, 6, 0 )519 CALL message( 'parin', 'PA0724', 1, 2, 0, 6, 0 ) 520 520 ENDIF 521 521 IF ( TRIM( restart_data_format_input ) == 'undefined' ) THEN -
palm/trunk/SOURCE/read_restart_data_mod.f90
r4534 r4536 25 25 ! ----------------- 26 26 ! $Id$ 27 ! binary version incremented 28 ! 29 ! 4534 2020-05-14 18:35:22Z raasch 27 30 ! adjustments for I/O on reduced number of cores using shared memory MPI 28 31 ! … … 253 256 READ ( 13 ) version_on_file 254 257 255 binary_version_global = ' 4.9'258 binary_version_global = '5.0' 256 259 IF ( TRIM( version_on_file ) /= TRIM( binary_version_global ) ) THEN 257 260 WRITE( message_string, * ) 'version mismatch concerning ', & … … 999 1002 CALL rrd_mpi_io( 'omega', omega ) 1000 1003 CALL rrd_mpi_io( 'omega_sor', omega_sor ) 1001 CALL rrd_mpi_io( 'origin_dat a_time', origin_date_time )1004 CALL rrd_mpi_io( 'origin_date_time', origin_date_time ) 1002 1005 CALL rrd_mpi_io( 'output_for_t0', output_for_t0 ) 1003 1006 CALL rrd_mpi_io( 'particle_advection', particle_advection ) … … 1569 1572 READ ( 13 ) version_on_file 1570 1573 1571 binary_version_local = ' 4.7'1574 binary_version_local = '5.0' 1572 1575 IF ( TRIM( version_on_file ) /= TRIM( binary_version_local ) ) THEN 1573 1576 WRITE( message_string, * ) 'version mismatch concerning ', & -
palm/trunk/SOURCE/restart_data_mpi_io_mod.f90
r4534 r4536 24 24 ! ----------------- 25 25 ! $Id$ 26 ! messages and debug output converted to PALM routines 27 ! 28 ! 4534 2020-05-14 18:35:22Z raasch 26 29 ! I/O on reduced number of cores added (using shared memory MPI) 27 30 ! … … 63 66 64 67 USE control_parameters, & 65 ONLY: include_total_domain_boundaries, restart_data_format_input 68 ONLY: debug_output, debug_string, include_total_domain_boundaries, message_string, & 69 restart_data_format_input, restart_data_format_output, restart_file_size 66 70 67 71 USE exchange_horiz_mod, & … … 135 139 LOGICAL :: filetypes_created !< 136 140 LOGICAL :: io_on_limited_cores_per_node !< switch to shared memory MPI-IO 137 LOGICAL :: print_header_now = .TRUE. !<138 141 LOGICAL :: rd_flag !< file is opened for read 139 142 LOGICAL :: wr_flag !< file is opened for write 140 141 REAL(KIND=wp) :: mb_processed !<142 143 143 144 #if defined( __parallel ) … … 194 195 PRIVATE 195 196 196 PUBLIC mb_processed, total_number_of_surface_values197 PUBLIC restart_file_size, total_number_of_surface_values 197 198 198 199 ! … … 300 301 301 302 offset = 0 303 io_on_limited_cores_per_node = .FALSE. 302 304 303 305 rd_flag = ( TRIM( action ) == 'READ' .OR. TRIM( action ) == 'read' ) 304 306 wr_flag = ( TRIM( action ) == 'WRITE' .OR. TRIM( action ) == 'write' ) 305 307 308 IF ( .NOT. ( rd_flag .OR. wr_flag ) ) THEN 309 message_string = 'illegal action "' // TRIM( action ) // '" for opening restart files' 310 CALL message( 'restart_data_mpi_io_mod', 'PA0720', 1, 2, 0, 6, 0 ) 311 ENDIF 306 312 ! 307 313 !-- Store name of I/O file to communicate it internally within this module. … … 309 315 ! 310 316 !-- Setup for IO on a limited number of threads per node (using shared memory MPI) 311 IF ( TRIM( restart_data_format_input ) == 'mpi_shared_memory' ) THEN 317 IF ( rd_flag ) THEN 318 set_filetype = .TRUE. 319 IF ( TRIM( restart_data_format_input ) == 'mpi_shared_memory' ) THEN 320 io_on_limited_cores_per_node = .TRUE. 321 ENDIF 322 ENDIF 323 324 IF ( TRIM( restart_data_format_output ) == 'mpi_shared_memory' .AND. wr_flag ) THEN 312 325 io_on_limited_cores_per_node = .TRUE. 313 set_filetype = .TRUE.314 326 ENDIF 315 327 ! … … 339 351 !-- In case of read it is not known yet if data include total domain. Filetypes will be created 340 352 !-- further below. 341 IF ( wr_flag ) THEN353 IF ( wr_flag ) THEN 342 354 CALL rd_mpi_io_create_filetypes 343 355 filetypes_created = .TRUE. … … 348 360 #if defined( __parallel ) 349 361 IF ( sm_io%iam_io_pe ) THEN 362 350 363 IF ( rd_flag ) THEN 364 365 IF ( debug_output ) THEN 366 WRITE( debug_string, * ) 'open joint restart file "' // TRIM( io_file_name ) // & 367 '" for read with MPI-IO' 368 CALL debug_message( debug_string, 'start' ) 369 ENDIF 370 351 371 CALL MPI_FILE_OPEN( comm_io, TRIM( io_file_name ), MPI_MODE_RDONLY, MPI_INFO_NULL, fh, & 352 372 ierr ) 353 WRITE (9,*) 'Open MPI-IO restart file for read ==> ', TRIM( io_file_name ) 373 374 IF ( ierr /= 0 ) THEN 375 message_string = 'error opening restart file "' // TRIM( io_file_name ) // & 376 '" for reading with MPI-IO' 377 CALL message( 'rrd_mpi_io_open', 'PA0727', 3, 2, 0, 6, 0 ) 378 ENDIF 379 380 IF ( debug_output ) THEN 381 WRITE( debug_string, * ) 'open joint restart file "' // TRIM( io_file_name ) // & 382 '" for read with MPI-IO' 383 CALL debug_message( debug_string, 'end' ) 384 ENDIF 385 354 386 ELSEIF ( wr_flag ) THEN 387 388 IF ( debug_output ) THEN 389 WRITE( debug_string, * ) 'open joint restart file "' // TRIM( io_file_name ) // & 390 '" for write with MPI-IO' 391 CALL debug_message( debug_string, 'start' ) 392 ENDIF 393 355 394 CALL MPI_FILE_OPEN( comm_io, TRIM( io_file_name ), MPI_MODE_CREATE+MPI_MODE_WRONLY, & 356 395 MPI_INFO_NULL, fh, ierr ) 357 WRITE (9,*) 'Open MPI-IO restart file for write ==> ', TRIM( io_file_name ) 358 ELSE 359 CALL rd_mpi_io_error( 1 ) 360 ENDIF 396 397 IF ( ierr /= 0 ) THEN 398 message_string = 'error opening restart file "' // TRIM( io_file_name ) // & 399 '" for writing with MPI-IO' 400 CALL message( 'rrd_mpi_io_open', 'PA0728', 3, 2, 0, 6, 0 ) 401 ENDIF 402 403 IF ( debug_output ) THEN 404 WRITE( debug_string, * ) 'open joint restart file "' // TRIM( io_file_name ) // & 405 '" for write with MPI-IO' 406 CALL debug_message( debug_string, 'end' ) 407 ENDIF 408 409 ENDIF 410 361 411 ENDIF 362 412 #else 363 413 IF ( rd_flag ) THEN 414 415 IF ( debug_output ) THEN 416 WRITE( debug_string, * ) 'open restart file "' // TRIM( io_file_name ) // & 417 '" for read in serial mode (posix)' 418 CALL debug_message( debug_string, 'start' ) 419 ENDIF 420 364 421 fh = posix_open( TRIM( io_file_name ), .TRUE. ) 365 WRITE (9,*) 'Open sequential restart file for read ==> ', TRIM( io_file_name ), ' ', fh 422 423 IF ( debug_output ) THEN 424 WRITE( debug_string, * ) 'open restart file "' // TRIM( io_file_name ) // & 425 '" for read in serial mode (posix)' 426 CALL debug_message( debug_string, 'end' ) 427 ENDIF 428 366 429 ELSEIF ( wr_flag ) THEN 430 431 IF ( debug_output ) THEN 432 WRITE( debug_string, * ) 'open restart file "' // TRIM( io_file_name ) // & 433 '" for write in serial mode (posix)' 434 CALL debug_message( debug_string, 'start' ) 435 ENDIF 436 367 437 fh = posix_open( TRIM( io_file_name ), .FALSE. ) 368 WRITE (9,*) 'Open sequential restart file for write ==> ', TRIM( io_file_name ), ' ', fh 369 ELSE 370 CALL rd_mpi_io_error( 1 ) 371 ENDIF 372 373 IF ( fh < 0 ) CALL rd_mpi_io_error( 6 ) 438 439 IF ( debug_output ) THEN 440 WRITE( debug_string, * ) 'open restart file "' // TRIM( io_file_name ) // & 441 '" for write in serial mode (posix)' 442 CALL debug_message( debug_string, 'end' ) 443 ENDIF 444 445 ENDIF 446 447 IF ( fh < 0 ) THEN 448 message_string = 'error opening restart file for posix I/O' 449 CALL message( 'restart_data_mpi_io_mod', 'PA0721', 1, 2, 0, 6, 0 ) 450 ENDIF 374 451 #endif 375 452 … … 506 583 header_position = header_position + SIZE( array_offset ) * rd_offset_kind 507 584 #endif 508 IF ( debug_level >= 2 ) THEN 509 WRITE (9,*) 'header positio after array metadata ', header_position 510 ENDIF 511 512 IF ( print_header_now ) CALL rd_mpi_io_print_header 585 IF ( debug_output ) CALL rd_mpi_io_print_header 513 586 514 587 ENDIF … … 585 658 !> Read INTEGER with MPI-IO 586 659 !--------------------------------------------------------------------------------------------------! 587 SUBROUTINE rrd_mpi_io_int( name, value , found)660 SUBROUTINE rrd_mpi_io_int( name, value ) 588 661 589 662 IMPLICIT NONE … … 594 667 INTEGER(KIND=iwp), INTENT(OUT) :: value 595 668 596 LOGICAL :: lo_found 597 LOGICAL, INTENT(OUT), OPTIONAL :: found 598 599 600 lo_found = .FALSE. 669 LOGICAL :: found 670 671 672 found = .FALSE. 601 673 value = 0 602 674 603 675 DO i = 1, tgh%nr_int 604 676 IF ( TRIM(int_names(i)) == TRIM( name ) ) THEN 605 IF ( debug_level >= 2 ) WRITE(9,*) 'INTEGER variable found ', name606 677 value = int_values(i) 607 lo_found = .TRUE.678 found = .TRUE. 608 679 EXIT 609 680 ENDIF 610 681 ENDDO 611 682 612 IF ( PRESENT( found ) ) THEN 613 found = lo_found 614 RETURN 615 ENDIF 616 617 IF ( .NOT. lo_found ) THEN 618 WRITE(9,*) 'INTEGER not found ', name 619 CALL rd_mpi_io_error( 3 ) 683 IF ( .NOT. found ) THEN 684 message_string = 'INTEGER variable "' // TRIM( name ) // '" not found in restart file' 685 CALL message( 'rrd_mpi_io_int', 'PA0722', 3, 2, 0, 6, 0 ) 620 686 ENDIF 621 687 … … 629 695 !> Read REAL with MPI-IO 630 696 !--------------------------------------------------------------------------------------------------! 631 SUBROUTINE rrd_mpi_io_real( name, value , found)697 SUBROUTINE rrd_mpi_io_real( name, value ) 632 698 633 699 IMPLICIT NONE … … 637 703 INTEGER(iwp) :: i 638 704 639 LOGICAL :: lo_found 640 LOGICAL, INTENT(OUT), OPTIONAL :: found 705 LOGICAL :: found 641 706 642 707 REAL(KIND=wp), INTENT(OUT) :: value 643 708 644 709 645 lo_found = .FALSE.710 found = .FALSE. 646 711 value = 0.0 647 712 648 713 DO i = 1, tgh%nr_real 649 714 IF ( TRIM(real_names(i)) == TRIM( name ) ) THEN 650 IF ( debug_level >= 2 ) WRITE(9,*) 'REAL variable found ', name651 715 value = real_values(i) 652 lo_found = .TRUE.716 found = .TRUE. 653 717 EXIT 654 718 ENDIF 655 719 ENDDO 656 720 657 IF ( PRESENT( found ) ) THEN 658 found = lo_found 659 RETURN 660 ENDIF 661 662 IF ( .NOT. lo_found ) THEN 663 WRITE(9,*) 'REAL value not found ', name 664 CALL rd_mpi_io_error(3) 721 IF ( .NOT. found ) THEN 722 message_string = 'REAL variable "' // TRIM( name ) // '" not found in restart file' 723 CALL message( 'rrd_mpi_io_int', 'PA0722', 3, 2, 0, 6, 0 ) 665 724 ENDIF 666 725 … … 729 788 730 789 ELSE 731 WRITE(9,*) 'array_2D not found ', name732 CALL rd_mpi_io_error( 2)790 message_string = '2d-REAL array "' // TRIM( name ) // '" not found in restart file' 791 CALL message( 'rrd_mpi_io_int', 'PA0722', 3, 2, 0, 6, 0 ) 733 792 ENDIF 734 793 … … 778 837 !-- would be dimensioned in the caller subroutine like this: 779 838 !-- INTEGER, DIMENSION(nysg:nyng,nxlg:nxrg):: data 780 CALL rd_mpi_io_error( 2 ) 839 message_string = '2d-INTEGER array "' // TRIM( name ) // '" to be read from restart ' // & 840 'file is defined with illegal dimensions in the PALM code' 841 CALL message( 'rrd_mpi_io_int_2d', 'PA0723', 3, 2, 0, 6, 0 ) 781 842 782 843 ELSEIF ( (nxr-nxl+1) == SIZE( data, 2 ) ) THEN … … 805 866 ENDDO 806 867 807 IF ( debug_level >= 2 ) WRITE(9,*) 'r2i ', TRIM( name ),' ', SUM( array_2di )808 809 868 ELSE 810 WRITE (9,*) '### rrd_mpi_io_int_2d array: ', TRIM( name ) 811 CALL rd_mpi_io_error( 4 ) 869 870 message_string = '2d-INTEGER array "' // TRIM( name ) // '" to be read from restart ' // & 871 'file is defined with illegal dimensions in the PALM code' 872 CALL message( 'rrd_mpi_io_int_2d', 'PA0723', 3, 2, 0, 6, 0 ) 873 812 874 ENDIF 813 875 814 876 ELSE 815 877 816 WRITE(9,*) 'array_2D not found ', name817 CALL rd_mpi_io_error( 2)878 message_string = '2d-INTEGER array "' // TRIM( name ) // '" not found in restart file' 879 CALL message( 'rrd_mpi_io_int_2d', 'PA0722', 3, 2, 0, 6, 0 ) 818 880 819 881 ENDIF … … 872 934 data(:,lb%nys-nbgp:lb%nyn-nbgp,i-nbgp) = array_3d(:,i,lb%nys:lb%nyn) 873 935 ENDDO 874 IF ( debug_level >= 2 ) WRITE(9,*) 'r3f_ob ', TRIM( name ),' ', SUM( data(:,nys:nyn,nxl:nxr) )875 936 ELSE 876 937 DO i = nxl, nxr 877 938 data(:,nys:nyn,i) = array_3d(:,i,nys:nyn) 878 939 ENDDO 879 IF ( debug_level >= 2 ) WRITE(9,*) 'r3f ', TRIM( name ),' ', SUM( data(:,nys:nyn,nxl:nxr) )880 940 ENDIF 881 941 … … 883 943 884 944 ELSE 885 WRITE(9,*) 'array_3D not found ', name 886 CALL rd_mpi_io_error(2) 945 946 message_string = '3d-REAL array "' // TRIM( name ) // '" not found in restart file' 947 CALL message( 'rrd_mpi_io_real_3d', 'PA0722', 3, 2, 0, 6, 0 ) 948 887 949 ENDIF 888 950 … … 946 1008 data(:,lb%nys-nbgp:lb%nyn-nbgp,i-nbgp) = array_3d(:,i,lb%nys:lb%nyn) 947 1009 ENDDO 948 IF ( debug_level >= 2 ) WRITE(9,*) 'r3f_ob_soil ', TRIM( name ),' ', SUM( data(:,nys:nyn,nxl:nxr) )949 1010 ELSE 950 1011 DO i = nxl, nxr 951 1012 data(:,nys:nyn,i) = array_3d(:,i,nys:nyn) 952 1013 ENDDO 953 IF ( debug_level >= 2 ) WRITE(9,*) 'r3f_soil ', TRIM( name ),' ', SUM( array_3d )954 1014 ENDIF 955 1015 956 1016 ELSE 957 WRITE(9,*) 'array_3D not found ', name 958 CALL rd_mpi_io_error( 2 ) 1017 1018 message_string = '3d-REAL soil array "' // TRIM( name ) // '" not found in restart file' 1019 CALL message( 'rrd_mpi_io_real_3d_soil', 'PA0722', 3, 2, 0, 6, 0 ) 1020 959 1021 ENDIF 960 1022 … … 968 1030 !> Read CHARACTER with MPI-IO 969 1031 !--------------------------------------------------------------------------------------------------! 970 SUBROUTINE rrd_mpi_io_char( name, text , found)1032 SUBROUTINE rrd_mpi_io_char( name, text ) 971 1033 972 1034 IMPLICIT NONE … … 974 1036 CHARACTER(LEN=*), INTENT(IN) :: name 975 1037 CHARACTER(LEN=*), INTENT(OUT) :: text 976 CHARACTER(LEN=128) :: l o_line1038 CHARACTER(LEN=128) :: line 977 1039 978 1040 INTEGER(iwp) :: i 979 1041 980 LOGICAL, INTENT(OUT), OPTIONAL :: found 981 LOGICAL :: lo_found 982 983 984 lo_found = .FALSE. 1042 LOGICAL :: found 1043 1044 1045 found = .FALSE. 985 1046 text = ' ' 986 1047 987 1048 DO i = 1, tgh%nr_char 988 lo_line = text_lines(i) 989 IF ( lo_line(1:32) == name ) THEN 990 IF ( debug_level >= 2 ) WRITE(9,*) 'Character variable found ==> ', lo_line(1:32) 991 text = lo_line(33:) 992 lo_found = .TRUE. 1049 line = text_lines(i) 1050 IF ( TRIM( line(1:32) ) == TRIM( name ) ) THEN 1051 text = line(33:) 1052 found = .TRUE. 993 1053 EXIT 994 1054 ENDIF 995 1055 ENDDO 996 1056 997 IF ( PRESENT( found ) ) THEN 998 found = lo_found 999 RETURN 1000 ENDIF 1001 1002 IF ( .NOT. lo_found ) THEN 1003 WRITE(9,*) 'Character variable not found ', name 1004 CALL rd_mpi_io_error( 3 ) 1057 IF ( .NOT. found ) THEN 1058 message_string = 'CHARACTER variable "' // TRIM( name ) // '" not found in restart file' 1059 CALL message( 'rrd_mpi_io_char', 'PA0722', 3, 2, 0, 6, 0 ) 1005 1060 ENDIF 1006 1061 … … 1101 1156 array_2d(i,lb%nys:lb%nyn) = data(lb%nys-nbgp:lb%nyn-nbgp,i-nbgp) 1102 1157 ENDDO 1103 IF ( debug_level >= 2 ) WRITE(9,*) 'w2f_ob ', TRIM( name ), ' ', SUM( data(nys:nyn,nxl:nxr) ) 1158 1104 1159 ELSE 1105 1160 ! … … 1108 1163 array_2d(i,lb%nys:lb%nyn) = data(nys:nyn,i) 1109 1164 ENDDO 1110 IF ( debug_level >= 2 ) WRITE(9,*) 'w2f ', TRIM( name ),' ', & 1111 SUM( array_2d(nxl:nxr, lb%nys:lb%nyn) ) 1165 1112 1166 ENDIF 1113 1167 … … 1138 1192 !> Write 2d-INTEGER array with MPI-IO 1139 1193 !--------------------------------------------------------------------------------------------------! 1140 SUBROUTINE wrd_mpi_io_int_2d( name, data , ar_found)1194 SUBROUTINE wrd_mpi_io_int_2d( name, data ) 1141 1195 1142 1196 IMPLICIT NONE … … 1151 1205 #endif 1152 1206 INTEGER(KIND=iwp), INTENT(IN), DIMENSION(:,:) :: data 1153 1154 LOGICAl, OPTIONAL :: ar_found1155 1207 1156 1208 … … 1164 1216 !-- dimensioned in the caller subroutine as 1165 1217 !-- INTEGER, DIMENSION(nysg:nyng,nxlg:nxrg) :: data 1166 WRITE (9,*) '### wrd_mpi_io_int_2d IF array: ', TRIM( name ) 1167 CALL rd_mpi_io_error( 4 ) 1218 message_string = '2d-INTEGER array "' // TRIM( name ) // '" to be written to restart ' // & 1219 'file is defined with illegal dimensions in the PALM code' 1220 CALL message( 'wrd_mpi_io_int_2d', 'PA0723', 3, 2, 0, 6, 0 ) 1168 1221 1169 1222 ELSEIF ( ( nxr-nxl+1 ) == SIZE( data, 2 ) ) THEN … … 1177 1230 ENDDO 1178 1231 ENDDO 1179 IF ( debug_level >= 2 ) WRITE(9,*) 'w2i ', TRIM( name ), ' ', SUM( array_2di(nxl:nxr,nys:nyn) ), SUM( data )1180 1232 #if defined( __parallel ) 1181 1233 CALL sm_io%sm_node_barrier() ! has no effect if I/O on limited number of cores is inactive … … 1197 1249 1198 1250 ELSE 1199 WRITE (9,*) '### wrd_mpi_io_int_2d array: ', TRIM( name ) 1200 CALL rd_mpi_io_error( 4 ) 1201 ENDIF 1202 1203 IF ( PRESENT( ar_found ) ) ar_found = .TRUE. 1251 1252 message_string = '2d-INTEGER array "' // TRIM( name ) // '" to be written to restart ' // & 1253 'file is defined with illegal dimensions in the PALM code' 1254 CALL message( 'wrd_mpi_io_int_2d', 'PA0723', 3, 2, 0, 6, 0 ) 1255 1256 ENDIF 1204 1257 1205 1258 END SUBROUTINE wrd_mpi_io_int_2d … … 1239 1292 array_3d(:,i,lb%nys:lb%nyn) = data(:,lb%nys-nbgp:lb%nyn-nbgp,i-nbgp) 1240 1293 ENDDO 1241 IF ( debug_level >= 2 ) WRITE(9,*) 'w3f_ob ', TRIM( name ),' ', SUM( data(:,nys:nyn,nxl:nxr) ) 1294 1242 1295 ELSE 1243 1296 ! … … 1246 1299 array_3d(:,i,lb%nys:lb%nyn) = data(:,nys:nyn,i) 1247 1300 ENDDO 1248 IF ( debug_level >= 2 ) WRITE(9,*) 'w3f ', TRIM( name ),' ', SUM( data(:,nys:nyn,nxl:nxr) ) 1301 1249 1302 ENDIF 1250 1303 #if defined( __parallel ) … … 1312 1365 array_3d_soil(:,i,lb%nys:lb%nyn) = data(:,lb%nys-nbgp:lb%nyn-nbgp,i-nbgp) 1313 1366 ENDDO 1314 IF ( debug_level >= 2 ) WRITE(9,*) 'w3f_ob_soil ', TRIM( name ), ' ', SUM( data(:,nys:nyn,nxl:nxr) ) 1367 1315 1368 ELSE 1316 1369 ! … … 1319 1372 array_3d_soil(:,i,lb%nys:lb%nyn) = data(:,nys:nyn,i) 1320 1373 ENDDO 1321 IF ( debug_level >= 2 ) WRITE(9,*) 'w3f_soil ', TRIM( name ), ' ', SUM( array_3d ) 1374 1322 1375 ENDIF 1323 1376 #if defined( __parallel ) … … 1446 1499 CALL posix_read( fh, data, SIZE( data ) ) 1447 1500 #endif 1448 IF ( debug_level >= 2) WRITE(9,*) 'rr1f ',name,' ', SUM( data) 1501 1449 1502 ELSE 1450 WRITE(9,*) 'replicated array_1D not found ', name 1451 CALL rd_mpi_io_error( 2 ) 1503 1504 message_string = '1d/2d/3d/4d-REAL global array "' // TRIM( name ) // '" not found in ' // & 1505 'restart file' 1506 CALL message( 'rrd_mpi_io_global_array_real_1d', 'PA0722', 3, 2, 0, 6, 0 ) 1507 1452 1508 ENDIF 1453 1509 … … 1481 1537 1482 1538 CALL rrd_mpi_io_global_array_real_1d( name, buf ) 1483 IF ( debug_level >= 2 ) WRITE(9,*) 'rr2f ', TRIM( name ), ' ', bufshape(1), SUM( data )1484 1539 1485 1540 END SUBROUTINE rrd_mpi_io_global_array_real_2d … … 1513 1568 CALL rrd_mpi_io_global_array_real_1d( name, buf ) 1514 1569 1515 IF ( debug_level >= 2 ) WRITE(9,*) 'rr3f ', TRIM( name ), ' ', bufshape(1), SUM( data )1516 1517 1570 END SUBROUTINE rrd_mpi_io_global_array_real_3d 1518 1571 … … 1544 1597 1545 1598 CALL rrd_mpi_io_global_array_real_1d( name, buf ) 1546 IF ( debug_level >= 2 ) WRITE(9,*) 'rr4f ', TRIM( name ), ' ', bufshape(1), SUM( data )1547 1599 1548 1600 END SUBROUTINE rrd_mpi_io_global_array_real_4d … … 1556 1608 !> Array contains identical data on all PEs. 1557 1609 !--------------------------------------------------------------------------------------------------! 1558 SUBROUTINE rrd_mpi_io_global_array_int_1d( name, data , ar_found)1610 SUBROUTINE rrd_mpi_io_global_array_int_1d( name, data ) 1559 1611 1560 1612 IMPLICIT NONE … … 1570 1622 INTEGER(KIND=iwp), INTENT(INOUT), DIMENSION(:) :: data 1571 1623 1572 LOGICAl, OPTIONAL :: ar_found1573 1624 LOGICAL :: found 1574 1625 … … 1602 1653 #endif 1603 1654 ELSE 1604 IF ( PRESENT( ar_found ) ) THEN 1605 ar_found =.FALSE. 1606 RETURN 1607 ELSE 1608 WRITE (9,*) '### rrd_mpi_io_global_array_int_1d ', TRIM( name ) 1609 CALL rd_mpi_io_error( 4 ) 1610 WRITE(9,*) 'replicated array_1D not found ', name 1611 CALL rd_mpi_io_error( 2 ) 1612 ENDIF 1613 ENDIF 1614 1615 IF ( PRESENT( ar_found ) ) ar_found =.TRUE. 1655 1656 message_string = '1d-INTEGER global array "' // TRIM( name ) // '" not found in ' // & 1657 'restart file' 1658 CALL message( 'rrd_mpi_io_global_array_int_1d', 'PA0722', 3, 2, 0, 6, 0 ) 1659 1660 ENDIF 1616 1661 1617 1662 END SUBROUTINE rrd_mpi_io_global_array_int_1d … … 1646 1691 header_arr_index = header_arr_index + 1 1647 1692 1648 IF ( debug_level >= 2 ) WRITE(9,*) 'wr1f ', TRIM( name ), ' ', SUM( data ) 1649 ! 1650 !-- Set default view 1651 #if defined( __parallel ) 1652 IF ( sm_io%iam_io_pe ) THEN 1653 CALL MPI_FILE_SET_VIEW( fh, offset, MPI_BYTE, MPI_BYTE, 'native', MPI_INFO_NULL, ierr ) 1654 ENDIF 1655 ! 1656 !-- Only PE 0 writes replicated data 1657 IF ( myid == 0 ) THEN 1658 CALL MPI_FILE_SEEK( fh, array_position, MPI_SEEK_SET, ierr ) 1659 CALL MPI_FILE_WRITE( fh, data, SIZE( data), MPI_REAL, status, ierr ) 1660 ENDIF 1693 ! 1694 !-- Set default view 1695 #if defined( __parallel ) 1696 IF ( sm_io%iam_io_pe ) THEN 1697 CALL MPI_FILE_SET_VIEW( fh, offset, MPI_BYTE, MPI_BYTE, 'native', MPI_INFO_NULL, ierr ) 1698 ENDIF 1699 ! 1700 !-- Only PE 0 writes replicated data 1701 IF ( myid == 0 ) THEN 1702 CALL MPI_FILE_SEEK( fh, array_position, MPI_SEEK_SET, ierr ) 1703 CALL MPI_FILE_WRITE( fh, data, SIZE( data), MPI_REAL, status, ierr ) 1704 ENDIF 1661 1705 #else 1662 1663 1664 #endif 1665 1706 CALL posix_lseek( fh, array_position ) 1707 CALL posix_write( fh, data, SIZE( data ) ) 1708 #endif 1709 array_position = array_position + SIZE( data ) * wp 1666 1710 1667 1711 END SUBROUTINE wrd_mpi_io_global_array_real_1d … … 1693 1737 CALL C_F_POINTER( c_data, buf, bufshape ) 1694 1738 1695 IF ( debug_level >= 2 ) WRITE(9,*) 'wr2f ', TRIM( name ), ' ', bufshape(1), SUM( data )1696 1697 1739 CALL wrd_mpi_io_global_array_real_1d( name, buf ) 1698 1740 … … 1725 1767 CALL C_F_POINTER( c_data, buf, bufshape ) 1726 1768 1727 IF ( debug_level >= 2 ) WRITE(9,*) 'wr3f ', TRIM( name ), ' ', bufshape(1), SUM( data )1728 1729 1769 CALL wrd_mpi_io_global_array_real_1d( name, buf ) 1730 1770 … … 1756 1796 bufshape(1) = SIZE( data) 1757 1797 CALL C_F_POINTER( c_data, buf, bufshape ) 1758 1759 IF ( debug_level >= 2 ) WRITE(9,*) 'wr4f ', TRIM( name ), ' ', bufshape(1), SUM( data )1760 1798 1761 1799 CALL wrd_mpi_io_global_array_real_1d( name, buf ) … … 1789 1827 header_arr_index = header_arr_index + 1 1790 1828 1791 IF ( debug_level >= 2 ) WRITE(9,*) 'wr1i ', TRIM( name ), ' ', SUM( data )1792 1829 ! 1793 1830 !-- Set default view … … 1906 1943 ELSE ! read 1907 1944 #if defined( __parallel ) 1908 IF ( debug_level >= 2 ) WRITE(9,'(a,4i4,4i10)') 'read block ', j, i, j_f, i_f, &1909 m_start_index(j_f,i_f), nr_bytes_f, disp_f1910 1945 CALL MPI_FILE_SEEK( fhs, disp_f, MPI_SEEK_SET, ierr ) 1911 1946 nr_words = nr_bytes_f / wp … … 1925 1960 1926 1961 ELSE 1927 WRITE(9,*) 'surface array not found ', name 1928 CALL rd_mpi_io_error( 2 ) 1929 ENDIF 1930 1931 IF ( lo_first_index == 1 ) THEN 1932 IF ( debug_level >= 2 .AND. nr_val > 0 ) WRITE(9,*) 'r_surf_1 ', TRIM( name ), ' ', nr_val, SUM( data(1:nr_val) ) 1933 ELSE 1934 IF ( debug_level >= 2 .AND. nr_val > 0 ) WRITE(9,*) 'r_surf_next ', TRIM( name ), ' ', & 1935 lo_first_index,nr_val, SUM( data(1:nr_val) ) 1936 ENDIF 1962 1963 message_string = 'surface array "' // TRIM( name ) // '" not found in restart file' 1964 CALL message( 'rrd_mpi_io_global_array_int_1d', 'PA0722', 3, 2, 0, 6, 0 ) 1965 1966 ENDIF 1967 1968 ! IF ( lo_first_index == 1 ) THEN 1969 ! IF ( debug_level >= 2 .AND. nr_val > 0 ) WRITE(9,*) 'r_surf_1 ', TRIM( name ), ' ', nr_val, SUM( data(1:nr_val) ) 1970 ! ELSE 1971 ! IF ( debug_level >= 2 .AND. nr_val > 0 ) WRITE(9,*) 'r_surf_next ', TRIM( name ), ' ', & 1972 ! lo_first_index,nr_val, SUM( data(1:nr_val) ) 1973 ! ENDIF 1937 1974 1938 1975 END SUBROUTINE rrd_mpi_io_surface … … 2026 2063 array_1d(i+local_start) = data(i) 2027 2064 ENDDO 2028 IF ( debug_level >= 2 ) WRITE(9,*) 'w_surf ', TRIM( name ), ' ', SUM( array_1d(local_start+1:local_start+nr_val)),sum(data)2029 2065 ELSE 2030 2066 ! array_1d => data !kk Did not work in all cases why??? … … 2056 2092 array_position = array_position + total_number_of_surface_values * wp 2057 2093 2058 IF ( lo_first_index == 1 ) THEN2059 IF ( debug_level >= 2 .AND. nr_val > 0 ) WRITE(9,*) 'w_surf_1 ', TRIM( name ), ' ', nr_val, SUM( data(1:nr_val) )2060 ELSE2061 IF ( debug_level >= 2 .AND. nr_val > 0 ) WRITE(9,*) 'w_surf_n ', TRIM( name ), ' ', &2062 lo_first_index, nr_val, SUM( data(1:nr_val) )2063 ENDIF2094 ! IF ( lo_first_index == 1 ) THEN 2095 ! IF ( debug_level >= 2 .AND. nr_val > 0 ) WRITE(9,*) 'w_surf_1 ', TRIM( name ), ' ', nr_val, SUM( data(1:nr_val) ) 2096 ! ELSE 2097 ! IF ( debug_level >= 2 .AND. nr_val > 0 ) WRITE(9,*) 'w_surf_n ', TRIM( name ), ' ', & 2098 ! lo_first_index, nr_val, SUM( data(1:nr_val) ) 2099 ! ENDIF 2064 2100 2065 2101 END SUBROUTINE wrd_mpi_io_surface … … 2122 2158 tgh%total_nx = lb%nx + 1 2123 2159 tgh%total_ny = lb%ny + 1 2124 IF ( include_total_domain_boundaries ) THEN ! not sure, if LOGICAL interpretation is the same onall compilers,2160 IF ( include_total_domain_boundaries ) THEN ! not sure, if LOGICAL interpretation is the same for all compilers, 2125 2161 tgh%i_outer_bound = 1 ! therefore store as INTEGER in general header 2126 2162 ELSE … … 2175 2211 2176 2212 CALL MPI_FILE_SEEK( fh, header_position, MPI_SEEK_SET, ierr ) 2177 CALL MPI_FILE_WRITE( fh, array_offset, SIZE( array_offset )*MPI_OFFSET_KIND, MPI_BYTE, status, ierr ) !There is no I*8 datatype in FORTRAN 2213 CALL MPI_FILE_WRITE( fh, array_offset, SIZE( array_offset )*MPI_OFFSET_KIND, MPI_BYTE, & 2214 status, ierr ) ! There is no I*8 datatype in Fortran 2178 2215 header_position = header_position + SIZE( array_offset ) * rd_offset_kind 2179 2216 #else … … 2215 2252 header_position = header_position + SIZE( array_offset ) * rd_offset_kind 2216 2253 #endif 2217 IF ( debug_level >= 2 ) THEN 2218 WRITE(9,*) 'header position after arrays ', header_position, gh_size 2219 ENDIF 2220 2221 IF ( print_header_now ) CALL rd_mpi_io_print_header 2254 IF ( debug_output ) CALL rd_mpi_io_print_header 2222 2255 ENDIF 2223 2256 … … 2248 2281 ENDIF 2249 2282 2250 mb_processed= array_position / ( 1024.0_dp * 1024.0_dp )2283 restart_file_size = array_position / ( 1024.0_dp * 1024.0_dp ) 2251 2284 2252 2285 END SUBROUTINE rd_mpi_io_close … … 2687 2720 2688 2721 2689 IF ( debug_level >= 1 ) THEN2690 2691 WRITE (9,*) ''2692 WRITE (9,*) ' CHARACTER header values ', tgh%nr_char2693 2694 DO i = 1, tgh%nr_char 2695 WRITE(9,*) text_lines(i)(1:80)2696 ENDDO2697 2698 WRITE (9,*) ' '2699 WRITE (9,*) ' INTEGER header values ', tgh%nr_int2700 2701 DO i = 1, tgh%nr_int 2702 WRITE(9,*) 'INTERGER value: ', int_names(i), ' ', int_values(i)2703 ENDDO2704 2705 WRITE (9,*) ' '2706 WRITE (9,*) ' REAL header values ', tgh%nr_real2707 2708 DO i = 1, tgh%nr_real 2709 WRITE(9,*) 'REAL value: ', real_names(i), ' ', real_values(i)2710 ENDDO2711 2712 WRITE (9,*) ' '2713 WRITE (9,*) ' Header entries with Offset ',tgh%nr_arrays2714 WRITE (9,*) ' Name Offset'2715 DO i = 1, tgh%nr_arrays 2716 WRITE(9,'(a,1x,a30,1x,i16)') 'Header entiy: ', array_names(i), array_offset(i)2717 ENDDO2718 WRITE (9,*) ' '2719 ENDIF2720 2721 print_header_now = .FALSE.2722 WRITE (9,*) 'header position after reading the restart file header: ', header_position 2723 WRITE (9,*) ' ' 2724 WRITE (9,*) 'restart file header content:' 2725 WRITE (9,*) '----------------------------' 2726 WRITE (9,*) ' ' 2727 2728 WRITE (9,*) ' CHARACTER header values Total number: ', tgh%nr_char 2729 WRITE (9,*) ' ' 2730 DO i = 1, tgh%nr_char 2731 WRITE( 9, '(I3,A,1X,A)' ) i, ': ', text_lines(i)(1:80) 2732 ENDDO 2733 WRITE (9,*) ' ' 2734 2735 WRITE (9,*) ' INTEGER header variables and values Total number: ', tgh%nr_int 2736 WRITE (9,*) ' ' 2737 DO i = 1, tgh%nr_int 2738 WRITE(9,*) ' variable: ', int_names(i), ' value: ', int_values(i) 2739 ENDDO 2740 WRITE (9,*) ' ' 2741 2742 WRITE (9,*) ' REAL header variables and values Total number: ', tgh%nr_real 2743 WRITE (9,*) ' ' 2744 DO i = 1, tgh%nr_real 2745 WRITE(9,*) ' variable: ', real_names(i), ' value: ', real_values(i) 2746 ENDDO 2747 WRITE (9,*) ' ' 2748 2749 WRITE (9,*) ' Header entries with offset (2d/3d arrays) Total number: ', tgh%nr_arrays 2750 WRITE (9,*) ' ' 2751 DO i = 1, tgh%nr_arrays 2752 WRITE(9,*) ' variable: ', array_names(i), ' offset: ', array_offset(i) 2753 ENDDO 2754 WRITE (9,*) ' ' 2722 2755 2723 2756 END SUBROUTINE rd_mpi_io_print_header 2724 2725 2726 2727 !--------------------------------------------------------------------------------------------------!2728 ! Description:2729 ! ------------2730 !> Print error messages for reading/writing restart data with MPI-IO2731 !--------------------------------------------------------------------------------------------------!2732 SUBROUTINE rd_mpi_io_error( error_number )2733 2734 IMPLICIT NONE2735 2736 INTEGER, INTENT(IN) :: error_number2737 2738 IF ( myid == 0) THEN2739 2740 SELECT CASE (error_number)2741 2742 CASE ( 1 )2743 WRITE(6,*) 'illegal action while opening restart File'2744 CASE ( 2 )2745 WRITE(6,*) 'data array not found in restart File'2746 CASE ( 3 )2747 WRITE(6,*) 'INTEGER or REAL value not found in restart File'2748 CASE ( 4 )2749 WRITE(6,*) 'Arrays only array with nbgp Halos or without halos legal'2750 CASE ( 5 )2751 WRITE(6,*) 'outer boundary in model and outer boundary in restart file do not match'2752 CASE ( 6 )2753 WRITE(6,*) 'posix IO: ERROR Opening Restart File'2754 CASE DEFAULT2755 WRITE(6,*) 'rd_mpi_io_error: illegal error number: ',error_number2756 2757 END SELECT2758 2759 ENDIF2760 #if defined( __parallel )2761 IF ( .NOT. sm_io%iam_io_pe ) RETURN2762 2763 CALL MPI_BARRIER( comm_io, ierr )2764 CALL MPI_ABORT( comm_io, 1, ierr )2765 #else2766 CALL ABORT2767 #endif2768 2769 END SUBROUTINE rd_mpi_io_error2770 2757 2771 2758 -
palm/trunk/SOURCE/shared_memory_io_mod.f90
r4534 r4536 257 257 TYPE(local_boundaries), DIMENSION(32) :: node_grid 258 258 259 #if defined( __intel_compiler ) 260 IF ( numprocs < this%n_npes ) THEN ! NO shared memory IO on one node jobs 261 this%no_shared_Memory_in_this_run = .TRUE. 259 ! 260 !-- Nn shared memory I/O on one node jobs 261 IF ( numprocs < this%n_npes ) THEN 262 this%no_shared_memory_in_this_run = .TRUE. 262 263 RETURN 263 264 ENDIF 264 #endif265 265 266 266 local_dim_s = 0 … … 320 320 color = 1 321 321 ENDIF 322 323 this%io_grid = node_grid(color) 324 this%io_grid%nnx = this%io_grid%nxr - this%io_grid%nxl + 1 325 this%io_grid%nny = this%io_grid%nyn - this%io_grid%nys + 1 322 326 323 327 END SUBROUTINE compute_color -
palm/trunk/SOURCE/virtual_measurement_mod.f90
r4504 r4536 21 21 ! ----------------- 22 22 ! 23 ! 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! bugfix: preprocessor directive adjusted 28 ! 29 ! 4504 2020-04-20 12:11:24Z raasch 27 30 ! file re-formatted to follow the PALM coding standard 28 31 ! … … 859 862 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: ns_all !< dummy array used to sum-up the number of observation coordinates 860 863 861 #if defined( __ parallel )864 #if defined( __netcdf4_parallel ) 862 865 INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: ns_atmos !< number of observation points for each station on each mpi rank 863 866 INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE :: ns_soil !< number of observation points for each station on each mpi rank -
palm/trunk/SOURCE/write_restart_data_mod.f90
r4535 r4536 24 24 ! ----------------- 25 25 ! $Id$ 26 ! binary version incremented 27 ! 28 ! 4535 2020-05-15 12:07:23Z raasch 26 29 ! bugfix for restart data format query 27 30 ! … … 181 184 INTEGER :: i !< loop index 182 185 183 binary_version_global = ' 4.9'186 binary_version_global = '5.0' 184 187 185 188 IF ( restart_data_format_output == 'fortran_binary' ) THEN … … 1162 1165 ! 1163 1166 !-- Write arrays. 1164 binary_version_local = ' 4.7'1167 binary_version_local = '5.0' 1165 1168 1166 1169 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN
Note: See TracChangeset
for help on using the changeset viewer.