Skip to content

Conversation

@veech
Copy link

@veech veech commented Sep 9, 2024

Add Linux aarch64 GNU compiler architecture to WPS

This PR adds support for Linux aarch64 systems using GNU compilers (gfortran/gcc) to the WPS configure.defaults file. The new architecture definition enables building WPS on ARM64-based Linux systems, supporting both serial and distributed memory parallel (dmpar) configurations, with and without GRIB2 support.

Key features:

  • Uses gfortran and gcc compilers
  • Configures appropriate flags for big-endian conversion and record markers
  • Supports both serial and parallel builds
  • Compatible with existing WPS configuration process

@mgduda mgduda requested review from islas and mgduda and removed request for islas and mgduda September 9, 2024 20:21
@mgduda
Copy link
Collaborator

mgduda commented Sep 9, 2024

@veech I may be missing something, but I think the existing Linux x86_64, gfortran stanza in configure.defaults should work equally for x86_64 and aarch64. I'd suggest creating a branch from master or the v4.6.0 tag and simply generalizing the name of the Linux x86_64, gfortran stanza to something like Linux, GNU compilers. But in any case, creating a PR from a branch and not from the head of your master branch would be good.

@veech
Copy link
Author

veech commented Sep 17, 2024

For a little more context, I'm running the build within a Docker container on my Apple Silicon Mac. When running configure without the lines I added, I get this:

Will use NETCDF in dir: /wrf/LIBRARIES/netcdf
Found what looks like a valid WRF I/O library in ../WRF
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Found Jasper environment variables for GRIB2 support...
  $JASPERLIB = /wrf/LIBRARIES/grib2/lib
  $JASPERINC = /wrf/LIBRARIES/grib2/include
------------------------------------------------------------------------
Please select from among the following supported platforms.

Enter selection [1-0] : 

When changing the line in configure.defaults to:

#ARCH    Linux, GNU compilers    # serial serial_NO_GRIB2 dmpar dmpar_NO_GRIB2

I get the same as above.

Sorry about the PR from master, what's the best way to fix this? Should I create a new PR from a branch?

@mgduda
Copy link
Collaborator

mgduda commented Apr 22, 2025

@veech Apologies for the long delay in following up. It looks like the change that have been proposed in PR #262 should allow you to build with the GNU compilers on Linux aarch64 systems. Would you be willing to see whether those changes work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants