icl-utk-edu / papi

Other
84 stars 38 forks source link

Variation between Fortran files #157

Open cponder opened 5 months ago

cponder commented 5 months ago

If I read right, the files under src/testlib are F77 compliant, while the

   src/components/sysdetect/tests/query_device_simple_f.F

is written in F90 format. You special-case this

26 ifeq ($(notdir $(F77)),gfortran) 27 FFLAGS +=-ffree-form -ffree-line-length-none 28 else ifeq ($(notdir $(F77)),flang) 29 FFLAGS +=-ffree-form 30 else ifneq ($(findstring $(notdir $(F77)), $(intel_compilers)),) 31 FFLAGS +=-free 32 else ifneq ($(findstring $(notdir $(F77)), $(cray_compilers)),) 33 FFLAGS +=-ffree 34 endif

in the file

   src/components/sysdetect/tests/Makefile

I'm testing the "nvfortran" compiler, so it's not triggering the corresponding "-Mfree" flag. And if I set it in general

    export FFLAGS="-noswitcherror -Mfree"

it will try to treat the F77 files as F90 and break the compile. As I understand the Fortra standard, if you change the name of the latter file to

    src/components/sysdetect/tests/query_device_simple_f.f90

the compilers will automatically treat the file as free-form and you won't have to use the special-casing in the Makefile.

cponder commented 5 months ago

I'm using PAPI 7.1.0 with the NVHPC 24.1 compilers. BTW, it was a lot easier to build this than 6.0.0.

adanalis commented 5 months ago

Can you please check in your environment if adding the following two lines under line 27 in the Makefile solves the problem?

else ifeq ($(notdir $(F77)),nvfortran) FFLAGS +=-Mfree

Thanks, Anthony

On Sat, Feb 3, 2024 at 11:51 AM Carl Ponder @.***> wrote:

I'm using PAPI 7.1.0 with the NVHPC 24.1 compilers. BTW, it was a lot easier to build this than 6.0.0.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>