From ec219c81cf07ce9dcea27870eae1e4278fc202f9 Mon Sep 17 00:00:00 2001 From: Aaron Bukowski Date: Tue, 16 Jun 2026 19:25:45 -0400 Subject: [PATCH 1/3] Create Makefile.dirs from Config.pl, don't pass during compile steps --- Config.pl | 10 ++++++++++ Makefile | 2 +- srcMake/Makefile.def | 3 --- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Config.pl b/Config.pl index b1c98e8d..5c1eaadd 100755 --- a/Config.pl +++ b/Config.pl @@ -99,6 +99,16 @@ my $command = "touch ext/Electrodynamics/src/Makefile.DEPEND"; print "creating DEPEND file in electrodynamics:\n\t $command\n"; my $exit_status = `$command`; + + # Write Makefile.dirs for ext/* libraries so they can find GITM's compiler + # settings (Makefile.dirs for paths, Makefile.conf for compiler rules) + my $GitMDir = `pwd`; chomp $GitMDir; + open(my $fh, ">", "ext/Electrodynamics/build/Makefile.dirs") + or die "Cannot write ext/Electrodynamics/build/Makefile.dirs: $!"; + print $fh "DIRSFILE := $GitMDir/Makefile.def\n"; + print $fh "BUILDDIR := $GitMDir\n"; + close($fh); + print "Created ext/Electrodynamics/build/Makefile.dirs\n"; } &modify_utilities if $NoFlush; diff --git a/Makefile b/Makefile index 9874c349..029597bc 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ VERSION: GITM: @cd ${SHAREDIR}; echo "Entering ${SHAREDIR}"; make --no-print-directory LIB @cd $(ABDIR); echo "Entering ${ABDIR}" ; make --no-print-directory LIB - @cd $(EIEDIR)/src; echo "Entering ${EIEDIR}/src"; make --no-print-directory DIRSFILE=${DIRSFILE} SHARELIB + @cd $(EIEDIR)/src; echo "Entering ${EIEDIR}/src"; make --no-print-directory SHARELIB @cd ${EUADIR}; echo "Entering ${EUADIR}"; make --no-print-directory LIB @cd $(IODIR); echo "Entering ${IODIR}"; make --no-print-directory LIB @cd $(GLDIR); echo "Entering ${GLDIR}"; make --no-print-directory LIB diff --git a/srcMake/Makefile.def b/srcMake/Makefile.def index 2ebd41d0..a3fce882 100644 --- a/srcMake/Makefile.def +++ b/srcMake/Makefile.def @@ -4,9 +4,6 @@ localdefault: help # default target DIR = ${UADIR} -DIRSFILE = ${UADIR}/Makefile.def -BUILDDIR = ${UADIR} - SCRIPTDIR = ${UADIR}/share/Scripts LIBDIR = ${UADIR}/src RUNDIR = ${UADIR}/run From 20132a15d08c7fd282bd2b781d95efe190a9c0e7 Mon Sep 17 00:00:00 2001 From: Aaron Bukowski Date: Wed, 17 Jun 2026 14:01:46 -0400 Subject: [PATCH 2/3] Change names of Makefile{.dirs,.local,.def} Documented more extensively in electrodynamics readme GITM will stick to the SWMF-style convention of Makefile.def (for coupling reasons) and electrodynamics & other ext/* codes can use whatever they would like --- Config.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Config.pl b/Config.pl index 5c1eaadd..ba5217e0 100755 --- a/Config.pl +++ b/Config.pl @@ -100,15 +100,15 @@ print "creating DEPEND file in electrodynamics:\n\t $command\n"; my $exit_status = `$command`; - # Write Makefile.dirs for ext/* libraries so they can find GITM's compiler - # settings (Makefile.dirs for paths, Makefile.conf for compiler rules) + # Write Makefile.local for ext/* libraries so they can find GITM's build + # config: Makefile.dirs for paths, Makefile.conf for compiler rules my $GitMDir = `pwd`; chomp $GitMDir; - open(my $fh, ">", "ext/Electrodynamics/build/Makefile.dirs") - or die "Cannot write ext/Electrodynamics/build/Makefile.dirs: $!"; + open(my $fh, ">", "ext/Electrodynamics/build/Makefile.local") + or die "Cannot write ext/Electrodynamics/build/Makefile.local: $!"; print $fh "DIRSFILE := $GitMDir/Makefile.def\n"; print $fh "BUILDDIR := $GitMDir\n"; close($fh); - print "Created ext/Electrodynamics/build/Makefile.dirs\n"; + print "Created ext/Electrodynamics/build/Makefile.local\n"; } &modify_utilities if $NoFlush; From a09a5b2fd771ba3b7251560bccb9f9f06a7d6faa Mon Sep 17 00:00:00 2001 From: Aaron Bukowski Date: Thu, 18 Jun 2026 14:34:20 -0400 Subject: [PATCH 3/3] Toggle gfortran manual linking in Macos CI runner --- .github/workflows/Format-and-Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Format-and-Test.yml b/.github/workflows/Format-and-Test.yml index b19675b9..9afe2ad1 100644 --- a/.github/workflows/Format-and-Test.yml +++ b/.github/workflows/Format-and-Test.yml @@ -65,7 +65,7 @@ jobs: run: | brew update brew install gcc open-mpi - ln -s $(brew --prefix)/bin/gfortran-15 $(brew --prefix)/bin/gfortran + # ln -s $(brew --prefix)/bin/gfortran-15 $(brew --prefix)/bin/gfortran - name: Clone GITM repository uses: actions/checkout@v4 - name: Run tests on MacOS (compile, clean, run one test, no output checking)