Changes between Version 4 and Version 5 of 2011WP/2011Stream2/DynamicMemory_improvments
- Timestamp:
- 2011-03-04T12:29:15+01:00 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
2011WP/2011Stream2/DynamicMemory_improvments
v4 v5 54 54 }}} 55 55 56 ---- 57 58 == gfortran spec == 59 60 gfortran doesn't compile when defining allocation function like this 61 {{{ 62 INTEGER FUNCTION work_alloc() 63 64 ALLOCATE( data(jpi,jpj,jpk), STAT=work_alloc ) 65 66 END FUNCTION p4z_che_alloc 67 }}} 68 69 The compilation returns this error : 56 70 71 A solution should be to write the function in that way 72 {{{ 73 INTEGER FUNCTION work_alloc() 74 INTEGER :: ierr 75 76 ALLOCATE( data(jpi,jpj,jpk), STAT=ierr ) 77 78 work_alloc = ierr 79 80 END FUNCTION p4z_che_alloc 81 }}} 57 82 ----