New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 2782 – NEMO

Changeset 2782


Ignore:
Timestamp:
2011-06-16T09:35:07+02:00 (13 years ago)
Author:
smasson
Message:

bugfix in xmlio_server for some machines..., see ticket#837

Location:
trunk/NEMOGCM/EXTERNAL/XMLIO_SERVER/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/EXTERNAL/XMLIO_SERVER/src/IOSERVER/mod_pack.f90

    r2767 r2782  
    542542       SELECT CASE(attrib%type) 
    543543         CASE (integer0) 
    544            ALLOCATE(attrib%integer0_ptr) 
     544!!$           ALLOCATE(attrib%integer0_ptr) 
    545545           CALL unpack_data(attrib%integer0_ptr) 
    546546         CASE (integer1) 
     
    551551           CALL unpack_data(attrib%integer2_ptr) 
    552552         CASE (real0) 
    553            ALLOCATE(attrib%real0_ptr) 
     553!!$           ALLOCATE(attrib%real0_ptr) 
    554554           CALL unpack_data(attrib%real0_ptr) 
    555555         CASE (real1) 
     
    559559           ALLOCATE(attrib%real2_ptr(attrib%dim(1),attrib%dim(2))) 
    560560         CASE (logical0) 
    561            ALLOCATE(attrib%logical0_ptr) 
     561!!$           ALLOCATE(attrib%logical0_ptr) 
    562562           CALL unpack_data(attrib%logical0_ptr) 
    563563         CASE (logical1) 
     
    568568           CALL unpack_data(attrib%logical2_ptr) 
    569569         CASE (string0) 
    570            ALLOCATE(attrib%string0_ptr) 
     570!!$           ALLOCATE(attrib%string0_ptr) 
    571571           CALL unpack_string0 
    572572         CASE (string1) 
  • trunk/NEMOGCM/EXTERNAL/XMLIO_SERVER/src/XMLIO/mod_attribut.f90

    r2281 r2782  
    1111    INTEGER :: dim(7) 
    1212    INTEGER :: ndim 
    13     INTEGER,POINTER :: integer0_ptr 
     13    INTEGER :: integer0_ptr 
    1414    INTEGER,POINTER :: integer1_ptr(:) 
    1515    INTEGER,POINTER :: integer2_ptr(:,:) 
    16     REAL,POINTER    :: real0_ptr 
     16    REAL    :: real0_ptr 
    1717    REAL,POINTER    :: real1_ptr(:) 
    1818    REAL,POINTER    :: real2_ptr(:,:) 
    19     LOGICAL,POINTER :: logical0_ptr 
     19    LOGICAL :: logical0_ptr 
    2020    LOGICAL,POINTER :: logical1_ptr(:) 
    2121    LOGICAL,POINTER :: logical2_ptr(:,:) 
    2222     
    23     CHARACTER(LEN=str_len),POINTER :: string0_ptr 
     23    CHARACTER(LEN=str_len) :: string0_ptr 
    2424    CHARACTER(LEN=str_len),POINTER :: string1_ptr(:) 
    2525    CHARACTER(LEN=str_len),POINTER :: string2_ptr(:,:) 
     
    8181    SELECT CASE(attrib%type) 
    8282       CASE (integer0) 
    83          DEALLOCATE(attrib%integer0_ptr) 
     83!!$         DEALLOCATE(attrib%integer0_ptr) 
    8484       CASE (integer1) 
    8585         DEALLOCATE(attrib%integer1_ptr) 
     
    8787         DEALLOCATE(attrib%integer2_ptr) 
    8888       CASE (real0) 
    89          DEALLOCATE(attrib%real0_ptr) 
     89!!$         DEALLOCATE(attrib%real0_ptr) 
    9090       CASE (real1) 
    9191         DEALLOCATE(attrib%real1_ptr) 
     
    9393         DEALLOCATE(attrib%real2_ptr) 
    9494       CASE (logical0) 
    95          DEALLOCATE(attrib%logical0_ptr) 
     95!!$         DEALLOCATE(attrib%logical0_ptr) 
    9696       CASE (logical1) 
    9797         DEALLOCATE(attrib%logical1_ptr) 
     
    9999         DEALLOCATE(attrib%logical2_ptr) 
    100100       CASE (string0) 
    101          DEALLOCATE(attrib%string0_ptr) 
     101!!$         DEALLOCATE(attrib%string0_ptr) 
    102102       CASE (string1) 
    103103         DEALLOCATE(attrib%string1_ptr) 
     
    112112    IMPLICIT NONE 
    113113    INTEGER :: attr_name 
    114     INTEGER,TARGET :: value 
     114    INTEGER :: value 
    115115     
    116116    TYPE(attribut) :: attr_int0 
     
    118118    attr_int0%name=attr_name 
    119119    attr_int0%type=integer0 
    120     attr_int0%integer0_ptr=>value 
     120    attr_int0%integer0_ptr=value 
    121121     
    122122  END FUNCTION attr_int0 
     
    126126    IMPLICIT NONE 
    127127    INTEGER :: attr_name 
    128     INTEGER,TARGET :: value(:) 
     128    INTEGER,TARGET, INTENT(INOUT) :: value(:) 
    129129     
    130130    TYPE(attribut) :: attr_int1 
     
    140140    IMPLICIT NONE 
    141141    INTEGER :: attr_name 
    142     INTEGER,TARGET :: value(:,:) 
     142    INTEGER,TARGET, INTENT(INOUT) :: value(:,:) 
    143143     
    144144    TYPE(attribut) :: attr_int2 
     
    155155    IMPLICIT NONE 
    156156    INTEGER :: attr_name 
    157     REAL,TARGET :: value 
     157    REAL :: value 
    158158     
    159159    TYPE(attribut) :: attr_real0 
     
    161161    attr_real0%name=attr_name 
    162162    attr_real0%type=real0 
    163     attr_real0%real0_ptr=>value 
     163    attr_real0%real0_ptr=value 
    164164     
    165165  END FUNCTION attr_real0 
     
    169169    IMPLICIT NONE 
    170170    INTEGER :: attr_name 
    171     REAL,TARGET :: value(:) 
     171    REAL,TARGET, INTENT(INOUT) :: value(:) 
    172172     
    173173    TYPE(attribut) :: attr_real1 
     
    183183    IMPLICIT NONE 
    184184    INTEGER :: attr_name 
    185     REAL,TARGET :: value(:,:) 
     185    REAL,TARGET, INTENT(INOUT) :: value(:,:) 
    186186     
    187187    TYPE(attribut) :: attr_real2 
     
    197197    IMPLICIT NONE 
    198198    INTEGER :: attr_name 
    199     LOGICAL,TARGET :: value 
     199    LOGICAL :: value 
    200200     
    201201    TYPE(attribut) :: attr_logical0 
     
    203203    attr_logical0%name=attr_name 
    204204    attr_logical0%type=logical0 
    205     attr_logical0%logical0_ptr=>value 
     205    attr_logical0%logical0_ptr=value 
    206206     
    207207  END FUNCTION attr_logical0 
     
    211211    IMPLICIT NONE 
    212212    INTEGER :: attr_name 
    213     LOGICAL,TARGET :: value(:) 
     213    LOGICAL,TARGET, INTENT(INOUT) :: value(:) 
    214214     
    215215    TYPE(attribut) :: attr_logical1 
     
    225225    IMPLICIT NONE 
    226226    INTEGER :: attr_name 
    227     LOGICAL,TARGET :: value(:,:) 
     227    LOGICAL,TARGET, INTENT(INOUT) :: value(:,:) 
    228228     
    229229    TYPE(attribut) :: attr_logical2 
     
    240240    IMPLICIT NONE 
    241241    INTEGER :: attr_name 
    242     CHARACTER(LEN=*),TARGET :: value 
     242    CHARACTER(LEN=*) :: value 
    243243    TYPE(attribut) :: attr_string0 
    244244 
     
    246246      attr_string0%name=attr_name 
    247247      attr_string0%type=string0 
    248       attr_string0%string_len=LEN(value) 
    249       attr_string0%string0_ptr=>value 
     248      attr_string0%string_len=LEN_TRIM(value) 
     249      attr_string0%string0_ptr=value 
    250250     
    251251  END FUNCTION attr_string0 
     
    255255    IMPLICIT NONE 
    256256    INTEGER :: attr_name 
    257     CHARACTER(LEN=*),TARGET :: value(:) 
     257    CHARACTER(LEN=*),TARGET, INTENT(INOUT) :: value(:) 
    258258     
    259259    TYPE(attribut) :: attr_string1 
     
    270270    IMPLICIT NONE 
    271271    INTEGER :: attr_name 
    272     CHARACTER(LEN=*),TARGET :: value(:,:) 
     272    CHARACTER(LEN=*),TARGET, INTENT(INOUT) :: value(:,:) 
    273273     
    274274    TYPE(attribut) :: attr_string2 
Note: See TracChangeset for help on using the changeset viewer.