Open LonelyCat124 opened 3 years ago
So somehow in spite of the errors for dl_esm_inf
, it still decides to make lib_fd.a
, however the later imports on field_mod
all fail
Ok, so I think this again a flang bug? But I'm no expert on fortran
The issues seems to be that flang believes that the definition of
grid_type` as public is not allowed, i..e:
type, public :: grid_type
does not work (or is hidden by the interface?)
Instead, if I remove that declaration of encapsulation, and instead add
public grid_init, HALO_WIDTH_X, HALO_WIDTH_Y, grid_type
then it seems to compile the library
Next confusion is what is
benchmarks/nemo/nemolite2d/common/gocean2d_io_mod.f90: use parallel_mod, only: on_master
benchmarks/nemo/nemolite2d/common/gocean2d_io_mod.f90: if (on_master()) then
I think this code compiles and works with gfortran, nvidia and Intel so it seems likely it's a Flang bug :-)
I discussed with rupert this morning and am going to hold off reporting bugs to flang until the next llvm release.
I'm trying to build PSycloneBench with flang/clang for the Excalibur project.
I have made a first version of llvm.sh compiler script, but I've found a couple of things that don't work, some of which might be our issues and some which aren't.
dl_timer
doesn't compile with flang. It complains inclear_timers
that withdefault(none)
various things are not declared (MAX_TIMERS
,_int64
,_r_def
, etc.). Now I'm pretty sure these don't need to be defined, but usingdefault(shared)
works around the issue for now.dl_esm_inf
fails to build, and this one confuses me. The error I see isNow this should be defined in grid_mod, which does exist and compiled:
I could try using clang + gfortran but I'm not sure if I can use the correct openmp library, but will give it a try in the mean time. Edit: ar won't work with clang .o files and gfortran .o files combined so I can't do clang + gfortran.