Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Cray Compiler Environment mkmf.template #470

Closed
hkershaw-brown opened this issue May 1, 2023 · 3 comments · Fixed by #488
Closed

Feature request: Cray Compiler Environment mkmf.template #470

hkershaw-brown opened this issue May 1, 2023 · 3 comments · Fixed by #488
Labels
Derecho issues related to running on NCAR's new supercomputer

Comments

@hkershaw-brown
Copy link
Member

Use case

Compiling with cce on Derecho/Gust

There is an mkmf.tempalate here: https://github.com/NCAR/DART/tree/derecho-cce

Out of the box, get this interesting output of 2*-1 rather than -1 -1 for obs_seq.final:
Screen_Shot_2023-05-01_at_1 24 02_PM

note, ifort & ifx you get the expected:

  0.899859108742901
   1.04325699682186
  0.784974601221952
  0.000000000000000E+000
  0.000000000000000E+000
       39999          -1          -1
obdef
loc1d
   0.9681760430187080
kind
           1
 57600         41
   1.00000000000000
@hkershaw-brown
Copy link
Member Author

hkershaw@gust02:~/issues/cce-format> cat main.f90 
program write_me

implicit none

real :: a,b,c

a = 1.0
b = 1.0
c = 2.0

print*, a, b
print*, a, b, c
print*, a, c, b
print*, a, b, b, b
write(*,*) a, b
write(6,'(2f8.2)') a, b

end program write_me
hkershaw@gust02:~/issues/cce-format> ftn main.f90 
hkershaw@gust02:~/issues/cce-format> ./a.out 
 2*1.
 2*1.,  2.
 1.,  2.,  1.
 4*1.
 2*1.
    1.00    1.00
hkershaw@gust02:~/issues/cce-format> module -t list
ncarenv/23.04
craype/2.7.20
cray-libsci/23.02.1.1
cce/15.0.1
ncarcompilers/0.8.0
hdf5/1.12.2
netcdf/4.9.1
cray-mpich/8.1.25

@hkershaw-brown
Copy link
Member Author

repeat counts (2*-1) are acceptable in the Fortran standard for list-directed IO. The separators can be blanks, commas, or slashes.
39999 -1 -1 39999, 2*-1 same difference to Fortran
The write_obs is list-directed write(file_id, *) so this needs a format specification if the obs_seq files need to look the same (e.g. if you rely on diff)

write(file_id, *) obs%prev_time, obs%next_time, obs%cov_group
call write_obs_def(file_id, obs%def, obs%key)
endif
end subroutine write_obs

side note here, the obs%cov_group is -1 all the time.

@hkershaw-brown hkershaw-brown added the Derecho issues related to running on NCAR's new supercomputer label May 1, 2023
@mjs2369
Copy link
Contributor

mjs2369 commented May 30, 2023

Formatting bug (output of 2*-1 rather than -1 -1) moved to separate issue #484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Derecho issues related to running on NCAR's new supercomputer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants