Changeset 1574


Ignore:
Timestamp:
11/10/11 09:21:23 (10 years ago)
Author:
mmaipsl
Message:

Add parallel getin_dump_para function for test all non-parallel getin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • IOIPSL/trunk/src/getincom.f90

    r1378 r1574  
    1313!- 
    1414PRIVATE 
    15 PUBLIC :: getin_name, getin, getin_dump 
     15PUBLIC :: getin_name, getin, getin_dump, getin_dump_para 
    1616!- 
    1717!!-------------------------------------------------------------------- 
     
    6565!! (C) fileprefix : allows the user to change the name of the file 
    6666!!                  in which the data will be archived 
     67!!-------------------------------------------------------------------- 
     68!- 
     69!!------------------------------------------------------------------------ 
     70!! Parallel version of getin_dump : user must give a fileprefix and a rank. 
     71!! It may be usefull to verify that only the root proc is reading the input 
     72!! def files. 
     73!! 
     74!!  SUBROUTINE getin_dump_para (fileprefix,rank) 
     75!! 
     76!! INPUT argument 
     77!! 
     78!! (C) fileprefix : allows the user to change the name of the file 
     79!!                  in which the data will be archived 
     80!! (I) rank : the rank of the parallel process (only 0-999 files will be created) 
    6781!!-------------------------------------------------------------------- 
    6882!- 
     
    12411255!- 
    12421256  INTEGER :: current,nb_lastkey 
    1243   CHARACTER(LEN=*) :: key_str,NEW_str,last_key 
     1257  CHARACTER(LEN=*) :: key_str,NEW_str 
     1258  CHARACTER(LEN=*),INTENT(out) :: last_key 
    12441259!- 
    12451260! LOCAL 
     
    14781493  INTEGER :: unit,eof,nb_lastkey 
    14791494  CHARACTER(LEN=100) :: dummy 
    1480   CHARACTER(LEN=100) :: out_string 
     1495  CHARACTER(LEN=100),INTENT(out) :: out_string 
    14811496  CHARACTER(LEN=1) :: first 
    14821497!--------------------------------------------------------------------- 
     
    18401855  CHARACTER(LEN=80) :: usedfileprefix 
    18411856  INTEGER :: ikey,if,iff,iv 
    1842   INTEGER :: ios 
    18431857  CHARACTER(LEN=20) :: c_tmp 
    18441858  CHARACTER(LEN=100) :: tmp_str,used_filename 
     
    20112025END SUBROUTINE getin_dump 
    20122026!=== 
     2027SUBROUTINE getin_dump_para (fileprefix,rank) 
     2028!--------------------------------------------------------------------- 
     2029  IMPLICIT NONE 
     2030!- 
     2031  CHARACTER(*) :: fileprefix 
     2032  INTEGER,INTENT(IN) :: rank 
     2033!- 
     2034  CHARACTER(LEN=80) :: usedfileprefix 
     2035  LOGICAL :: l_dbg 
     2036  INTEGER :: isize 
     2037!--------------------------------------------------------------------- 
     2038  CALL ipsldbg (old_status=l_dbg) 
     2039!--------------------------------------------------------------------- 
     2040  IF ( rank < 1000 ) THEN 
     2041     isize=MIN(LEN_TRIM(fileprefix),75) 
     2042     usedfileprefix = fileprefix(1:isize) 
     2043     usedfileprefix((isize+1):(isize+1))='_' 
     2044     WRITE(usedfileprefix((isize+2):(isize+5)),'(I4.4)') rank 
     2045     IF (l_dbg) & 
     2046          WRITE(ipslout,*) 'Dump getin to file ',usedfileprefix 
     2047     CALL getin_dump(usedfileprefix) 
     2048  ENDIF 
     2049!------------------------ 
     2050END SUBROUTINE getin_dump_para 
     2051 
     2052!=== 
    20132053SUBROUTINE get_qtyp (k_typ,c_vtyp,i_v,r_v,c_v,l_v) 
    20142054!--------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.