Skip to content

Add new stanza for ARM aarch64/openmpi#1557

Merged
davegill merged 5 commits intowrf-model:release-v4.3.2from
yip111:patch-1
Dec 13, 2021
Merged

Add new stanza for ARM aarch64/openmpi#1557
davegill merged 5 commits intowrf-model:release-v4.3.2from
yip111:patch-1

Conversation

@yip111
Copy link
Contributor

@yip111 yip111 commented Sep 16, 2021

TYPE:enhancement

KEYWORDS: ARM

DESCRIPTION OF CHANGES:
Problem:
There are no ARM-only stanzas in arch/configure.defaults. As the suggestion from #1535 , we need a separate PR for ARM specific update.

Solution:
Edit the arch/configure.defaults file and add a stanza for aarch64 and armv7l, using the GNU compiler options.

The default optimization is -03, up from the usual -02. On two 36-h nested simulations on a raspberry pi, the difference
is a consistent 3% speed increase. This used CONUS, so the -03 seems robust.

LIST OF MODIFIED FILES:
M arch/configure.defaults

RELEASE NOTE: Added a new stanza that is only for ARM processors (right now aarch64 and armv7l) with GNU.

Add the aarch64 GNU & OPEN MPI compile options in `arch/configure.defaults`
@yip111 yip111 requested a review from a team as a code owner September 16, 2021 07:14
yip111 added a commit to yip111/WRF that referenced this pull request Sep 16, 2021
martin-g
martin-g previously approved these changes Sep 16, 2021
@davegill
Copy link
Contributor

davegill commented Sep 16, 2021

@yip111
Would you please confirm that the current version of WRF, v4.3, does NOT already provide build support for ARM.

@davegill davegill changed the base branch from develop to release-v4.3.1 September 16, 2021 19:26
@davegill davegill dismissed martin-g’s stale review September 16, 2021 19:26

The base branch was changed.

@davegill davegill changed the title Add new stanza for aarch64/openmpi Add new stanza for ARM aarch64/openmpi Sep 16, 2021
@davegill
Copy link
Contributor

@yip111
We want to know the following.
Does the existing WRF release v4.3 work with ARM and gfortran, WITHOUT this update?

@davegill
Copy link
Contributor

@yip111
There are a couple of remaining questions about the previous version of the model, and the requirements for certain flags.

@davegill davegill changed the base branch from release-v4.3.1 to release-v4.3.2 November 2, 2021 17:39
@davegill
Copy link
Contributor

davegill commented Nov 2, 2021

@yip111
First of all, we very much appreciate your time. When users provide suggested modifications, it is beneficial to the entire WRF community. There are a couple of questions about this pull request (PR):

  1. Without this PR, does the WRF model (branch release-v4.3.1) successfully build on your ARM machine?

  2. Regarding the -march=armv8.2-a option, I see this in the gcc man page, and native looks to be a better choice for software compiled and run on the host architecture.

       -march=name
           Specify the name of the target architecture and, optionally,
           one or more feature modifiers.  This option has the form
           -march=arch{+[no]feature}*.

           The permissible values for arch are armv8-a, armv8.1-a,
           armv8.2-a, armv8.3-a, armv8.4-a, armv8.5-a or native.

           The value armv8.5-a implies armv8.4-a and enables compiler
           support for the ARMv8.5-A architecture extensions.

           The value armv8.4-a implies armv8.3-a and enables compiler
           support for the ARMv8.4-A architecture extensions.

           The value armv8.3-a implies armv8.2-a and enables compiler
           support for the ARMv8.3-A architecture extensions.

           The value armv8.2-a implies armv8.1-a and enables compiler
           support for the ARMv8.2-A architecture extensions.

           The value armv8.1-a implies armv8-a and enables compiler
           support for the ARMv8.1-A architecture extension.  In
           particular, it enables the +crc, +lse, and +rdma features.

           The value native is available on native AArch64 GNU/Linux and
           causes the compiler to pick the architecture of the host
           system.  This option has no effect if the compiler is unable
           to recognize the architecture of the host system,
  1. With the m4 -G suggestion, are there GNU extensions to m4 that are causing troubles for you?

@yip111
Copy link
Contributor Author

yip111 commented Nov 4, 2021

@davegill
Sorry I'm late.
1.Without this pr, WRF model (branch release-v4.3.1) can successfully build on ARM machine.
2.Adding these flags can bring more performance gains,and it also can provide another reference option for users.

@davegill
Copy link
Contributor

davegill commented Dec 12, 2021

Using the optimization level -03 on arm7l. This is using CONUS physics suite, d02 at 6 km. This is Saturday at 11 AM through Sunday at 5 PM.

t2_d02

@mgduda
Michael,
For no other reason than here is a WRF simulation on a raspberry pi, just wanted to include you.

modified:   arch/configure.defaults
@davegill davegill self-requested a review December 13, 2021 23:33
@davegill
Copy link
Contributor

@kkeene44
Kelly,
No one else is going to review a PR about ARM processors. I have tested this PR on my ARM machine. I have cleaned up the configure.defaults file to be consistent with what we have now as default options. I have modified the commit message to be in final form. Would you please, per this request, approve this additional ARM-processor stanza.

@davegill davegill merged commit fc99e4e into wrf-model:release-v4.3.2 Dec 13, 2021
@martin-g
Copy link

Thank you!

vlakshmanan-scala pushed a commit to scala-computing/WRF that referenced this pull request Apr 4, 2024
TYPE:enhancement

KEYWORDS: ARM 

DESCRIPTION OF CHANGES:
Problem:
There are no ARM-only stanzas in arch/configure.defaults. As the suggestion from wrf-model#1535 , we need a separate PR for ARM specific update.

Solution:
Edit the arch/configure.defaults file and add a stanza for aarch64 and armv7l, using the GNU compiler options. 

The default optimization is -03, up from the usual -02. On two 36-h nested simulations on a raspberry pi, the 
difference is a consistent 3% speed increase across the radiation and non-radiation time steps. This used CONUS, 
so the -03 option seems reasonably robust with the GNU compiler.

LIST OF MODIFIED FILES:
M arch/configure.defaults

RELEASE NOTE: Added a new stanza that is only for ARM processors (right now aarch64 and armv7l) with GNU.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants