#1527 closed Bug (fixed)
SETTE agrif failed in an INTEL (r5331)
Reported by: | mathiot | Owned by: | pabouttier |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OCE | Version: | trunk |
Severity: | Keywords: | AGRIF | |
Cc: |
Description
SETTE test with AGRIF failed at revision 5331 (not at revision 5305) on an intel machine. It comes from the file storng.F90. After a quick look, it seems, AGRIF doesn't like code structure like this:
MODULE xxxxx
... CONTAINS ... FUNCTION ... CONTAINS FUNCTION yyyy ... END FUNCTION FUNCTION zzzz ... END FUNCTION END FUNCTION ... END MODULE
I suggest to write the function kiss like this:
FUNCTION kiss() !! -------------------------------------------------------------------- !! *** FUNCTION kiss *** !! !! ** Purpose : 64-bit KISS random number generator !! !! ** Method : combine several random number generators: !! (1) Xorshift (XSH), period 2^64-1, !! (2) Multiply-with-carry (MWC), period (2^121+2^63-1) !! (3) Congruential generator (CNG), period 2^64. !! !! overall period: !! (2^250+2^192+2^64-2^186-2^129)/6 !! ~= 2^(247.42) or 10^(74.48) !! !! set your own seeds with 'kiss_seed' ! -------------------------------------------------------------------- IMPLICIT NONE INTEGER(KIND=8) :: kiss, t INTEGER(KIND=8) :: tmp t = ISHFT(x,58) + w IF (ISHFT(x,-63).eq.ISHFT(t,-63)) THEN w = ISHFT(x,-6) + ISHFT(x,-63) ELSE w = ISHFT(x,-6) + 1 - ISHFT(x+t,-63) ENDIF x = t + x tmp = IEOR(y , ISHFT(y , 13) ) tmp = IEOR(tmp, ISHFT(tmp, -17) ) y = IEOR(tmp, ISHFT(tmp, 43) ) z = 6906969069 * z + 1234567 kiss = x + y + z END FUNCTION kiss
Confirmation of this modification is needed.
Commit History (1)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
5366 | pabouttier | 2015-06-05T13:21:13+02:00 | Add AGRIF_DO_NOT_TREAT directve in storng to compile AGRIF configuration in SETTE; See Ticket #1527 |
Change History (3)
comment:1 Changed 9 years ago by bouttier
comment:2 Changed 9 years ago by bouttier
- Resolution set to fixed
- Status changed from new to closed
The safest solution for now is to add AGRIF_DO_NOT_TREAT dircetive. This is done in the revision 5366.
comment:3 Changed 8 years ago by nicolasmartin
- Keywords AGRIF added; Agrif removed
Note: See
TracTickets for help on using
tickets.
This solution seems to be correct. Another solution is to extract functions attached to the kiss routine and put them at the same level that the kiss routine.
I will choose the most reliable option to fix this.