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 2635 – NEMO

Changeset 2635


Ignore:
Timestamp:
2011-03-01T12:37:29+01:00 (13 years ago)
Author:
trackstand2
Message:

wrk_use etc.: fixed bug in check on return value in loop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/wrk_nemo.F90

    r2634 r2635  
    220220      iarg    = 1 
    221221       
    222       DO WHILE( wrk_in_use .AND. iarg <= max_num_wrkspaces ) 
     222      DO WHILE( (.NOT. wrk_in_use) .AND. iarg <= max_num_wrkspaces ) 
    223223         ! 
    224224         IF( kdim == 1 ) THEN 
     
    315315      iarg      = 1 
    316316      ! 
    317       DO WHILE( llwrk_in_use .AND. iarg <= max_num_wrkspaces ) 
     317      DO WHILE( (.NOT. llwrk_in_use) .AND. iarg <= max_num_wrkspaces ) 
    318318         ! 
    319319         IF( kdim == 2 ) THEN 
     
    355355         ENDIF 
    356356         ! 
    357       END DO ! while(llwrk_in_use .AND. iarg <= max_num_wrkspaces) 
     357      END DO ! while( (.NOT. llwrk_in_use) .AND. iarg <= max_num_wrkspaces) 
    358358      ! 
    359359   END FUNCTION llwrk_in_use 
     
    384384      iarg     = 1 
    385385       
    386       DO WHILE( iwrk_in_use .AND. iarg <= max_num_wrkspaces ) 
     386      DO WHILE( (.NOT. iwrk_in_use) .AND. iarg <= max_num_wrkspaces ) 
    387387         ! 
    388388         IF( kdim == 2 ) THEN 
     
    463463      iarg       = 1 
    464464        
    465       DO WHILE( wrk_in_use_xz .AND. iarg <= max_num_wrkspaces ) 
     465      DO WHILE( (.NOT. wrk_in_use_xz) .AND. iarg <= max_num_wrkspaces ) 
    466466         ! 
    467467         IF(iptr > num_xz_wrkspaces)THEN 
     
    485485         END IF 
    486486         ! 
    487       END DO ! while(wrk_in_use_xz .AND. iarg <= max_num_wrkspaces) 
     487      END DO ! while( (.NOT. wrk_in_use_xz) .AND. iarg <= max_num_wrkspaces) 
    488488      ! 
    489489   END FUNCTION wrk_in_use_xz 
Note: See TracChangeset for help on using the changeset viewer.