Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Uses march=native by default
Browse files Browse the repository at this point in the history
  • Loading branch information
nichollsh committed Jun 3, 2024
1 parent 7f98b94 commit 5f588e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
9 changes: 7 additions & 2 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
# Script to generate Mk_cmd for socrates

# Optimisation flags options (uncomment as required)
optim="-Ofast -march=native"
# optim="-O3"
# optim=""

# Remove old files
rm -rf "bin/"
rm -f "set_rad_env"
Expand Down Expand Up @@ -29,8 +34,8 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
else
extra=""
fi
echo "FORTCOMP = $fc -Ofast -fPIC $extra -c " >> $genpath
echo "LINK = $fc -Ofast -fPIC $extra " >> $genpath
echo "FORTCOMP = $fc $optim -fPIC $extra -c " >> $genpath
echo "LINK = $fc $optim -fPIC $extra " >> $genpath

ar="$(command -v ar)"
if [ -z "$ar" ]; then
Expand Down
12 changes: 6 additions & 6 deletions make/Mk_cmd
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Generated automatically
# System: Linux norma2.intra.astro.rug.nl 5.14.0-362.18.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 11 13:49:23 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
# Date: Thu May 30 05:46:41 PM CEST 2024
# System: Darwin hnmacbook 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 arm64
# Date: Mon 3 Jun 2024 09:14:35 BST

FORTCOMP = /usr/bin/gfortran -Ofast -fPIC -c
LINK = /usr/bin/gfortran -Ofast -fPIC
FORTCOMP = /opt/homebrew/bin/gfortran -Ofast -march=native -fPIC -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/ -c
LINK = /opt/homebrew/bin/gfortran -Ofast -march=native -fPIC -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/
LIBLINK = /usr/bin/ar rvu
INCCDF_PATH = /usr/include -I/usr/lib64/gfortran/modules
LIBCDF_PATH = netcdff
INCCDF_PATH = /opt/homebrew/Cellar/netcdf-fortran/4.6.1/include -I/opt/homebrew/Cellar/netcdf-fortran/4.6.1/include -I/opt/homebrew/Cellar/netcdf-fortran/4.6.1/include
LIBCDF_PATH = /opt/homebrew/Cellar/netcdf-fortran/4.6.1/lib
LIBCDF_NAME = netcdff
OMPARG = -fopenmp

Expand Down

0 comments on commit 5f588e6

Please sign in to comment.