Skip to content

NAG CMake support is incomplete/broken #5002

@mathomp4

Description

@mathomp4

All,

I recently tried to build OpenBLAS with NAG Fortran using CMake and it was...not happy.

In my testing I've found incomplete NAG support in CMake itself. This was fixable but in doing so, I found there were Fortran Standards issues in:

  • lapack-netlib
  • local ctest code

So now here's the crux. I have a set of fixes for the CMake and the Fortran Standards issues and can issue a PR at anytime, but I'm not sure how to proceed. I'll detail my reasoning below.


CMake

These should be safe to take since, well, without them, NAG just has issues. They are partly bringing stuff from Makefile to CMake systems and partly from changes I found from @ACSimon33 from Reference-LAPACK/lapack#686 (also seen below)

lapack-netlib

The lapack-netlib fixes are all thanks to @ACSimon33 who fixed the same issues in a couple Reference-LAPACK PRs:

But, my question is: How often are Reference-LAPACK changes brought into OpenBLAS? If a sync with the Reference is coming, well, those changes in my PR might be moot as they are fixed "upstream". But if the sync might not happen for a bit, I can put them in my PR.

local ctest code

These changes are caused by #4918 which changed all the STOP calls to CALL ABORT. ABORT is not part of the Fortran Standard though many compilers support it via extensions. But, NAG is very strict and will not support extensions that have equivalents in the Fortran Standard. That equivalent is ERROR STOP.

The main reason I'm hesitant here is I don't know how old of compilers you need to support. ERROR STOP is from Fortran 2008 and while every compiler I use is happy with it, I don't have to build things with GCC 4 or whatever. (The oldest compiler I can find is GCC 7 and it is happy with ERROR STOP.)

So, if you'd prefer to keep CALL ABORT (and thus not touch "working" code), I believe it should be fairly simple to make a routine that is only compiled when NAG Fortran is used that can provide an ABORT routine (that underneath calls ERROR STOP).

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