Skip to content

Building with llvm  #71

@LonelyCat124

Description

@LonelyCat124

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.

  1. dl_timer doesn't compile with flang. It complains in clear_timers that with default(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 using default(shared) works around the issue for now.
  2. dl_esm_inf fails to build, and this one confuses me. The error I see is
/home/achalk/PSycloneBench/shared/dl_esm_inf/finite_difference/src//field_mod.f90:60:11: error: The derived type 'grid_type' was forward-referenced but not defined
       type(grid_type), pointer :: grid
            ^^^^^^^^^

Now this should be defined in grid_mod, which does exist and compiled:

[achalk@glados src]$ ls grid_mod*
grid_mod.f18.mod  grid_mod.f90  grid_mod.mod  grid_mod.o

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions