File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Infrastructure/TimeMgr/tests Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ program ESMF_ClockTest
78
78
! Random number
79
79
real :: ranNum
80
80
integer :: timevals(8 )
81
+ integer :: milliseconds
81
82
integer , allocatable :: seed(:)
82
83
integer :: seed_size
83
84
@@ -1510,9 +1511,15 @@ program ESMF_ClockTest
1510
1511
1511
1512
if (rc.eq. ESMF_SUCCESS) then
1512
1513
call date_and_time (values= timevals)
1514
+ milliseconds = timevals(8 )
1513
1515
call random_seed (size= seed_size)
1514
1516
allocate (seed(seed_size))
1515
- seed= timevals(8 )
1517
+ if (milliseconds.eq. 0 ) then
1518
+ ! random_seed needs non-zero values, at least with some compilers (e.g., nvhpc)
1519
+ seed = 1000
1520
+ else
1521
+ seed = milliseconds
1522
+ end if
1516
1523
call random_seed (put= seed)
1517
1524
deallocate (seed)
1518
1525
testResults = 0
You can’t perform that action at this time.
0 commit comments