diff --git a/.github/actions/install-mesa/action.yml b/.github/actions/install-mesa/action.yml
index f12de9c65..d1e36e0ef 100644
--- a/.github/actions/install-mesa/action.yml
+++ b/.github/actions/install-mesa/action.yml
@@ -115,7 +115,4 @@ runs:
sed -i 's/use_cache_for_eos = .true./use_cache_for_eos = .false./g' $MESA_DIR/eos/public/eos_def.f90
sed -i 's/use_cache = .true./use_cache = .false./g' $MESA_DIR/star/private/star_private_def.f90
./install
- if [ ! -f lib/libbinary.a ]; then
- exit 1
- fi
shell: bash
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..f29c122c7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+.DELETE_ON_ERROR:
+.DEFAULT_GOAL := all
+.SHELLFLAGS := -eu -c
+
+BUILD_SUBDIR := @$(MAKE) -C
+CHECK_SUBDIR := @$(MAKE) check -C
+MAKE_DIR := make
+
+BUILD_DIR ?= build
+
+include $(MAKE_DIR)/helpers.mk
+include $(MAKE_DIR)/subdirs.mk
+include $(MAKE_DIR)/setup-builddir.mk
+include $(MAKE_DIR)/version.mk
+include $(MAKE_DIR)/subdir-deps.mk
+
+clean:
+ @rm -rf $(BUILD_DIR_)
+
+all: $(SUBDIRS) $(addsuffix -extract-data,$(SUBDIRS)) $(addsuffix -check,$(SUBDIRS))
+
+.PHONY: all $(SUBDIRS) $(addsuffix -extract-data,$(SUBDIRS)) $(addsuffix -check,$(SUBDIRS)) $(addsuffix -install,$(SUBDIRS)) clean install
diff --git a/adipls/Makefile b/adipls/Makefile
new file mode 100644
index 000000000..9bf7004b2
--- /dev/null
+++ b/adipls/Makefile
@@ -0,0 +1,121 @@
+include ../make/defaults-module.mk
+
+FFLAGS += -fno-check=bounds
+
+# Build
+
+MODULE_NAME := adipls
+SRCS := adipack.c/adipls/adipls.c.d.f \
+ adipack.c/adipls/adirhs.c.d.f \
+ adipack.c/adipls/anldet.d.f \
+ adipack.c/adipls/cmparr.d.f \
+ adipack.c/adipls/danorm.d.f \
+ adipack.c/adipls/decicd.d.f \
+ adipack.c/adipls/delta1.d.f \
+ adipack.c/adipls/delta2.d.f \
+ adipack.c/adipls/delta3.d.f \
+ adipack.c/adipls/dmpgsm.d.f \
+ adipack.c/adipls/dmpmde.d.f \
+ adipack.c/adipls/dmpsum.d.f \
+ adipack.c/adipls/dump_obs.c.d.f \
+ adipack.c/adipls/geninh.d.f \
+ adipack.c/adipls/gm1ker.n.d.f \
+ adipack.c/adipls/gravpo.n.d.f \
+ adipack.c/adipls/kiner.n.d.f \
+ adipack.c/adipls/mchcff.d.f \
+ adipack.c/adipls/mchsol.n.d.f \
+ adipack.c/adipls/nrkint.c.d.f \
+ adipack.c/adipls/nrkm.d.f \
+ adipack.c/adipls/nrtssl.d.f \
+ adipack.c/adipls/order.d.f \
+ adipack.c/adipls/rdfrqr.d.f \
+ adipack.c/adipls/readml.n.d.f \
+ adipack.c/adipls/readsm.d.f \
+ adipack.c/adipls/res_adimod.c.d.f \
+ adipack.c/adipls/res_adipar.c.d.f \
+ adipack.c/adipls/rotker.c.d.f \
+ adipack.c/adipls/rsnfit.n.d.f \
+ adipack.c/adipls/sclasl.c.d.f \
+ adipack.c/adipls/setbcs.n.d.f \
+ adipack.c/adipls/setobs_st.c.d.f \
+ adipack.c/adipls/set_rotation.c.d.f \
+ adipack.c/adipls/setssm.n.d.f \
+ adipack.c/adipls/setsum.d.f \
+ adipack.c/adipls/setups_adi.c.d.f \
+ adipack.c/adipls/shtint.c.d.f \
+ adipack.c/adipls/sigint.n.d.f \
+ adipack.c/adipls/sigitc.c.d.f \
+ adipack.c/adipls/sigitr.n.d.f \
+ adipack.c/adipls/signew.n.d.f \
+ adipack.c/adipls/sigout.c.d.f \
+ adipack.c/adipls/sigscn.c.d.f \
+ adipack.c/adipls/sigsol.c.d.f \
+ adipack.c/adipls/sph.d.f \
+ adipack.c/adipls/stevft.n.d.f \
+ adipack.c/adipls/sumout.d.f \
+ adipack.c/adipls/takata.d.f \
+ adipack.c/adipls/trnmod.n.d.f \
+ adipack.c/adipls/uhx.d.f \
+ adipack.c/adipls/varfrq.n.d.f \
+ adipack.c/adipls/xlmult.d.f \
+ adipack.c/gensr/aramax.d.f \
+ adipack.c/gensr/blstio.f \
+ adipack.c/gensr/cpycom.f \
+ adipack.c/gensr/craysub.d.f \
+ adipack.c/gensr/derive.d.f \
+ adipack.c/gensr/derivk.new.d.f \
+ adipack.c/gensr/eiginh.d.f \
+ adipack.c/gensr/getcas.f \
+ adipack.c/gensr/intgpt.d.f \
+ adipack.c/gensr/iprsgn.d.f \
+ adipack.c/gensr/izero.f \
+ adipack.c/gensr/length.f \
+ adipack.c/gensr/leq.d.f \
+ adipack.c/gensr/lininh4.d.f \
+ adipack.c/gensr/lininh.new.d.f \
+ adipack.c/gensr/lir.d.f \
+ adipack.c/gensr/lirt.d.f \
+ adipack.c/gensr/lsqpol.d.f \
+ adipack.c/gensr/lstsqr.f \
+ adipack.c/gensr/notwin.d.f \
+ adipack.c/gensr/notwni.f \
+ adipack.c/gensr/nrk.d.f \
+ adipack.c/gensr/ofiles.c.f \
+ adipack.c/gensr/ofiles.f \
+ adipack.c/gensr/rdilst.f \
+ adipack.c/gensr/rnmean.d.f \
+ adipack.c/gensr/skpcom.f \
+ adipack.c/gensr/sort.d.f \
+ adipack.c/gensr/spline.d.f \
+ adipack.c/gensr/squint.d.f \
+ adipack.c/gensr/store.d.f \
+ adipack.c/gensr/strcompr.f \
+ adipack.c/gensr/vinta.d.f \
+ adipack.c/gensr/vintk.new.d.f \
+ adipack.c/gensr/zero.d.f \
+ adipack.c/adiajobs/sr/inrnge.f \
+ adipack.c/adiajobs/sr/intmdl.d.f \
+ adipack.c/adiajobs/sr/rdamdl.n.d.f \
+ adipack.c/adiajobs/sr/rdfreq.d.f \
+ adipack.c/adiajobs/sr/rdfrqe.d.f \
+ adipack.c/adiajobs/sr/rdfrqm.d.f \
+ adipack.c/adiajobs/sr/rseta4.c.d.f \
+ adipack.c/adiajobs/sr/setssm.d.f \
+ adipack.c/adiajobs/sr/srdist.c.d.f \
+ adipack.c/adiajobs/sr/wrfreq.d.f \
+ src/callbacks.f90
+
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON := const
+EXTERNAL_DEPENDS_ON :=
+BINTYPE = static-lib
+INCLUDE_DIRS := -Iadipack.c/adipls
+MODULES := adipls_callbacks.mod
+# adipls has too much UB, plaster over it by disabling optimizations. If you
+# ever remove this line, make sure that all arrays in common blocks have proper
+# bounds everywhere.
+PROFILE := debug
+
+CHECK_RESULTS_GOLDEN :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/adipls/adipack.c/adiajobs/makefile b/adipls/adipack.c/adiajobs/makefile
deleted file mode 100644
index 8c045eae5..000000000
--- a/adipls/adipack.c/adiajobs/makefile
+++ /dev/null
@@ -1,187 +0,0 @@
-
-ROOT = ..
-include $(ROOT)/../../utils/makefile_header
-
-FFLAGS = -w
-
-ADIR = $(ROOT)/adipls
-GDIR = $(ROOT)/gensr
-ADIAJOBS = .
-ADISR = $(ADIAJOBS)/sr
-
-LOFILES = \
-$(GDIR)/ofiles.c.o \
-$(GDIR)/lirt.d.o \
-$(GDIR)/derive.d.o \
-$(GDIR)/craysub.d.o \
-$(GDIR)/iprsgn.d.o \
-$(GDIR)/length.o \
-$(GDIR)/leq.d.o \
-$(GDIR)/lir.d.o \
-$(GDIR)/lsqpol.d.o \
-$(GDIR)/lstsqr.o \
-$(GDIR)/blstio.o \
-$(GDIR)/cpycom.o \
-$(GDIR)/ofiles.o \
-$(GDIR)/rdilst.o \
-$(GDIR)/rnmean.d.o \
-$(GDIR)/skpcom.o \
-$(GDIR)/sort.d.o \
-$(GDIR)/spline.d.o \
-$(GDIR)/vinta.d.o \
-$(GDIR)/squint.d.o \
-$(GDIR)/getcas.o \
-$(GDIR)/zero.d.o \
-$(GDIR)/izero.o \
-$(GDIR)/blstio.o
-
-ALL = \
-asymp-scale.d.x compamod.n.d.x diff-fgong.d.x diff-sum.d.x \
-fdif.sin.d.x fgong-amdl.d.x \
-filt-gsm.d.x fit-dnl.x form-agsm.d.x form-amdl.d.x freqdif.d.x \
-lsqfreq.d.x mer-amde.d.x mer-sum.d.x prt-amdl.d.x redistrb.c.d.x \
-redistrb.d.x res-amde.d.x scan-agsm.d.x scan-amde.d.x scan-amdl.d.x \
-scan-ssm.d.x selamde.d.x sel-amdl.d.x selsum.d.x set-asscal.d.x set-dnl.d.x \
-setexec.d.x set-obs.d.x sortsum.d.x
-
-default: all
-
-all: $(ALL)
-
-asymp-scale.d.x: asymp-scale.d.o srfiles lofiles
- $(FC) $(FFLAGS) -o asymp-scale.d.x asymp-scale.d.o \
- $(GDIR)/lir.d.o $(GDIR)/getcas.o $(ADISR)/rdamdl.n.d.o \
- $(GDIR)/skpcom.o $(GDIR)/cpycom.o $(GDIR)/length.o \
- $(GDIR)/ofiles.o $(GDIR)/blstio.o
-
-compamod.n.d.x: compamod.n.d.o lofiles
- $(FC) $(FFLAGS) -o compamod.n.d.x compamod.n.d.o \
- $(GDIR)/ofiles.o $(GDIR)/lir.d.o \
- $(GDIR)/vinta.d.o $(GDIR)/length.o $(GDIR)/blstio.o
-
-diff-fgong.d.x: diff-fgong.d.o lofiles srfiles
- $(FC) $(FFLAGS) -o diff-fgong.d.x diff-fgong.d.o $(GDIR)/lir.d.o $(GDIR)/blstio.o
-
-diff-sum.d.x: diff-sum.d.o lofiles srfiles
- $(FC) $(FFLAGS) -o diff-sum.d.x diff-sum.d.o \
- $(ADIAJOBS)/sr/rdfreq.d.o $(ADIAJOBS)/sr/wrfreq.d.o \
- $(GDIR)/skpcom.o $(GDIR)/blstio.o
-
-fdif.sin.d.x: fdif.sin.d.o lofiles
- $(FC) $(FFLAGS) -o fdif.sin.d.x fdif.sin.d.o \
- $(GDIR)/ofiles.o $(GDIR)/zero.d.o $(GDIR)/lir.d.o \
- $(GDIR)/skpcom.o $(GDIR)/length.o $(GDIR)/blstio.o
-
-fgong-amdl.d.x: fgong-amdl.d.o
- $(FC) $(FFLAGS) -o fgong-amdl.d.x fgong-amdl.d.o $(GDIR)/blstio.o
-
-filt-gsm.d.x: filt-gsm.d.o
- $(FC) $(FFLAGS) -o filt-gsm.d.x filt-gsm.d.o $(GDIR)/blstio.o
-
-fit-dnl.x: fit-dnl.o lofiles
- $(FC) $(FFLAGS) -o fit-dnl.x fit-dnl.o \
- $(GDIR)/lstsqr.o $(GDIR)/skpcom.o $(GDIR)/length.o $(GDIR)/blstio.o
-
-form-amdl.d.x: form-amdl.d.o
- $(FC) $(FFLAGS) -o form-amdl.d.x form-amdl.d.o $(GDIR)/blstio.o
-
-form-agsm.d.x: form-agsm.d.o
- $(FC) $(FFLAGS) -o form-agsm.d.x form-agsm.d.o $(GDIR)/blstio.o
-
-freqdif.d.x: freqdif.d.o lofiles srfiles
- $(FC) $(FFLAGS) -o freqdif.d.x freqdif.d.o \
- $(GDIR)/ofiles.o $(GDIR)/zero.d.o $(GDIR)/izero.o $(GDIR)/lir.d.o \
- $(ADIAJOBS)/sr/rdfreq.d.o $(ADIAJOBS)/sr/rdfrqe.d.o \
- $(GDIR)/skpcom.o $(GDIR)/length.o $(GDIR)/blstio.o
-
-lsqfreq.d.x: lsqfreq.d.o lofiles srfiles
- $(FC) $(FFLAGS) -o lsqfreq.d.x lsqfreq.d.o \
- $(ADIAJOBS)/sr/rdfrqm.d.o $(GDIR)/ofiles.o \
- $(GDIR)/lsqpol.d.o $(GDIR)/leq.d.o $(GDIR)/skpcom.o \
- $(GDIR)/craysub.d.o $(GDIR)/length.o $(GDIR)/blstio.o
-
-mer-amde.d.x: mer-amde.d.o
- $(FC) $(FFLAGS) -o mer-amde.d.x mer-amde.d.o $(GDIR)/blstio.o
-
-mer-sum.d.x: mer-sum.d.o lofiles srfiles
- $(FC) $(FFLAGS) -o mer-sum.d.x mer-sum.d.o \
- $(ADIAJOBS)/sr/rdfreq.d.o $(ADIAJOBS)/sr/wrfreq.d.o \
- $(GDIR)/skpcom.o $(GDIR)/blstio.o
-
-prt-amdl.d.x: prt-amdl.d.o
- $(FC) $(FFLAGS) -o prt-amdl.d.x prt-amdl.d.o $(GDIR)/blstio.o
-
-redistrb.d.x: redistrb.d.o lofiles
- $(FC) $(FFLAGS) -o redistrb.d.x redistrb.d.o \
- $(GDIR)/ofiles.o $(GDIR)/length.o $(GDIR)/lir.d.o $(GDIR)/vinta.d.o \
- $(GDIR)/rnmean.d.o $(GDIR)/spline.d.o $(GDIR)/blstio.o
-
-redistrb.c.d.x: redistrb.c.d.o srfiles lofiles
- $(FC) $(FFLAGS) -o redistrb.c.d.x redistrb.c.d.o \
- $(ADISR)/srdist.c.d.o $(ADISR)/rseta4.c.d.o \
- $(GDIR)/ofiles.c.o $(GDIR)/length.o \
- $(GDIR)/lir.d.o $(GDIR)/lirt.d.o $(GDIR)/vinta.d.o $(GDIR)/derive.d.o \
- $(GDIR)/rnmean.d.o $(GDIR)/blstio.o
-
-res-amde.d.x: res-amde.d.o
- $(FC) $(FFLAGS) -o res-amde.d.x res-amde.d.o $(GDIR)/blstio.o
-
-scan-agsm.d.x: scan-agsm.d.o
- $(FC) $(FFLAGS) -o scan-agsm.d.x scan-agsm.d.o $(GDIR)/blstio.o
-
-scan-amde.d.x: scan-amde.d.o
- $(FC) $(FFLAGS) -o scan-amde.d.x scan-amde.d.o $(GDIR)/blstio.o
-
-scan-amdl.d.x: scan-amdl.d.o
- $(FC) $(FFLAGS) -o scan-amdl.d.x scan-amdl.d.o $(GDIR)/blstio.o
-
-scan-ssm.d.x: scan-ssm.d.o
- $(FC) $(FFLAGS) -o scan-ssm.d.x scan-ssm.d.o $(GDIR)/blstio.o
-
-sel-amdl.d.x: sel-amdl.d.o
- $(FC) $(FFLAGS) -o sel-amdl.d.x sel-amdl.d.o $(GDIR)/blstio.o
-
-selamde.d.x: selamde.d.o lofiles srfiles
- $(FC) $(FFLAGS) -o selamde.d.x selamde.d.o \
- $(GDIR)/ofiles.o $(GDIR)/length.o $(ADIAJOBS)/sr/inrnge.o \
- $(ADIAJOBS)/sr/rdfreq.d.o $(ADIAJOBS)/sr/setssm.d.o \
- $(GDIR)/skpcom.o $(GDIR)/blstio.o
-
-selsum.d.x: selsum.d.o lofiles srfiles
- $(FC) $(FFLAGS) -o selsum.d.x selsum.d.o \
- $(GDIR)/ofiles.o $(GDIR)/length.o $(ADIAJOBS)/sr/inrnge.o \
- $(ADIAJOBS)/sr/rdfreq.d.o $(ADIAJOBS)/sr/setssm.d.o \
- $(GDIR)/skpcom.o $(GDIR)/blstio.o
-
-set-asscal.d.x: set-asscal.d.o lofiles
- $(FC) $(FFLAGS) -o set-asscal.d.x set-asscal.d.o \
- $(ADIAJOBS)/sr/rdamdl.n.d.o \
- $(GDIR)/ofiles.o $(GDIR)/length.o \
- $(GDIR)/squint.d.o $(GDIR)/vinta.d.o \
- $(GDIR)/lir.d.o $(GDIR)/blstio.o
-
-set-dnl.d.x: set-dnl.d.o lofiles
- $(FC) $(FFLAGS) -o set-dnl.d.x set-dnl.d.o \
- sr/rdfreq.d.o $(GDIR)/skpcom.o $(GDIR)/blstio.o
-
-set-obs.d.x: set-obs.d.o lofiles srfiles
- $(FC) $(FFLAGS) -o set-obs.d.x set-obs.d.o \
- $(ADIAJOBS)/sr/rdfreq.d.o $(GDIR)/skpcom.o $(GDIR)/blstio.o
-
-setexec.d.x: setexec.d.o lofiles
- $(FC) $(FFLAGS) -o setexec.d.x setexec.d.o sr/rdfreq.d.o \
- $(GDIR)/ofiles.o $(GDIR)/length.o $(GDIR)/skpcom.o $(GDIR)/blstio.o
-
-sortsum.d.x: sortsum.d.o lofiles
- $(FC) $(FFLAGS) -o sortsum.d.x sortsum.d.o sr/rdfreq.d.o \
- $(GDIR)/rdilst.o $(GDIR)/iprsgn.d.o $(GDIR)/sort.d.o \
- $(GDIR)/skpcom.o $(GDIR)/ofiles.o $(GDIR)/length.o $(GDIR)/blstio.o
-
-lofiles:
- cd $(GDIR); make $(LOFILES)
-
-srfiles:
- cd $(ADISR); make
-
-clean:
- -@rm -f *.o *.x sr/*.o
diff --git a/adipls/adipack.c/adiajobs/sr/makefile b/adipls/adipack.c/adiajobs/sr/makefile
deleted file mode 100644
index 670ccb9ac..000000000
--- a/adipls/adipack.c/adiajobs/sr/makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-ROOT = ../..
-include $(ROOT)/../../utils/makefile_header
-
-FFLAGS = -w
-
-OFILES =\
-inrnge.o intmdl.d.o rdamdl.n.d.o rdfreq.d.o rdfrqe.d.o rdfrqm.d.o \
-rseta4.c.d.o setssm.d.o srdist.c.d.o wrfreq.d.o
-
-default: ofiles
-
-ofiles: $(OFILES)
-
-clean:
- -@rm -f *.o
diff --git a/adipls/adipack.c/adipls/adipls.c.d.f b/adipls/adipack.c/adipls/adipls.c.d.f
index 8471c9936..0a64f7d73 100644
--- a/adipls/adipack.c/adipls/adipls.c.d.f
+++ b/adipls/adipack.c/adipls/adipls.c.d.f
@@ -13,7 +13,7 @@ subroutine adipls(i_paramset, ierr_param, i_inout,
c in case of error.
c i_inout: If i_inout = 1 read model from file, as usual.
c If i_inout = 0, model quantities must be provided in
-c x_arg(1:nn_arg), aa(arg(1:ivarmd,1:nn_arg), data_arg(1:8)
+c x_arg(1:nn_arg), aa_arg(1:ivarmd,1:nn_arg), data_arg(1:8)
c If i_inout = -1, assume that model is already stored,
c regardless of possible model parameters read in.
c
@@ -55,7 +55,7 @@ subroutine adipls(i_paramset, ierr_param, i_inout,
* nnq1,nnq2,idgnrk
common/sysord/ ii
common/ccgrav/ cgrav
- common/xarra/ x(1)
+ common/xarra/ x(nnmax)
common/wrklir/ wwwww(300)
common/worksp/ aa1(iaa1,1)
common/yyyyyy/ y(iy,1)
diff --git a/adipls/adipack.c/adipls/delta1.d.f b/adipls/adipack.c/adipls/delta1.d.f
index 02201a166..a9d829eb1 100644
--- a/adipls/adipack.c/adipls/delta1.d.f
+++ b/adipls/adipack.c/adipls/delta1.d.f
@@ -4,8 +4,9 @@
subroutine delta1(x,y,del1,del1as,aa,omgrtp,sig,iy,ia,nn,el)
- IMPLICIT REAL*8 (a-h,o-z)
- INTEGER*4 v
+ use const_def, only: dp
+ IMPLICIT real(dp) (a-h,o-z)
+ INTEGER(4) v
include 'adipls.c.d.incl'
parameter(iwork=10*nnmax)
REAL mass, rad, gconst, oms2, oms
diff --git a/adipls/adipack.c/adipls/delta2.d.f b/adipls/adipack.c/adipls/delta2.d.f
index 1ddfe9842..d21ff6257 100644
--- a/adipls/adipack.c/adipls/delta2.d.f
+++ b/adipls/adipack.c/adipls/delta2.d.f
@@ -4,8 +4,9 @@
subroutine delta2(x,y,del2,del2as,xis,aa,omgrtp,sig,iy,ia,nn,el)
- implicit real*8 (a-h,o-z)
- integer*4 v
+ use const_def
+ implicit real(dp) (a-h,o-z)
+ integer(4) v
include 'adipls.c.d.incl'
parameter(iwork=10*nnmax)
real mass, rad, gconst, oms2, f4, f4int, oms
@@ -32,7 +33,6 @@ subroutine delta2(x,y,del2,del2as,xis,aa,omgrtp,sig,iy,ia,nn,el)
common/cstdio/ istdin, istdou, istdpr, istder
- pi = 4.d0*atan(1.d0)
ell = el*(el+1.)
freq = sqrt(cs(20))
mass = cs(2)/1000
diff --git a/adipls/adipack.c/adipls/delta3.d.f b/adipls/adipack.c/adipls/delta3.d.f
index 9832eeaf1..a01aedcd0 100644
--- a/adipls/adipack.c/adipls/delta3.d.f
+++ b/adipls/adipack.c/adipls/delta3.d.f
@@ -7,8 +7,9 @@
subroutine delta3(x,y,del3,del3as,u,aa,omgrtp,sig,iy,ia,nn,el)
- implicit real*8 (a-h,o-z)
- integer*4 v
+ use const_def, only: dp
+ implicit real(dp) (a-h,o-z)
+ integer(4) v
include 'adipls.c.d.incl'
parameter(iwork=10*nnmax)
diff --git a/adipls/adipack.c/adipls/dmpgsm.d.f b/adipls/adipack.c/adipls/dmpgsm.d.f
index 19d8849ce..98d314c77 100644
--- a/adipls/adipack.c/adipls/dmpgsm.d.f
+++ b/adipls/adipack.c/adipls/dmpgsm.d.f
@@ -25,7 +25,7 @@ subroutine dmpgsm(ids,iw,k)
c
save
c
- data icasep,mlnamp,xtrncp /-1,4*8h ,0./
+ data icasep,mlnamp,xtrncp /-1,4*z'20202020',0./
data datp /8*0.d0/
c
if(ids.ge.0) go to 5
diff --git a/adipls/adipack.c/adipls/dmpmde.d.f b/adipls/adipack.c/adipls/dmpmde.d.f
index 82e9838c9..918893e35 100644
--- a/adipls/adipack.c/adipls/dmpmde.d.f
+++ b/adipls/adipack.c/adipls/dmpmde.d.f
@@ -25,7 +25,7 @@ subroutine dmpmde(ids,iw,k)
c
save
c
- data icasep,mlnamp,xtrncp /-1,4*8h ,0./
+ data icasep,mlnamp,xtrncp /-1,4*z'20202020',0./
data datp /8*0./
c
if(ids.ge.0) go to 5
diff --git a/adipls/adipack.c/adipls/makefile b/adipls/adipack.c/adipls/makefile
deleted file mode 100644
index 1d5d52837..000000000
--- a/adipls/adipack.c/adipls/makefile
+++ /dev/null
@@ -1,68 +0,0 @@
-
-ROOT = ..
-include $(ROOT)/../../utils/makefile_header
-
-FFLAGS = -w
-
-GDIR = $(ROOT)/gensr
-ADIAJOBS = $(ROOT)/adiajobs
-ADISR = $(ADIAJOBS)/sr
-
-LOFILES = \
-$(GDIR)/aramax.d.o $(GDIR)/derive.d.o $(GDIR)/derivk.new.d.o $(GDIR)/leq.d.o \
-$(GDIR)/lininh.new.d.o $(GDIR)/lininh4.d.o $(GDIR)/ofiles.c.o \
-$(GDIR)/nrk.d.o $(GDIR)/vinta.d.o $(GDIR)/lir.d.o $(GDIR)/rnmean.d.o \
-$(GDIR)/vintk.new.d.o $(GDIR)/store.d.o $(GDIR)/notwin.d.o $(GDIR)/notwni.o \
-$(GDIR)/skpcom.o $(GDIR)/zero.d.o $(GDIR)/eiginh.d.o $(GDIR)/intgpt.d.o \
-$(GDIR)/spline.d.o $(GDIR)/length.o $(GDIR)/strcompr.o $(GDIR)/lirt.d.o $(GDIR)/blstio.o
-
-OFILES = \
-adipls.c.d.o anldet.d.o cmparr.d.o danorm.d.o decicd.d.o \
-dmpgsm.d.o dmpmde.d.o dmpsum.d.o geninh.d.o gm1ker.n.d.o gravpo.n.d.o \
-kiner.n.d.o mchcff.d.o order.d.o takata.d.o readml.n.d.o res_adimod.c.d.o \
-readsm.d.o adirhs.c.d.o rotker.c.d.o \
-trnmod.n.d.o setbcs.n.d.o setssm.n.d.o signew.n.d.o rdfrqr.d.o varfrq.n.d.o \
-xlmult.d.o nrkint.c.d.o nrtssl.d.o stevft.n.d.o shtint.c.d.o mchsol.n.d.o \
-sclasl.c.d.o nrkm.d.o setsum.d.o sumout.d.o \
-sigint.n.d.o sigitr.n.d.o sigitc.c.d.o sigsol.c.d.o sigout.c.d.o sigscn.c.d.o \
-rsnfit.n.d.o res_adipar.c.d.o setups_adi.c.d.o set_rotation.c.d.o \
-setobs_st.c.d.o dump_obs.c.d.o \
-delta1.d.o delta2.d.o delta3.d.o \
-sph.d.o uhx.d.o
-
-
-REDIST_OBS = $(ADISR)/srdist.c.d.o $(ADISR)/rseta4.c.d.o
-
-
-
-
-
-LIB = libadipls.$(LIB_SUFFIX)
-LIB_OBJS = $(OFILES)
-LIB_TOOL = ar crs
-
-default: adipls.c.d.x
-
-$(LIB) : $(LIB_OBJS) $(REDIST_OBS) lofiles
- $(LIB_TOOL) $(LIB) $(LIB_OBJS) $(REDIST_OBS) $(LOFILES)
-
-#On windows the blstio common block isn't linked in properly
-ifeq ($(BUILD_ON_WINDOWS),YES)
- EXTRAS=$(GDIR)/blstio.o
-endif
-
-adipls.c.d.x: main.c.d.o $(LIB) lofiles user_adi.c.d.o
- $(FC) $(FFLAGS) -o adipls.c.d.x main.c.d.o $(LIB) user_adi.c.d.o $(EXTRAS)
-
-lofiles:
- cd $(GDIR); make $(LOFILES)
-
-#%.o: %.f
-# $(FC) $(FFLAGS) -fbounds-check -Wuninitialized -Warray-bounds -g -c $<
-
-# to use libadipls, you must provide your own user_adi.c.d.o
-# the routine spcout_adi is called for each solution
-
-
-clean:
- -@rm -f *.o $(LIB) *.so
diff --git a/adipls/adipack.c/adipls/readml.n.d.f b/adipls/adipack.c/adipls/readml.n.d.f
index 4888b3ce7..c37f4eefa 100644
--- a/adipls/adipack.c/adipls/readml.n.d.f
+++ b/adipls/adipack.c/adipls/readml.n.d.f
@@ -63,7 +63,7 @@ subroutine readml(ifind,xmod,mdintg,ids,idsp,in,data,x,aa,ia,nn,
c
save
c
- data iblank/8h /
+ data iblank/z'20202020'/
data inp /-1/
data amsun /1.989d33/
c
diff --git a/adipls/adipack.c/adipls/readsm.d.f b/adipls/adipack.c/adipls/readsm.d.f
index 731a06937..e9e2e2ce6 100644
--- a/adipls/adipack.c/adipls/readsm.d.f
+++ b/adipls/adipack.c/adipls/readsm.d.f
@@ -22,7 +22,8 @@ subroutine readsm(iw,ih,nwmod,an,xtrnct,icas1,data,id,nd,ndmax,
c
save
c
- data dot,blank,peh,el /1h.,1h ,1hp,1hl/
+c '.', ' ', 'p', 'l'
+ data dot,blank,peh,el /z'2e',z'20',z'70',z'6c'/
data iaper,inw1 /87,105,99,111,6,7,7,8/
c
nr=0
diff --git a/adipls/adipack.c/adipls/sigout.c.d.f b/adipls/adipack.c/adipls/sigout.c.d.f
index ca44e4209..176e5530a 100644
--- a/adipls/adipack.c/adipls/sigout.c.d.f
+++ b/adipls/adipack.c/adipls/sigout.c.d.f
@@ -346,7 +346,7 @@ subroutine sigout(sig,x,y,iy,nw1,nibc,nn,nnw,mdintg,nev1,nfit,
* 'write amde, nw1, nn =',nw1, nn
end if
end if
- call flush(idsefn)
+ flush(idsefn)
idsn=4
if(istdpr.gt.0) write(istdpr,195) idsn, nfmode
end if
@@ -355,7 +355,7 @@ subroutine sigout(sig,x,y,iy,nw1,nibc,nn,nnw,mdintg,nev1,nfit,
c
if(idsgsm.gt.0.and.nscfil(idsgsm)) then
write(idsgsm) csummm
- call flush(idsgsm)
+ flush(idsgsm)
end if
c
c set and output short summary
@@ -364,7 +364,7 @@ subroutine sigout(sig,x,y,iy,nw1,nibc,nn,nnw,mdintg,nev1,nfit,
call setssm(csummm,icsumm,ssummm,issumm,ssmmod,irsmod)
if(irsmod.eq.1) write(idsssm) ssmmod
write(idsssm) ssummm
- call flush(idsssm)
+ flush(idsssm)
end if
c
c set mode quantities in common/cobs_param/
diff --git a/adipls/adipack.c/adipls/sph.d.f b/adipls/adipack.c/adipls/sph.d.f
index cf88f43a5..7a6aba3a2 100644
--- a/adipls/adipack.c/adipls/sph.d.f
+++ b/adipls/adipack.c/adipls/sph.d.f
@@ -4,8 +4,9 @@
subroutine sph(x,y,xis,aa,omgrtp,el,sig,iy,ia,nn)
- implicit real*8 (a-h,o-z)
- integer*4 v
+ use const_def, only: dp
+ implicit real(dp) (a-h,o-z)
+ integer(4) v
include 'adipls.c.d.incl'
parameter (iw=10*nnmax)
@@ -140,7 +141,8 @@ subroutine sph(x,y,xis,aa,omgrtp,el,sig,iy,ia,nn)
subroutine rhskdbsph(x,y,zk,ap,aq,f,fd,h,hd,ifd,n)
- implicit real*8 (a-h,o-z)
+ use const_def, only: dp
+ implicit real(dp) (a-h,o-z)
include 'adipls.c.d.incl'
dimension y(*),f(*),fd(ifd,*),h(*),hd(ifd,*),zk(1),ap(*)
@@ -221,7 +223,8 @@ subroutine rhskdbsph(x,y,zk,ap,aq,f,fd,h,hd,ifd,n)
subroutine bckdbsph(x1,x2,y1,y2,zk,ap,aq,g,gd,ig,id,n)
- implicit real*8(a-h,o-z)
+ use const_def, only: dp
+ implicit real(dp) (a-h,o-z)
include 'adipls.c.d.incl'
dimension y1(*),y2(*),g(*),gd(ig,*),zk(1),ap(*),aq(20,*)
diff --git a/adipls/adipack.c/adipls/takata.d.f b/adipls/adipack.c/adipls/takata.d.f
index c5959c133..2018e69e7 100644
--- a/adipls/adipack.c/adipls/takata.d.f
+++ b/adipls/adipack.c/adipls/takata.d.f
@@ -19,12 +19,13 @@ subroutine takata(x,y,nn,iasn,data,aa,iy,iaa,iord,sig)
! Modified 11/10/10, correcting the use of aa(i,.), replacing
! aa(i,.) by aa(i-1,.) and aa(1,.) by x(.).
!
+ use iso_fortran_env
IMPLICIT NONE
integer iaa,iord,iordg,iordp,iy,k,n,nn,iasn,nnmax,ns,
* istdin,istdou,istdpr,istder,icount
c.. parameter (nnmax=10000)
include 'adipls.c.d.incl'
- real*8 aa(iaa,nn),data(*),dfyy,G,J(nnmax),phx1,phx2,
+ real(REAL64) aa(iaa,nn),data(*),dfyy,G,J(nnmax),phx1,phx2,
* phy1,phy2,phy2m,pi,rho(nnmax),sig,T2(nnmax),x(nn),
* y(iy,nn),yy(2,nnmax),gr(nnmax),dphipdr(nnmax), cgrav
common/ccgrav/ cgrav
diff --git a/adipls/adipack.c/adipls/uhx.d.f b/adipls/adipack.c/adipls/uhx.d.f
index e6a90a542..63520cede 100644
--- a/adipls/adipack.c/adipls/uhx.d.f
+++ b/adipls/adipack.c/adipls/uhx.d.f
@@ -4,8 +4,9 @@
subroutine uhx(x,u,aa,omgrtp,ia,nn)
- implicit real*8 (a-h,o-z)
- integer*4 v
+ use const_def, only: dp
+ implicit real(dp) (a-h,o-z)
+ integer(4) v
include 'adipls.c.d.incl'
parameter(iwork=10*nnmax)
@@ -84,7 +85,8 @@ subroutine uhx(x,u,aa,omgrtp,ia,nn)
ccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine rhskdbh(x,y,zk,ap,aq,f,fd,h,hd,ifd,n)
- implicit real*8 (a-h,o-z)
+ use const_def, only: dp
+ implicit real(dp) (a-h,o-z)
real mass, rad, gconst, oms2
include 'adipls.c.d.incl'
@@ -137,7 +139,8 @@ subroutine rhskdbh(x,y,zk,ap,aq,f,fd,h,hd,ifd,n)
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine bckdbh(x1,x2,y1,y2,zk,ap,aq,g,gd,ig,id,n)
- implicit real*8(a-h,o-z)
+ use const_def, only: dp
+ implicit real(dp) (a-h,o-z)
real mass, rad, gconst, oms2
include 'adipls.c.d.incl'
diff --git a/adipls/adipack.c/gensr/makefile b/adipls/adipack.c/gensr/makefile
deleted file mode 100644
index 52a502176..000000000
--- a/adipls/adipack.c/gensr/makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-ROOT = ..
-include $(ROOT)/../../utils/makefile_header
-
-FC += -w
diff --git a/adipls/adipack.c/gensr/ofiles.c.f b/adipls/adipack.c/gensr/ofiles.c.f
index 066da8632..b974ca9df 100644
--- a/adipls/adipack.c/gensr/ofiles.c.f
+++ b/adipls/adipack.c/gensr/ofiles.c.f
@@ -289,10 +289,10 @@ subroutine openf(id,status,form)
c common defining standard input and output
c
common/cstdio/ istdin, istdou, istdpr, istder
+ save
!external time
- data trailer_par /''/
+ trailer_par = ''
c
- save
data nnul /0/
c
c find file name
diff --git a/adipls/adipack.c/gensr/ofiles.f b/adipls/adipack.c/gensr/ofiles.f
index 7e3b45bc5..876679677 100644
--- a/adipls/adipack.c/gensr/ofiles.f
+++ b/adipls/adipack.c/gensr/ofiles.f
@@ -286,10 +286,10 @@ subroutine openf(id,status,form)
c common defining standard input and output
c
common/cstdio/ istdin, istdou, istdpr, istder
+ save
!external time
- data trailer_par /''/
+ trailer_par = ''
c
- save
data nnul /0/
c
c find file name
diff --git a/adipls/adipack.c/gensr/spline.d.f b/adipls/adipack.c/gensr/spline.d.f
index 372ffee0b..d0acda779 100644
--- a/adipls/adipack.c/gensr/spline.d.f
+++ b/adipls/adipack.c/gensr/spline.d.f
@@ -44,7 +44,10 @@ subroutine splint(xa,ya,y2a,n,x,y)
goto 1
endif
h=xa(khi)-xa(klo)
- if (h.eq.0.d0) pause 'bad xa input.'
+ if (h.eq.0.d0) then
+ write(*,*) 'Bad XA input.'
+ call mesa_error(__FILE__,__LINE__)
+ endif
a=(xa(khi)-x)/h
b=(x-xa(klo))/h
y=a*ya(klo)+b*ya(khi)+
diff --git a/adipls/build_and_test b/adipls/build_and_test
deleted file mode 100755
index 9aaf8326b..000000000
--- a/adipls/build_and_test
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bash
-
-function error {
- echo
- cat diff.txt
- echo
- pwd
- echo "TEST FAILED -- compare obs.txt to obs.test.txt"
- echo
- exit 1
-}
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-if [ ! -f ../skip_build ]
-then
- if [ ! -f skip_build ]
- then
- cd make
- make
- check_okay
- cd ..
- fi
-fi
-
-if [ ! -f ../skip_test ]
-then
- if [ ! -f skip_test ] && [ ! -f test/build_skip_test ]
- then
- cd test
- ./ck >& diff.txt
- if [ $? -eq 0 ]
- then
- if [ -s diff.txt ]
- then
- grep -vq IEEE_ diff.txt
- if [ $? -eq 0 ]
- then
- # This matches if we have any error and no IEEE_ errors or
- # we have an IEEE_ error and any other error
- # but does not match if we only have IEEE_ errors
- error
- fi
- fi
- else
- error
- fi
- fi
-fi
diff --git a/adipls/build_and_test_parallel b/adipls/build_and_test_parallel
deleted file mode 100755
index 728f958e7..000000000
--- a/adipls/build_and_test_parallel
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/env bash
-
-function error {
- echo
- cat diff.txt
- echo
- pwd
- echo "TEST FAILED -- compare obs.txt to obs.test.txt"
- echo
- exit 1
-}
-
-function enum_procs {
- if [ -n "$NPROCS" ]; then
- echo $NPROCS
- else
- case $(uname -s) in
- Linux)
- if [ -r /proc/cpuinfo ]; then
- grep -c processor /proc/cpuinfo
- else
- echo 1
- fi
- ;;
- Darwin)
- sysctl hw.ncpu | awk '{print $2}'
- ;;
- *)
- echo 1
- ;;
- esac
- fi
-}
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-if [ ! -f ../skip_build ]
-then
- if [ ! -f skip_build ]
- then
- cd make
- make -j$(enum_procs)
- check_okay
- cd ..
- fi
-fi
-
-if [ ! -f ../skip_test ]
-then
- if [ ! -f skip_test ] && [ ! -f test/build_skip_test ]
- then
- cd test
- ./ck >& diff.txt
- if [ $? -eq 0 ]
- then
- if [ -s diff.txt ]
- then
- grep -vq IEEE_ diff.txt
- if [ $? -eq 0 ]
- then
- # This matches if we have any error and no IEEE_ errors or
- # we have an IEEE_ error and any other error
- # but does not match if we only have IEEE_ errors
- error
- fi
- fi
- else
- error
- fi
- fi
-fi
diff --git a/adipls/clean b/adipls/clean
deleted file mode 100755
index 356f57db5..000000000
--- a/adipls/clean
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make clean
diff --git a/adipls/export b/adipls/export
deleted file mode 100755
index db3250885..000000000
--- a/adipls/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/adipls/i1 b/adipls/i1
deleted file mode 100755
index cfea43808..000000000
--- a/adipls/i1
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "./build_and_test FAILED"
- echo
- exit 1
- fi
-}
-
-./build_and_test
-check_okay
-echo "export"
-./export
-echo "done"
\ No newline at end of file
diff --git a/adipls/i1p b/adipls/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/adipls/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/adipls/install b/adipls/install
deleted file mode 100755
index 9026e932d..000000000
--- a/adipls/install
+++ /dev/null
@@ -1,8 +0,0 @@
-./build_and_test
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-echo "export"
-./export
-echo "done"
\ No newline at end of file
diff --git a/adipls/make/makefile b/adipls/make/makefile
deleted file mode 100644
index 32f194295..000000000
--- a/adipls/make/makefile
+++ /dev/null
@@ -1,27 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-include $(MESA_DIR)/utils/makefile_header
-
-QUIET = yes
-
-export QUIET
-
-
-ifeq ($(USE_ADIPLS),YES)
-all install:
- @rm -f ../test/build_skip_test
- @make -f makefile_adipls $@
- @make -f makefile_adiajobs $@
-else
-all install:
- @touch ../test/build_skip_test
-endif
-
-
-clean:
- @make -f makefile_adipls $@
- @make -f makefile_adiajobs $@
- @rm -f ../test/build_skip_test
diff --git a/adipls/make/makefile_adiajobs b/adipls/make/makefile_adiajobs
deleted file mode 100644
index 0eb53ee0f..000000000
--- a/adipls/make/makefile_adiajobs
+++ /dev/null
@@ -1,300 +0,0 @@
-# This is the makefile for the mesa adipls support programs
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-ASYMP_SCALE_SRCS = \
- asymp-scale.d.o lir.d.o getcas.o rdamdl.n.d.o skpcom.o \
- cpycom.o length.o ofiles.o
-
-COMPAMOD_SRCS = \
- compamod.n.d.o ofiles.o lir.d.o vinta.d.o \
- length.o
-
-DIFF_FGONG_SRCS = \
- diff-fgong.d.o lir.d.o
-
-DIFF_SUM_SRCS = \
- diff-sum.d.o rdfreq.d.o wrfreq.d.o skpcom.o
-
-FDIF_SIN_SRCS = \
- fdif.sin.d.o ofiles.o zero.d.o lir.d.o \
- skpcom.o length.o
-
-FGONG_AMDL_SRCS = \
- fgong-amdl.d.o
-
-FILT_GSM_SRCS = \
- filt-gsm.d.o
-
-FIT_DNL_SRCS = \
- fit-dnl.o lstsqr.o skpcom.o length.o
-
-FORM_AGSM_SRCS = \
- form-agsm.d.o
-
-FORM_AMDL_SRCS = \
- form-amdl.d.o
-
-FREQDIF_SRCS = \
- freqdif.d.o ofiles.o zero.d.o izero.o lir.d.o \
- rdfreq.d.o rdfrqe.d.o skpcom.o length.o
-
-LSQFREQ_SRCS = \
- lsqfreq.d.o rdfrqm.d.o ofiles.o lsqpol.d.o \
- leq.d.o skpcom.o craysub.d.o length.o
-
-MER_AMDE_SRCS = \
- mer-amde.d.o
-
-MER_SUM_SRCS = \
- mer-sum.d.o rdfreq.d.o wrfreq.d.o skpcom.o
-
-PRT_AMDL_SRCS = \
- prt-amdl.d.o
-
-REDISTRB_SRCS = \
- redistrb.d.o ofiles.o length.o lir.d.o vinta.d.o \
- rnmean.d.o spline.d.o
-
-REDISTRB_C_SRCS = \
- redistrb.c.d.o srdist.c.d.o rseta4.c.d.o ofiles.c.o \
- length.o lir.d.o lirt.d.o vinta.d.o derive.d.o \
- rnmean.d.o
-
-RES_AMDE_SRCS = \
- res-amde.d.o
-
-SCAN_AGSM_SRCS = \
- scan-agsm.d.o
-
-SCAN_AMDE_SRCS = \
- scan-amde.d.o
-
-SCAN_AMDL_SRCS = \
- scan-amdl.d.o
-
-SCAN_SSM_SRCS = \
- scan-ssm.d.o
-
-SEL_AMDL_SRCS = \
- sel-amdl.d.o
-
-SELAMDE_SRCS = \
- selamde.d.o ofiles.o length.o inrnge.o \
- rdfreq.d.o setssm.d.o skpcom.o
-
-SELSUM_SRCS = \
- selsum.d.o ofiles.o length.o inrnge.o \
- rdfreq.d.o setssm.d.o skpcom.o
-
-SET_ASSCAL_SRCS = \
- set-asscal.d.o rdamdl.n.d.o ofiles.o length.o \
- squint.d.o vinta.d.o lir.d.o
-
-SET_DNL_SRCS = \
- set-dnl.d.o rdfreq.d.o skpcom.o
-
-SET_OBS_SRCS = \
- set-obs.d.o rdfreq.d.o skpcom.o
-
-SETEXEC_SRCS = \
- setexec.d.o rdfreq.d.o ofiles.o length.o \
- skpcom.o
-
-SORTSUM_SRCS = \
- sortsum.d.o rdfreq.d.o rdilst.o iprsgn.d.o \
- sort.d.o skpcom.o ofiles.o length.o
-
-#################################################################
-#
-# TARGETS
-
-PROG_DIR = ../adipack.c/adiajobs
-
-ASYMP_SCALE = $(PROG_DIR)/asymp-scale.d.x
-COMPAMOD = $(PROG_DIR)/compamod.n.d.x
-DIFF_FGONG = $(PROG_DIR)/diff-fgong.d.x
-DIFF_SUM = $(PROG_DIR)/diff-sum.d.x
-FDIF_SIN = $(PROG_DIR)/fdif.sin.d.x
-FGONG_AMDL = $(PROG_DIR)/fgong-amdl.d.x
-FILT_GSM = $(PROG_DIR)/filt-gsm.d.x
-FIT_DNL = $(PROG_DIR)/fit-dnl
-FORM_AGSM = $(PROG_DIR)/form-agsm.d.x
-FORM_AMDL = $(PROG_DIR)/form-amdl.d.x
-FREQDIF = $(PROG_DIR)/freqdif.d.x
-LSQFREQ = $(PROG_DIR)/lsqfreq.d.x
-MER_AMDE = $(PROG_DIR)/mer-amde.d.x
-MER_SUM = $(PROG_DIR)/mer-sum.d.x
-PRT_AMDL = $(PROG_DIR)/prt-amdl.d.x
-REDISTRB_C = $(PROG_DIR)/redistrb.c.d.x
-REDISTRB = $(PROG_DIR)/redistrb.d.x
-RES_AMDE = $(PROG_DIR)/res-amde.d.x
-SCAN_AGSM = $(PROG_DIR)/scan-agsm.d.x
-SCAN_AMDE = $(PROG_DIR)/scan-amde.d.x
-SCAN_AMDL = $(PROG_DIR)/scan-amdl.d.x
-SCAN_SSM = $(PROG_DIR)/scan-ssm.d.x
-SEL_AMDL = $(PROG_DIR)/sel-amdl.d.x
-SELAMDE = $(PROG_DIR)/selamde.d.x
-SELSUM = $(PROG_DIR)/selsum.d.x
-SET_ASSCAL = $(PROG_DIR)/set-asscal.d.x
-SET_DNL = $(PROG_DIR)/set-dnl.d.x
-SET_OBS = $(PROG_DIR)/set-obs.d.x
-SETEXEC = $(PROG_DIR)/setexec.d.x
-SORTSUM = $(PROG_DIR)/sortsum.d.x
-
-ASYMP_SCALE_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(ASYMP_SCALE_SRCS)))
-COMPAMOD_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(COMPAMOD_SRCS)))
-DIFF_FGONG_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(DIFF_FGONG_SRCS)))
-DIFF_SUM_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(DIFF_SUM_SRCS)))
-FDIF_SIN_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(FDIF_SIN_SRCS)))
-FGONG_AMDL_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(FGONG_AMDL_SRCS)))
-FILT_GSM_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(FILT_GSM_SRCS)))
-FIT_DNL_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(FIT_DNL_SRCS)))
-FORM_AGSM_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(FORM_AGSM_SRCS)))
-FORM_AMDL_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(FORM_AMDL_SRCS)))
-FREQDIF_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(FREQDIF_SRCS)))
-LSQFREQ_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(LSQFREQ_SRCS)))
-MER_AMDE_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(MER_AMDE_SRCS)))
-MER_SUM_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(MER_SUM_SRCS)))
-PRT_AMDL_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(PRT_AMDL_SRCS)))
-REDISTRB_C_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(REDISTRB_C_SRCS)))
-REDISTRB_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(REDISTRB_SRCS)))
-RES_AMDE_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(RES_AMDE_SRCS)))
-SCAN_AGSM_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SCAN_AGSM_SRCS)))
-SCAN_AMDE_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SCAN_AMDE_SRCS)))
-SCAN_AMDL_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SCAN_AMDL_SRCS)))
-SCAN_SSM_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SCAN_SSM_SRCS)))
-SEL_AMDL_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SEL_AMDL_SRCS)))
-SELAMDE_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SELAMDE_SRCS)))
-SELSUM_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SELSUM_SRCS)))
-SET_ASSCAL_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SET_ASSCAL_SRCS)))
-SET_DNL_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SET_DNL_SRCS)))
-SET_OBS_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SET_OBS_SRCS)))
-SETEXEC_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SETEXEC_SRCS)))
-SORTSUM_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SORTSUM_SRCS)))
-
-all : $(ASYMP_SCALE) $(COMPAMOD) $(DIFF_FGONG) $(DIFF_SUM) $(FDIF_SIN) \
- $(FGONG_AMDL) $(FILT_GSM) $(FIT_DNL) $(FORM_AGSM) $(FORM_AMDL) $(FREQDIF) \
- $(LSQFREQ) $(MER_AMDE) $(MER_SUM) $(PRT_AMDL) $(REDISTRB_C) $(REDISTRB) \
- $(RES_AMDE) $(SCAN_AGSM) $(SCAN_AMDE) $(SCAN_AMDL) $(SCAN_SSM) $(SEL_AMDL) \
- $(SELAMDE) $(SELSUM) $(SET_ASSCAL) $(SET_DNL) $(SET_OBS) $(SETEXEC) \
- $(SORTSUM)
-
-$(ASYMP_SCALE) : $(ASYMP_SCALE_OBJS)
-$(COMPAMOD) : $(COMPAMOD_OBJS)
-$(DIFF_FGONG) : $(DIFF_FGONG_OBJS)
-$(DIFF_SUM) : $(DIFF_SUM_OBJS)
-$(FDIF_SIN) : $(FDIF_SIN_OBJS)
-$(FGONG_AMDL) : $(FGONG_AMDL_OBJS)
-$(FILT_GSM) : $(FILT_GSM_OBJS)
-$(FIT_DNL) : $(FIT_DNL_OBJS)
-$(FORM_AGSM) : $(FORM_AGSM_OBJS)
-$(FORM_AMDL) : $(FORM_AMDL_OBJS)
-$(FREQDIF) : $(FREQDIF_OBJS)
-$(LSQFREQ) : $(LSQFREQ_OBJS)
-$(MER_AMDE) : $(MER_AMDE_OBJS)
-$(MER_SUM) : $(MER_SUM_OBJS)
-$(PRT_AMDL) : $(PRT_AMDL_OBJS)
-$(REDISTRB_C) : $(REDISTRB_C_OBJS)
-$(REDISTRB) : $(REDISTRB_OBJS)
-$(RES_AMDE) : $(RES_AMDE_OBJS)
-$(SCAN_AGSM) : $(SCAN_AGSM_OBJS)
-$(SCAN_AMDE) : $(SCAN_AMDE_OBJS)
-$(SCAN_AMDL) : $(SCAN_AMDL_OBJS)
-$(SCAN_SSM) : $(SCAN_SSM_OBJS)
-$(SEL_AMDL) : $(SEL_AMDL_OBJS)
-$(SELAMDE) : $(SELAMDE_OBJS)
-$(SELSUM) : $(SELSUM_OBJS)
-$(SET_ASSCAL) : $(SET_ASSCAL_OBJS)
-$(SET_DNL) : $(SET_DNL_OBJS)
-$(SET_OBS) : $(SET_OBS_OBJS)
-$(SETEXEC) : $(SETEXEC_OBJS)
-$(SORTSUM) : $(SORTSUM_OBJS)
-
-$(ASYMP_SCALE) : OBJS = $(ASYMP_SCALE_OBJS)
-$(COMPAMOD) : OBJS = $(COMPAMOD_OBJS)
-$(DIFF_FGONG) : OBJS = $(DIFF_FGONG_OBJS)
-$(DIFF_SUM) : OBJS = $(DIFF_SUM_OBJS)
-$(FDIF_SIN) : OBJS = $(FDIF_SIN_OBJS)
-$(FGONG_AMDL) : OBJS = $(FGONG_AMDL_OBJS)
-$(FILT_GSM) : OBJS = $(FILT_GSM_OBJS)
-$(FIT_DNL) : OBJS = $(FIT_DNL_OBJS)
-$(FORM_AGSM) : OBJS = $(FORM_AGSM_OBJS)
-$(FORM_AMDL) : OBJS = $(FORM_AMDL_OBJS)
-$(FREQDIF) : OBJS = $(FREQDIF_OBJS)
-$(LSQFREQ) : OBJS = $(LSQFREQ_OBJS)
-$(MER_AMDE) : OBJS = $(MER_AMDE_OBJS)
-$(MER_SUM) : OBJS = $(MER_SUM_OBJS)
-$(PRT_AMDL) : OBJS = $(PRT_AMDL_OBJS)
-$(REDISTRB_C) : OBJS = $(REDISTRB_C_OBJS)
-$(REDISTRB) : OBJS = $(REDISTRB_OBJS)
-$(RES_AMDE) : OBJS = $(RES_AMDE_OBJS)
-$(SCAN_AGSM) : OBJS = $(SCAN_AGSM_OBJS)
-$(SCAN_AMDE) : OBJS = $(SCAN_AMDE_OBJS)
-$(SCAN_AMDL) : OBJS = $(SCAN_AMDL_OBJS)
-$(SCAN_SSM) : OBJS = $(SCAN_SSM_OBJS)
-$(SEL_AMDL) : OBJS = $(SEL_AMDL_OBJS)
-$(SELAMDE) : OBJS = $(SELAMDE_OBJS)
-$(SELSUM) : OBJS = $(SELSUM_OBJS)
-$(SET_ASSCAL) : OBJS = $(SET_ASSCAL_OBJS)
-$(SET_DNL) : OBJS = $(SET_DNL_OBJS)
-$(SET_OBS) : OBJS = $(SET_OBS_OBJS)
-$(SETEXEC) : OBJS = $(SETEXEC_OBJS)
-$(SORTSUM) : OBJS = $(SORTSUM_OBJS)
-
-$(PROG_DIR)/% :
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $@
- @$(COMPILE_CMD) -w -o $@ $(OBJS)
-else
- $(COMPILE_CMD) -w -o $@ $(OBJS)
-endif
-
-clean:
- -@rm -f *.o $(ASYMP_SCALE) $(COMPAMOD) $(DIFF_FGONG) $(DIFF_SUM) $(FDIF_SIN) \
- $(FGONG_AMDL) $(FILT_GSM) $(FIT_DNL) $(FORM_AGSM) $(FORM_AMDL) $(FREQDIF) \
- $(LSQFREQ) $(MER_AMDE) $(MER_SUM) $(PRT_AMDL) $(REDISTRB_C) $(REDISTRB) \
- $(RES_AMDE) $(SCAN_AGSM) $(SCAN_AMDE) $(SCAN_AMDL) $(SCAN_SSM) $(SEL_AMDL) \
- $(SELAMDE) $(SELSUM) $(SET_ASSCAL) $(SET_DNL) $(SET_OBS) $(SETEXEC) \
- $(SORTSUM)
-
-#################################################################
-#
-# COMPILATION RULES
-
-ifneq (,$(findstring gfortran,$(FC)))
-COMPILE_CMD = $(FC) -std=legacy
-else
-COMPILE_CMD = $(FC)
-endif
-
-ifeq ($(USE_SHARED), YES)
- COMPILE_CMD += -fPIC
-endif
-
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) -w -c $<
-else
- $(COMPILE_CMD) -w -c $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = ../adipack.c/adiajobs:../adipack.c/gensr:../adipack.c/adiajobs/sr
-
-vpath %.f $(SRC_PATH)
diff --git a/adipls/make/makefile_adipls b/adipls/make/makefile_adipls
deleted file mode 100644
index 92a0b04a8..000000000
--- a/adipls/make/makefile_adipls
+++ /dev/null
@@ -1,113 +0,0 @@
-# This is the makefile for the mesa adipls main program/library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-LIB_SRCS = \
- adipls.c.d.f anldet.d.f cmparr.d.f danorm.d.f decicd.d.f \
- dmpgsm.d.f dmpmde.d.f dmpsum.d.f geninh.d.f gm1ker.n.d.f gravpo.n.d.f \
- kiner.n.d.f mchcff.d.f order.d.f takata.d.f readml.n.d.f res_adimod.c.d.f \
- readsm.d.f adirhs.c.d.f rotker.c.d.f \
- trnmod.n.d.f setbcs.n.d.f setssm.n.d.f signew.n.d.f rdfrqr.d.f varfrq.n.d.f \
- xlmult.d.f nrkint.c.d.f nrtssl.d.f stevft.n.d.f shtint.c.d.f mchsol.n.d.f \
- sclasl.c.d.f nrkm.d.f setsum.d.f sumout.d.f \
- sigint.n.d.f sigitr.n.d.f sigitc.c.d.f sigsol.c.d.f sigout.c.d.f sigscn.c.d.f \
- rsnfit.n.d.f res_adipar.c.d.f setups_adi.c.d.f set_rotation.c.d.f \
- setobs_st.c.d.f dump_obs.c.d.f \
- delta1.d.f delta2.d.f delta3.d.f \
- sph.d.f uhx.d.f \
- aramax.d.f derive.d.f derivk.new.d.f leq.d.f \
- lininh.new.d.f lininh4.d.f \
- nrk.d.f vinta.d.f lir.d.f rnmean.d.f \
- vintk.new.d.f store.d.f notwin.d.f notwni.f \
- skpcom.f zero.d.f eiginh.d.f intgpt.d.f \
- spline.d.f length.f strcompr.f lirt.d.f \
- srdist.c.d.f rseta4.c.d.f
-
-PROG_SRCS = main.c.d.f user_adi.c.d.f
-
-#################################################################
-#
-# TARGETS
-
-LIB = libadipls.$(LIB_SUFFIX_STATIC)
-PROG = ../adipack.c/adipls/adipls.c.d.x
-
-LIB_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(LIB_SRCS))) ofiles_blstio.o
-PROG_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(PROG_SRCS)))
-
-all : $(LIB) $(PROG)
-
-$(LIB) : $(LIB_OBJS)
-# Dont build shared libraries
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL_STATIC) $(LIB) $(LIB_OBJS)
-else
- $(LIB_TOOL_STATIC) $(LIB) $(LIB_OBJS)
-endif
-
-$(PROG) : $(PROG_OBJS) $(LIB)
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $(PROG)
- @$(COMPILE_CMD) -w -o $(PROG) $(PROG_OBJS) $(LIB)
-else
- $(COMPILE_CMD) -w -o $(PROG) $(PROG_OBJS) $(LIB)
-endif
-
-clean:
- -@rm -f *.o ofiles_blstio.f $(LIB) $(PROG)
-
-install:
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-#################################################################
-#
-# COMPILATION RULES
-
-ifneq (,$(findstring gfortran,$(FC)))
-COMPILE_CMD = $(FC) -std=legacy
-else
-COMPILE_CMD = $(FC)
-endif
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) -w -c $<
-else
- $(COMPILE_CMD) -w -c $<
-endif
-
-# This is a workaround for some linkers that ignore the BLOCK DATA in
-# blstio
-
-ofiles_blstio.f : ofiles.c.f blstio.f
-ifneq ($(QUIET),)
- @echo COMBINE $^
- @cat $^ > $@
-else
- cat $^ > $@
-endif
-
-ifeq ($(USE_SHARED), YES)
- COMPILE_CMD += -fPIC
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = ../adipack.c/adipls:../adipack.c/gensr:../adipack.c/adiajobs/sr
-
-vpath %.f $(SRC_PATH)
-
diff --git a/adipls/mk b/adipls/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/adipls/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/adipls/src/callbacks.f90 b/adipls/src/callbacks.f90
new file mode 100644
index 000000000..350984f70
--- /dev/null
+++ b/adipls/src/callbacks.f90
@@ -0,0 +1,51 @@
+! ***********************************************************************
+!
+! Copyright (C) 2025 The MESA Team
+!
+! This program is free software: you can redistribute it and/or modify
+! it under the terms of the GNU Lesser General Public License
+! as published by the Free Software Foundation,
+! either version 3 of the License, or (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+! See the GNU Lesser General Public License for more details.
+!
+! You should have received a copy of the GNU Lesser General Public License
+! along with this program. If not, see .
+!
+! ***********************************************************************
+
+module adipls_callbacks
+ implicit none
+
+ procedure(), pointer :: spcout_adi_ptr, modmod_ptr, resdif_ptr => NULL()
+end module adipls_callbacks
+
+subroutine spcout_adi(x, y, aa, data, nn, iy, iaa, ispcpr)
+ use const_def, only: dp
+ use adipls_callbacks, only: spcout_adi_ptr
+ integer :: nn, iy, iaa, ispcpr
+ real(dp) :: x(1:nn), y(1:iy,1:nn), aa(1:iaa,1:nn), data(8)
+
+ if (associated(spcout_adi_ptr)) then
+ call spcout_adi_ptr(x, y, aa, data, nn, iy, iaa, ispcpr)
+ end if
+end subroutine spcout_adi
+
+subroutine modmod(x, aa, data, nn, ivarmd, iaa, imdmod)
+ use const_def, only: dp
+ use adipls_callbacks, only: modmod_ptr
+ integer :: nn, ivarmd, iaa, imdmod
+ real(dp) :: x(nn), aa(iaa,nn), data(8)
+
+ if (associated(modmod_ptr)) then
+ call modmod_ptr(x, aa, data, nn, ivarmd, iaa, imdmod)
+ end if
+end subroutine modmod
+
+subroutine resdif
+ ! Complex signature, unused
+ return
+end subroutine resdif
diff --git a/adipls/test/ck b/adipls/test/ck
deleted file mode 100755
index ecab667b6..000000000
--- a/adipls/test/ck
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-DIR=`pwd`
-check_okay
-aprgdir="$DIR"/../adipack.c
-check_okay
-export aprgdir="$aprgdir"
-check_okay
-export PATH="$aprgdir"/bin:"$PATH"
-check_okay
-fgong-amdl.d Gemma.fgong amdl.mesa > .list
-check_okay
-scan-amdl.d amdl.mesa >> .list
-check_okay
-adipls.c.d adipls.c.in >> .list
-check_okay
-set-obs.d 16 mesa >> .list
-check_okay
-mv obs.mesa obs.txt
-check_okay
-ndiff -quiet -relerr 1e-9 obs.txt obs.test.txt
diff --git a/adipls/test/cleanup b/adipls/test/cleanup
deleted file mode 100755
index 22f65cbab..000000000
--- a/adipls/test/cleanup
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ../make
-make clean
diff --git a/adipls/test/mkx b/adipls/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/adipls/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/astero/Makefile b/astero/Makefile
new file mode 100644
index 000000000..8fdd3a342
--- /dev/null
+++ b/astero/Makefile
@@ -0,0 +1,49 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := astero
+SRCS := \
+ public/astero_def.f90 \
+ public/astero_lib.f90 \
+ private/astero_support.f90 \
+ private/extras_support.f90 \
+ private/astero_run_support.f90
+
+INTERNAL_DEPENDS_ON := const utils math num auto_diff star_data star
+
+ifeq ($(WITH_PGSTAR),yes)
+SRCS += private/pgstar_astero_plots.f90
+EXTERNAL_DEPENDS_ON += pgplot
+else
+SRCS += private/pgstar_astero_plots_stub.f90
+endif
+
+ifeq ($(WITH_GYRE),yes)
+SRCS += private/gyre_support.f90
+INTERNAL_DEPENDS_ON += gyre
+else
+SRCS += private/gyre_support_stub.f90
+endif
+
+ifeq ($(WITH_ADIPLS),yes)
+SRCS += private/adipls_support.f90
+INTERNAL_DEPENDS_ON += adipls
+else
+SRCS += private/adipls_support_stub.f90
+endif
+
+SRCS_CHECK = test/src/test_astero.f90
+BINTYPE := static-lib
+INCLUDE_DIRS := -Iprivate -Ipublic -Idefaults
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := astero_def.mod astero_lib.mod
+INSTALL_INCLUDES := public/set_star_astero_procs.inc
+
+include $(MAKE_DIR)/Makefile
diff --git a/astero/build_and_test b/astero/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/astero/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/astero/build_and_test_parallel b/astero/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/astero/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/astero/clean b/astero/clean
deleted file mode 100755
index e71485281..000000000
--- a/astero/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make; make clean
-cd ../test/make; make clean
diff --git a/astero/cpv b/astero/cpv
deleted file mode 100755
index 8303b0d6b..000000000
--- a/astero/cpv
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-if [ -d defaults_$1 ]
-then
- echo defaults_$1 "already exists, so abort cpv"
-else
- mkdir defaults_$1
- cp defaults/* defaults_$1
- mkdir private_$1
- cp private/* private_$1
- mkdir public_$1
- cp public/* public_$1
- cp make/makefile make/makefile_$1
- cp make/makefile_base make/makefile_base_$1
- echo astero $1
-fi
diff --git a/astero/export b/astero/export
deleted file mode 100755
index db3250885..000000000
--- a/astero/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/astero/i1 b/astero/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/astero/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/astero/i1p b/astero/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/astero/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/astero/make/makefile b/astero/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/astero/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/astero/make/makefile_base b/astero/make/makefile_base
deleted file mode 100644
index d4c22c501..000000000
--- a/astero/make/makefile_base
+++ /dev/null
@@ -1,157 +0,0 @@
-# This is the makefile for the mesa astero library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-# define the PGSTAR files for astero
-ifeq ($(USE_PGSTAR),YES)
-PGSTAR_SRCS = pgstar_astero_plots.f90
-else
-PGSTAR_SRCS = pgstar_astero_plots_stub.f90
-endif
-
-ifeq ($(USE_GYRE),YES)
-GYRE_SRCS = gyre_support.f90
-else
-GYRE_SRCS = gyre_support_stub.f90
-endif
-
-ifeq ($(USE_ADIPLS),YES)
-ADIPLS_SRCS = adipls_support.f90 adipls_support_procs.f90
-ADIPLS_LIB = -ladipls
-else
-ADIPLS_SRCS = adipls_support_stub.f90 adipls_support_procs_stub.f90
-ADIPLS_LIB =
-endif
-
-
-SRCS = \
- astero_def.f90 \
- $(ADIPLS_SRCS) \
- $(GYRE_SRCS) \
- astero_support.f90 \
- $(PGSTAR_SRCS) \
- extras_support.f90 \
- astero_run_support.f90 \
- astero_lib.f90
-
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MESA_STAR)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR) $(ADIPLS_LIB)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libastero.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) astero_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) astero_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
- @$(CP_IF_NEWER) ../public/*.inc $(MESA_DIR)/include
-ifneq (,$(findstring ifort,$(FC)))
- @$(CP_IF_NEWER) astero_support.mod $(MESA_DIR)/include
-endif
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-MOD_DEFAULTS_DIR = $(MODULE_DIR)/defaults
-MOD_OTHER_DIR = $(MODULE_DIR)/other
-
-ASTERO_INCLUDES = -I$(MOD_DEFAULTS_DIR)
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree) $(ASTERO_INCLUDES)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree) $(ASTERO_INCLUDES)
-
-COMPILE_CMD = $(COMPILE)
-COMPILE_LEGACY = $(filter-out -std=f2008, $(COMPILE))
-
-%.o : %.mod
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR):$(MOD_OTHER_DIR):$(MOD_DEFAULTS_DIR)
-
-vpath %.f90 $(SRC_PATH)
-vpath %.inc $(SRC_PATH)
-vpath %.defaults $(MOD_DEFAULTS_DIR)
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
-
-ifeq ($(USE_GYRE),NO)
-gyre_support.mod : gyre_support_stub.o
- @true
-endif
-
-ifeq ($(USE_PGSTAR),NO)
-pgstar_astero_plots.mod : pgstar_astero_plots_stub.o
- @true
-endif
-
-ifeq ($(USE_ADIPLS),NO)
-adipls_support.mod : adipls_support_stub.o
- @true
-adipls_support_procs.mod : adipls_support_procs_stub.o
-endif
diff --git a/astero/makefile b/astero/makefile
deleted file mode 100644
index f31141bda..000000000
--- a/astero/makefile
+++ /dev/null
@@ -1,65 +0,0 @@
-# astero/makefile
-
-include $(MESA_DIR)/utils/makefile_header
-
-ifeq ($(USE_GYRE),YES)
-LOAD_GYRE = -lgyre $(LOAD_LAPACK) $(LOAD_BLAS)
-else
-LOAD_GYRE =
-endif
-
-ifeq ($(USE_ADIPLS),YES)
-ADIPLS_LIB = -ladipls
-else
-ADIPLS_LIB =
-endif
-
-LOAD_MESA = $(LOAD_EXTRAS1) -L$(MESA_LIB_DIR) -lastero $(ADIPLS_LIB) $(LOAD_MESA_STAR) -lastero $(LOAD_GYRE) $(LOAD_EXTRAS)
-# the replication of -lastero is required to deal with the lack of "hooks" in adipls.
-# it needs astero, and astero needs it and order of loading matters on linux. so need to list it twice.
-# check this again someday to see if the problem has gone away.
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(MESA_CONTRIB_DIR),)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) -I $(MESA_CONTRIB_DIR)/hooks $<
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/astero/mk b/astero/mk
deleted file mode 100755
index e98ec1713..000000000
--- a/astero/mk
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-cd make; make
diff --git a/astero/private/adipls_support.f90 b/astero/private/adipls_support.f90
index 4b55a3330..324d57a17 100644
--- a/astero/private/adipls_support.f90
+++ b/astero/private/adipls_support.f90
@@ -415,8 +415,8 @@ subroutine run_adipls( &
contains
-
subroutine setup_adipls
+ use adipls_callbacks, only: spcout_adi_ptr
iounit = alloc_iounit(ierr)
if (ierr /= 0) then
write(*,*) 'setup_adipls failed in alloc_iounit'
@@ -445,6 +445,9 @@ subroutine setup_adipls
call setups_adi
nn_arg_0 = 0
istdin = iounit
+
+ spcout_adi_ptr => spcout_adi
+
call adipls(i_paramset, ierr_param, i_inout, &
x_arg0, aa_arg0, data_arg, nn_arg_0, ivarmd, iaa_arg)
close(iounit)
@@ -462,6 +465,48 @@ subroutine setup_adipls
end subroutine setup_adipls
+ subroutine spcout_adi(x, y, aa, data, nn, iy, iaa, ispcpr)
+ ! must set ispcpr > 0 to get this called
+ use astero_def, only: store_new_oscillation_results, &
+ el, order, em, cyclic_freq, inertia, num_results
+ use const_def, only: dp, pi4
+ use utils_lib, only: mesa_error
+
+ implicit none
+
+ integer :: nn, iy, iaa, ispcpr
+ real(dp) :: x(1:nn), y(1:iy,1:nn), aa(1:iaa,1:nn), data(8)
+
+ ! common for storage of model parameters
+ ! degree, order, cyclic frequency (microHz), inertia
+ common/cobs_param/ icobs_st, nobs_st, obs_st
+ real(dp) :: csummm(50)
+ common/csumma/ csummm
+
+ integer :: icobs_st, nobs_st
+ real(dp) :: obs_st(10,100000) ! huge 2nd dimension to satisfy bounds checking
+
+ integer :: ierr, new_el, new_order, new_em, n
+ real(dp) :: new_inertia, new_cyclic_freq
+
+ include 'formats'
+
+ new_el = int(obs_st(1,nobs_st) + 0.5_dp)
+ new_order = int(obs_st(2,nobs_st) + 0.5_dp)
+ new_em = csummm(38)
+ new_inertia = obs_st(4,nobs_st)*pi4
+ new_cyclic_freq = obs_st(3,nobs_st)
+
+ call store_new_oscillation_results( &
+ new_el, new_order, new_em, new_inertia, new_cyclic_freq, 0._dp, ierr)
+ if (ierr /= 0) call mesa_error(__FILE__,__LINE__)
+
+ n = num_results
+ call adipls_mode_info( &
+ el(n), order(n), em(n), cyclic_freq(n), inertia(n), &
+ x, y, aa, data, nn, iy, iaa, ispcpr)
+
+ end subroutine spcout_adi
subroutine setup_redist
diff --git a/astero/private/adipls_support_procs.f90 b/astero/private/adipls_support_procs.f90
deleted file mode 100644
index c74d790b3..000000000
--- a/astero/private/adipls_support_procs.f90
+++ /dev/null
@@ -1,77 +0,0 @@
-! ***********************************************************************
-!
-! Copyright (C) 2013 The MESA Team
-!
-! This program is free software: you can redistribute it and/or modify
-! it under the terms of the GNU Lesser General Public License
-! as published by the Free Software Foundation,
-! either version 3 of the License, or (at your option) any later version.
-!
-! This program is distributed in the hope that it will be useful,
-! but WITHOUT ANY WARRANTY; without even the implied warranty of
-! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-! See the GNU Lesser General Public License for more details.
-!
-! You should have received a copy of the GNU Lesser General Public License
-! along with this program. If not, see .
-!
-! ***********************************************************************
-
- ! routines that are called by adipls
- ! uses adipls_support, so must compile after that
-
- subroutine spcout_adi(x,y,aa,data,nn,iy,iaa,ispcpr)
- ! must set ispcpr > 0 to get this called
- use astero_def, only: store_new_oscillation_results, &
- el, order, em, cyclic_freq, inertia, num_results
- use adipls_support, only: adipls_mode_info
- use const_def, only: dp, pi4
- use utils_lib, only: mesa_error
-
- implicit none
-
- integer :: nn, iy, iaa, ispcpr
- real(dp) :: x(1:nn), y(1:iy,1:nn), aa(1:iaa,1:nn), data(8)
-
- ! common for storage of model parameters
- ! degree, order, cyclic frequency (microHz), inertia
- common/cobs_param/ icobs_st, nobs_st, obs_st
- real(dp) :: csummm(50)
- common/csumma/ csummm
-
- integer :: icobs_st, nobs_st
- real(dp) :: obs_st(10,100000) ! huge 2nd dimension to satisfy bounds checking
-
- integer :: ierr, new_el, new_order, new_em, n
- real(dp) :: new_inertia, new_cyclic_freq
-
- include 'formats'
-
- new_el = int(obs_st(1,nobs_st) + 0.5_dp)
- new_order = int(obs_st(2,nobs_st) + 0.5_dp)
- new_em = csummm(38)
- new_inertia = obs_st(4,nobs_st)*pi4
- new_cyclic_freq = obs_st(3,nobs_st)
-
- call store_new_oscillation_results( &
- new_el, new_order, new_em, new_inertia, new_cyclic_freq, 0._dp, ierr)
- if (ierr /= 0) call mesa_error(__FILE__,__LINE__)
-
- n = num_results
- call adipls_mode_info( &
- el(n), order(n), em(n), cyclic_freq(n), inertia(n), &
- x, y, aa, data, nn, iy, iaa, ispcpr)
-
- end subroutine spcout_adi
-
-
- subroutine modmod(x,aa,data,nn,ivarmd,iaa,imdmod)
- use const_def, only: dp
- integer :: nn, ivarmd, iaa, imdmod
- real(dp) :: x(nn), aa(iaa,nn), data(8)
- end subroutine modmod
-
-
- subroutine resdif
- return
- end subroutine resdif
diff --git a/astero/private/adipls_support_procs_stub.f90 b/astero/private/adipls_support_procs_stub.f90
deleted file mode 100644
index 821ceb2c1..000000000
--- a/astero/private/adipls_support_procs_stub.f90
+++ /dev/null
@@ -1,48 +0,0 @@
-! ***********************************************************************
-!
-! Copyright (C) 2021 The MESA Team
-!
-! This program is free software: you can redistribute it and/or modify
-! it under the terms of the GNU Lesser General Public License
-! as published by the Free Software Foundation,
-! either version 3 of the License, or (at your option) any later version.
-!
-! This program is distributed in the hope that it will be useful,
-! but WITHOUT ANY WARRANTY; without even the implied warranty of
-! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-! See the GNU Lesser General Public License for more details.
-!
-! You should have received a copy of the GNU Lesser General Public License
-! along with this program. If not, see .
-!
-! ***********************************************************************
-
- ! routines that are called by adipls
- ! uses adipls_support, so must compile after that
-
- subroutine spcout_adi(x,y,aa,data,nn,iy,iaa,ispcpr)
- ! must set ispcpr > 0 to get this called
- use astero_def, only: store_new_oscillation_results, &
- el, order, em, cyclic_freq, inertia, num_results
- use adipls_support, only: adipls_mode_info
- use const_def, only: dp, pi4
- use utils_lib, only: mesa_error
-
- implicit none
-
- integer :: nn, iy, iaa, ispcpr
- real(dp) :: x(1:nn), y(1:iy,1:nn), aa(1:iaa,1:nn), data(8)
-
- end subroutine spcout_adi
-
-
- subroutine modmod(x,aa,data,nn,ivarmd,iaa,imdmod)
- use const_def, only: dp
- integer :: nn, ivarmd, iaa, imdmod
- real(dp) :: x(nn), aa(iaa,nn), data(8)
- end subroutine modmod
-
-
- subroutine resdif
- return
- end subroutine resdif
diff --git a/astero/private/astero_support.f90 b/astero/private/astero_support.f90
index fe112c356..8e1d979e5 100644
--- a/astero/private/astero_support.f90
+++ b/astero/private/astero_support.f90
@@ -81,7 +81,7 @@ subroutine get_one_el_info( &
ierr = -1
write(*,'(A)')
write(*,'(a)') 'gyre is not currently enabled in your configuration of mesa.'
- write(*,'(a)') 'check that your utils/makefile_header has USE_GYRE = YES'
+ write(*,'(a)') 'check that your make/defaults-module.mk has WITH_GYRE = YES'
write(*,'(A)')
return
end if
@@ -101,7 +101,7 @@ subroutine get_one_el_info( &
ierr = -1
write(*,'(A)')
write(*,'(a)') 'adipls is not currently enabled in your configuration of mesa.'
- write(*,'(a)') 'check that your utils/makefile_header has USE_ADIPLS = YES'
+ write(*,'(a)') 'check that your make/defaults-module.mk has WITH_ADIPLS = YES'
write(*,'(A)')
return
end if
diff --git a/astero/private/gyre_support.f90 b/astero/private/gyre_support.f90
index 786a59a63..2a2863792 100644
--- a/astero/private/gyre_support.f90
+++ b/astero/private/gyre_support.f90
@@ -63,7 +63,7 @@ subroutine init_gyre (gyre_file, ierr)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
write(*,*) 'done init_gyre'
diff --git a/astero/replace_v b/astero/replace_v
deleted file mode 100755
index 4e7dd1de1..000000000
--- a/astero/replace_v
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-cp defaults_$1/* defaults/
-cp private_$1/* private/
-cp public_$1/* public/
-cp make/makefile_$1 make/makefile
-cp make/makefile_base_$1 make/makefile_base
-echo astero $1
diff --git a/astero/test/ck b/astero/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/astero/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/astero/test/clean b/astero/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/astero/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/astero/test/cleanup b/astero/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/astero/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/astero/test/export b/astero/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/astero/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/astero/test/make/makefile b/astero/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/astero/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/astero/test/make/makefile_base b/astero/test/make/makefile_base
deleted file mode 100644
index fb086c63a..000000000
--- a/astero/test/make/makefile_base
+++ /dev/null
@@ -1,92 +0,0 @@
-# This is the makefile for testing the mesa astero library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-TEST_SRCS = test_astero.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = astero
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = $(LIBS_MESA_STAR)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-TEST_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TEST_SRCS)))
-
-all : $(TEST)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(TEST_SRC_DIR)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/astero/test/mk b/astero/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/astero/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/astero/test/mkx b/astero/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/astero/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/astero/test/rn b/astero/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/astero/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/astero/test_suite/astero_adipls/Makefile b/astero/test_suite/astero_adipls/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/astero/test_suite/astero_adipls/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/astero/test_suite/astero_adipls/clean b/astero/test_suite/astero_adipls/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/test_suite/astero_adipls/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/test_suite/astero_adipls/make/makefile b/astero/test_suite/astero_adipls/make/makefile
deleted file mode 100644
index 60c717c09..000000000
--- a/astero/test_suite/astero_adipls/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/test_suite/astero_adipls/mk b/astero/test_suite/astero_adipls/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/test_suite/astero_adipls/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/test_suite/astero_adipls/re b/astero/test_suite/astero_adipls/re
index 53dfe4abb..7093783a3 100755
--- a/astero/test_suite/astero_adipls/re
+++ b/astero/test_suite/astero_adipls/re
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/astero_adipls/rn1 b/astero/test_suite/astero_adipls/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/astero/test_suite/astero_adipls/rn1
+++ b/astero/test_suite/astero_adipls/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/astero_adipls/src/run_star_extras.f90 b/astero/test_suite/astero_adipls/src/run_star_extras.f90
index 1987694b8..bd58bb519 100644
--- a/astero/test_suite/astero_adipls/src/run_star_extras.f90
+++ b/astero/test_suite/astero_adipls/src/run_star_extras.f90
@@ -276,7 +276,9 @@ subroutine get_adipls_frequency_info( &
okay = (abs(freq - expected_freq) < expected_freq*3d-2)
end if
end do
- deallocate(l_freq, l_inertia, l_order, l_em)
+ if (associated(l_freq)) then
+ deallocate(l_freq, l_inertia, l_order, l_em)
+ end if
end subroutine get_adipls_frequency_info
diff --git a/astero/test_suite/astero_gyre/Makefile b/astero/test_suite/astero_gyre/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/astero/test_suite/astero_gyre/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/astero/test_suite/astero_gyre/clean b/astero/test_suite/astero_gyre/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/test_suite/astero_gyre/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/test_suite/astero_gyre/make/makefile b/astero/test_suite/astero_gyre/make/makefile
deleted file mode 100644
index 60c717c09..000000000
--- a/astero/test_suite/astero_gyre/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/test_suite/astero_gyre/mk b/astero/test_suite/astero_gyre/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/test_suite/astero_gyre/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/test_suite/astero_gyre/re b/astero/test_suite/astero_gyre/re
index 7fd60020a..7093783a3 100755
--- a/astero/test_suite/astero_gyre/re
+++ b/astero/test_suite/astero_gyre/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/astero_gyre/rn1 b/astero/test_suite/astero_gyre/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/astero/test_suite/astero_gyre/rn1
+++ b/astero/test_suite/astero_gyre/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/each_test_compile b/astero/test_suite/each_test_compile
index a7c6aab18..33ec9bb16 100755
--- a/astero/test_suite/each_test_compile
+++ b/astero/test_suite/each_test_compile
@@ -13,8 +13,8 @@ if [ "$DO_ALL" == 1 ] || [ "$curr_id" == "$id" ] ; then
cd "$1" || return
echo "clean $1"
- ./clean
- ./mk
+ make clean
+ make
check_okay
cd ..
fi
diff --git a/astero/test_suite/example_astero/Makefile b/astero/test_suite/example_astero/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/astero/test_suite/example_astero/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/astero/test_suite/example_astero/clean b/astero/test_suite/example_astero/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/test_suite/example_astero/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/test_suite/example_astero/make/makefile b/astero/test_suite/example_astero/make/makefile
deleted file mode 100644
index 60c717c09..000000000
--- a/astero/test_suite/example_astero/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/test_suite/example_astero/mk b/astero/test_suite/example_astero/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/test_suite/example_astero/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/test_suite/example_astero/re b/astero/test_suite/example_astero/re
index 7fd60020a..7093783a3 100755
--- a/astero/test_suite/example_astero/re
+++ b/astero/test_suite/example_astero/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/example_astero/rn1 b/astero/test_suite/example_astero/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/astero/test_suite/example_astero/rn1
+++ b/astero/test_suite/example_astero/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/fast_from_file/Makefile b/astero/test_suite/fast_from_file/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/astero/test_suite/fast_from_file/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/astero/test_suite/fast_from_file/clean b/astero/test_suite/fast_from_file/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/test_suite/fast_from_file/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/test_suite/fast_from_file/make/makefile b/astero/test_suite/fast_from_file/make/makefile
deleted file mode 100644
index 60c717c09..000000000
--- a/astero/test_suite/fast_from_file/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/test_suite/fast_from_file/mk b/astero/test_suite/fast_from_file/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/test_suite/fast_from_file/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/test_suite/fast_from_file/re b/astero/test_suite/fast_from_file/re
index e3f36a106..7093783a3 100755
--- a/astero/test_suite/fast_from_file/re
+++ b/astero/test_suite/fast_from_file/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/fast_from_file/rn1 b/astero/test_suite/fast_from_file/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/astero/test_suite/fast_from_file/rn1
+++ b/astero/test_suite/fast_from_file/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/fast_newuoa/Makefile b/astero/test_suite/fast_newuoa/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/astero/test_suite/fast_newuoa/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/astero/test_suite/fast_newuoa/clean b/astero/test_suite/fast_newuoa/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/test_suite/fast_newuoa/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/test_suite/fast_newuoa/make/makefile b/astero/test_suite/fast_newuoa/make/makefile
deleted file mode 100644
index 60c717c09..000000000
--- a/astero/test_suite/fast_newuoa/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/test_suite/fast_newuoa/mk b/astero/test_suite/fast_newuoa/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/test_suite/fast_newuoa/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/test_suite/fast_newuoa/re b/astero/test_suite/fast_newuoa/re
index e3f36a106..7093783a3 100755
--- a/astero/test_suite/fast_newuoa/re
+++ b/astero/test_suite/fast_newuoa/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/fast_newuoa/rn1 b/astero/test_suite/fast_newuoa/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/astero/test_suite/fast_newuoa/rn1
+++ b/astero/test_suite/fast_newuoa/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/fast_scan_grid/Makefile b/astero/test_suite/fast_scan_grid/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/astero/test_suite/fast_scan_grid/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/astero/test_suite/fast_scan_grid/clean b/astero/test_suite/fast_scan_grid/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/test_suite/fast_scan_grid/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/test_suite/fast_scan_grid/make/makefile b/astero/test_suite/fast_scan_grid/make/makefile
deleted file mode 100644
index 60c717c09..000000000
--- a/astero/test_suite/fast_scan_grid/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/test_suite/fast_scan_grid/mk b/astero/test_suite/fast_scan_grid/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/test_suite/fast_scan_grid/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/test_suite/fast_scan_grid/re b/astero/test_suite/fast_scan_grid/re
index e3f36a106..7093783a3 100755
--- a/astero/test_suite/fast_scan_grid/re
+++ b/astero/test_suite/fast_scan_grid/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/fast_scan_grid/rn1 b/astero/test_suite/fast_scan_grid/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/astero/test_suite/fast_scan_grid/rn1
+++ b/astero/test_suite/fast_scan_grid/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/fast_simplex/Makefile b/astero/test_suite/fast_simplex/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/astero/test_suite/fast_simplex/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/astero/test_suite/fast_simplex/clean b/astero/test_suite/fast_simplex/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/test_suite/fast_simplex/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/test_suite/fast_simplex/make/makefile b/astero/test_suite/fast_simplex/make/makefile
deleted file mode 100644
index 60c717c09..000000000
--- a/astero/test_suite/fast_simplex/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/test_suite/fast_simplex/mk b/astero/test_suite/fast_simplex/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/test_suite/fast_simplex/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/test_suite/fast_simplex/re b/astero/test_suite/fast_simplex/re
index e3f36a106..7093783a3 100755
--- a/astero/test_suite/fast_simplex/re
+++ b/astero/test_suite/fast_simplex/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/fast_simplex/rn1 b/astero/test_suite/fast_simplex/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/astero/test_suite/fast_simplex/rn1
+++ b/astero/test_suite/fast_simplex/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/surface_effects/Makefile b/astero/test_suite/surface_effects/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/astero/test_suite/surface_effects/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/astero/test_suite/surface_effects/clean b/astero/test_suite/surface_effects/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/test_suite/surface_effects/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/test_suite/surface_effects/make/makefile b/astero/test_suite/surface_effects/make/makefile
deleted file mode 100644
index 60c717c09..000000000
--- a/astero/test_suite/surface_effects/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/test_suite/surface_effects/mk b/astero/test_suite/surface_effects/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/test_suite/surface_effects/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/test_suite/surface_effects/re b/astero/test_suite/surface_effects/re
index 7fd60020a..7093783a3 100755
--- a/astero/test_suite/surface_effects/re
+++ b/astero/test_suite/surface_effects/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/test_suite/surface_effects/rn1 b/astero/test_suite/surface_effects/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/astero/test_suite/surface_effects/rn1
+++ b/astero/test_suite/surface_effects/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/work/Makefile b/astero/work/Makefile
new file mode 100644
index 000000000..a9df6ba96
--- /dev/null
+++ b/astero/work/Makefile
@@ -0,0 +1,19 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+ src/run_star_extras.f90 \
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/astero/work/clean b/astero/work/clean
deleted file mode 100755
index 87aefd84b..000000000
--- a/astero/work/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/bash
-
-cd make
-make clean
diff --git a/astero/work/make/makefile b/astero/work/make/makefile
deleted file mode 100644
index ef9fb1c40..000000000
--- a/astero/work/make/makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-ifeq ($(MESA_DIR),)
-ifeq ($($MESA_DIR_INTENTIONALLY_EMPTY),)
- $(error MESA_DIR environment variable is not set)
-endif
-endif
-
-include $(MESA_DIR)/astero/makefile
diff --git a/astero/work/mk b/astero/work/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/astero/work/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/astero/work/re b/astero/work/re
index 7fd60020a..7093783a3 100755
--- a/astero/work/re
+++ b/astero/work/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/astero/work/rn b/astero/work/rn
index 25a1a7b16..f4ce7695f 100755
--- a/astero/work/rn
+++ b/astero/work/rn
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/atm/Makefile b/atm/Makefile
new file mode 100644
index 000000000..dfe6a30d4
--- /dev/null
+++ b/atm/Makefile
@@ -0,0 +1,33 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := atm
+SRCS := public/atm_def.f90 \
+ public/atm_lib.f90 \
+ private/atm_t_tau_uniform.f90 \
+ private/atm_t_tau_varying.f90 \
+ private/atm_t_tau_relations.f90 \
+ private/atm_irradiated.f90 \
+ private/atm_table.f90 \
+ private/atm_utils.f90 \
+ private/table_atm.f90
+SRCS_CHECK = test/src/test_atm.f90 test/src/test_atm_setup.f90 test/src/test_atm_support.f90
+INTERNAL_DEPENDS_ON := const math utils chem num auto_diff interp_1d interp_2d eos kap
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := atm_def.mod atm_lib.mod
+INSTALL_INCLUDES :=
+EXTRACT_DATA_COMMANDS += install-atm-data
+
+include $(MAKE_DIR)/Makefile
+
+install-atm-data:
+ mkdir -p ../data/atm_data && cp atm_data/* ../data/atm_data
diff --git a/atm/build_and_test b/atm/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/atm/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/atm/build_and_test_parallel b/atm/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/atm/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/atm/build_data_and_export b/atm/build_data_and_export
deleted file mode 100755
index a8bd34d5e..000000000
--- a/atm/build_data_and_export
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-cd atm_data
-check_okay
-cd ..
-
-./export_data
-check_okay
diff --git a/atm/clean b/atm/clean
deleted file mode 100755
index b6c78afc7..000000000
--- a/atm/clean
+++ /dev/null
@@ -1,3 +0,0 @@
-cd make; make clean
-cd ../preprocessor; ./clean
-cd ../test/make; make clean
diff --git a/atm/export b/atm/export
deleted file mode 100755
index db3250885..000000000
--- a/atm/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/atm/export_data b/atm/export_data
deleted file mode 100755
index c9ddeb5c8..000000000
--- a/atm/export_data
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-rm -rf ../data/atm_data
-check_okay
-mkdir ../data/atm_data
-check_okay
-cp atm_data/* ../data/atm_data
-check_okay
diff --git a/atm/i1 b/atm/i1
deleted file mode 100755
index 6ca43fc78..000000000
--- a/atm/i1
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/i1 && \
-./i1_preprocessor
diff --git a/atm/i1_preprocessor b/atm/i1_preprocessor
deleted file mode 100755
index 4b15f6b0a..000000000
--- a/atm/i1_preprocessor
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "build FAILED"
- echo
- exit 1
- fi
-}
-
-cd preprocessor/make
-make all
-check_okay
-cd ../..
-
diff --git a/atm/i1p b/atm/i1p
deleted file mode 100755
index 9923ee852..000000000
--- a/atm/i1p
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/i1p && \
-./i1_preprocessor
diff --git a/atm/make/makefile b/atm/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/atm/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/atm/make/makefile_base b/atm/make/makefile_base
deleted file mode 100644
index fab82d45b..000000000
--- a/atm/make/makefile_base
+++ /dev/null
@@ -1,128 +0,0 @@
-# This is the makefile for the mesa atm library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- atm_def.f90 \
- atm_lib.f90 \
- atm_t_tau_uniform.f90 \
- atm_t_tau_varying.f90 \
- atm_t_tau_relations.f90 \
- atm_irradiated.f90 \
- atm_table.f90 \
- atm_utils.f90 \
- table_atm.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = eos kap chem $(LIBS_MESA_NUMERICS)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lkap -lchem $(LOAD_MESA_NUMERICS)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libatm.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) atm_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) atm_lib.mod $(MESA_DIR)/include
-ifneq (,$(findstring ifort,$(FC)))
- @$(CP_IF_NEWER) atm_utils.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) atm_t_tau_uniform.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) atm_t_tau_varying.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) atm_t_tau_relations.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) atm_table.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) atm_irradiated.mod $(MESA_DIR)/include
-endif
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY)
-#COMPILE = $(COMPILE_TO_TEST)
-
-#COMPILE = $(COMPILE_NO_OPENMP_NO_OPT)
-
-COMPILE_CMD = $(COMPILE) $(FCfree)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.dek $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/atm/mk b/atm/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/atm/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/atm/preprocessor/Makefile b/atm/preprocessor/Makefile
new file mode 100644
index 000000000..f03094977
--- /dev/null
+++ b/atm/preprocessor/Makefile
@@ -0,0 +1,16 @@
+bt-settl-create ck-read plot table-create table-merge tau100-create wd-tau25-create:
+ $(MAKE) --no-print-directory -f $@.mk
+
+all: ck-read plot table-create table-merge tau100-create wd-tau25-create
+
+clean:
+ $(MAKE) --no-print-directory -f ck-read.mk clean
+ $(MAKE) --no-print-directory -f table-create.mk clean
+ $(MAKE) --no-print-directory -f table-merge.mk clean
+ $(MAKE) --no-print-directory -f tau100-create.mk clean
+ $(MAKE) --no-print-directory -f wd-tau25-create.mk clean
+ $(MAKE) --no-print-directory -f plot.mk clean
+ $(MAKE) --no-print-directory -f bt-settl-create.mk clean
+
+.DEFAULT_GOAL = all
+.PHONY: all clean gen-data bt-settl-create ck-read plot table-create table-merge tau100-create wd-tau25-create
diff --git a/atm/preprocessor/bt-settl-create.mk b/atm/preprocessor/bt-settl-create.mk
new file mode 100644
index 000000000..687abef6e
--- /dev/null
+++ b/atm/preprocessor/bt-settl-create.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := atm-bt-settl-create
+SRCS := src/create_BT_Settl.f90
+INTERNAL_DEPENDS_ON := const math chem num
+INCLUDE_DIRS := -Isrc
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/atm/preprocessor/ck-read.mk b/atm/preprocessor/ck-read.mk
new file mode 100644
index 000000000..587895d43
--- /dev/null
+++ b/atm/preprocessor/ck-read.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := atm-ck-read
+SRCS := src/ckread.f90
+INTERNAL_DEPENDS_ON := const
+INCLUDE_DIRS := -Isrc
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/atm/preprocessor/clean b/atm/preprocessor/clean
deleted file mode 100755
index 87ba205e0..000000000
--- a/atm/preprocessor/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-rm -f ckread table_merge create_table_atm
-cd make; make clean
diff --git a/atm/preprocessor/make/makefile b/atm/preprocessor/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/atm/preprocessor/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/atm/preprocessor/make/makefile_base b/atm/preprocessor/make/makefile_base
deleted file mode 100644
index 04a58880a..000000000
--- a/atm/preprocessor/make/makefile_base
+++ /dev/null
@@ -1,135 +0,0 @@
-# This is the makefile for the mesa atm preprocessor
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-CREATE_TABLE_SRCS = create_table_atm.f90
-
-CREATE_TAU100_SRCS = create_tau100.f90 $(DEPS_LOCAL) $(DEPS_OTHER)
-
-MAKE_BT_SRCS = create_BT_Settl.f90
-
-MAKE_WD_SRCS = create_wd_tau25.f90
-
-PLOT_SRCS = plot.f90
-
-CKREAD_SRCS = ckread.f90
-
-MERGE_SRCS = table_merge.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_CONST = const
-DEPS_LOCAL = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_CONST))
-LOAD_LOCAL = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_CONST))
-
-LIBS_LOCAL = atm
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = eos kap chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lkap -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-
-# STEP 3: build
-
-CREATE_TABLE = ../create_table_atm
-CREATE_TAU100 = ../create_tau100
-MAKE_BT = ../make_BT_Settl
-MAKE_WD = ../make_wd_tau25
-PLOT = ../plotter
-CKREAD = ../ckread
-MERGE = ../table_merge
-
-CREATE_TABLE_OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(CREATE_TABLE_SRCS)))
-CREATE_TAU100_OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(CREATE_TAU100_SRCS)))
-MAKE_BT_OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(MAKE_BT_SRCS)))
-MAKE_WD_OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(MAKE_WD_SRCS)))
-PLOT_OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(PLOT_SRCS)))
-CKREAD_OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(CKREAD_SRCS)))
-MERGE_OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(MERGE_SRCS)))
-
-all : $(CREATE_TABLE) $(CREATE_TAU100) $(MAKE_WD) $(PLOT) $(CKREAD) $(MERGE)
-
-$(CREATE_TABLE) : $(CREATE_TABLE_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(CREATE_TAU100) : $(CREATE_TAU100_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(MAKE_BT) : $(MAKE_BT_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(MAKE_WD) : $(MAKE_WD_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(PLOT) : $(PLOT_OBJS) $(DEPS_CONST)
-$(CKREAD) : $(CKREAD_OBJS) $(DEPS_CONST)
-$(MERGE) : $(MERGE_OBJS) $(DEPS_CONST)
-
-$(CREATE_TABLE) $(CREATE_TAU100) $(MAKE_BT) $(MAKE_WD) :
-ifneq ($(QUIET),)
- @echo FC $@
- @$(FC) $(FCopenmp) -o $@ $< $(LOAD_LOCAL) $(LOAD_OTHER)
-else
- $(FC) $(FCopenmp) -o $@ $< $(LOAD_LOCAL) $(LOAD_OTHER)
-endif
-
-$(PLOT) $(CKREAD) $(MERGE) :
-ifneq ($(QUIET),)
- @echo FC $@
- @$(FC) $(FCopenmp) -o $@ $< $(LOAD_CONST)
-else
- $(FC) $(FCopenmp) -o $@ $< $(LOAD_CONST)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(CREATE_TABLE) $(CREATE_TAU100) \
- $(MAKE_BT) $(MAKE_WD) $(PLOT) $(CKREAD) $(MERGE)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-INCLUDES = -I$(MESA_DIR)/include
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) -O${OPT_LEVEL} $(FCfree) $(FCchecks) $<
-else
- $(TEST_COMPILE) -O${OPT_LEVEL} $(FCfree) $(FCchecks) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/atm/preprocessor/mk b/atm/preprocessor/mk
deleted file mode 100755
index d2c3b3280..000000000
--- a/atm/preprocessor/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make all
diff --git a/atm/preprocessor/plot.mk b/atm/preprocessor/plot.mk
new file mode 100644
index 000000000..3984b7c00
--- /dev/null
+++ b/atm/preprocessor/plot.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := atm-plot
+SRCS := src/plot.f90
+INTERNAL_DEPENDS_ON := const utils
+INCLUDE_DIRS := -Isrc
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/atm/preprocessor/src/create_table_atm.f90 b/atm/preprocessor/src/create_table_atm.f90
index bc217dafd..bea0db681 100644
--- a/atm/preprocessor/src/create_table_atm.f90
+++ b/atm/preprocessor/src/create_table_atm.f90
@@ -51,9 +51,9 @@ program create_table_atm
integer :: ierr, i_Teff, i_logg
character(len=256) :: clogZ, output_file, ctau_base
logical, parameter :: use_cache = .true.
- real(dp) :: M, R, L, X, Y, Z, XC, XN, XO, XNe, XMg, abar, zbar, z2bar, z53bar, kap, err
- real(dp) :: Pextra_factor, Teff, lnP, lnT, tau_base, Teff_out, ye
- real(dp) :: dabar_dx(num_isos), dzbar_dx(num_isos), Xsun, Ysun, Zsun, logZ
+ real(dp) :: M, R, L, X, Y, Z, XC, XN, XO, XNe, XMg, abar, zbar, z2bar, z53bar, kap
+ real(dp) :: Pextra_factor, lnP, lnT, tau_base
+ real(dp) :: Xsun, Ysun, Zsun, logZ
real(dp) :: dlnT_dL, dlnT_dlnR, dlnT_dlnM, dlnT_dlnkap
real(dp) :: dlnP_dL, dlnP_dlnR, dlnP_dlnm, dlnP_dlnkap, Xbbn, Ybbn
real(dp) :: logg_array(num_logg), Teff_array(num_Teff)
@@ -106,7 +106,7 @@ program create_table_atm
call atm_eval_T_tau_uniform( &
tau_base, L, R, M, standard_cgrav, 0.2d0*(1 + X), Pextra_factor, &
ATM_T_TAU_EDDINGTON, eos_proc, kap_proc, errtol, max_iters, .TRUE., &
- Teff, kap, &
+ Teff_array(i_Teff), kap, &
lnT, dlnT_dL, dlnT_dlnR, dlnT_dlnM, dlnT_dlnkap, &
lnP, dlnP_dL, dlnP_dlnR, dlnP_dlnM, dlnP_dlnkap, &
ierr)
@@ -143,6 +143,8 @@ subroutine mesa_init
call const_init(' ', ierr)
if (ierr /= 0) call mesa_error(__FILE__, __LINE__)
+ call math_init()
+
call chem_init('isotopes.data', ierr)
if (ierr /= 0) call mesa_error(__FILE__, __LINE__)
diff --git a/atm/preprocessor/src/create_tau100.f90 b/atm/preprocessor/src/create_tau100.f90
index 00f3a1253..dd44917dc 100644
--- a/atm/preprocessor/src/create_tau100.f90
+++ b/atm/preprocessor/src/create_tau100.f90
@@ -57,13 +57,12 @@ subroutine build_tau_tables
integer, pointer :: chem_id(:), net_iso(:)
real(dp), pointer :: xa(:)
- integer :: i, j, k, ierr, i_Teff, i_logg, logg_i_lo, logg_i_hi, &
- io_out1, io_out2, io, ii, jj
+ integer :: i, j, ierr, io_out1, io_out2, io, ii, jj
include 'tau100_Ts.dek'
character(len=256) :: filename
integer, parameter :: ng = 13, nT = num_tau100_Ts, num_layers = 50
- real(dp) :: loggs(ng), Teffs(nT), vals(num_layers), jnk1, jnk2
- real(dp) :: T(ng, nT), Pgas(ng, nT), logT(ng, nT), logPgas(ng, nT)
+ real(dp) :: loggs(ng), Teffs(nT), vals(num_layers)
+ real(dp) :: T(ng, nT), Pgas(ng, nT)
real(dp) :: logT_plot(nT, ng), logPgas_plot(nT, ng)
real(dp) :: X, Y, Z, XC, XN, XO, XNe, XMg, abar, zbar, z2bar, z53bar, logg, Teff
integer, parameter :: nt_for_CK = 76, max_ng_for_CK = 11
@@ -492,7 +491,7 @@ subroutine eval1_Ttau(logg, Teff, Pgas, T, ierr)
integer, intent(out) :: ierr
integer :: iters
- real(dp) :: M, R, L, Teff_out, kap, err, Pextra_factor
+ real(dp) :: M, R, L, Teff_out, kap, Pextra_factor
real(dp) :: lnT, dlnT_dL, dlnT_dlnR, dlnT_dlnM, dlnT_dlnkap
real(dp) :: lnP, dlnP_dL, dlnP_dlnR, dlnP_dlnm, dlnP_dlnkap
@@ -525,8 +524,7 @@ end subroutine eval1_Ttau
subroutine set_table_composition()
integer :: i
- real(dp) :: dabar_dx(num_isos), dzbar_dx(num_isos), ye, sumx, &
- xh, xhe, xz, approx_abar, approx_zbar, mass_correction
+ real(dp) :: ye, sumx, xh, xhe, xz, mass_correction
real(dp), parameter :: &
Xbbn = 0.75d0, &
Ybbn = 0.25d0, &
diff --git a/atm/preprocessor/src/nextgen.f90 b/atm/preprocessor/src/nextgen.f90
deleted file mode 100644
index 150b051f6..000000000
--- a/atm/preprocessor/src/nextgen.f90
+++ /dev/null
@@ -1,191 +0,0 @@
-
-! ***********************************************************************
-!
-! Copyright (C) 2010 Bill Paxton & The MESA Team
-!
-! This program is free software: you can redistribute it and/or modify
-! it under the terms of the GNU Lesser General Public License
-! as published by the Free Software Foundation,
-! either version 3 of the License, or (at your option) any later version.
-!
-! This program is distributed in the hope that it will be useful,
-! but WITHOUT ANY WARRANTY; without even the implied warranty of
-! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-! See the GNU Lesser General Public License for more details.
-!
-! You should have received a copy of the GNU Lesser General Public License
-! along with this program. If not, see .
-!
-! ***********************************************************************
-
-module nextgen_support
-
- implicit none
-
- integer, parameter :: table100_version = 2
- character(len=64) :: f_output, head_phx
-
-contains
-
- subroutine make_nextgen
-
- character(len=256) :: filename
-
- integer, parameter :: ng = 5, nT = 46
-
- integer :: i, iT, j, io, ierr
- integer :: T2s(nT), ibound(ng)
- real(dp) :: loggs(ng)
- integer, parameter :: n = 50
- integer :: layers, k
- real(dp) :: vals(n)
- real(dp), dimension(ng, nT) :: &
- T, Pgas, Pe, logT, logPgas, logPe, Psum, logPsum
-
- logical, parameter :: write_plot_files = .false.
-
- logical, parameter :: dbg = .false.
-
- head_phx = '#[Z/Z_SOLAR]= 0.00 [A/Fe]= 0.0 GN93' ! for now
-
- i = 0
- do iT = 21, 40
- i = i + 1
- T2s(i) = iT
- end do
- do iT = 42, 86, 2
- i = i + 1
- T2s(i) = iT
- end do
- do iT = 90, 98, 4
- i = i + 1
- T2s(i) = iT
- end do
- if (i /= nT) then
- write (*, *) 'bad i for Ts', i
- call mesa_error(__FILE__, __LINE__)
- end if
-
- loggs(:) = [3.5d0, 4d0, 4.5d0, 5d0, 5.5d0]
- ibound(:) = nT
-
- io = 33
- ierr = 0
-
- do i = 1, ng
- do j = 1, nT
- write (filename, '(a,i2,a,f3.1,a)') &
- 'atm_input_data/NextGen_solar/lte', T2s(j), '-', loggs(i), '-0.0.NextGen.20'
- write (*, *) trim(filename)
- open (io, file=trim(filename), action='read', status='old', iostat=ierr)
- if (ierr /= 0) then
- write (*, *) 'failed to open '//trim(filename)
- call mesa_error(__FILE__, __LINE__)
- end if
- call read_nextgen(i, j)
- close (io)
- end do
- write (*, *)
- end do
-
- if (write_plot_files) then
-
- open (io, file='plot_nextgen/logT.data', action='write')
- write (io, '(e20.10)') logT(:, :)
- close (io)
-
- open (io, file='plot_nextgen/logPgas.data', action='write')
- write (io, '(e20.10)') logPgas(:, :)
- close (io)
-
- open (io, file='plot_nextgen/logPe.data', action='write')
- write (io, '(e20.10)') logPe(:, :)
- close (io)
-
- open (io, file='plot_nextgen/logPsum.data', action='write')
- write (io, '(e20.10)') logPsum(:, :)
- close (io)
-
- open (io, file='plot_nextgen/Teff.data', action='write')
- write (io, '(e20.10)') T2s(:)*1d2
- close (io)
-
- open (io, file='plot_nextgen/logg.data', action='write')
- write (io, '(e20.10)') loggs(:)
- close (io)
-
- end if
-
- !write out combined table
- f_output = 'atm_data/100_Zp00.tbl'
- open (io, file=f_output)
- write (io, '("Table Version",i4)') table100_version
- write (io, '(a40,a15,20i4)') head_phx, '| VALID RANGE: ', ibound
- write (io, '("#Teff(K)| Pgas@")', advance='no')
- call write_logg_header
- do i = 1, nT
- write (io, '(1p,20e15.7)') 1d2*T2s(i), Psum(:, i)
- end do
- write (io, '("#Teff(K)| T@")', advance='no')
- call write_logg_header
- do i = 1, nT
- write (io, '(1p,20e15.7)') 1d2*T2s(i), T(:, i)
- end do
- close (io)
-
- contains
-
- subroutine write_logg_header
- do i = 1, ng
- write (io, '(" log g =",f5.2," ")', advance='no') loggs(i)
- end do
- write (io, *)
- end subroutine write_logg_header
-
- subroutine read_nextgen(i, j)
- integer, intent(in) :: i, j
- read (io, *)
- read (io, '(i5)') layers
- if (layers /= n) then
- write (*, *) 'layers /= n', i, j, layers
- call mesa_error(__FILE__, __LINE__)
- end if
- call read_vals(.false.) ! tau
- call read_vals(.false.) ! temperature
- T(i, j) = vals(n)
- logT(i, j) = log10(T(i, j))
- call read_vals(.true.) ! flxrad
- call read_vals(.true.) ! terad
- call read_vals(.true.) ! bkmean
- call read_vals(.true.) ! jkmean
- call read_vals(.true.) ! fkmean
- call read_vals(.true.) ! rkmean
- call read_vals(.true.) ! pgas
- Pgas(i, j) = vals(n)
- logPgas(i, j) = log10(Pgas(i, j))
- call read_vals(.true.) ! pe
- Pe(i, j) = vals(n)
- logPe(i, j) = log10(Pe(i, j))
- Psum(i, j) = Pgas(i, j) + Pe(i, j)
- logPsum(i, j) = log10(Psum(i, j))
- end subroutine read_nextgen
-
- subroutine read_vals(skip)
- logical, intent(in) :: skip
- include 'tau100_T2s.dek'
- if (skip) read (io, *) ! skip line
- do k = 1, 16
- read (io, *) vals(1 + (k - 1)*3:k*3)
- end do
- read (io, *) vals(49:50)
- end subroutine read_vals
-
- end subroutine make_nextgen
-
-end module nextgen_support
-
-program nextgen
- use nextgen_support
- implicit none
- call make_nextgen
-end program nextgen
diff --git a/atm/preprocessor/src/plot.f90 b/atm/preprocessor/src/plot.f90
index 6cfbfd235..4ae6cf4f2 100644
--- a/atm/preprocessor/src/plot.f90
+++ b/atm/preprocessor/src/plot.f90
@@ -37,7 +37,7 @@ subroutine make_plot_files
real(dp) :: Teff_array(nT), logg_array(ng), Teff_bound(ng)
real(dp) :: logZ(nZ), alphaFe(nZ), Pgas(ng, nT, nZ)
real(dp) :: Teff_tmp(nT), logg_tmp(ng)
- integer :: ierr, iounit, i, j, ii, jj, ibound_tmp(ng), nZ_tmp, nT_tmp, ng_tmp, &
+ integer :: ierr, iounit, i, j, ibound_tmp(ng), nZ_tmp, nT_tmp, ng_tmp, &
tmp_version(nZ), ibound(ng, nZ), iZ, text_file_version
real(dp), parameter :: Pfill = 1d2 !used for interpolation in filling missing values
diff --git a/atm/preprocessor/table-create.mk b/atm/preprocessor/table-create.mk
new file mode 100644
index 000000000..91da5a7c8
--- /dev/null
+++ b/atm/preprocessor/table-create.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := atm-table-create
+SRCS := src/create_table_atm.f90
+INTERNAL_DEPENDS_ON := const utils math kap eos chem atm
+INCLUDE_DIRS := -Isrc
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/atm/preprocessor/table-merge.mk b/atm/preprocessor/table-merge.mk
new file mode 100644
index 000000000..b4603539e
--- /dev/null
+++ b/atm/preprocessor/table-merge.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := atm-table-merge
+SRCS := src/table_merge.f90
+INTERNAL_DEPENDS_ON := const
+INCLUDE_DIRS := -Isrc
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/atm/preprocessor/tau100-create.mk b/atm/preprocessor/tau100-create.mk
new file mode 100644
index 000000000..ed857e893
--- /dev/null
+++ b/atm/preprocessor/tau100-create.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := atm-tau100-create
+SRCS := src/create_tau100.f90
+INTERNAL_DEPENDS_ON := const utils math kap eos chem atm
+INCLUDE_DIRS := -Isrc
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/atm/preprocessor/wd-tau25-create.mk b/atm/preprocessor/wd-tau25-create.mk
new file mode 100644
index 000000000..efd4bc535
--- /dev/null
+++ b/atm/preprocessor/wd-tau25-create.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := atm-wd-tau25-create
+SRCS := src/create_wd_tau25.f90
+INTERNAL_DEPENDS_ON := const utils
+INCLUDE_DIRS := -Isrc
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/atm/test/ck b/atm/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/atm/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/atm/test/clean b/atm/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/atm/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/atm/test/cleanup b/atm/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/atm/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/atm/test/export b/atm/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/atm/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/atm/test/make/makefile b/atm/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/atm/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/atm/test/make/makefile_base b/atm/test/make/makefile_base
deleted file mode 100644
index 306213c98..000000000
--- a/atm/test/make/makefile_base
+++ /dev/null
@@ -1,100 +0,0 @@
-# This is the makefile for testing the mesa atm library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-COMMON_SRCS = test_atm_support.f90 test_atm_setup.f90
-
-TEST_SRCS = $(COMMON_SRCS) test_atm.f90
-
-TESTQ_SRCS = $(COMMON_SRCS) test_atm_quietly.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = atm
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = eos kap chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lkap -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-TESTQ = $(TEST_DIR)/test_quietly
-
-TEST_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TEST_SRCS)))
-TESTQ_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TESTQ_SRCS)))
-
-all : $(TEST) $(TEST_QUIETLY) $(TESTQ)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(TESTQ) : $(TESTQ_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-$(TESTQ) : OBJS = $(TESTQ_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST) $(TESTQ)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) -O${OPT_LEVEL} $(FCfree) $<
-else
- $(TEST_COMPILE) -O${OPT_LEVEL} $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/atm/test/mk b/atm/test/mk
deleted file mode 100755
index c3bff0981..000000000
--- a/atm/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make all
diff --git a/atm/test/mkx b/atm/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/atm/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/atm/test/rn b/atm/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/atm/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/atm/test/src/test_atm_quietly.f90 b/atm/test/src/test_atm_quietly.f90
deleted file mode 100644
index 86e288708..000000000
--- a/atm/test/src/test_atm_quietly.f90
+++ /dev/null
@@ -1,15 +0,0 @@
-program test_atm_quietly
-
- use const_def, only: dp
- use test_atm_setup, only: setup
- use test_atm_support, only: do_test_atm, &
- test_verbosely, cgrav, eos_handle, kap_handle
-
- implicit none
-
- call setup
- test_verbosely = .false.
-
- call do_test_atm(test_verbosely, cgrav, eos_handle, kap_handle)
-
-end program test_atm_quietly
diff --git a/auto_diff/Makefile b/auto_diff/Makefile
new file mode 100644
index 000000000..28c164037
--- /dev/null
+++ b/auto_diff/Makefile
@@ -0,0 +1,30 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := auto_diff
+SRCS := public/auto_diff.f90 \
+ private/auto_diff_real_15var_order1_module.f90 \
+ private/auto_diff_real_1var_order1_module.f90 \
+ private/auto_diff_real_2var_order1_module.f90 \
+ private/auto_diff_real_2var_order2_module.f90 \
+ private/auto_diff_real_2var_order3_module.f90 \
+ private/auto_diff_real_4var_order1_module.f90 \
+ private/auto_diff_real_star_order1_module.f90 \
+ private/auto_diff_real_tdc_module.f90 \
+ private/support_functions.f90
+SRCS_CHECK := test/src/test_auto_diff.f90
+INTERNAL_DEPENDS_ON := const utils math
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := auto_diff.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/auto_diff/build_and_test b/auto_diff/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/auto_diff/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/auto_diff/build_and_test_parallel b/auto_diff/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/auto_diff/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/auto_diff/clean b/auto_diff/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/auto_diff/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/auto_diff/export b/auto_diff/export
deleted file mode 100755
index db3250885..000000000
--- a/auto_diff/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/auto_diff/i1 b/auto_diff/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/auto_diff/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/auto_diff/i1p b/auto_diff/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/auto_diff/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/auto_diff/make/makefile b/auto_diff/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/auto_diff/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/auto_diff/make/makefile_base b/auto_diff/make/makefile_base
deleted file mode 100644
index fc0e326a6..000000000
--- a/auto_diff/make/makefile_base
+++ /dev/null
@@ -1,113 +0,0 @@
-# This is the makefile for the mesa library for automatic differentiation
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCE FILES
-
-SRCS = $(subst ../private/,,$(wildcard ../private/*.f90)) auto_diff.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MATRIX)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libauto_diff.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) auto_diff.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-ifneq (,$(findstring ifort,$(FC)))
- @$(CP_IF_NEWER) auto_diff_*.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) support_functions.mod $(MESA_DIR)/include
-endif
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPULATION RULES
-
-COMPILE_LEGACY = $(filter-out -std=f2008, $(COMPILE_TO_DEPLOY))
-
-COMPILE = $(COMPILE_LEGACY) $(FCfixed)
-
-COMPILE_FREE = $(COMPILE_LEGACY) $(FCfree)
-
-#COMPILE_XTRA = $(COMPILE_NO_CHECKS) $(FCfixed) -c
-COMPILE_XTRA = $(COMPILE_BASIC) $(FCopt) $(FCfixed) -c
-
-COMPILE_LEGACY_XTRA = $(filter-out -std=f2008, $(COMPILE_XTRA)) -std=legacy
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_FREE $<
- @$(COMPILE_FREE) $<
-else
- $(COMPILE_FREE) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.dek $(SRC_PATH)
-vpath %.inc $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/auto_diff/make/mkb b/auto_diff/make/mkb
deleted file mode 100644
index 6990c89e4..000000000
--- a/auto_diff/make/mkb
+++ /dev/null
@@ -1,99 +0,0 @@
-# This is the makefile for the mesa const package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = support_functions.f90 diff_operators_base.f90 $(wildcard ../private/*.f90) auto_diff.f90
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER =
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR_SUPPORT)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libauto_diff.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS)
-else
- $(LIB_TOOL) $(LIB) $(OBJS)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) auto_diff.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/auto_diff/make/mod_list.txt b/auto_diff/make/mod_list.txt
deleted file mode 100644
index 280e65e90..000000000
--- a/auto_diff/make/mod_list.txt
+++ /dev/null
@@ -1 +0,0 @@
-auto_diff_2vars_2order.mod auto_diff_2vars_3order.mod auto_diff_3vars_2order.mod auto_diff_3vars_3order.mod
\ No newline at end of file
diff --git a/auto_diff/make/source_list.txt b/auto_diff/make/source_list.txt
deleted file mode 100644
index d876114e4..000000000
--- a/auto_diff/make/source_list.txt
+++ /dev/null
@@ -1 +0,0 @@
-support_functions.f90 auto_diff_real_2var_order2.f90 auto_diff_real_4var_order1.f90 auto_diff_real_tdc.f90 auto_diff_real_1var_order1.f90 auto_diff_real_2var_order1.f90 auto_diff_real_star_order1.f90 auto_diff_real_2var_order3.f90 auto_diff.f90
\ No newline at end of file
diff --git a/auto_diff/mk b/auto_diff/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/auto_diff/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/auto_diff/test/ck b/auto_diff/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/auto_diff/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/auto_diff/test/clean b/auto_diff/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/auto_diff/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/auto_diff/test/cleanup b/auto_diff/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/auto_diff/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/auto_diff/test/export b/auto_diff/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/auto_diff/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/auto_diff/test/make/makefile b/auto_diff/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/auto_diff/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/auto_diff/test/make/makefile_base b/auto_diff/test/make/makefile_base
deleted file mode 100644
index 5ceb15f58..000000000
--- a/auto_diff/test/make/makefile_base
+++ /dev/null
@@ -1,86 +0,0 @@
-# This is the makefile for testing the mesa auto_diff package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_auto_diff.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = auto_diff
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) -lauto_diff
-
-LIBS_OTHER = $(LIBS_MATRIX)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -ggdb -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -ggdb -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(TEST_SRC_DIR)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/auto_diff/test/mk b/auto_diff/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/auto_diff/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/auto_diff/test/mkx b/auto_diff/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/auto_diff/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/auto_diff/test/rn b/auto_diff/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/auto_diff/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/binary/Makefile b/binary/Makefile
new file mode 100644
index 000000000..6ece62f7d
--- /dev/null
+++ b/binary/Makefile
@@ -0,0 +1,79 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := binary
+SRCS := \
+ public/binary_pgbinary.f90 \
+ public/binary_def.f90 \
+ private/binary_private_def.f90 \
+ private/binary_utils.f90 \
+ private/binary_photos.f90 \
+ private/binary_jdot.f90 \
+ private/binary_wind.f90 \
+ private/binary_mdot.f90 \
+ private/binary_tides.f90 \
+ private/binary_edot.f90 \
+ private/binary_ctrls_io.f90 \
+ private/binary_irradiation.f90 \
+ private/binary_history_specs.f90 \
+ private/binary_history.f90 \
+ private/binary_evolve.f90 \
+ private/binary_timestep.f90\
+ private/binary_ce.f90\
+ private/binary_job_ctrls_io.f90\
+ private/binary_do_one_utils.f90\
+ private/run_binary_support.f90 \
+ public/binary_lib.f90 \
+ other/mod_other_rlo_mdot.f90 \
+ other/mod_other_tsync.f90 \
+ other/mod_other_sync_spin_to_orbit.f90 \
+ other/mod_other_mdot_edd.f90 \
+ other/mod_other_adjust_mdots.f90 \
+ other/mod_other_accreted_material_j.f90 \
+ other/mod_other_binary_jdot.f90 \
+ other/mod_other_binary_wind_transfer.f90 \
+ other/mod_other_binary_edot.f90 \
+ other/mod_other_binary_ce.f90 \
+ other/mod_other_implicit_rlo.f90 \
+ other/mod_other_binary_extras.f90 \
+ other/mod_other_binary_photo_read.f90 \
+ other/mod_other_binary_photo_write.f90 \
+ other/mod_other_e2.f90 \
+ other/mod_other_pgbinary_plots.f90 \
+ other/pgbinary_decorator.f90
+
+ifeq ($(WITH_PGSTAR),yes)
+SRCS += \
+ private/pgbinary_support.f90 \
+ private/pgbinary_ctrls_io.f90 \
+ private/pgbinary_summary.f90 \
+ private/pgbinary_summary_history.f90 \
+ private/pgbinary_hist_track.f90 \
+ private/pgbinary_history_panels.f90 \
+ private/pgbinary_orbit.f90 \
+ private/pgbinary_star.f90 \
+ private/pgbinary_grid.f90 \
+ private/pgbinary_lib.f90 \
+ private/pgbinary_full.f90
+EXTERNAL_DEPENDS_ON := pgplot
+else
+SRCS += private/pgstar_stub.f90
+EXTERNAL_DEPENDS_ON :=
+endif
+
+SRCS_CHECK = test/src/test_binary.f90
+INTERNAL_DEPENDS_ON := const utils math net interp_1d chem rates num star_data star
+BINTYPE := static-lib
+INCLUDE_DIRS := -Iprivate -Ipublic -Idefaults
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := binary_lib.mod binary_def.mod binary_pgbinary.mod
+INSTALL_INCLUDES := job/binary_test_suite_extras.inc job/binary_test_suite_extras_def.inc
+
+include $(MAKE_DIR)/Makefile
diff --git a/binary/build_and_test b/binary/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/binary/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/binary/build_and_test_parallel b/binary/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/binary/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/binary/clean b/binary/clean
deleted file mode 100755
index e71485281..000000000
--- a/binary/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make; make clean
-cd ../test/make; make clean
diff --git a/binary/export b/binary/export
deleted file mode 100755
index db3250885..000000000
--- a/binary/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/binary/i1 b/binary/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/binary/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/binary/i1p b/binary/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/binary/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/binary/install b/binary/install
deleted file mode 100755
index 9026e932d..000000000
--- a/binary/install
+++ /dev/null
@@ -1,8 +0,0 @@
-./build_and_test
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-echo "export"
-./export
-echo "done"
\ No newline at end of file
diff --git a/binary/make/makefile b/binary/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/binary/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/binary/make/makefile_base b/binary/make/makefile_base
deleted file mode 100644
index e5f5f6e75..000000000
--- a/binary/make/makefile_base
+++ /dev/null
@@ -1,186 +0,0 @@
-# This is the makefile for the mesa binary library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCE FILES
-
-ifeq ($(USE_PGSTAR),YES)
- PGSTAR_SRCS = \
- pgbinary_decorator.f90 \
- pgbinary_support.f90 \
- pgbinary_ctrls_io.f90 \
- pgbinary_summary.f90 \
- pgbinary_summary_history.f90 \
- pgbinary_hist_track.f90 \
- pgbinary_history_panels.f90 \
- pgbinary_orbit.f90 \
- pgbinary_star.f90 \
- pgbinary_grid.f90 \
- pgbinary_lib.f90 \
- pgbinary.f90
- ifneq ($(MAKECMDGOALS),clean)
- $(shell ln -sf $(MOD_PRIVATE_DIR)/pgbinary_full.f90 pgbinary.f90)
- endif
-else
- PGSTAR_SRCS = pgbinary.f90 pgbinary_decorator.f90
- ifneq ($(MAKECMDGOALS),clean)
- $(shell ln -sf $(MOD_PRIVATE_DIR)/pgbinary_stub.f90 pgbinary.f90)
- endif
-endif
-
-
-SRCS = \
- binary_pgbinary.f90\
- binary_def.f90 \
- binary_private_def.f90 \
- binary_utils.f90 \
- binary_photos.f90 \
- binary_jdot.f90 \
- binary_wind.f90 \
- binary_mdot.f90 \
- binary_tides.f90 \
- binary_edot.f90 \
- binary_ctrls_io.f90 \
- binary_irradiation.f90 \
- binary_history_specs.f90 \
- binary_history.f90 \
- binary_evolve.f90 \
- binary_timestep.f90\
- binary_ce.f90\
- binary_job_ctrls_io.f90\
- binary_do_one_utils.f90\
- run_binary_support.f90 \
- binary_lib.f90 \
- $(PGSTAR_SRCS) \
- mod_other_rlo_mdot.f90 \
- mod_other_tsync.f90 \
- mod_other_sync_spin_to_orbit.f90 \
- mod_other_mdot_edd.f90 \
- mod_other_adjust_mdots.f90 \
- mod_other_accreted_material_j.f90 \
- mod_other_binary_jdot.f90 \
- mod_other_binary_wind_transfer.f90 \
- mod_other_binary_edot.f90 \
- mod_other_binary_ce.f90 \
- mod_other_implicit_rlo.f90 \
- mod_other_binary_extras.f90 \
- mod_other_binary_photo_read.f90 \
- mod_other_binary_photo_write.f90 \
- mod_other_e2.f90 \
- mod_other_pgbinary_plots.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MESA_STAR)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR)
-
-ifeq ($(USE_PGSTAR), YES)
- LOAD_OTHER += $(LOAD_PGPLOT)
-endif
-
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libbinary.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod *.f90
-
-install:
- @$(CP_IF_NEWER) binary_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) binary_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) binary_pgbinary.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
- @$(CP_IF_NEWER) ../job/*.inc $(MESA_DIR)/include
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-MOD_DEFAULTS_DIR = $(MODULE_DIR)/defaults
-MOD_OTHER_DIR = $(MODULE_DIR)/other
-
-BINARY_INCLUDES = -I$(MOD_DEFAULTS_DIR)
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree) $(BINARY_INCLUDES)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR):$(MOD_OTHER_DIR)
-
-vpath %.f90 $(SRC_PATH)
-vpath %.inc $(SRC_PATH)
-vpath %.defaults $(MOD_DEFAULTS_DIR)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- DEPEND_DIRS = .:$(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR):$(MOD_DEFAULTS_DIR):$(MOD_JOB_DIR):$(MOD_OTHER_DIR)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/binary/mk b/binary/mk
deleted file mode 100755
index e98ec1713..000000000
--- a/binary/mk
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-cd make; make
diff --git a/binary/other/mod_other_accreted_material_j.f90 b/binary/other/mod_other_accreted_material_j.f90
index 4fe500f18..3afe02aab 100644
--- a/binary/other/mod_other_accreted_material_j.f90
+++ b/binary/other/mod_other_accreted_material_j.f90
@@ -41,7 +41,7 @@ module mod_other_accreted_material_j
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_adjust_mdots.f90 b/binary/other/mod_other_adjust_mdots.f90
index 415b04e78..be6ba360d 100644
--- a/binary/other/mod_other_adjust_mdots.f90
+++ b/binary/other/mod_other_adjust_mdots.f90
@@ -41,7 +41,7 @@ module mod_other_adjust_mdots
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_binary_ce.f90 b/binary/other/mod_other_binary_ce.f90
index a4c4a5bac..46ab2edda 100644
--- a/binary/other/mod_other_binary_ce.f90
+++ b/binary/other/mod_other_binary_ce.f90
@@ -41,7 +41,7 @@ module mod_other_binary_ce
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_binary_edot.f90 b/binary/other/mod_other_binary_edot.f90
index f7c42126f..0e13485e4 100644
--- a/binary/other/mod_other_binary_edot.f90
+++ b/binary/other/mod_other_binary_edot.f90
@@ -45,7 +45,7 @@ module mod_other_binary_edot
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_binary_jdot.f90 b/binary/other/mod_other_binary_jdot.f90
index b408aa816..9d3cd492f 100644
--- a/binary/other/mod_other_binary_jdot.f90
+++ b/binary/other/mod_other_binary_jdot.f90
@@ -45,7 +45,7 @@ module mod_other_binary_jdot
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_jdot
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_binary_wind_transfer.f90 b/binary/other/mod_other_binary_wind_transfer.f90
index e6c3e526f..1057570af 100644
--- a/binary/other/mod_other_binary_wind_transfer.f90
+++ b/binary/other/mod_other_binary_wind_transfer.f90
@@ -41,7 +41,7 @@ module mod_other_binary_wind_transfer
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_implicit_rlo.f90 b/binary/other/mod_other_implicit_rlo.f90
index 9156c90be..2f63f3be8 100644
--- a/binary/other/mod_other_implicit_rlo.f90
+++ b/binary/other/mod_other_implicit_rlo.f90
@@ -42,7 +42,7 @@ module mod_other_implicit_rlo
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_mdot_edd.f90 b/binary/other/mod_other_mdot_edd.f90
index cf610d18c..48fdaa26f 100644
--- a/binary/other/mod_other_mdot_edd.f90
+++ b/binary/other/mod_other_mdot_edd.f90
@@ -41,7 +41,7 @@ module mod_other_mdot_edd
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_rlo_mdot.f90 b/binary/other/mod_other_rlo_mdot.f90
index 07786fce1..bd10cda7c 100644
--- a/binary/other/mod_other_rlo_mdot.f90
+++ b/binary/other/mod_other_rlo_mdot.f90
@@ -41,7 +41,7 @@ module mod_other_rlo_mdot
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_sync_spin_to_orbit.f90 b/binary/other/mod_other_sync_spin_to_orbit.f90
index 0312af485..72c5baf99 100644
--- a/binary/other/mod_other_sync_spin_to_orbit.f90
+++ b/binary/other/mod_other_sync_spin_to_orbit.f90
@@ -41,7 +41,7 @@ module mod_other_sync_spin_to_orbit
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/other/mod_other_tsync.f90 b/binary/other/mod_other_tsync.f90
index 1caf8d9cd..dcfeeeb0b 100644
--- a/binary/other/mod_other_tsync.f90
+++ b/binary/other/mod_other_tsync.f90
@@ -41,7 +41,7 @@ module mod_other_tsync
! write(*,*) 'hello from extra_binary_controls'
! end subroutine extras_binary_controls
-! then, in your work directory, do ./mk and ./rn to check that it is okay.
+! then, in your work directory, do ./rn to check that it is okay.
! assuming that worked, now edit extra_binary_controls to set the procedure pointer to other_wind_transfer
! subroutine extras_binary_controls(binary_id, ierr)
diff --git a/binary/test/ck b/binary/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/binary/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/binary/test/clean b/binary/test/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test/cleanup b/binary/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/binary/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/binary/test/export b/binary/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/binary/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/binary/test/make/makefile b/binary/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/binary/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/binary/test/make/makefile_base b/binary/test/make/makefile_base
deleted file mode 100644
index 63082ade9..000000000
--- a/binary/test/make/makefile_base
+++ /dev/null
@@ -1,95 +0,0 @@
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_binary.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = binary
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = $(LIBS_MESA_STAR)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo FC $@
- @$(FC) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(FC) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $<
-else
- $(TEST_COMPILE) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f $(SRC_PATH)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/binary/test/mk b/binary/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/binary/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/binary/test/mkx b/binary/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/binary/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/binary/test/rn b/binary/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/binary/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/binary/test_suite/double_bh/Makefile b/binary/test_suite/double_bh/Makefile
new file mode 100644
index 000000000..3ba05d7fd
--- /dev/null
+++ b/binary/test_suite/double_bh/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/binary/work/Makefile
\ No newline at end of file
diff --git a/binary/test_suite/double_bh/clean b/binary/test_suite/double_bh/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test_suite/double_bh/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test_suite/double_bh/make/makefile b/binary/test_suite/double_bh/make/makefile
deleted file mode 100644
index 6a2056899..000000000
--- a/binary/test_suite/double_bh/make/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-STAR= binary
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/test_suite/double_bh/mk b/binary/test_suite/double_bh/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/test_suite/double_bh/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/test_suite/double_bh/re b/binary/test_suite/double_bh/re
index a004e4e36..f65987522 100755
--- a/binary/test_suite/double_bh/re
+++ b/binary/test_suite/double_bh/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/double_bh/rn1 b/binary/test_suite/double_bh/rn1
index 59cb24dc5..fcfc31730 100755
--- a/binary/test_suite/double_bh/rn1
+++ b/binary/test_suite/double_bh/rn1
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/each_test_compile b/binary/test_suite/each_test_compile
index a7c6aab18..33ec9bb16 100755
--- a/binary/test_suite/each_test_compile
+++ b/binary/test_suite/each_test_compile
@@ -13,8 +13,8 @@ if [ "$DO_ALL" == 1 ] || [ "$curr_id" == "$id" ] ; then
cd "$1" || return
echo "clean $1"
- ./clean
- ./mk
+ make clean
+ make
check_okay
cd ..
fi
diff --git a/binary/test_suite/evolve_both_stars/Makefile b/binary/test_suite/evolve_both_stars/Makefile
new file mode 100644
index 000000000..3ba05d7fd
--- /dev/null
+++ b/binary/test_suite/evolve_both_stars/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/binary/work/Makefile
\ No newline at end of file
diff --git a/binary/test_suite/evolve_both_stars/clean b/binary/test_suite/evolve_both_stars/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test_suite/evolve_both_stars/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test_suite/evolve_both_stars/make/makefile b/binary/test_suite/evolve_both_stars/make/makefile
deleted file mode 100644
index 6a2056899..000000000
--- a/binary/test_suite/evolve_both_stars/make/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-STAR= binary
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/test_suite/evolve_both_stars/mk b/binary/test_suite/evolve_both_stars/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/test_suite/evolve_both_stars/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/test_suite/evolve_both_stars/re b/binary/test_suite/evolve_both_stars/re
index a004e4e36..f65987522 100755
--- a/binary/test_suite/evolve_both_stars/re
+++ b/binary/test_suite/evolve_both_stars/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/evolve_both_stars/rn1 b/binary/test_suite/evolve_both_stars/rn1
index 59cb24dc5..fcfc31730 100755
--- a/binary/test_suite/evolve_both_stars/rn1
+++ b/binary/test_suite/evolve_both_stars/rn1
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/jdot_gr_check/Makefile b/binary/test_suite/jdot_gr_check/Makefile
new file mode 100644
index 000000000..3ba05d7fd
--- /dev/null
+++ b/binary/test_suite/jdot_gr_check/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/binary/work/Makefile
\ No newline at end of file
diff --git a/binary/test_suite/jdot_gr_check/clean b/binary/test_suite/jdot_gr_check/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test_suite/jdot_gr_check/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test_suite/jdot_gr_check/make/makefile b/binary/test_suite/jdot_gr_check/make/makefile
deleted file mode 100644
index 6a2056899..000000000
--- a/binary/test_suite/jdot_gr_check/make/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-STAR= binary
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/test_suite/jdot_gr_check/mk b/binary/test_suite/jdot_gr_check/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/test_suite/jdot_gr_check/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/test_suite/jdot_gr_check/re b/binary/test_suite/jdot_gr_check/re
index a004e4e36..f65987522 100755
--- a/binary/test_suite/jdot_gr_check/re
+++ b/binary/test_suite/jdot_gr_check/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/jdot_gr_check/rn1 b/binary/test_suite/jdot_gr_check/rn1
index 59cb24dc5..fcfc31730 100755
--- a/binary/test_suite/jdot_gr_check/rn1
+++ b/binary/test_suite/jdot_gr_check/rn1
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/jdot_ls_check/Makefile b/binary/test_suite/jdot_ls_check/Makefile
new file mode 100644
index 000000000..3ba05d7fd
--- /dev/null
+++ b/binary/test_suite/jdot_ls_check/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/binary/work/Makefile
\ No newline at end of file
diff --git a/binary/test_suite/jdot_ls_check/clean b/binary/test_suite/jdot_ls_check/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test_suite/jdot_ls_check/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test_suite/jdot_ls_check/make/makefile b/binary/test_suite/jdot_ls_check/make/makefile
deleted file mode 100644
index 6a2056899..000000000
--- a/binary/test_suite/jdot_ls_check/make/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-STAR= binary
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/test_suite/jdot_ls_check/mk b/binary/test_suite/jdot_ls_check/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/test_suite/jdot_ls_check/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/test_suite/jdot_ls_check/re b/binary/test_suite/jdot_ls_check/re
index a004e4e36..f65987522 100755
--- a/binary/test_suite/jdot_ls_check/re
+++ b/binary/test_suite/jdot_ls_check/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/jdot_ls_check/rn1 b/binary/test_suite/jdot_ls_check/rn1
index 59cb24dc5..fcfc31730 100755
--- a/binary/test_suite/jdot_ls_check/rn1
+++ b/binary/test_suite/jdot_ls_check/rn1
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/jdot_ml_check/Makefile b/binary/test_suite/jdot_ml_check/Makefile
new file mode 100644
index 000000000..3ba05d7fd
--- /dev/null
+++ b/binary/test_suite/jdot_ml_check/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/binary/work/Makefile
\ No newline at end of file
diff --git a/binary/test_suite/jdot_ml_check/clean b/binary/test_suite/jdot_ml_check/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test_suite/jdot_ml_check/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test_suite/jdot_ml_check/make/makefile b/binary/test_suite/jdot_ml_check/make/makefile
deleted file mode 100644
index 6a2056899..000000000
--- a/binary/test_suite/jdot_ml_check/make/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-STAR= binary
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/test_suite/jdot_ml_check/mk b/binary/test_suite/jdot_ml_check/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/test_suite/jdot_ml_check/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/test_suite/jdot_ml_check/re b/binary/test_suite/jdot_ml_check/re
index a004e4e36..f65987522 100755
--- a/binary/test_suite/jdot_ml_check/re
+++ b/binary/test_suite/jdot_ml_check/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/jdot_ml_check/rn1 b/binary/test_suite/jdot_ml_check/rn1
index 59cb24dc5..fcfc31730 100755
--- a/binary/test_suite/jdot_ml_check/rn1
+++ b/binary/test_suite/jdot_ml_check/rn1
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/star_plus_point_mass/Makefile b/binary/test_suite/star_plus_point_mass/Makefile
new file mode 100644
index 000000000..3ba05d7fd
--- /dev/null
+++ b/binary/test_suite/star_plus_point_mass/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/binary/work/Makefile
\ No newline at end of file
diff --git a/binary/test_suite/star_plus_point_mass/clean b/binary/test_suite/star_plus_point_mass/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test_suite/star_plus_point_mass/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test_suite/star_plus_point_mass/make/makefile b/binary/test_suite/star_plus_point_mass/make/makefile
deleted file mode 100644
index 6a2056899..000000000
--- a/binary/test_suite/star_plus_point_mass/make/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-STAR= binary
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/test_suite/star_plus_point_mass/mk b/binary/test_suite/star_plus_point_mass/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/test_suite/star_plus_point_mass/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/test_suite/star_plus_point_mass/re b/binary/test_suite/star_plus_point_mass/re
index a004e4e36..f65987522 100755
--- a/binary/test_suite/star_plus_point_mass/re
+++ b/binary/test_suite/star_plus_point_mass/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/star_plus_point_mass/rn1 b/binary/test_suite/star_plus_point_mass/rn1
index 59cb24dc5..fcfc31730 100755
--- a/binary/test_suite/star_plus_point_mass/rn1
+++ b/binary/test_suite/star_plus_point_mass/rn1
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/star_plus_point_mass_explicit_mdot/Makefile b/binary/test_suite/star_plus_point_mass_explicit_mdot/Makefile
new file mode 100644
index 000000000..3ba05d7fd
--- /dev/null
+++ b/binary/test_suite/star_plus_point_mass_explicit_mdot/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/binary/work/Makefile
\ No newline at end of file
diff --git a/binary/test_suite/star_plus_point_mass_explicit_mdot/clean b/binary/test_suite/star_plus_point_mass_explicit_mdot/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test_suite/star_plus_point_mass_explicit_mdot/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test_suite/star_plus_point_mass_explicit_mdot/make/makefile b/binary/test_suite/star_plus_point_mass_explicit_mdot/make/makefile
deleted file mode 100644
index 6a2056899..000000000
--- a/binary/test_suite/star_plus_point_mass_explicit_mdot/make/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-STAR= binary
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/test_suite/star_plus_point_mass_explicit_mdot/mk b/binary/test_suite/star_plus_point_mass_explicit_mdot/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/test_suite/star_plus_point_mass_explicit_mdot/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/test_suite/star_plus_point_mass_explicit_mdot/re b/binary/test_suite/star_plus_point_mass_explicit_mdot/re
index a004e4e36..f65987522 100755
--- a/binary/test_suite/star_plus_point_mass_explicit_mdot/re
+++ b/binary/test_suite/star_plus_point_mass_explicit_mdot/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/star_plus_point_mass_explicit_mdot/rn1 b/binary/test_suite/star_plus_point_mass_explicit_mdot/rn1
index 59cb24dc5..fcfc31730 100755
--- a/binary/test_suite/star_plus_point_mass_explicit_mdot/rn1
+++ b/binary/test_suite/star_plus_point_mass_explicit_mdot/rn1
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/wind_fed_bhhmxb/Makefile b/binary/test_suite/wind_fed_bhhmxb/Makefile
new file mode 100644
index 000000000..3ba05d7fd
--- /dev/null
+++ b/binary/test_suite/wind_fed_bhhmxb/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/binary/work/Makefile
\ No newline at end of file
diff --git a/binary/test_suite/wind_fed_bhhmxb/clean b/binary/test_suite/wind_fed_bhhmxb/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/test_suite/wind_fed_bhhmxb/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/test_suite/wind_fed_bhhmxb/make/makefile b/binary/test_suite/wind_fed_bhhmxb/make/makefile
deleted file mode 100644
index 6a2056899..000000000
--- a/binary/test_suite/wind_fed_bhhmxb/make/makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-STAR= binary
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/test_suite/wind_fed_bhhmxb/mk b/binary/test_suite/wind_fed_bhhmxb/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/test_suite/wind_fed_bhhmxb/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/test_suite/wind_fed_bhhmxb/re b/binary/test_suite/wind_fed_bhhmxb/re
index a004e4e36..f65987522 100755
--- a/binary/test_suite/wind_fed_bhhmxb/re
+++ b/binary/test_suite/wind_fed_bhhmxb/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/test_suite/wind_fed_bhhmxb/rn1 b/binary/test_suite/wind_fed_bhhmxb/rn1
index 59cb24dc5..fcfc31730 100755
--- a/binary/test_suite/wind_fed_bhhmxb/rn1
+++ b/binary/test_suite/wind_fed_bhhmxb/rn1
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/work/Makefile b/binary/work/Makefile
new file mode 100644
index 000000000..5ac476637
--- /dev/null
+++ b/binary/work/Makefile
@@ -0,0 +1,21 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := binary
+SRCS := \
+ src/binary_run.f90 \
+ src/run_star_extras.f90 \
+ src/run_binary_extras.f90 \
+ $(MESA_DIR)/binary/job/run_binary.f90
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/binary/work/clean b/binary/work/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/binary/work/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/binary/work/make/makefile b/binary/work/make/makefile
deleted file mode 100644
index a9680333a..000000000
--- a/binary/work/make/makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-ifeq ($(MESA_DIR),)
-ifeq ($($MESA_DIR_INTENTIONALLY_EMPTY),)
- $(error MESA_DIR environment variable is not set)
-endif
-endif
-
-include $(MESA_DIR)/binary/work_standard_makefile_binary
diff --git a/binary/work/mk b/binary/work/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/binary/work/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/binary/work/re b/binary/work/re
index a004e4e36..f65987522 100755
--- a/binary/work/re
+++ b/binary/work/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -25,6 +25,4 @@ fi
echo "restart from $photo"
echo "$photo" > .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/work/rn b/binary/work/rn
index 59cb24dc5..fcfc31730 100755
--- a/binary/work/rn
+++ b/binary/work/rn
@@ -2,6 +2,4 @@
rm -f .restart
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./binary
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/binary/work_standard_makefile_binary b/binary/work_standard_makefile_binary
deleted file mode 100755
index bc28b7bd5..000000000
--- a/binary/work_standard_makefile_binary
+++ /dev/null
@@ -1,68 +0,0 @@
-# work_standard_makefile for mesa/binary
-
-# change this as necessary. see utils/makefile_header for definitions.
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_BINARY) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = binary
-endif
-
-# BINARY_WORK_OBJS defined in makefile_header
-OBJS = $(BINARY_WORK_OBJS) binary_run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-BINARY_JOB_DIR = $(MESA_DIR)/binary/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-# STAR_WORK_OBJS
-
-ifeq ($(MESA_CONTRIB_DIR),)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) -I $(MESA_CONTRIB_DIR)/hooks $<
-endif
-
-run_star.o: $(STAR_JOB_DIR)/run_star.f90
- $(WORK_COMPILE) $<
-
-# NOTE: we don't use work/src/run.f
-
-
-# BINARY_WORK_OBJS
-
-binary_run.o: $(WORK_SRC_DIR)/binary_run.f90
- $(WORK_COMPILE) $<
-
-ifeq ($(MESA_CONTRIB_DIR),)
-run_binary_extras.o: $(WORK_SRC_DIR)/run_binary_extras.f90
- $(WORK_COMPILE) $<
-else
-run_binary_extras.o: $(WORK_SRC_DIR)/run_binary_extras.f90
- $(WORK_COMPILE) -I $(MESA_CONTRIB_DIR)/hooks $<
-endif
-
-run_binary.o: $(BINARY_JOB_DIR)/run_binary.f90
- $(WORK_COMPILE) $<
-
-
-clean:
- -@rm -f *.o *.mod *.smod $(WORK_DIR)/$(STAR)
-
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/chem/Makefile b/chem/Makefile
new file mode 100644
index 000000000..bc6a8757e
--- /dev/null
+++ b/chem/Makefile
@@ -0,0 +1,29 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := chem
+SRCS := public/chem_def.f90 \
+ public/chem_lib.f90 \
+ private/chem_isos_io.f90 \
+ private/lodders_mod.f90 \
+ private/nuclide_set_mod.f90
+SRCS_CHECK := test/src/test_chem.f90
+INTERNAL_DEPENDS_ON := const utils math
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := chem_def.mod chem_lib.mod
+INSTALL_INCLUDES :=
+EXTRACT_DATA_COMMANDS += install-chem-data
+
+include $(MAKE_DIR)/Makefile
+
+install-chem-data:
+ mkdir -p ../data/chem_data && cp data/* ../data/chem_data
diff --git a/chem/build_and_test b/chem/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/chem/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/chem/build_and_test_parallel b/chem/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/chem/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/chem/build_data_and_export b/chem/build_data_and_export
deleted file mode 100755
index e731f35b4..000000000
--- a/chem/build_data_and_export
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-echo 'create chem_data'
-
-rm -rf ../data/chem_data
-check_okay
-
-mkdir ../data/chem_data
-check_okay
-
-cp data/* ../data/chem_data
-check_okay
diff --git a/chem/clean b/chem/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/chem/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/chem/export b/chem/export
deleted file mode 100755
index db3250885..000000000
--- a/chem/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/chem/i1 b/chem/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/chem/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/chem/i1p b/chem/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/chem/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/chem/make/makefile b/chem/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/chem/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/chem/make/makefile_base b/chem/make/makefile_base
deleted file mode 100644
index e4e7dc7c1..000000000
--- a/chem/make/makefile_base
+++ /dev/null
@@ -1,115 +0,0 @@
-# This is the makefile for the mesa chem package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- chem_def.f90 \
- nuclide_set_mod.f90 \
- chem_isos_io.f90 \
- lodders_mod.f90 \
- chem_lib.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = interp_1d num $(LIBS_MATRIX)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_NUMERICS)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libchem.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) chem_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) chem_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-
-COMPILE_FIXED = $(COMPILE_TO_DEPLOY) $(FCfixed)
-#COMPILE_FIXED = $(COMPILE_TO_TEST) $(FCfixed)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -m %m.mod -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -m %m.mod -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/chem/mk b/chem/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/chem/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/chem/preprocessor/Makefile b/chem/preprocessor/Makefile
new file mode 100644
index 000000000..f775dd626
--- /dev/null
+++ b/chem/preprocessor/Makefile
@@ -0,0 +1,26 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := chem-preprocessor
+SRCS := src/chem_support.f90 \
+ src/create_table.f90
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON := const utils math chem
+EXTERNAL_DEPENDS_ON :=
+CHECK_RESULTS_GOLDEN :=
+INCLUDE_DIRS := -Isrc
+
+# Install
+
+MODULES :=
+INSTALL_INCLUDES :=
+BINTYPE := executable
+
+include ../../make/Makefile
+
+$(BUILD_DIR_MODULE)/chem-out/isotopes.data: $(OBJ_OUT) inlist chem_input_data.tar.xz | $(BUILD_DIR_MODULE)/chem-out/ $(BUILD_DIR_MODULE)/chem-input/
+ rm -rf $(BUILD_DIR_MODULE)/chem-input/*
+ tar -xf chem_input_data.tar.xz --strip-components=1 -C $(BUILD_DIR_MODULE)/chem-input/
+ $(OBJ_OUT) inlist
+
+process-data: $(BUILD_DIR_MODULE)/chem-out/isotopes.data
+ cp $^ ../data
diff --git a/chem/preprocessor/build_for_export b/chem/preprocessor/build_for_export
deleted file mode 100755
index 2715478ed..000000000
--- a/chem/preprocessor/build_for_export
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-cp data/chem_data/isotopes.data ../data/isotopes.data
-
-
-echo "**************"
-echo "**************"
-echo "next step is"
-echo "cd .. ; ./build_data_and_export"
-echo "**************"
-echo "**************"
diff --git a/chem/preprocessor/clean b/chem/preprocessor/clean
deleted file mode 100755
index 2698dfecc..000000000
--- a/chem/preprocessor/clean
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
-cd ..
-
-rm -rf cchem data
-
diff --git a/chem/preprocessor/inlist b/chem/preprocessor/inlist
index 48c6f55eb..a3e740d4b 100644
--- a/chem/preprocessor/inlist
+++ b/chem/preprocessor/inlist
@@ -1,15 +1,15 @@
&chem
! directories
- data_dir = 'chem_input_data'
- output_dir = 'data/chem_data'
-
+ data_dir = '../../build/chem-preprocessor/chem-input'
+ output_dir = '../../build/chem-preprocessor/chem-out'
+
! input files
masstable_filename = 'masslib_library_5.data'
winvn_filename = 'winvne_v2.data'
-
+
! header information
masstable_header_length = 15
winvn_header_length = 4
number_nuclides = 7853
-
+
/
diff --git a/chem/preprocessor/make/makefile b/chem/preprocessor/make/makefile
deleted file mode 100644
index 63b3b9bbc..000000000
--- a/chem/preprocessor/make/makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-# This is the makefile for creating the program that builds the chem table
-
-PACKAGE_DIR = ../..
-MESA_DIR = ../../..
-
-#################################################################
-
-# STEP 1: get the standard compiler setup
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-
-# STEP 2: info about the libraries
-
-OTHER_LIBS_DIR = $(MESA_DIR)/lib
-INCLUDES = -I$(MESA_DIR)/include
-LOAD_OTHER_LIBS = -L$(OTHER_LIBS_DIR) $(LOAD_MESA_NUMERICS)
-
-#################################################################
-
-# STEP 3: build it
-
-OBJS = chem_support.o
-
-CCHEM = cchem
-
-all : $(CCHEM)
-
-$(CCHEM) : $(OBJS) create_table.o
- $(LOADER) $(FCopenmp) -o ../$(CCHEM) $(OBJS) create_table.o \
- $(LOAD_OTHER_LIBS)
-
-#################################################################
-
-SRC_DIR = ../src
-
-#COMPILE = $(COMPILE_NO_CHECKS)
-COMPILE = $(COMPILE_TO_TEST)
-
-%.o: $(SRC_DIR)/%.f90
- $(COMPILE) $(FCfree) $<
-
-clean:
- -@rm -f *.o *.mod ../$(CCHEM)
-
diff --git a/chem/preprocessor/mk b/chem/preprocessor/mk
deleted file mode 100755
index 4557054f7..000000000
--- a/chem/preprocessor/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-if [ ! -d chem_input_data ]
-then
- echo
- echo 'unpacking chem input data'
- echo
- tar Jxf chem_input_data.tar.xz
-fi
-
-echo
-echo 'builiding preprocessor'
-echo
-cd make
-make
diff --git a/chem/preprocessor/rebuild_all b/chem/preprocessor/rebuild_all
deleted file mode 100755
index ffd4e57c4..000000000
--- a/chem/preprocessor/rebuild_all
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-function do_one {
- echo "using" $1
- echo
- check_okay
- ./rn $1
- check_okay
- echo "done"
- echo
-}
-
-mkdir -p data/chem_data
-
-rm -f data/chem_data/*.data
-rm -f data/chem_data.tar.xz
-
-./mk
-check_okay
-do_one inlist
-check_okay
-
-echo "**************"
-echo "**************"
-echo "next step is"
-echo "./build_for_export"
-echo "**************"
-echo "**************"
diff --git a/chem/preprocessor/rn b/chem/preprocessor/rn
deleted file mode 100755
index d317939ed..000000000
--- a/chem/preprocessor/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./cchem "$1"
diff --git a/chem/test/ck b/chem/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/chem/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/chem/test/clean b/chem/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/chem/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/chem/test/cleanup b/chem/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/chem/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/chem/test/export b/chem/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/chem/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/chem/test/make/makefile b/chem/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/chem/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/chem/test/make/makefile_base b/chem/test/make/makefile_base
deleted file mode 100644
index 36d926f00..000000000
--- a/chem/test/make/makefile_base
+++ /dev/null
@@ -1,86 +0,0 @@
-# This is the makefile for testing the mesa chem package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_chem.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = chem
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = interp_1d num $(LIBS_MATRIX)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.smod *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/chem/test/mk b/chem/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/chem/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/chem/test/mkx b/chem/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/chem/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/chem/test/rn b/chem/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/chem/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/colors/Makefile b/colors/Makefile
new file mode 100644
index 000000000..2402173ac
--- /dev/null
+++ b/colors/Makefile
@@ -0,0 +1,27 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := colors
+SRCS := public/colors_def.f90 \
+ public/colors_lib.f90 \
+ private/mod_colors.f90
+SRCS_CHECK := test/src/test_colors.f90
+INTERNAL_DEPENDS_ON := const utils math
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := colors_def.mod colors_lib.mod
+INSTALL_INCLUDES :=
+EXTRACT_DATA_COMMANDS += install-colors-data
+
+include $(MAKE_DIR)/Makefile
+
+install-colors-data:
+ mkdir -p ../data/colors_data && cp data/lcb98cor.dat data/blackbody_johnson.dat ../data/colors_data
diff --git a/colors/build_and_test b/colors/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/colors/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/colors/build_and_test_parallel b/colors/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/colors/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/colors/build_data_and_export b/colors/build_data_and_export
deleted file mode 100755
index dc55085fc..000000000
--- a/colors/build_data_and_export
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-
-mkdir -p data
-cd data
-check_okay
-cd ..
-
-rm -rf ../data/colors_data
-check_okay
-mkdir ../data/colors_data
-check_okay
-cp data/lcb98cor.dat ../data/colors_data
-cp data/blackbody_johnson.dat ../data/colors_data
-check_okay
-echo "done"
-
-cd ..
diff --git a/colors/clean b/colors/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/colors/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/colors/export b/colors/export
deleted file mode 100755
index db3250885..000000000
--- a/colors/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/colors/i1 b/colors/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/colors/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/colors/i1p b/colors/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/colors/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/colors/make/makefile b/colors/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/colors/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/colors/make/makefile_base b/colors/make/makefile_base
deleted file mode 100644
index 42c792533..000000000
--- a/colors/make/makefile_base
+++ /dev/null
@@ -1,109 +0,0 @@
-# This is the makefile for the mesa colors package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- colors_def.f90 \
- mod_colors.f90 \
- colors_lib.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MATRIX)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libcolors.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) colors_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) colors_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/colors/mk b/colors/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/colors/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/colors/test/ck b/colors/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/colors/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/colors/test/clean b/colors/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/colors/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/colors/test/cleanup b/colors/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/colors/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/colors/test/export b/colors/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/colors/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/colors/test/make/makefile b/colors/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/colors/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/colors/test/make/makefile_base b/colors/test/make/makefile_base
deleted file mode 100644
index c8a5b0cb2..000000000
--- a/colors/test/make/makefile_base
+++ /dev/null
@@ -1,87 +0,0 @@
-# This is the makefile for testing the mesa colors package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_colors.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = colors
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = $(LIBS_MATRIX)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FC_free_preprocess) $<
-else
- $(TEST_COMPILE) $(FC_free_preprocess) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
-
diff --git a/colors/test/mk b/colors/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/colors/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/colors/test/mkx b/colors/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/colors/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/colors/test/rn b/colors/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/colors/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/const/Makefile b/const/Makefile
new file mode 100644
index 000000000..f49a1ef52
--- /dev/null
+++ b/const/Makefile
@@ -0,0 +1,21 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := const
+SRCS := public/const_def.f90 public/const_lib.f90
+SRCS_CHECK := test/src/test_const.f90
+INTERNAL_DEPENDS_ON :=
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := const_def.mod const_lib.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/const/build_and_test b/const/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/const/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/const/build_and_test_parallel b/const/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/const/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/const/clean b/const/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/const/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/const/export b/const/export
deleted file mode 100755
index db3250885..000000000
--- a/const/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/const/i1 b/const/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/const/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/const/i1p b/const/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/const/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/const/make/makefile b/const/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/const/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/const/make/makefile_base b/const/make/makefile_base
deleted file mode 100644
index 7743caff0..000000000
--- a/const/make/makefile_base
+++ /dev/null
@@ -1,96 +0,0 @@
-# This is the makefile for the mesa const package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- const_def.f90 \
- const_lib.f90
-
-#################################################################
-#
-# TARGETS
-
-LIB = libconst.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS)
-else
- $(LIB_TOOL) $(LIB) $(OBJS)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) const_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) const_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/const/mk b/const/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/const/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/const/test/ck b/const/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/const/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/const/test/clean b/const/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/const/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/const/test/cleanup b/const/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/const/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/const/test/export b/const/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/const/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/const/test/make/makefile b/const/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/const/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/const/test/make/makefile_base b/const/test/make/makefile_base
deleted file mode 100644
index 907ef665a..000000000
--- a/const/test/make/makefile_base
+++ /dev/null
@@ -1,84 +0,0 @@
-# This is the makefile for testing the mesa const package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_const.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = const
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) -lconst
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f90,%.o,$(SRCS))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -ggdb -o $@ $(OBJS) $(LOAD_LOCAL) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -ggdb -o $@ $(OBJS) $(LOAD_LOCAL) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(FCbasic) $(FCopenmp) $(FCopt) $(FCfree)
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(COMPILE) $<
-else
- $(TEST_COMPILE) $(COMPILE) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(TEST_SRC_DIR)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/const/test/mk b/const/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/const/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/const/test/mkx b/const/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/const/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/const/test/rn b/const/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/const/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/data/star_data/zams_models/create_z2m2_y28/Makefile b/data/star_data/zams_models/create_z2m2_y28/Makefile
new file mode 100644
index 000000000..a9df6ba96
--- /dev/null
+++ b/data/star_data/zams_models/create_z2m2_y28/Makefile
@@ -0,0 +1,19 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+ src/run_star_extras.f90 \
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/data/star_data/zams_models/create_z2m2_y28/clean b/data/star_data/zams_models/create_z2m2_y28/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/data/star_data/zams_models/create_z2m2_y28/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/data/star_data/zams_models/create_z2m2_y28/make/makefile b/data/star_data/zams_models/create_z2m2_y28/make/makefile
deleted file mode 100644
index 5ba2f1cfb..000000000
--- a/data/star_data/zams_models/create_z2m2_y28/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/data/star_data/zams_models/create_z2m2_y28/mk b/data/star_data/zams_models/create_z2m2_y28/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/data/star_data/zams_models/create_z2m2_y28/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/data/star_data/zams_models/create_z2m2_y28/re b/data/star_data/zams_models/create_z2m2_y28/re
index e3f36a106..7093783a3 100755
--- a/data/star_data/zams_models/create_z2m2_y28/re
+++ b/data/star_data/zams_models/create_z2m2_y28/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/data/star_data/zams_models/create_z2m2_y28/rn b/data/star_data/zams_models/create_z2m2_y28/rn
index 25a1a7b16..f4ce7695f 100755
--- a/data/star_data/zams_models/create_z2m2_y28/rn
+++ b/data/star_data/zams_models/create_z2m2_y28/rn
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/docs/source/developing.rst b/docs/source/developing.rst
index d0304af2a..40a6b6a5e 100644
--- a/docs/source/developing.rst
+++ b/docs/source/developing.rst
@@ -23,4 +23,5 @@ Developing MESA
developing/coverage
developing/test_suite
developing/infrastructure
+ developing/build-system
developing/release
diff --git a/docs/source/developing/build-system.rst b/docs/source/developing/build-system.rst
new file mode 100644
index 000000000..3e30e27f1
--- /dev/null
+++ b/docs/source/developing/build-system.rst
@@ -0,0 +1,139 @@
+============
+Build system
+============
+
+*This page documents the MESA build system. It is only relevant if you want to modify the build system, or use some of the MESA modules outside of MESA. For building MESA itself without modifications to the build system, see* :ref:`installation:Installing MESA`.
+
+The MESA build system uses ``make``, with some additional (shell) scripts. All relevant files can be found in the ``make`` subfolder, except for the main ``Makefile`` in the repository root, and the module specific make files (see :ref:`developing/build-system:Module build configuration`).
+
+Running ``make`` in the root folder will build all the modules, install relevant files, and run all the associated module tests (test suite tests will not be run). To build an individual module and all its dependencies, run ``make MODULE_NAME``. Append ``-install`` or ``-check`` to run those steps. If you don't want to try to build the dependencies, ``cd`` to the folder of that module and run ``make`` there.
+
+Build options
+=============
+
+The build system exposes several options to control the build process. If you want to change these options, give them as arguments to make, e.g. ``make BUILD_DIR=my_build_dir``.
+
+* **BUILD_DIR**: Where all compiled files will end up, default is ``build``. The output from each module's build will be in a subfolder with the module's name.
+* **COMPILER**: Which compiler to use. Supported options are ``gfortran`` (default).
+* **PROFILE**: Which set of compiler flags to use, mostly to control optimizations. Supported options are ``release`` (enable optimizations), ``release-with-dbg-info`` (enable optimizations, but keep debug info, default), and ``debug`` (disable most optimizations, keep debug info).
+* **WITH_OPENMP**: Whether to use openmp. Defaults to ``yes`` (any other value will disable openmp).
+* **WITH_CRLIBM**: Whether to use crlibm for certain math operations. Defaults to ``yes`` (any other value will disable crlibm).
+* **WITH_GYRE**: Whether to build GYRE and include support for GYRE in MESA. Defaults to ``yes`` (any other value will disable GYRE).
+* **WITH_ADIPLS**: Whether to build ADIPLS and include support for ADIPLS in MESA. Defaults to ``yes`` (any other value will disable ADIPLS).
+* **WITH_PGSTAR**: Whether to include support for showing and saving plots with pgplot. Defaults to ``yes`` (any other value will disable pgstar/pgplot).
+* **WITH_FPE_CHECKS**: Whether to enable FPE checks for NaNs, overflows, and division by zero. Defaults to ``no`` (set to ``yes`` to enable).
+
+Module build configuration
+==========================
+
+Each MESA module has its own configuration Makefile. This make file is located in the root directory of the module. For example, inn the case of the ``eos`` module, this make file is ``eos/Makefile``. This make file includes configurations for how to build, test, and install the module. This can be both in the form of make variables and rules.
+
+The following properties control the main compilation of the module:
+
+* **MODULE_NAME**: The name of the module. (e.g. ``eos``)
+* **SRCS**: Source files (.f, .f90) that are part of this module. Include files (.inc, .dek) should not be included in this list.
+* **INTERNAL_DEPENDS_ON**: Which MESA modules this module directly depends on. Transitive dependencies do not need to be filled in here.
+* **EXTERNAL_DEPENDS_ON**: Which external packages (e.g. lapack) this module depends on.
+* **BINTYPE**: What the eventual output of the build should be, can be ``static-lib``, ``dynamic-lib``, ``executable`` or ``manual``. The ``manual`` option skips the generation of the final binary object. This is used in the gyre module, as more than one library is created.
+* **LIB_NAMES**: Which output libraries are produced in case ``BINTYPE`` is set to ``manual``.
+* **INCLUDE_DIRS**: In which directories are the source files found, prefixed by ``-I``. By default, this is ``-Ipublic -Iprivate``.
+
+The following properties control building and running the tests of the module:
+
+* **SRCS_CHECK**: Source files that are part of the test binary. Typically, all the .f or .f90 files under ``module-name/test/src``.
+* **CHECK_RESULTS_GOLDEN**: File to compare the output from the test binary against. If this is left empty, no tests will be run.
+* **CHECK_DIFF_PROG**: For setting a different a program to compare the output to the golden output (e.g. ndiff). By default this is `diff -b`.
+* **CHECK_FILTER_PROG**: Filters the output of the executable before running the diff program. By default this uses grep to remove output from caches being initialized.
+
+Finally, we have the install settings, which control what files are made available to other modules:
+
+* **MODULES**: Which mod files should be made available.
+* **INSTALL_INCLUDES**: Which additional include files should be made available.
+
+Conditional compilation
+-----------------------
+
+Sometimes you want to have certain files included in the compilation depending on other variables. This can be done with the usual make file syntax. For example, see the following snippet from ``math/Makefile`` which adds a source file and dependency based on whether the variable ``WITH_CRLIBM`` is set to ``yes``.
+
+.. code-block:: make
+
+ ifeq ($(WITH_CRLIBM),yes)
+ SRCS += public/math_lib_crmath.f90
+ EXTERNAL_DEPENDS_ON += crlibm-fortran
+ else
+ SRCS += public/math_lib_intrinsic.f90
+ endif
+
+
+All variables mentioned above can be modified in this way.
+
+Preprocessing
+-------------
+
+Some of the modules require some preprocessing of the FORTRAN source code. This requires setting up a make target for these files, and add the generated files to the ``SRCS_GENERATED`` or ``SRCS_CHECK_GENERATED``. These source files will be automatically prefixed with the path to the build directory, so make sure that the output files from the preprocessing are written to the build directory. The following snippet shows an example from the ``mtx`` module (currently no longer used, but can serve as inspiration). Be carefull copying the text, as all tabs will have converted to spaces:
+
+.. code-block:: make
+
+ SRCS_GENERATED := private/my_lapack95_dble.f90 \
+ private/my_lapack95_quad.f90
+ SRCS_CHECK_GENERATED := \
+ test/src/test_block_tridiagonal_dble.f90 \
+ test/src/test_block_tridiagonal_quad.f90
+
+ include ../make/Makefile
+
+ # Custom build steps (this needs to come after the include statement,
+ # otherwise the BUILD_DIR_MODULE variable is not set)
+
+ $(BUILD_DIR_MODULE)/private/my_lapack95_dble.f90: private/my_lapack95.F90 | $(BUILD_DIR_MODULE)/private/
+ # Note: PREPROCESS just calls the C preprocessor, and is set in compile-settings-*.mk
+ $(PREPROCESS) -DDBLE $^ > $@
+
+ $(BUILD_DIR_MODULE)/private/my_lapack95_quad.f90: private/my_lapack95.F90 | $(BUILD_DIR_MODULE)/private/
+ $(PREPROCESS) $^ > $@
+
+ $(BUILD_DIR_MODULE)/test/src/test_block_tridiagonal_dble.f90: test/src/test_block_tridiagonal.f90 | $(BUILD_DIR_MODULE)/test/src/
+ $(PREPROCESS) -DDBLE $^ > $@
+
+ $(BUILD_DIR_MODULE)/test/src/test_block_tridiagonal_quad.f90: test/src/test_block_tridiagonal.f90 | $(BUILD_DIR_MODULE)/test/src/
+ $(PREPROCESS) $^ > $@
+
+Integrating modules in another piece of software
+================================================
+
+Since MESA is written in a modular way, it is possible to take some of the piece of the MESA source code and integrate them in your own project. You will need at least the ``make`` folder which contains all the build files, the main Makefile in the root of the repository, the source of the module(s) you want to include, and the sources of all the dependent modules. If these modules need data files (e.g. eos tables), you will need to ensure you have them available as well. It is recommended to keep the same source tree, otherwise certain paths in the various make files may no longer point to the right directories. One change that will be necessary, is to edit the list of all modules in ``make/subdirs.mk``. This is used by the make files to establish the right dependencies. However, if some of the folders in that list do not exist, you will get errors. In order to build and test the modules, run ``make -C MESA_SOURCE_TREE MODULE1 MODULE2 ...``, where ``MESA_SOURCE_TREE`` refers where in your project you have copied the MESA source code. If you want to consolidate build directories of your project and the MESA modules, add ``BUILD_DIR=LOCATION_OF_BUILD_DIR`` where ``LOCATION_OF_BUILD_DIR`` is relative to the MESA source directory.
+
+The nitty-gritty details
+========================
+
+When running ``make`` on a clean MESA source tree, the following happens:
+
+#. The main ``Makefile`` gets loaded, which on its turn will load all relevant dependent make files in ``make/``. These additional make files contain instructions for setting up the build dir, getting the version of the source code, and collecting dependencies between the modules.
+#. For each module listed in ``make/subdirs.mk``, the main make process will call into the module specific make file (``MODULE/Makefile``) and request the dependent modules of that module. A make file containing dependencies between all the modules is then generated by the ``make/gen-folder-deps`` script.
+#. The version number is written to ``data/version_number`` if it does not exist with ``git describe``. As source distributions will not contain any git information, this file should be precreated.
+#. For each module that needs building, make will run their builds and tests in parallel, obeying the dependencies set in step 2.
+
+Within each module's separate make process, the following steps will happen:
+
+#. The main make file for each module will set the relevant settings and load ``make/Makefile``, which contains the core build logic.
+#. Some initialization is repeated, such as the setup of the build directory to support building modules separately.
+#. Load relevant other make files, such as those for setting the correct dependencies between source files, loading compiler settings, link commands, ...
+#. ``PKG_CONFIG_PATH`` is set to all known module's pkg-config build folders (``build/module_name/lib/pkg-config``). This path is generated by the ``make/gen-pkgconfig-path`` script (since it is much cleaner to do this in bash than in the make files themselves).
+#. ``make/gen-compile-tree`` is called with all FORTRAN source files for that module, and is given all the necessary include paths. It will parse (in a simplified way) the source files and generate a make file that contains the necessary dependencies between all the modules. Meaning that if a module ``abc`` contains ``use def``, the compilation of module ``abc`` will need to wait until the compilation of ``def`` is done. The resulting make file is then loaded by make.
+#. The source files get compiled, and the final object file gets linked according to which type of object is selected in the module config.
+
+After the module is built, all relevant files are installed and the module-specific tests will run:
+
+#. Copy the public modules, include files, and compiled library to ``include`` and ``lib``
+#. Compile the test binary from the test source files and link it with the object file generated previously.
+#. Run the test binary and compare the output to a golden output specified by the module config.
+
+Parallel compilation
+--------------------
+
+In order to improve parallelisation, the compilation of each source file is split into two steps: generating the ``.mod`` files, and actually compiling the source code. FORTRAN ``.mod`` files describe the interface of a certain module, but do not contain the actual compiled code. In order to build dependent modules, only this ``.mod`` file is necessary. Since this file is generated much faster than compiling the module, the build system generates them in a separate step, which allows the compilation of the dependent module to start almost immediately.
+
+Work directory
+--------------
+
+Each work directory has its own build directory in the work directory itself to prevent conflicts with other work directories. The setup is similar to a normal MESA module, but does less work. For example, it will not call into the MESA build system to build required modules. Each module is also added to the include and library paths, there is no option to limit this. The details can be found in the ``make/work.mk`` script.
diff --git a/docs/source/developing/debugging.rst b/docs/source/developing/debugging.rst
index 45721f65f..8ac36c6a9 100644
--- a/docs/source/developing/debugging.rst
+++ b/docs/source/developing/debugging.rst
@@ -74,8 +74,7 @@ After you've make this change, in ``kap`` do
.. code-block:: console
- ./mk
- ./export
+ make
to recompile and export the module.
@@ -406,9 +405,9 @@ Again, the key point of this step is that we're passing up a value
(``kap_rad``) that we wouldn't normally have access to from star.
This procedure allows you to debug deep within a module from star.
-We changed code in ``kap``, so we need to do ``./mk && ./export`` in
+We changed code in ``kap``, so we need to do ``make`` in
``star`` and then in the work directory also recompile before we
-restart ``./mk && ./re``.
+restart ``make clean && ./re``.
The output should clearly illustrate that this derivative has the
wrong sign. Before making a change that corrects the value of
@@ -553,10 +552,9 @@ analytic derivative.
write(*,*) 'set_Psurf_BC', s% solver_test_partials_var
end if
-
-We changed code in star, so we need to do ``./mk && ./export`` in
+We changed code in star, so we need to do ``make`` in
``star`` and then in the work directory also recompile before we
-restart ``./mk && ./re``. We will repeat this recompilation/restart
+restart ``make clean && ./re``. We will repeat this recompilation/restart
process many times, so do it in a way that makes it easy for you do
over and over.
@@ -851,7 +849,7 @@ Alter star/test_suite/1.3M_ms_high_Z/src/run_star_extras.f90 and in extras_finis
Step 0: Notice your code has a problem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Run ./mk and ./rn to run the test case and you'll get the following output:
+Run ./rn to run the test case and you'll get the following output:
.. code-block:: console
diff --git a/docs/source/developing/profiling.rst b/docs/source/developing/profiling.rst
index e2fcfd617..1b2a29e96 100644
--- a/docs/source/developing/profiling.rst
+++ b/docs/source/developing/profiling.rst
@@ -17,7 +17,7 @@ valgrind must be launched by hand, for instance via
.. code-block:: console
- valgrind --tool=massif ./star
+ valgrind --tool=massif ./build/bin/star
Other useful options:
@@ -26,7 +26,7 @@ Other useful options:
--stacks=yes # Makes it run slower but will include information about the stack usage
Once finished the tool will write a file massif.out.$PID where $PID is the PID of the
-./star run. If you ctrl-c the run you will still get the output up to that point, but
+``star`` run. If you ctrl-c the run you will still get the output up to that point, but
otherwise you will need to wait till the run finishes before being able to view the output.
To visualize the data use:
@@ -49,7 +49,7 @@ valgrind must be launched by hand, for instance via
.. code-block:: console
- valgrind --tool=callgrind ./star
+ valgrind --tool=callgrind ./build/bin/star
Other useful options:
@@ -60,7 +60,7 @@ Other useful options:
--dump-every-bb=1000000000 # How often to output a file with the profile information, this will output maybe once every few steps. This lets you start profiling while the run is still going.
Once finished the tool will write a file callgrind.out.$PID.$NUM where $PID is the PID of the
-./star run. $NUM is a seqeuential output number for the each output file.
+``star`` run. $NUM is a sequential output number for each output file.
To visualize the data use:
diff --git a/docs/source/faq.rst b/docs/source/faq.rst
index 01dd383f2..91e2459ee 100644
--- a/docs/source/faq.rst
+++ b/docs/source/faq.rst
@@ -629,8 +629,8 @@ install step to give time for the files transferred by git lfs to properly sync.
-Installing Older Versions of MESA
-=================================
+Installing Older (before 25.XX) Versions of MESA
+================================================
Older versions of MESA may fail to compile with more recent versions of
the MESA SDK. There are a few possible solutions:
@@ -651,7 +651,7 @@ the MESA SDK. There are a few possible solutions:
handful to work through). The basic workflow is
- ./install until an error turns up,
-- cd to that module and edit and ./mk until it compiles, then
+- cd to that module and edit and make until it compiles, then
- go back to ./install and repeat until everything works before
- a final ./touch and ./install.
@@ -740,9 +740,8 @@ Why don't I see any PGPLOT output when I run MESA?
--------------------------------------------------
Make sure you have the option pgstar_flag = .TRUE. in the &star_job
-section of your input file. Also, if you're not using the SDK, make sure
-you enabled PGPLOT in your utils/makefile_header file (when using the
-SDK, PGPLOT is enabled by default).
+section of your input file. Also, if you are building without the SDK,
+make sure that you haven't disabled pgplot in ``make/defaults-module.mk``.
How can I make a movie from my pgstar output?
---------------------------------------------
diff --git a/docs/source/installation.rst b/docs/source/installation.rst
index 22e6e6d32..f2b2f8ffb 100644
--- a/docs/source/installation.rst
+++ b/docs/source/installation.rst
@@ -42,11 +42,6 @@ also an option, so long as you use ifort 14 or later. Even if you choose
to use ifort, you should still visit the MESA SDK website to get a feel
for the other MESA requirements.
-Not using the MESA SDK means you'll need to replace the file
-:file:`$MESA_DIR/utils/makefile_header` with a version customized to your
-system. There's a template to get you started at
-:file:`$MESA_DIR/utils/makefile_header_non_mesasdk`.
-
Regardless of whether you use the MESA SDK or ifort, and whether your
machine runs MacOS or Linux, the output of MESA should be bit-for-bit
identical. If it's not, this is considered to be a bug. (This has
diff --git a/docs/source/reference/env_vars.rst b/docs/source/reference/env_vars.rst
index b0f601133..76a47194b 100644
--- a/docs/source/reference/env_vars.rst
+++ b/docs/source/reference/env_vars.rst
@@ -16,10 +16,8 @@ Location of the MESA source code.
GYRE_DIR
~~~~~~~~
-Location of the GYRE source code (only needed if running GYRE). If
-you haven't moved it from the ``$MESA_DIR`` then set as
-``GYRE_DIR=$MESA_DIR/gyre/gyre``.
-
+Location of the GYRE source code (only needed if running GYRE separately from MESA). If
+you haven't moved it from the ``$MESA_DIR`` then set as ``GYRE_DIR=$MESA_DIR/build/gyre/src``.
Recommended
@@ -102,10 +100,10 @@ Useful things that are not environment variables.
Command line arguments
~~~~~~~~~~~~~~~~~~~~~~
-``./star`` can accept one argument that overrides the location of the
+``./build/bin/star`` can accept one argument that overrides the location of the
inlist file. This will also override the environment variable ``$MESA_INLIST``. ::
- ./star some_other_inlist_file
+ ./build/bin/star some_other_inlist_file
skip_build
~~~~~~~~~~
@@ -129,7 +127,7 @@ If you use them and things break then stop using them.
MESA_DIR_INTENTIONALLY_EMPTY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Bypass checks done at compile time for checking if ``$MESA_DIR`` is set.
+Bypass checks done at compile time for checking if ``$MESA_DIR`` and ``MESAROOT_SDK`` is set.
MESA_TEMP_CACHES_DISABLE
@@ -149,8 +147,7 @@ This is mostly helpful on macs, as they don't generate useful backtraces.
MESA_FPE_CHECKS_ON
~~~~~~~~~~~~~~~~~~
-When set to 1 this will turn on a series of compile time checks as well as
-certain inlist options designed to catch floating point exceptions.
+When set to 1 this turns on certain inlist options designed to catch floating point exceptions.
This should not be set during a normal run.
diff --git a/docs/source/test_suite.rst b/docs/source/test_suite.rst
index fff43f7df..802db42d6 100644
--- a/docs/source/test_suite.rst
+++ b/docs/source/test_suite.rst
@@ -34,7 +34,6 @@ central X of 0.5. To try it yourself,
::
cd star/test_suite/high_mass
- ./mk
./rn
You can do the same with any of the ``test_suite`` cases.
diff --git a/docs/source/using_mesa/best_practices.rst b/docs/source/using_mesa/best_practices.rst
index 4d8c20bca..8d8f825dc 100644
--- a/docs/source/using_mesa/best_practices.rst
+++ b/docs/source/using_mesa/best_practices.rst
@@ -54,15 +54,9 @@ Now clean the directory,
.. code-block:: console
- ./clean
+ make clean
-build the executable,
-
-.. code-block:: console
-
- ./mk
-
-and run the executable
+and run the test case
.. code-block:: console
diff --git a/docs/source/using_mesa/extending_mesa.rst b/docs/source/using_mesa/extending_mesa.rst
index 9cdf43854..7767f7db8 100644
--- a/docs/source/using_mesa/extending_mesa.rst
+++ b/docs/source/using_mesa/extending_mesa.rst
@@ -53,7 +53,7 @@ Before we make any changes, we should check that the code compiles.
::
cd ..
- ./mk
+ make
If it doesn't compile, make sure that you cleanly inserted the file and
removed the include line.
@@ -554,8 +554,4 @@ the other_neu at the routine you want to be executed.
end subroutine extras_controls
-Now, recompile your working directory::
-
- ./mk
-
-and run MESA as usual.
+Now, run MESA as usual. This will first recompile the code and then start the simulation.
diff --git a/docs/source/using_mesa/running.rst b/docs/source/using_mesa/running.rst
index c67b8576e..b5a2c8516 100644
--- a/docs/source/using_mesa/running.rst
+++ b/docs/source/using_mesa/running.rst
@@ -34,13 +34,16 @@ copy of the star/work directory. Let's do that for this tutorial.
cp -r $MESA_DIR/star/work tutorial
-Now that we have our copy of the work directory, we need to compile the
-code that lives in it.
+Now that we have our copy of the work directory, we can check that the
+code that lives in it compiles properly.
::
cd tutorial
- ./mk
+ make
+
+This will also be done automatically by the run script, which we will
+encounter below
Set up configuration files
--------------------------
diff --git a/docs/source/using_mesa/using_pgstar.rst b/docs/source/using_mesa/using_pgstar.rst
index 5da9c86f6..28953ebba 100644
--- a/docs/source/using_mesa/using_pgstar.rst
+++ b/docs/source/using_mesa/using_pgstar.rst
@@ -180,7 +180,7 @@ I suggest using the test case 1M_pre_ms_to_wd. Go to the directory,
$MESA_DIR/star/test_suite/1M_pre_ms_to_wd, and open "inlist_1.0" in your
text editor. In the &star_job section, set pgstar_flag = .true. and
check the &pgstar section to make sure it starts empty. Then do the
-usual ./mk and ./rn to start the test case.
+usual ./rn to start the test case.
First, open some plot windows and take a look at what's available. Just
edit your pgstar inlist to set the "win_flag" for the plot; the changes
diff --git a/eos/Makefile b/eos/Makefile
new file mode 100644
index 000000000..93f061dcd
--- /dev/null
+++ b/eos/Makefile
@@ -0,0 +1,75 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := eos
+SRCS := public/eos_def.f90 \
+ public/eos_lib.f90 \
+ private/create_EXCOR7_table.f90 \
+ private/create_FSCRliq8_table.f90 \
+ private/eos_blend.f90 \
+ private/eoscms_eval.f90 \
+ private/eos_ctrls_io.f90 \
+ private/eosde_eval.f90 \
+ private/eosdt_eval.f90 \
+ private/eosdt_load_tables.f90 \
+ private/eosdt_support.f90 \
+ private/eos_helm_eval.f90 \
+ private/eos_initialize.f90 \
+ private/eospc_eval.f90 \
+ private/eospt_eval.f90 \
+ private/gauss_fermi.f90 \
+ private/helm_alloc.f90 \
+ private/helm.f90 \
+ private/helm_polynomials.f90 \
+ private/ideal.f90 \
+ private/ion_offset.f90 \
+ private/pc_eos.f90 \
+ private/pc_support.f90 \
+ private/skye_coulomb.f90 \
+ private/skye_coulomb_liquid.f90 \
+ private/skye_coulomb_solid.f90 \
+ private/skye.f90 \
+ private/skye_ideal.f90 \
+ private/skye_thermodynamics.f90 \
+ other/other_eos.f90
+SRCS_CHECK = test/src/test_eos.f90 \
+ test/src/eos_support.f90 \
+ test/src/test_eos_blend.f90 \
+ test/src/test_eos_support.f90
+INTERNAL_DEPENDS_ON := const math utils chem num auto_diff interp_1d interp_2d
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+INCLUDE_DIRS := -Iprivate -Ipublic -Idefaults
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := eos_def.mod eos_lib.mod
+INSTALL_INCLUDES := public/helm_def.dek
+EXTRACT_DATA_COMMANDS += install-free-eos install-cms install-dt install-pc
+
+include $(MAKE_DIR)/Makefile
+
+install-free-eos:
+ if [ ! -r ../data/eosFreeEOS_data ]; then \
+ tar -xJf eosFreeEOS_data.tar.xz -C ../data; \
+ fi
+
+install-cms:
+ if [ ! -r ../data/eosCMS_data ]; then \
+ tar -xJf eosCMS_data.tar.xz -C ../data; \
+ fi
+
+install-dt:
+ if [ ! -r ../data/eosDT_data ]; then \
+ tar -xJf eosDT_data.tar.xz -C ../data; \
+ xz --decompress --keep --stdout helm_table.dat.xz > ../data/eosDT_data/helm_table.dat; \
+ fi
+
+install-pc:
+ mkdir -p ../data/eosPC_support_data
+ mkdir -p ../data/eosPC_support_data/cache
diff --git a/eos/build_and_test b/eos/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/eos/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/eos/build_and_test_parallel b/eos/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/eos/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/eos/clean b/eos/clean
deleted file mode 100755
index 5ea65ce22..000000000
--- a/eos/clean
+++ /dev/null
@@ -1,8 +0,0 @@
-cd make; make clean
-
-for i in eosDT_builder eosFreeEOS_builder
-do
- cd ../$i
- ./clean
-done
-cd ../test/make; make clean
diff --git a/eos/eosCMS_builder/Makefile b/eos/eosCMS_builder/Makefile
new file mode 100644
index 000000000..9f575df96
--- /dev/null
+++ b/eos/eosCMS_builder/Makefile
@@ -0,0 +1,7 @@
+mixing resample:
+ $(MAKE) --no-print-directory -f $@.mk
+
+all: mixing resample
+
+.DEFAULT_GOAL := all
+.PHONY: all
diff --git a/eos/eosCMS_builder/clean b/eos/eosCMS_builder/clean
deleted file mode 100755
index 356f57db5..000000000
--- a/eos/eosCMS_builder/clean
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make clean
diff --git a/eos/eosCMS_builder/make/makefile b/eos/eosCMS_builder/make/makefile
deleted file mode 100644
index 484688a74..000000000
--- a/eos/eosCMS_builder/make/makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-# This is the makefile for creating the program that builds the FreeEOS tables
-
-MESA_DIR = ../../..
-
-#################################################################
-
-# STEP 1: get the standard compiler setup
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-
-# STEP 2: info about the libraries
-
-LOAD_OTHER_LIBS = -L$(MESA_LIB_DIR) $(LOAD_MESA_MICRO)
-
-#################################################################
-
-# STEP 3: build it
-
-OBJS = cms_mixing.o cms_resample.o
-
-MIX = cms_mixing
-RES = cms_resample
-
-all : $(MIX) $(RES)
-
-$(MIX) : cms_mixing.o
- $(FC) $(FCopenmp) -o ../$@ $^ $(LOAD_OTHER_LIBS)
-
-$(RES) : cms_resample.o
- $(FC) $(FCopenmp) -o ../$@ $^ $(LOAD_OTHER_LIBS)
-
-
-#################################################################
-
-SRC_DIR = ../src
-
-COMPILE_SIMPLE = $(FC) -pedantic -Wall -fcheck=all -fbacktrace $(FCdebug) -I$(MESA_INCLUDE_DIR) -c
-
-#COMPILE = $(FC) $(FCbasic) $(FCopenmp) $(FCopt) $(FCstatic) $(FCstandard) $(FCdebug) -I$(MESA_INCLUDE_DIR) -c
-
-cms_mixing.o: $(SRC_DIR)/cms_mixing.f90
- $(COMPILE_SIMPLE) $(FCfree) $^
-
-cms_resample.o: $(SRC_DIR)/cms_resample.f90
- $(COMPILE_SIMPLE) $(FCfree) $^
-
-clean:
- -@rm -f *.o *mod ../$(MIX) ../$(RES)
diff --git a/eos/eosCMS_builder/mixing.mk b/eos/eosCMS_builder/mixing.mk
new file mode 100644
index 000000000..189ee8279
--- /dev/null
+++ b/eos/eosCMS_builder/mixing.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := eos-cms-mixing
+SRCS := src/cms_mixing.f90
+INTERNAL_DEPENDS_ON := const math
+INCLUDE_DIRS := -Isrc -I../private
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/eos/eosCMS_builder/mk b/eos/eosCMS_builder/mk
deleted file mode 100755
index d2c3b3280..000000000
--- a/eos/eosCMS_builder/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make all
diff --git a/eos/eosCMS_builder/resample.mk b/eos/eosCMS_builder/resample.mk
new file mode 100644
index 000000000..e77db10da
--- /dev/null
+++ b/eos/eosCMS_builder/resample.mk
@@ -0,0 +1,9 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := eos-cms-resample
+SRCS := src/cms_resample.f90
+INTERNAL_DEPENDS_ON := interp_1d
+INCLUDE_DIRS := -Isrc -I../private
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/eos/eosDT_builder/Makefile b/eos/eosDT_builder/Makefile
new file mode 100644
index 000000000..ad5637318
--- /dev/null
+++ b/eos/eosDT_builder/Makefile
@@ -0,0 +1,45 @@
+include ../../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := eos-dt-builder
+SRCS := src/azbar.f \
+ src/create_eos_files.f \
+ src/eos5_xtrin_h-he.f \
+ src/helm_opal_scvh_driver.f \
+ src/opal_core.f \
+ src/opal_scvh_driver.f \
+ src/scvh_core.f
+SRCS_GENERATED := \
+ private/helm_alloc.f90 \
+ private/helm_polynomials.f90 \
+ private/gauss_fermi.f90 \
+ private/helm.f90
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON := const utils math chem num interp_2d eos
+EXTERNAL_DEPENDS_ON :=
+CHECK_RESULTS_GOLDEN :=
+INCLUDE_DIRS := -Isrc -I../private
+
+# Install
+
+MODULES :=
+INSTALL_INCLUDES :=
+BINTYPE := executable
+
+include ../../make/Makefile
+
+# Generated sources
+# This just copies over private implementations from eos
+
+$(BUILD_DIR_MODULE)/private/helm_alloc.f90: ../private/helm_alloc.f90 | $(BUILD_DIR_MODULE)/private/
+ @cp $^ $@
+
+$(BUILD_DIR_MODULE)/private/helm_polynomials.f90: ../private/helm_polynomials.f90 | $(BUILD_DIR_MODULE)/private/
+ @cp $^ $@
+
+$(BUILD_DIR_MODULE)/private/gauss_fermi.f90: ../private/gauss_fermi.f90 | $(BUILD_DIR_MODULE)/private/
+ @cp $^ $@
+
+$(BUILD_DIR_MODULE)/private/helm.f90: ../private/helm.f90 | $(BUILD_DIR_MODULE)/private/
+ @cp $^ $@
diff --git a/eos/eosDT_builder/make/makefile b/eos/eosDT_builder/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/eos/eosDT_builder/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/eos/eosDT_builder/make/makefile_base b/eos/eosDT_builder/make/makefile_base
deleted file mode 100644
index 98b9590ad..000000000
--- a/eos/eosDT_builder/make/makefile_base
+++ /dev/null
@@ -1,110 +0,0 @@
-# This is the makefile for the mesa DT equation of state builder
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-FCstandard =
-
-#################################################################
-#
-# SOURCES
-
-SRCS = eos_def.f90 other_eos.f90 gauss_fermi.f90 azbar.f90 helm_alloc.f90 \
- helm_polynomials.f90 helm.f90 \
- eos5_xtrin_h-he.f opal_core.f scvh_core.f90 \
- opal_scvh_driver.f90 helm_opal_scvh_driver.f90 \
- create_eos_files.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_OTHER = chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-CEOS_DIR = ..
-
-CEOS = $(CEOS_DIR)/ceos
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(CEOS) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo FC $@
- @$(FC) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER)
-else
- $(FC) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER)
-endif
-
-all : $(CEOS)
-
-clean:
- -@rm -f $(OBJS) *.o *.mod *.smod .depend $(CEOS)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-PACKAGE_DIR = ../..
-
-INCLUDES = -I$(MESA_DIR)/include
-PKG_INCLUDES = -I$(PACKAGE_DIR)/make
-
-COMPILE = $(COMPILE_NO_CHECKS) $(FCfree) $(PKG_INCLUDES)
-COMPILE_FIXED = $(COMPILE_NO_CHECKS) $(FCfixed) $(PKG_INCLUDES)
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE $<
- @$(COMPILE) $<
-else
- $(COMPILE) $<
-endif
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_FIXED $<
- @$(COMPILE_FIXED) $<
-else
- $(COMPILE_FIXED) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(CEOS_DIR)/src:$(PACKAGE_DIR)/public:$(PACKAGE_DIR)/private:$(PACKAGE_DIR)/other
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.dek $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/eos/eosFreeEOS_builder/Makefile b/eos/eosFreeEOS_builder/Makefile
new file mode 100644
index 000000000..08d774c68
--- /dev/null
+++ b/eos/eosFreeEOS_builder/Makefile
@@ -0,0 +1,10 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := free-eos-builder
+SRCS := src/free_eos_table.f90
+INTERNAL_DEPENDS_ON := const utils math chem eos
+EXTERNAL_DEPENDS_ON := free-eos
+INCLUDE_DIRS :=
+BINTYPE := executable
+
+include ../../make/Makefile
diff --git a/eos/eosFreeEOS_builder/clean b/eos/eosFreeEOS_builder/clean
deleted file mode 100755
index 43a8724e4..000000000
--- a/eos/eosFreeEOS_builder/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-
-cd make; make clean
-cd ..
-rm -rf .mesa_temp_cache
diff --git a/eos/eosFreeEOS_builder/make/makefile b/eos/eosFreeEOS_builder/make/makefile
deleted file mode 100644
index 462846853..000000000
--- a/eos/eosFreeEOS_builder/make/makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-# This is the makefile for creating the program that builds the FreeEOS tables
-
-MESA_DIR = ../../..
-FREE_EOS_DIR = #set this to your FreeEOS installation directory
-
-#################################################################
-
-# STEP 1: get the standard compiler setup
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-
-# STEP 2: info about the libraries
-
-LOAD_OTHER_LIBS = -L$(FREE_EOS_DIR)/lib -lfree_eos -L$(MESA_LIB_DIR) $(LOAD_MESA_MICRO)
-
-#################################################################
-
-# STEP 3: build it
-
-OBJS = free_eos_table.o
-
-TABLE = free_eos_table
-
-all : $(TABLE)
-
-$(TABLE) : $(OBJS)
- $(COMPILE_BASIC) -o ../$(TABLE) $(OBJS) $(LOAD_OTHER_LIBS)
-
-
-#################################################################
-
-SRC_DIR = ../src
-
-COMPILE = $(FC) $(FCbasic) $(FCopenmp) $(FCopt) $(FCstatic) $(FCstandard) $(FCdebug) -I$(MESA_INCLUDE_DIR) -c
-
-free_eos_table.o: $(SRC_DIR)/free_eos_table.f90
- $(COMPILE) $(FCfree) $^
-
-clean:
- -@rm -f *.o *mod ../$(TABLE)
diff --git a/eos/eosFreeEOS_builder/mk b/eos/eosFreeEOS_builder/mk
deleted file mode 100755
index 08968a555..000000000
--- a/eos/eosFreeEOS_builder/mk
+++ /dev/null
@@ -1,8 +0,0 @@
-echo 'building FreeEOS'
-cd free_eos-2.2.1
-./install
-
-cd ..
-echo 'building FreeEOS builder'
-cd make
-make
diff --git a/eos/export b/eos/export
deleted file mode 100755
index db3250885..000000000
--- a/eos/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/eos/i1 b/eos/i1
deleted file mode 100755
index 0d5651693..000000000
--- a/eos/i1
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/i1 && \
-./i1_preprocessors
diff --git a/eos/i1_preprocessors b/eos/i1_preprocessors
deleted file mode 100755
index ab50ec448..000000000
--- a/eos/i1_preprocessors
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "build FAILED"
- echo
- exit 1
- fi
-}
-
-function do1 {
- cd $1
- pwd
- mkdir -p run
- cd make
- make ../ceos
- check_okay
- cd ../..
-}
-
-do1 eosDT_builder
-
diff --git a/eos/i1p b/eos/i1p
deleted file mode 100755
index 8416268a9..000000000
--- a/eos/i1p
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/i1p && \
-./i1_preprocessors
diff --git a/eos/install b/eos/install
deleted file mode 100755
index 9026e932d..000000000
--- a/eos/install
+++ /dev/null
@@ -1,8 +0,0 @@
-./build_and_test
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-echo "export"
-./export
-echo "done"
\ No newline at end of file
diff --git a/eos/make/makefile b/eos/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/eos/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/eos/make/makefile_base b/eos/make/makefile_base
deleted file mode 100644
index 54b820260..000000000
--- a/eos/make/makefile_base
+++ /dev/null
@@ -1,153 +0,0 @@
-# This is the makefile for the mesa equation of state library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- eos_def.f90 \
- eos_blend.f90 \
- create_FSCRliq8_table.f90 \
- create_EXCOR7_table.f90 \
- pc_support.f90 \
- pc_eos.f90 \
- ion_offset.f90 \
- helm_polynomials.f90 \
- ideal.f90 \
- skye_thermodynamics.f90 \
- skye_ideal.f90 \
- skye_coulomb_liquid.f90 \
- skye_coulomb_solid.f90 \
- skye_coulomb.f90 \
- skye.f90 \
- helm_alloc.f90 \
- helm.f90 \
- gauss_fermi.f90 \
- eosdt_load_tables.f90 \
- eoscms_eval.f90 \
- eospc_eval.f90 \
- eosdt_support.f90 \
- eos_helm_eval.f90 \
- eosdt_eval.f90 \
- eospt_eval.f90 \
- eosde_eval.f90 \
- eos_ctrls_io.f90 \
- eos_initialize.f90 \
- eos_lib.f90 \
- other_eos.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = chem $(LIBS_MESA_NUMERICS)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) -lchem $(LOAD_MESA_NUMERICS)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libeos.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.a .depend *.so *.smod
-
-install:
- @$(CP_IF_NEWER) eos_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) eos_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-MOD_DEFAULTS_DIR = $(MODULE_DIR)/defaults
-INCLUDE_DEFAULTS = -I$(MOD_DEFAULTS_DIR)
-
-MOD_OTHER_DIR = $(MODULE_DIR)/other
-INCLUDE_OTHER = -I$(MOD_OTHER_DIR)
-
-MOD_INCLUDES = $(INCLUDE_DEFAULTS) $(INCLUDE_OTHER)
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree) $(MOD_INCLUDES)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree) $(MOD_INCLUDES)
-
-COMPILE_FIXED = $(COMPILE_TO_DEPLOY) $(FCfixed) $(MOD_INCLUDES)
-#COMPILE_FIXED = $(COMPILE_TO_TEST) $(FCfixed) $(MOD_INCLUDES)
-
-COMPILE_FIXED_LEGACY = $(filter-out -std=f2008, $(COMPILE_FIXED))
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR):$(MOD_OTHER_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.dek $(SRC_PATH)
-vpath %.defaults $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/eos/mk b/eos/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/eos/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/eos/plotter/Makefile b/eos/plotter/Makefile
new file mode 100644
index 000000000..36d64df52
--- /dev/null
+++ b/eos/plotter/Makefile
@@ -0,0 +1,14 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := eos-plotter
+SRCS := src/eos_plotter.f90
+INTERNAL_DEPENDS_ON := const utils math chem eos
+INCLUDE_DIRS :=
+BINTYPE := executable
+
+include ../../make/Makefile
+
+plot: $(OBJ_OUT)
+ $(OBJ_OUT)
+ ./regions.py
+ ./plotter.py
diff --git a/eos/plotter/README.rst b/eos/plotter/README.rst
index d26023c67..6338de897 100644
--- a/eos/plotter/README.rst
+++ b/eos/plotter/README.rst
@@ -1,11 +1,6 @@
These plotting programs and scripts aim to make it simple to plot EOS
quantities.
-To use them, first compile the eos plotter program::
-
- ./clean
- ./mk
-
The options that control what data is output by the program are
documented in the file ``inlist_plotter``. This inlist contains two
namelists: the ``eos`` namelist that controls the MESA ``eos`` module
@@ -15,15 +10,4 @@ plotter will output the desired quantities.
Then, run the plotter::
- ./plotter
-
-This will create an output data file ``eos_plotter.dat``.
-
-A python script that knows how to read this file and plot it using
-matplotlib is provided. You can invoke it via::
-
- ./plotter.py
-
-This will produce a plot file ``eos_plotter.png`` that you can then
-view. You may need to edit the python file to manually adjust various
-aspects of the plotting (e.g., colorbar limits).
+ make plot
diff --git a/eos/plotter/clean b/eos/plotter/clean
deleted file mode 100755
index 356f57db5..000000000
--- a/eos/plotter/clean
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make clean
diff --git a/eos/plotter/make/makefile b/eos/plotter/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/eos/plotter/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/eos/plotter/make/makefile_base b/eos/plotter/make/makefile_base
deleted file mode 100644
index bb3bfa3ac..000000000
--- a/eos/plotter/make/makefile_base
+++ /dev/null
@@ -1,92 +0,0 @@
-# This is the makefile for testing the mesa eos_plotter library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-EOS_PLOTTER_SRCS = eos_plotter.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_OTHER = net eos kap rates chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lnet -leos -lkap -lrates -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-EOS_PLOTTER = ../plotter
-
-EOS_PLOTTER_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(EOS_PLOTTER_SRCS)))
-
-all: $(EOS_PLOTTER)
-
-$(EOS_PLOTTER) : $(EOS_PLOTTER_OBJS) $(DEPS_OTHER)
-
-$(EOS_PLOTTER) : OBJS = $(EOS_PLOTTER_OBJS)
-
-$(EOS_PLOTTER) :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER) $(LDFLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER) $(LDFLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(EOS_PLOTTER) *.smod
-
-install:
- @:
-
-#################################################################
-#
-# COMPILATION RULES
-
-MY_FC_FLAGS = $(FCfree)
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo FC $<
- @$(FC) $(FCbasic) $(MY_FC_FLAGS) -I$(MESA_INCLUDE_DIR) -c $<
-else
- $(FC) $(FCbasic) $(MY_FC_FLAGS) -I$(MESA_INCLUDE_DIR) -c $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = ../src
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
-
diff --git a/eos/plotter/mk b/eos/plotter/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/eos/plotter/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/eos/plotter/rn b/eos/plotter/rn
deleted file mode 100755
index fe8388ce4..000000000
--- a/eos/plotter/rn
+++ /dev/null
@@ -1 +0,0 @@
-./plotter && ./regions.py && ./plotter.py
diff --git a/eos/test/ck b/eos/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/eos/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/eos/test/clean b/eos/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/eos/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/eos/test/cleanup b/eos/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/eos/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/eos/test/export b/eos/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/eos/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/eos/test/make/makefile b/eos/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/eos/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/eos/test/make/makefile_base b/eos/test/make/makefile_base
deleted file mode 100644
index 5254beefe..000000000
--- a/eos/test/make/makefile_base
+++ /dev/null
@@ -1,110 +0,0 @@
-# This is the makefile for testing the mesa eos library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-TEST_SRCS = eos_support.f90 \
- test_eos_blend.f90 test_eos_support.f90 test_eos.f90
-
-TESTQ_SRCS = eos_support.f90 \
- test_eos_blend.f90 test_eos_support.f90 test_eos_quietly.f90
-
-SAMPLE_SRCS = sample_eos.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = eos
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-TESTQ = $(TEST_DIR)/test_quietly
-SAMPLE = $(TEST_DIR)/sample
-
-TEST_OBJS = $(patsubst %.f90,%.o,$(TEST_SRCS))
-TESTQ_OBJS = $(patsubst %.f90,%.o,$(TESTQ_SRCS))
-SAMPLE_OBJS = $(patsubst %.f90,%.o,$(SAMPLE_SRCS))
-
-all : $(TEST) $(TESTQ) $(SAMPLE)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(TESTQ) : $(TESTQ_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(SAMPLE) : $(SAMPLE_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-$(TESTQ) : OBJS = $(TESTQ_OBJS)
-$(SAMPLE) : OBJS = $(SAMPLE_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST) $(TESTQ) $(SAMPLE)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(FCbasic) $(FCopenmp) $(FCopt) $(FCfree)
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(COMPILE) $<
-else
- $(TEST_COMPILE) $(COMPILE) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-# Search paths for prerequisites
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/eos/test/mk b/eos/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/eos/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/eos/test/mkx b/eos/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/eos/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/eos/test/rn b/eos/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/eos/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/forum/Makefile b/forum/Makefile
new file mode 100644
index 000000000..f061ddd77
--- /dev/null
+++ b/forum/Makefile
@@ -0,0 +1,55 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := forum
+SRCS :=
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON :=
+EXTERNAL_DEPENDS_ON := hdf5_fortran
+BINTYPE := static-lib
+INCLUDE_DIRS :=
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := forum_m.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
+
+ifeq ($(PROFILE),debug)
+ FORUM_DEBUG = yes
+else
+ FORUM_DEBUG = false
+endif
+
+ifeq ($(MESASDK_ROOT),)
+ FPP=./fypp_deps
+else
+ FPP= PYTHONPATH=$(MESASDK_ROOT)/lib/python ./fypp_deps
+endif
+
+BUILD_DIR_FORUM_BUILD := $(BUILD_DIR_MODULE)/src
+INSTALL_INCLUDES_BUILD += $(BUILD_DIR_MODULE)/include/forum.inc
+
+$(BUILD_DIR_FORUM_BUILD): forum-1.0.4.tar.gz | $(BUILD_DIR_FORUM_BUILD)/. $(BUILD_DIR_MODULE)/include/.
+ tar --strip-components=1 -xf $< -C $(BUILD_DIR_FORUM_BUILD)
+ cp $(BUILD_DIR_FORUM_BUILD)/src/include/forum.inc $(BUILD_DIR_MODULE)/include/forum.inc
+
+$(BUILD_DIR_FORUM_BUILD)/build-complete: $(BUILD_DIR_FORUM_BUILD)
+ $(MAKE) -C $(BUILD_DIR_FORUM_BUILD) SHARED=no DEBUG=$(FORUM_DEBUG) OMP=$(WITH_OPENMP) FPE=yes VERSION_CHECK=passed FPP="$(FPP)" LDFLAGS="$(LIB_DEP_ARGS)" FFLAGS="$(FLAGS_DEPS)"
+ touch $@
+
+$(OBJ_OUT): $(BUILD_DIR_FORUM_BUILD)/build-complete | $(BUILD_DIR_MODULE)/lib/.
+ cp $(BUILD_DIR_FORUM_BUILD)/build/$(notdir $@) $@
+
+$(BUILD_DIR_MODULE)/modules/forum_m.mod: $(BUILD_DIR_FORUM_BUILD)/build-complete | $(BUILD_DIR_MODULE)/modules/.
+ cp $(BUILD_DIR_FORUM_BUILD)/build/$(notdir $@) $@
+
+check:
+ cd test; ../$(BUILD_DIR_FORUM_BUILD)/build/test_order > ../$(CHECK_RESULTS)
+ diff -b $(CHECK_RESULTS) $(CHECK_RESULTS_GOLDEN)
diff --git a/forum/build_and_test b/forum/build_and_test
deleted file mode 100755
index e2043afaf..000000000
--- a/forum/build_and_test
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-rm -rf forum
-tar xf forum-1.0.4.tar.gz
-mv forum-1.0.4 forum
-
-../utils/build_and_test
diff --git a/forum/build_and_test_parallel b/forum/build_and_test_parallel
deleted file mode 100755
index 8e86e14eb..000000000
--- a/forum/build_and_test_parallel
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-
-rm -rf forum
-tar xf forum-1.0.4.tar.gz
-mv forum-1.0.4 forum
-
-../utils/build_and_test_parallel
-
diff --git a/forum/clean b/forum/clean
deleted file mode 100755
index 356f57db5..000000000
--- a/forum/clean
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make clean
diff --git a/forum/export b/forum/export
deleted file mode 100755
index db3250885..000000000
--- a/forum/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/forum/i1 b/forum/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/forum/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/forum/i1p b/forum/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/forum/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/forum/install b/forum/install
deleted file mode 100755
index 9026e932d..000000000
--- a/forum/install
+++ /dev/null
@@ -1,8 +0,0 @@
-./build_and_test
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-echo "export"
-./export
-echo "done"
\ No newline at end of file
diff --git a/forum/make/makefile b/forum/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/forum/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/forum/make/makefile_base b/forum/make/makefile_base
deleted file mode 100644
index f4ba6b3bb..000000000
--- a/forum/make/makefile_base
+++ /dev/null
@@ -1,37 +0,0 @@
-# This is the makefile for the forum library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# Hand off to ForUM build system
-
-MESA_LIB_DIR = $(MESA_DIR)/lib
-MESA_INC_DIR = $(MESA_DIR)/include
-
-FORUM_DIR = ../forum
-
-ifeq ($(USE_SHARED), YES)
- export SHARED = yes
-else
- export SHARED = no
-endif
-
-all:
- @$(MAKE) --no-print-directory -C $(FORUM_DIR) install
-
-install:
- @$(CP_IF_NEWER) $(FORUM_DIR)/include/forum_m.mod $(MESA_INC_DIR)/
- @$(CP_IF_NEWER) $(FORUM_DIR)/include/forum.inc $(MESA_INC_DIR)/
- @$(CP_IF_NEWER) $(FORUM_DIR)/lib/libforum.a $(MESA_LIB_DIR)/
-
-clean:
- @$(MAKE) --no-print-directory -C $(FORUM_DIR) $@
-
-.PHONY: install clean
diff --git a/forum/mk b/forum/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/forum/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/forum/test/ck b/forum/test/ck
deleted file mode 100755
index 2ef1f96b9..000000000
--- a/forum/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
diff --git a/forum/test/clean b/forum/test/clean
deleted file mode 100755
index e69de29bb..000000000
diff --git a/forum/test/cleanup b/forum/test/cleanup
deleted file mode 100755
index 22f65cbab..000000000
--- a/forum/test/cleanup
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ../make
-make clean
diff --git a/forum/test/export b/forum/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/forum/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/forum/test/mk b/forum/test/mk
deleted file mode 100755
index e69de29bb..000000000
diff --git a/forum/test/rn b/forum/test/rn
deleted file mode 100755
index 7026ec930..000000000
--- a/forum/test/rn
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-../forum/bin/test_order
-
diff --git a/gyre/Makefile b/gyre/Makefile
new file mode 100644
index 000000000..05edf1e89
--- /dev/null
+++ b/gyre/Makefile
@@ -0,0 +1,74 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := gyre
+
+ifeq ($(WITH_GYRE),yes)
+SRCS :=
+SRCS_CHECK := test/src/test_gyre.f90
+INTERNAL_DEPENDS_ON := forum const
+EXTERNAL_DEPENDS_ON := hdf5_fortran lapack95 lapack crlibm-fortran
+CHECK_RESULTS_GOLDEN := test/test_output
+CHECK_DIFF_PROG := ndiff -quiet -relerr 1.0e-6
+BINTYPE := manual
+LIB_NAMES = gyre_mesa gyre
+INSTALL_COMMANDS := install-lib
+
+else
+
+SRCS := public/gyre_mesa_m_stub.f90
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON := forum
+EXTERNAL_DEPENDS_ON :=
+CHECK_RESULTS_GOLDEN :=
+BINTYPE := static-lib
+
+endif
+
+INCLUDE_DIRS :=
+INSTALL_INCLUDES :=
+MODULES := gyre_mesa_m.mod
+
+include $(MAKE_DIR)/Makefile
+
+ifeq ($(WITH_GYRE),yes)
+
+include $(MAKE_DIR)/pkg-config.mk
+
+ifeq ($(PROFILE),debug)
+ GYRE_DEBUG = yes
+else
+ GYRE_DEBUG = false
+endif
+
+ifeq ($(MESASDK_ROOT),)
+ FPP=./fypp_deps $(FLAGS_DEPS)
+else
+ FPP= PYTHONPATH=$(MESASDK_ROOT)/lib/python ./fypp_deps $(FLAGS_DEPS)
+endif
+
+BUILD_DIR_GYRE_BUILD := $(BUILD_DIR_MODULE)/src
+OBJ_OUT := $(BUILD_DIR_MODULE)/lib/libgyre.a $(BUILD_DIR_MODULE)/lib/libgyre_mesa.a
+
+$(BUILD_DIR_GYRE_BUILD): gyre-8.0.tar.gz | $(BUILD_DIR_GYRE_BUILD)/. $(BUILD_DIR_MODULE)/include/.
+ tar --strip-components=1 -xf $< -C $(BUILD_DIR_GYRE_BUILD)
+
+$(BUILD_DIR_GYRE_BUILD)/build-complete: $(BUILD_DIR_GYRE_BUILD)
+ $(MAKE) -C $(BUILD_DIR_GYRE_BUILD) SHARED=no DEBUG=$(GYRE_DEBUG) OMP=$(WITH_OPENMP) CRMATH=$(WITH_CRLIBM) FPE=yes VERSION_CHECK=passed FPP="$(FPP)" LDFLAGS="$(LIB_DEP_ARGS)" FFLAGS="$(FLAGS_DEPS)" FRONTENDS=no TOOLS=no FORUM=no IFACES=yes
+ touch $@
+
+
+$(BUILD_DIR_MODULE)/lib/libgyre.a $(BUILD_DIR_MODULE)/lib/libgyre_mesa.a: $(BUILD_DIR_GYRE_BUILD)/build-complete | $(BUILD_DIR_MODULE)/lib/.
+ cp $(BUILD_DIR_GYRE_BUILD)/build/$(notdir $@) $@
+
+$(BUILD_DIR_MODULE)/modules/gyre_mesa_m.mod: $(BUILD_DIR_GYRE_BUILD)/build-complete | $(BUILD_DIR_MODULE)/modules/.
+ cp $(BUILD_DIR_GYRE_BUILD)/build/$(notdir $@) $@
+
+all: $(PKG_CONFIG) $(BUILD_DIR_MODULE)/lib/libgyre_mesa.a $(BUILD_DIR_MODULE)/lib/libgyre.a
+
+else
+
+check: $(OBJ_OUT);
+
+endif
diff --git a/gyre/README b/gyre/README
index 79efb8f30..e3ea6d0ba 100644
--- a/gyre/README
+++ b/gyre/README
@@ -1,21 +1,21 @@
GYRE
====
-This directory contains the GYRE oscillation code suite. A full
-description of GYRE, plus tools and documentation, can be found at:
+This directory contains the GYRE oscillation code suite. A full description of
+GYRE, plus tools and documentation, can be found at:
-http://www.astro.wisc.edu/~townsend/gyre/
+https://gyre.readthedocs.io
Using GYRE within MESA
======================
GYRE is used internally by MESA's astero module to calculate stellar
-eigenfrequencies; this capability is enabled by setting
+eigenfrequencies; this capability is enabled by default, but can be disabled by
+setting
-USE_GYRE = yes
+WITH_GYRE = no
-in mesa/utils/makefile_header, and then building MESA as usual (i.e.,
-running ./install in mesa)
+as an environment variable
Using GYRE Stand-alone
======================
@@ -26,10 +26,10 @@ to do this are given at the website referenced above.
** IMPORTANT NOTE **
-The full source code for the GYRE suite is provided in the gyre
+The full source code for the GYRE suite is provided in the build/gyre/src
subdirectory; there's no need to download it again from the
website. When following the instructions on the website, you should
-set the GYRE_DIR environment variable to point to $MESA_DIR/gyre/gyre.
+set the GYRE_DIR environment variable to point to $MESA_DIR/build/gyre/src.
Support, FAQs
=============
diff --git a/gyre/build_and_test b/gyre/build_and_test
deleted file mode 100755
index 7fb997b51..000000000
--- a/gyre/build_and_test
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-rm -rf gyre
-tar xf gyre-8.0.tar.gz
-mv gyre-8.0 gyre
-
-../utils/build_and_test
diff --git a/gyre/build_and_test_parallel b/gyre/build_and_test_parallel
deleted file mode 100755
index 2d06808cf..000000000
--- a/gyre/build_and_test_parallel
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-rm -rf gyre
-tar xf gyre-8.0.tar.gz
-mv gyre-8.0 gyre
-
-../utils/build_and_test_parallel
diff --git a/gyre/clean b/gyre/clean
deleted file mode 100755
index 344123539..000000000
--- a/gyre/clean
+++ /dev/null
@@ -1,3 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
-cd ../..; rm -rf gyre
diff --git a/gyre/export b/gyre/export
deleted file mode 100755
index db3250885..000000000
--- a/gyre/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/gyre/i1 b/gyre/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/gyre/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/gyre/i1p b/gyre/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/gyre/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/gyre/install b/gyre/install
deleted file mode 100755
index 9026e932d..000000000
--- a/gyre/install
+++ /dev/null
@@ -1,8 +0,0 @@
-./build_and_test
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-echo "export"
-./export
-echo "done"
\ No newline at end of file
diff --git a/gyre/make/makefile b/gyre/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/gyre/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/gyre/make/makefile_base b/gyre/make/makefile_base
deleted file mode 100644
index 11c4b5d25..000000000
--- a/gyre/make/makefile_base
+++ /dev/null
@@ -1,15 +0,0 @@
-# This is the makefile for the mesa gyre library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-ifeq ($(USE_GYRE),NO)
- include makefile_stub
-else
- include makefile_full
-endif
diff --git a/gyre/make/makefile_full b/gyre/make/makefile_full
deleted file mode 100644
index 04ed901ad..000000000
--- a/gyre/make/makefile_full
+++ /dev/null
@@ -1,52 +0,0 @@
-# This is the makefile for the mesa gyre full library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# Hand off to GYRE build system
-
-MESA_LIB_DIR = $(MESA_DIR)/lib
-MESA_INC_DIR = $(MESA_DIR)/include
-
-GYRE_DIR = ../gyre
-
-export FRONTENDS = no
-export TOOLS = no
-export FORUM = no
-export IFACES = yes
-
-export FORUM_LIB_DIR = ../$(MESA_LIB_DIR)
-export FORUM_INC_DIR = ../$(MESA_INC_DIR)
-
-ifeq ($(USE_SHARED), YES)
- export SHARED = yes
-else
- export SHARED = no
-endif
-
-ifeq ($(USE_CRMATH), YES)
- export CRMATH = yes
-else
- export CRMATH = no
-endif
-
-all :
- @$(MAKE) --no-print-directory -C $(GYRE_DIR) install
-
-install:
- @$(CP_IF_NEWER) $(GYRE_DIR)/build/gyre_mesa_m.f90 ../public/
- @$(CP_IF_NEWER) $(GYRE_DIR)/build/gyre_mesa_m.mod $(MESA_INC_DIR)/
- @$(CP_IF_NEWER) $(GYRE_DIR)/build/libgyre.a $(MESA_LIB_DIR)/
- @$(CP_IF_NEWER) $(GYRE_DIR)/build/libgyre_mesa.a $(MESA_LIB_DIR)/
-
-clean:
- @$(MAKE) --no-print-directory -C $(GYRE_DIR) $@
-
-.PHONY: install clean
diff --git a/gyre/make/makefile_stub b/gyre/make/makefile_stub
deleted file mode 100644
index 3b3ff8639..000000000
--- a/gyre/make/makefile_stub
+++ /dev/null
@@ -1,71 +0,0 @@
-# This is the makefile for the mesa gyre stub library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = gyre_mesa_m_stub.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MATRIX)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libgyre_mesa.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.f90 *.fpp *.mod .depend *.so *.a ../public/gyre_mesa_m.f90
-
-install:
- @$(CP_IF_NEWER) gyre_mesa_m.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE $<
- @$(COMPILE) $<
-else
- $(COMPILE) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR)
-
-vpath %.f90 $(SRC_PATH)
diff --git a/gyre/mk b/gyre/mk
deleted file mode 100755
index a92a49a59..000000000
--- a/gyre/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
diff --git a/gyre/public/gyre_mesa_m_stub.f90 b/gyre/public/gyre_mesa_m_stub.f90
index cca97afca..4424b2973 100644
--- a/gyre/public/gyre_mesa_m_stub.f90
+++ b/gyre/public/gyre_mesa_m_stub.f90
@@ -1,6 +1,6 @@
! This stub fakes enough of GYRE to make sure that test cases can
! optionally use GYRE without failing to compile on systems built with
-! USE_GYRE=NO in utils/makefile_header.
+! WITH_GYRE=NO in make/defaults-module.mk.
module gyre_mesa_m ! stub
diff --git a/gyre/test/ck b/gyre/test/ck
deleted file mode 100755
index 005f73d8f..000000000
--- a/gyre/test/ck
+++ /dev/null
@@ -1,17 +0,0 @@
-#./../../utils/test/ck
-
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-./rn >& tmp.txt
-check_okay
-ndiff -quiet -relerr 1.0e-6 tmp.txt test_output
diff --git a/gyre/test/clean b/gyre/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/gyre/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/gyre/test/cleanup b/gyre/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/gyre/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/gyre/test/export b/gyre/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/gyre/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/gyre/test/make/makefile b/gyre/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/gyre/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/gyre/test/make/makefile_base b/gyre/test/make/makefile_base
deleted file mode 100644
index 44d0d97a4..000000000
--- a/gyre/test/make/makefile_base
+++ /dev/null
@@ -1,99 +0,0 @@
-# This is the makefile for testing the mesa gyre package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-ifeq ($(USE_GYRE),YES)
- SRCS = test_gyre.f90
-else
- SRCS = test_gyre_stub.f90
-endif
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_GYRE),YES)
- LOCAL_LIB_DIR = ../../gyre/lib
- LOCAL_INC_DIR = ../../gyre/include
- LIBS_LOCAL = gyre_mesa gyre
-else
- LOCAL_LIB_DIR = ../../make
- LOCAL_INC_DIR = ../../make
- LIBS_LOCAL = gyre_mesa
-endif
-
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = $(LIBS_MATRIX) $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX) $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo FC $@
- @$(FC) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(FC) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) -I$(LOCAL_INC_DIR) $<
-else
- $(TEST_COMPILE) $(FCfree) -I$(LOCAL_INC_DIR) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = ../src
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_INC_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/gyre/test/mk b/gyre/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/gyre/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/gyre/test/rn b/gyre/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/gyre/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/gyre/test/src/test_gyre_stub.f90 b/gyre/test/src/test_gyre_stub.f90
deleted file mode 100644
index 78d4f032c..000000000
--- a/gyre/test/src/test_gyre_stub.f90
+++ /dev/null
@@ -1,26 +0,0 @@
-module test_gyre_mod
-
- implicit none
-
-contains
-
- subroutine do_test
- integer :: ierr
- character(len=1000) :: line
- ierr = 0
- open (33, file='test_output')
- do
- read (33, fmt='(a)', iostat=ierr) line
- if (ierr /= 0) exit
- write (*, '(a)') trim(line)
- end do
- close (33)
- end subroutine do_test
-
-end module test_gyre_mod
-
-program test_gyre
- use test_gyre_mod
- implicit none
- call do_test
-end program test_gyre
diff --git a/install b/install
index 612459587..f3c444401 100755
--- a/install
+++ b/install
@@ -2,19 +2,14 @@
set -o pipefail
-# Get version number from git
-if [ -d ".git" ] || [ -f ".git" ]; then
- # Limits hashes to 7 characters
- version=$(git rev-parse HEAD)
- printf "%s" "${version:0:7}" > data/version_number
-fi
-
# Create file for TestHub
# This file will be populated during math/test
echo "# If this file contains only this line, install failed before math/test" > testhub.yml
export BUILD_LOG="build.log"
+make data/version_number
+
# Get system info
./help > $BUILD_LOG 2>&1
@@ -22,64 +17,7 @@ export BUILD_LOG="build.log"
# at the end of the file
{
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-function do_one_parallel {
- cd "$1" || exit
- check_okay
- echo
- pwd
- echo "building $1 package."
- echo
- # don't use nice with ./i1 or can miss errors
- ./i1p
- check_okay
- cd ..
- echo
- if [ -f skip_build ] || [ -f "$1/skip_build" ]
- then
- echo "mesa/$1 has been tested and exported."
- elif [ -f skip_test ] || [ -f "$1/skip_test" ]
- then
- echo "mesa/$1 has been built and exported."
- else
- echo "mesa/$1 has been built, tested, and exported."
- fi
- echo
- echo "************************************************"
-}
-
-function do_one {
- cd "$1" || exit
- check_okay
- echo
- pwd
- echo "building $1 package."
- echo
- # don't use nice with ./i1 or can miss errors
- ./i1
- check_okay
- cd ..
- echo
- if [ -f skip_build ] || [ -f "$1/skip_build" ]
- then
- echo "mesa/$1 has been tested and exported."
- elif [ -f skip_test ] || [ -f "$1/skip_test" ]
- then
- echo "mesa/$1 has been built and exported."
- else
- echo "mesa/$1 has been built, tested, and exported."
- fi
- echo
- echo "************************************************"
-}
-
-# Block sudo access, this check should come first as if a user blindly types "sudo ./install" then MESA_DIR won't be set
+# Block sudo access, this check should come first as if a user blindly types "sudo ./install" then MESA_DIR wont be set
# So lets catch this error first rather then forcing them to set MESA_DIR under sudo
if [ ${EUID:-$(id -u)} -eq 0 ];
then
@@ -162,7 +100,7 @@ then
echo "****************************************************************"
echo "* *"
echo "* MESA_DIR is not set *"
- echo "* Please set MESA_DIR and run ./mk again *"
+ echo "* Please set MESA_DIR and run ./install again *"
echo "* *"
echo "* Please also read: *"
echo "* http://www.astro.wisc.edu/~townsend/static.php?ref=mesasdk *"
@@ -174,7 +112,7 @@ then
fi
fi
-if [[ "$MESA_DIR" == *" "* ]];
+if [[ "$MESA_DIR" == *" "* ]];
then
echo
echo "****************************************************************"
@@ -230,149 +168,60 @@ then
exit 1
fi
-makedepf90 > /dev/null
-if [ $? -ne 0 ]
-then
- echo
- echo "*******************************************************************"
- echo "* *"
- echo "* You need to install makedepf90 before you can install mesa. *"
- echo "* *"
- echo "* *"
- echo "* But only if you are not using the SDK. If you see this *"
- echo "* message and are trying to use the sdk *"
- echo "* then please check your environment variables *"
- echo "* are set first. *"
- echo "* *"
- echo "* *"
- echo "* The makedepf90 tar file is in the mesa/scripts directory. *"
- echo "* Unpack it anywhere (tar -zxvf makedepf90-2.8.8.tar.gz), *"
- echo "* and cd to the makedepf90-2.8.8 directory. *"
- echo "* Then do the usual sequence: *"
- echo "* *"
- echo "* ./configure *"
- echo "* make all *"
- echo "* sudo make install *"
- echo "* *"
- echo "* Note: 'make test' doesn't seem to work. I suggest skipping *"
- echo "* that step in the makedepf90 installation. *"
- echo "* *"
- echo "******************************************************************"
- echo
- exit 1
-fi
-
-
-if [ ! -r lib ]
-then
- mkdir lib
-fi
-
-if [ ! -r include ]
-then
- mkdir include
-fi
-
-do_one_parallel const
-do_one utils
-do_one_parallel math
-do_one_parallel mtx
-do_one_parallel auto_diff
-do_one_parallel forum
-do_one_parallel num
-
-do_one_parallel interp_1d
-do_one_parallel interp_2d
-
-if [ ! -r data ]
-then
- echo
- echo "******************************************************************"
- echo "* *"
- echo "* Please setup the current mesa data before doing ./install *"
- echo "* See the mesa README file for details. *"
- echo "* *"
- echo "******************************************************************"
- echo
+# Check mesasdk version
+if [ -z "$MESA_DIR_INTENTIONALLY_EMPTY" ]; then
+ if [ ! -z "$MESASDK_ROOT" ]; then
+ MINIMUM_VERSION=20.3.1
+ VERSION_CHECK=$(echo $($MESA_DIR/scripts/check_sdk_version $MINIMUM_VERSION))
+ echo MESASDK version check $VERSION_CHECK
+ if [ $VERSION_CHECK != "passed" ]; then
+ echo Your MESASDK is too old please update to version $MINIMUM_VERSION or newer
+ exit 1
+ fi
+ else
+ echo MESASDK_ROOT enviroment variable is not set. See https://docs.mesastar.org/en/latest/installation.html#set-your-environment-variables
exit 1
+ fi
fi
-function do_input_data {
- cd "$1" || exit
- check_okay
- echo
- pwd
- echo "installing mesa $1 data."
- echo
- # don't use nice or can miss errors
- ./build_data_and_export
- check_okay
- echo "$1 data successfully installed."
- echo
- echo "************************************************"
- cd ..
+SYSTEM=`uname -s`
+
+function enum_procs {
+ if [ -n "$NPROCS" ]; then
+ echo $NPROCS
+ else
+ case `uname -s` in
+ Linux)
+ if [ -r /proc/cpuinfo ]; then
+ grep -c processor /proc/cpuinfo
+ else
+ echo 1
+ fi
+ ;;
+ Darwin)
+ sysctl hw.ncpu | awk '{print $2}'
+ ;;
+ *)
+ echo 1
+ ;;
+ esac
+ fi
}
-
-
-
-
-if [ ! -r data/chem_data ]
-then
- do_input_data chem
-fi
-do_one_parallel chem
-
-if [ ! -r data/colors_data ]
-then
- do_input_data colors
+# MacOS has gnumake version 3.81, which does not support -Oline
+if [ "${SYSTEM}" = "Darwin" ]; then
+ make -w -j$(enum_procs)
+else
+ make -w -Oline -j$(enum_procs)
fi
-do_one_parallel colors
-# get rid of obsolete eos_data directory
-rm -rf data/eos_data
-
-# check that the eos data directories exist
-if [ ! -r data/eosDT_data ]
-then
- do_input_data eos
-fi
-
-# now have installed eos data, so can install the eos module
-do_one_parallel eos
-
-if [ ! -r data/kap_data ]
-then
- do_input_data kap
-fi
-do_one_parallel kap
-
-do_one_parallel rates
-do_one_parallel neu
-do_one_parallel net
-
-if [ ! -r data/ionization_data ]
+if [ $? -ne 0 ]
then
- do_input_data ionization
+ echo
+ echo "!! MESA install failed, see above or $BUILD_LOG for details !!"
+ echo
+ exit 1
fi
-do_one_parallel ionization
-
-if [ ! -r data/atm_data ]
-then
- do_input_data atm
-fi
-do_one atm
-do_one turb
-
-do_one sample
-
-do_one star_data
-do_one_parallel gyre
-do_one adipls
-do_one_parallel star
-do_one_parallel binary
-do_one_parallel astero
-
echo
echo
@@ -396,4 +245,4 @@ echo
echo
# end scope and redirect output
-} 2>&1 | tee -a $BUILD_LOG
+} 2>&1 | tee -a $BUILD_LOG | grep -Ev "(Leaving|Entering) directory"
diff --git a/interp_1d/Makefile b/interp_1d/Makefile
new file mode 100644
index 000000000..d4949a15e
--- /dev/null
+++ b/interp_1d/Makefile
@@ -0,0 +1,33 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := interp_1d
+SRCS := public/interp_1d_def.f90 \
+ public/interp_1d_lib_sg.f90 \
+ public/interp_1d_lib.f90 \
+ private/interp_1d_misc_sg.f90 \
+ private/interp_1d_mp.f90 \
+ private/interp_1d_mp_sg.f90 \
+ private/interp_1d_pm.f90 \
+ private/interp_1d_pm_sg.f90 \
+ private/interp_1d_misc.f90 \
+ private/interp_1d_mp_autodiff.f90 \
+ private/interp_1d_pm_autodiff.f90
+SRCS_CHECK = test/src/interp_1d_support.f90 \
+ test/src/interp_1d_support_sg.f90 \
+ test/src/test_interp_1d.f90
+INTERNAL_DEPENDS_ON := const math utils auto_diff
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := interp_1d_lib.mod interp_1d_def.mod interp_1d_lib_sg.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/interp_1d/build_and_test b/interp_1d/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/interp_1d/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/interp_1d/build_and_test_parallel b/interp_1d/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/interp_1d/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/interp_1d/clean b/interp_1d/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/interp_1d/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/interp_1d/copy_extras b/interp_1d/copy_extras
deleted file mode 100755
index 1677e3930..000000000
--- a/interp_1d/copy_extras
+++ /dev/null
@@ -1,4 +0,0 @@
-mkdir new/test/plot_data
-mkdir new/test/plot_out
-cp -r test/test_data new/test/test_data
-cp test/*.rb new/test
diff --git a/interp_1d/export b/interp_1d/export
deleted file mode 100755
index db3250885..000000000
--- a/interp_1d/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/interp_1d/i1 b/interp_1d/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/interp_1d/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/interp_1d/i1p b/interp_1d/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/interp_1d/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/interp_1d/make/makefile b/interp_1d/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/interp_1d/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/interp_1d/make/makefile_base b/interp_1d/make/makefile_base
deleted file mode 100644
index 90049154f..000000000
--- a/interp_1d/make/makefile_base
+++ /dev/null
@@ -1,119 +0,0 @@
-# This is the makefile for the mesa 1D interpolation library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- interp_1d_misc.f90 \
- interp_1d_pm.f90 \
- interp_1d_pm_autodiff.f90 \
- interp_1d_mp.f90 \
- interp_1d_mp_autodiff.f90\
- interp_1d_misc_sg.f90 \
- interp_1d_pm_sg.f90 \
- interp_1d_mp_sg.f90 \
- interp_1d_lib.f90 \
- interp_1d_lib_sg.f90 \
- interp_1d_def.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = auto_diff $(LIBS_MATRIX)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) -lauto_diff $(LOAD_MATRIX)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libinterp_1d.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) interp_1d_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) interp_1d_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) interp_1d_lib_sg.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/interp_1d/mk b/interp_1d/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/interp_1d/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/interp_1d/test/ck b/interp_1d/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/interp_1d/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/interp_1d/test/clean b/interp_1d/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/interp_1d/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/interp_1d/test/cleanup b/interp_1d/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/interp_1d/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/interp_1d/test/export b/interp_1d/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/interp_1d/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/interp_1d/test/make/makefile b/interp_1d/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/interp_1d/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/interp_1d/test/make/makefile_base b/interp_1d/test/make/makefile_base
deleted file mode 100644
index 057ff80d7..000000000
--- a/interp_1d/test/make/makefile_base
+++ /dev/null
@@ -1,86 +0,0 @@
-# This is the makefile for testing the interp_1d library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = interp_1d_support.f90 interp_1d_support_sg.f90 test_interp_1d.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = interp_1d
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = auto_diff $(LIBS_MATRIX)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lauto_diff $(LOAD_MATRIX)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/interp_1d/test/mk b/interp_1d/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/interp_1d/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/interp_1d/test/mkx b/interp_1d/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/interp_1d/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/interp_1d/test/rn b/interp_1d/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/interp_1d/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/interp_2d/Makefile b/interp_2d/Makefile
new file mode 100644
index 000000000..2500f3097
--- /dev/null
+++ b/interp_2d/Makefile
@@ -0,0 +1,35 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := interp_2d
+SRCS := public/interp_2d_lib_db.f90 \
+ public/interp_2d_lib_sg.f90 \
+ private/akima760_db.f \
+ private/akima760_sg.f \
+ private/bicub_db.f \
+ private/bicub_sg.f \
+ private/bipm_db.f90 \
+ private/bipm_sg.f90 \
+ private/renka790_db.f \
+ private/renka790_sg.f
+SRCS_CHECK = test/src/interp_2d_support.f90 \
+ test/src/test_akima_db.f \
+ test/src/test_akima_sg.f \
+ test/src/test_interp_2d.f90 \
+ test/src/test_renka790_db.f \
+ test/src/test_renka790_sg.f
+INTERNAL_DEPENDS_ON := const utils math num interp_1d
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := interp_2d_lib_db.mod interp_2d_lib_sg.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/interp_2d/build_and_test b/interp_2d/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/interp_2d/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/interp_2d/build_and_test_parallel b/interp_2d/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/interp_2d/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/interp_2d/clean b/interp_2d/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/interp_2d/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/interp_2d/copy_extras b/interp_2d/copy_extras
deleted file mode 100755
index 1677e3930..000000000
--- a/interp_2d/copy_extras
+++ /dev/null
@@ -1,4 +0,0 @@
-mkdir new/test/plot_data
-mkdir new/test/plot_out
-cp -r test/test_data new/test/test_data
-cp test/*.rb new/test
diff --git a/interp_2d/export b/interp_2d/export
deleted file mode 100755
index db3250885..000000000
--- a/interp_2d/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/interp_2d/i1 b/interp_2d/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/interp_2d/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/interp_2d/i1p b/interp_2d/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/interp_2d/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/interp_2d/make/makefile b/interp_2d/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/interp_2d/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/interp_2d/make/makefile_base b/interp_2d/make/makefile_base
deleted file mode 100644
index bb2209a79..000000000
--- a/interp_2d/make/makefile_base
+++ /dev/null
@@ -1,137 +0,0 @@
-# This is the makefile for the mesa interp_2d library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- bicub_sg.f \
- bicub_db.f \
- bipm_db.f90 \
- bipm_sg.f90 \
- akima760_sg.f \
- akima760_db.f \
- renka790_sg.f \
- renka790_db.f \
- interp_2d_lib_db.f90 \
- interp_2d_lib_sg.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = num auto_diff interp_1d $(LIBS_MATRIX)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) -lnum -lauto_diff -linterp_1d $(LOAD_MATRIX)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libinterp_2d.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) interp_2d_lib_db.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) interp_2d_lib_sg.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-COMPILE_FIXED = $(COMPILE_NO_CHECKS) $(FCfixed)
-
-COMPILE_LEGACY = $(filter-out -std=f2008, $(COMPILE_FIXED))
-
-renka790_sg.o renka790_db.o bicub_sg.o bicub_db.o : %.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_NO_CHECKS $<
- @$(COMPILE_NO_CHECKS) $(FCfixed) $<
-else
- $(COMPILE_NO_CHECKS) $(FCfixed) $<
-endif
-
-akima760_sg.o akima760_db.o : %.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_LEGACY $<
- @$(COMPILE_LEGACY) $<
-else
- $(COMPILE_LEGACY) $<
-endif
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_FIXED $<
- @$(COMPILE_FIXED) $<
-else
- $(COMPILE_FIXED) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/interp_2d/mk b/interp_2d/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/interp_2d/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/interp_2d/test/ck b/interp_2d/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/interp_2d/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/interp_2d/test/clean b/interp_2d/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/interp_2d/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/interp_2d/test/cleanup b/interp_2d/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/interp_2d/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/interp_2d/test/export b/interp_2d/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/interp_2d/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/interp_2d/test/make/makefile b/interp_2d/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/interp_2d/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/interp_2d/test/make/makefile_base b/interp_2d/test/make/makefile_base
deleted file mode 100644
index 8c78af8ad..000000000
--- a/interp_2d/test/make/makefile_base
+++ /dev/null
@@ -1,106 +0,0 @@
-# This is the makefile for testing the mesa interp_2d library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-TEST_SRCS = \
- test_renka790_sg.f test_renka790_db.f \
- test_akima_sg.f test_akima_db.f \
- interp_2d_support.f90 test_interp_2d.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = interp_2d
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = num interp_1d auto_diff $(LIBS_MATRIX)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lnum -linterp_1d -lauto_diff $(LOAD_MATRIX)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-TEST_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TEST_SRCS)))
-
-all : $(TEST)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-TEST_COMPILE_LEGACY = $(filter-out -std=f2008, $(TEST_COMPILE))
-
-%.o: %.f
-ifneq ($(QUIET),)
- @echo TEST_COMPILE_LEGACY $<
- @$(TEST_COMPILE_LEGACY) $(FCfixed) $<
-else
- $(TEST_COMPILE_LEGACY) $(FCfixed) $<
-endif
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/interp_2d/test/mk b/interp_2d/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/interp_2d/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/interp_2d/test/mkx b/interp_2d/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/interp_2d/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/interp_2d/test/rn b/interp_2d/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/interp_2d/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/ionization/Makefile b/ionization/Makefile
new file mode 100644
index 000000000..c87eecc35
--- /dev/null
+++ b/ionization/Makefile
@@ -0,0 +1,32 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := ionization
+SRCS := public/ionization_def.f90 \
+ public/ionization_lib.f90 \
+ private/ion_tables_load.f90 \
+ private/ion_tables_eval.f90 \
+ private/ion_table_plot.f90 \
+ private/mod_ionization.f90
+SRCS_CHECK := test/src/test_ionization.f90 test/src/test_ionization_support.f90
+INTERNAL_DEPENDS_ON := const utils math interp_2d chem
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := ionization_def.mod ionization_lib.mod
+INSTALL_INCLUDES :=
+EXTRACT_DATA_COMMANDS += install-ionization-data
+
+include $(MAKE_DIR)/Makefile
+
+install-ionization-data:
+ if [ ! -r ../data/ionozation_data ]; then \
+ tar -xJf test/ionization_data.tar.xz -C ../data; \
+ fi
diff --git a/ionization/build_and_test b/ionization/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/ionization/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/ionization/build_and_test_parallel b/ionization/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/ionization/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/ionization/build_data_and_export b/ionization/build_data_and_export
deleted file mode 100755
index a0eeb9dc6..000000000
--- a/ionization/build_data_and_export
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-
-echo 'create ionization_data'
-
-rm -rf ionization_data
-
-echo 'tar xfJ ionization_data.tar.xz'
-tar xfJ test/ionization_data.tar.xz
-check_okay
-
-rm -rf ../data/ionization_data
-check_okay
-
-mkdir ../data/ionization_data
-check_okay
-
-mv ionization_data/*.data ../data/ionization_data
-check_okay
-
-mkdir ../data/ionization_data/cache
-check_okay
-
-echo "done"
diff --git a/ionization/clean b/ionization/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/ionization/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/ionization/export b/ionization/export
deleted file mode 100755
index db3250885..000000000
--- a/ionization/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/ionization/i1 b/ionization/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/ionization/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/ionization/i1p b/ionization/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/ionization/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/ionization/make/makefile b/ionization/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/ionization/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/ionization/make/makefile_base b/ionization/make/makefile_base
deleted file mode 100644
index f1317b9ba..000000000
--- a/ionization/make/makefile_base
+++ /dev/null
@@ -1,111 +0,0 @@
-# This is the makefile for the mesa ionization package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- ionization_def.f90 \
- ion_tables_load.f90 \
- ion_tables_eval.f90 \
- ion_table_plot.f90 \
- mod_ionization.f90 \
- ionization_lib.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MESA_NUMERICS)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) -lnet -leos -lkap -lrates -lchem $(LOAD_MESA_NUMERICS)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libionization.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) ionization_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) ionization_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
- -include .depend
-
-endif
diff --git a/ionization/mk b/ionization/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/ionization/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/ionization/preprocessor/Makefile b/ionization/preprocessor/Makefile
new file mode 100644
index 000000000..27c28100b
--- /dev/null
+++ b/ionization/preprocessor/Makefile
@@ -0,0 +1,34 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := ionization-preprocessor
+SRCS := src/def_args.f90 \
+ src/def_const.f90 \
+ src/def_type.f90 \
+ src/lib_alert.f90 \
+ src/lib_rkqsstep.f90 \
+ src/lib_util.f90 \
+ src/mod_bi.f90 \
+ src/mod_density.f90 \
+ src/mod_fast_tfdh.f90 \
+ src/mod_gfdi.f90 \
+ src/mod_run_tfdh.f90 \
+ src/mod_tfdh.f90 \
+ src/root_chi.f90 \
+ src/root_vex.f90 \
+ src/main.f90
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON := ionization
+EXTERNAL_DEPENDS_ON :=
+CHECK_RESULTS_GOLDEN :=
+INCLUDE_DIRS := -Isrc
+
+# Install
+
+MODULES :=
+INSTALL_INCLUDES :=
+BINTYPE := executable
+
+include ../../make/Makefile
+
+build-data:
+
diff --git a/ionization/preprocessor/mk b/ionization/preprocessor/mk
deleted file mode 100755
index 636f231d5..000000000
--- a/ionization/preprocessor/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd src; make $1
diff --git a/ionization/preprocessor/rn b/ionization/preprocessor/rn
deleted file mode 100755
index 2a6fb7b6c..000000000
--- a/ionization/preprocessor/rn
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-# a script to call the tfdh code with an output directory
-
-mkdir ./data/$1
-./src/tfdh ./data/$1
diff --git a/ionization/preprocessor/src/lib_alert.f90 b/ionization/preprocessor/src/lib_alert.f90
index bf89b7e0b..abc661b42 100644
--- a/ionization/preprocessor/src/lib_alert.f90
+++ b/ionization/preprocessor/src/lib_alert.f90
@@ -17,6 +17,7 @@ module lib_alert
contains
subroutine alert(flag, message)
+ use utils_lib, only: mesa_error
integer, intent(in) :: flag
character(*), intent(in) :: message
diff --git a/ionization/preprocessor/src/main.f90 b/ionization/preprocessor/src/main.f90
index ab54d7493..28627ef6d 100644
--- a/ionization/preprocessor/src/main.f90
+++ b/ionization/preprocessor/src/main.f90
@@ -52,8 +52,8 @@ program main
!
! read in directory and assign file names for output
!
- if (iargc() /= 1) call alert(1, '(main) tfdh takes 1 argument - an output directory')
- call getarg(1, dir)
+ if (command_argument_count() /= 1) call alert(1, '(main) tfdh takes 1 argument - an output directory')
+ call get_command_argument(1, dir)
file_profile = trim(dir)//'/'//'profile'
file_z = trim(dir)//'/'//'z_table'
diff --git a/ionization/preprocessor/src/maintest.f90 b/ionization/preprocessor/src/maintest.f90
deleted file mode 100644
index 238e823ab..000000000
--- a/ionization/preprocessor/src/maintest.f90
+++ /dev/null
@@ -1,122 +0,0 @@
-!
-! maintest
-! francois hebert, dec 26 2010
-!
-! generate simple file with summary info from a single tfdh calculation..
-! with the purpose of comparing to a "reference" file to determine compilation success
-!
-! NOTE: use caution in modifying! you may no longer be able to meaningfully
-! compare with provided reference file
-!
-
-program maintest
-
- use def_args
- use def_type
- use def_const
- use lib_util
- use mod_run_tfdh
-
- implicit none
-
- !======================================================================
- !======================================================================
-
- real(dp) :: ztr, tmp, ne, rho
- real(dp), dimension(:), allocatable :: as, xs, zs
- integer :: i, j, ns
- type(datastruct) :: args
- logical :: return_profile
-
- integer, parameter :: f_unit = 1
- character(len=20) :: tmpstring
- character(len=64) :: dir, testfile
-
- !======================================================================
- !======================================================================
-
- !
- ! read in directory and assign file name for output
- !
- if (iargc() /= 1) call alert(1, '(main) tfdh takes 1 argument - an output directory')
- call getarg(1, dir)
-
- testfile = trim(dir)//'/'//'test_file'
-
- !======================================================================
- !======================================================================
-
- !
- ! setup
- !
- ztr = 26_dp
- ne = 1e27_dp
- tmp = 1e7_dp
-
- ns = 2
- call reallocate_dp(xs, ns)
- call reallocate_dp(zs, ns)
- call reallocate_dp(as, ns)
- xs = [0.5_dp, 0.5_dp]
- zs = [1.0_dp, 2.0_dp]
- as = [1.0_dp, 4.0_dp]
-
- return_profile = .false.
-
- write (*, *) 'initialization complete'
-
- !
- ! run code
- !
- write (*, *) 'running..'
- call run_tfdh(ztr, tmp, ne, xs, zs, as, return_profile, args)
-
- !
- ! write info to file
- ! NOTE: tmpstring formatting is unable to support ns > 9
- !
- write (*, *) 'writing summary to file..'
-
- open (unit=f_unit, file=testfile)
- call write_header(ztr, tmp, ne, xs, zs, as)
- write (f_unit, *) 'kt = ', args%kt
- write (f_unit, *) 'ne = ', args%neinf
- write (f_unit, *) 'mu = ', args%mu
- write (f_unit, *) 'rho = ', args%mu*args%neinf*mp
- write (f_unit, *) 'dv0 = ', args%dv0
- write (f_unit, *) 'znet = ', args%znet
- write (f_unit, *) 'rex1 = ', args%rex(1)
- write (f_unit, *) 'rex2 = ', args%rex(2)
- write (f_unit, *) 'rws = ', args%rws
- write (f_unit, *) 'nerws = ', args%nerws
- close (f_unit)
-
- !======================================================================
- !======================================================================
-
-contains
-
- subroutine write_header(ztr, tmp, ne, xs, zs, as)
-
- real(dp), intent(in) :: ztr, tmp, ne
- real(dp), intent(in), dimension(:) :: xs, zs, as
-
- integer :: ns, i
-
- ns = size(xs)
- if (ns /= size(as)) call alert(1, '(main: write_header) composition vectors xs,as of different length')
- if (ns /= size(zs)) call alert(1, '(main: write_header) composition vectors xs,zs of different length')
-
- write (f_unit, '(3a20)') 'Z_trace', 'log ne', 'log T'
- write (f_unit, '(3es20.9)') ztr, log10(ne), log10(tmp)
- write (f_unit, *) ''
-
- write (f_unit, '(4a20)') 'element #', 'X', 'Z', 'A'
- do i = 1, ns
- write (f_unit, '(i20,3es20.9)') i, xs(i), zs(i), as(i)
- end do
- write (f_unit, *) ''
-
- end subroutine write_header
-
-end program maintest
diff --git a/ionization/preprocessor/src/makefile b/ionization/preprocessor/src/makefile
deleted file mode 100755
index 42185af9e..000000000
--- a/ionization/preprocessor/src/makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-FC=gfortran
-FCFLAGS=-ffree-form -O2 #-std=f2003
-LDFLAGS=
-
-SOURCES=def_args.f90\
-def_const.f90\
-def_type.f90\
-lib_alert.f90\
-lib_rkqsstep.f90\
-lib_util.f90\
-mod_bi.f90\
-mod_density.f90\
-mod_fast_tfdh.f90\
-mod_gfdi.f90\
-mod_run_tfdh.f90\
-mod_tfdh.f90\
-root_chi.f90\
-root_vex.f90
-OBJECTS=$(SOURCES:.f90=.o)
-
-SRCMAIN=main.f90
-OBJMAIN=$(SRCMAIN:.f90=.o)
-EXECUTABLE=tfdh
-
-SRCTEST=maintest.f90
-OBJTEST=$(SRCTEST:.f90=.o)
-TESTEXECUTABLE=tfdh_test
-
-#################################################
-
-all: $(EXECUTABLE)
-
-$(EXECUTABLE): $(OBJECTS) $(OBJMAIN)
- $(FC) $(FCFLAGS) $(OBJECTS) $(OBJMAIN) -o $(EXECUTABLE)
-
-
-test: $(TESTEXECUTABLE)
-
-$(TESTEXECUTABLE): $(OBJECTS) $(OBJTEST)
- $(FC) $(FCFLAGS) $(OBJECTS) $(OBJTEST) -o $(TESTEXECUTABLE)
-
-
-.f90.o:
- $(FC) $(FCFLAGS) -c $<
-
-
-clean:
- rm -f *.o *.mod $(EXECUTABLE) $(TESTEXECUTABLE)
-
-
-#################################################
-# dependencies in the code
-main.o: def_args.o def_const.o def_type.o lib_util.o mod_run_tfdh.o
-maintest.o: def_args.o def_const.o def_type.o lib_util.o mod_run_tfdh.o
-mod_run_tfdh.o: def_args.o def_const.o def_type.o lib_util.o mod_tfdh.o root_chi.o root_vex.o
-mod_tfdh.o: def_args.o def_const.o def_type.o lib_alert.o lib_rkqsstep.o lib_util.o mod_density.o
-root_vex.o: def_args.o def_type.o mod_fast_tfdh.o
-mod_fast_tfdh.o: def_args.o def_const.o def_type.o lib_rkqsstep.o mod_density.o
-root_chi.o: def_type.o mod_density.o
-mod_density.o: lib_alert.o def_args.o def_type.o mod_gfdi.o mod_bi.o
-mod_bi.o: def_args.o def_type.o lib_alert.o lib_rkqsstep.o
-lib_rkqsstep.o: def_args.o def_type.o lib_alert.o
-mod_gfdi.o: def_type.o def_const.o lib_alert.o
-lib_util.o: def_type.o
-def_const.o: def_type.o
-def_args.o: def_type.o
-def_type.o:
-lib_alert.o:
-#################################################
-
diff --git a/ionization/preprocessor/testdir/diff_file b/ionization/preprocessor/testdir/diff_file
deleted file mode 100644
index 630e36d9e..000000000
--- a/ionization/preprocessor/testdir/diff_file
+++ /dev/null
@@ -1 +0,0 @@
-### Maximum relative error in matching lines = 1.17e-08 at line 14 field 3
diff --git a/ionization/preprocessor/testdir/reference_file b/ionization/preprocessor/testdir/reference_file
deleted file mode 100644
index d47dc94e2..000000000
--- a/ionization/preprocessor/testdir/reference_file
+++ /dev/null
@@ -1,17 +0,0 @@
- Z_trace log ne log T
- 2.600000000E+01 2.700000000E+01 7.000000000E+00
-
- element # X Z A
- 1 5.000000000E-01 1.000000000E+00 1.000000000E+00
- 2 5.000000000E-01 2.000000000E+00 4.000000000E+00
-
- kt = 1.38065049999999994E-009
- ne = 1.00000000000000001E+027
- mu = 1.3333333333333333
- rho = 2230.1641333333332
- dv0 = -33.563394350167073
- znet = 22.170802712108351
- rex1 = 1.02860692654225559E-009
- rex2 = 1.30033273698273485E-009
- rws = 1.83778589032405691E-009
- nerws = 1.04606097456700664E+027
diff --git a/ionization/preprocessor/testdir/test_file b/ionization/preprocessor/testdir/test_file
deleted file mode 100644
index 1674fd430..000000000
--- a/ionization/preprocessor/testdir/test_file
+++ /dev/null
@@ -1,17 +0,0 @@
- Z_trace log ne log T
- 2.600000000E+01 2.700000000E+01 7.000000000E+00
-
- element # X Z A
- 1 5.000000000E-01 1.000000000E+00 1.000000000E+00
- 2 5.000000000E-01 2.000000000E+00 4.000000000E+00
-
- kt = 1.38065049999999994E-009
- ne = 1.00000000000000001E+027
- mu = 1.3333333333333333
- rho = 2230.1641333333332
- dv0 = -33.563394350167073
- znet = 22.170802723712811
- rex1 = 1.02860691451767144E-009
- rex2 = 1.30033272540110612E-009
- rws = 1.83778589032405691E-009
- nerws = 1.04606097367744676E+027
diff --git a/ionization/preprocessor/testscript b/ionization/preprocessor/testscript
deleted file mode 100755
index 163b500bc..000000000
--- a/ionization/preprocessor/testscript
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-# a script to test that compiling and linking
-# produces a code that works as expected..
-
-cd src; make test
-cd ..
-
-./src/tfdh_test ./testdir
-
-echo "checking that file matches reference"
-
-cd testdir; ndiff -relerr 1d-7 reference_file test_file > diff_file
-
-if [[ -s diff_file ]]; then
- echo "does not match.. see testdir/diff_file for more"
-else
- echo "matches.. success!"
-fi
\ No newline at end of file
diff --git a/ionization/test/ck b/ionization/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/ionization/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/ionization/test/clean b/ionization/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/ionization/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/ionization/test/cleanup b/ionization/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/ionization/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/ionization/test/export b/ionization/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/ionization/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/ionization/test/make/makefile b/ionization/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/ionization/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/ionization/test/make/makefile_base b/ionization/test/make/makefile_base
deleted file mode 100644
index 3713025ed..000000000
--- a/ionization/test/make/makefile_base
+++ /dev/null
@@ -1,98 +0,0 @@
-# This is the makefile for testing the mesa ionization package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-TEST_SRCS = test_ionization_support.f90 test_ionization.f90
-
-TESTQ_SRCS = test_ionization_support.f90 test_ionization_quietly.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = ionization
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = net eos kap rates chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lnet -leos -lkap -lrates -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-TESTQ = $(TEST_DIR)/test_quietly
-
-TEST_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TEST_SRCS)))
-TESTQ_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TESTQ_SRCS)))
-
-all : $(TEST) $(TESTQ)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(TESTQ) : $(TESTQ_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-$(TESTQ) : OBJS = $(TESTQ_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST) $(TESTQ)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/ionization/test/mk b/ionization/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/ionization/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/ionization/test/mkx b/ionization/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/ionization/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/ionization/test/rn b/ionization/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/ionization/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/ionization/test/src/test_ionization_quietly.f90 b/ionization/test/src/test_ionization_quietly.f90
deleted file mode 100644
index 2efab8af5..000000000
--- a/ionization/test/src/test_ionization_quietly.f90
+++ /dev/null
@@ -1,9 +0,0 @@
-program test_ionization_quietly
-
- use test_ionization_support
-
- implicit none
-
- call do_test(.true.)
-
-end program test_ionization_quietly
diff --git a/kap/Makefile b/kap/Makefile
new file mode 100644
index 000000000..bf4fa8e6c
--- /dev/null
+++ b/kap/Makefile
@@ -0,0 +1,57 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := kap
+SRCS = \
+ private/cubic_interpolator.f90 \
+ private/op_def.f90 \
+ private/op_load.f \
+ private/op_load_master.f90 \
+ private/op_common.f \
+ private/op_ev.f90 \
+ private/op_osc.f \
+ private/op_radacc.f90 \
+ private/op_eval.f90 \
+ private/op_eval_mombarg.f90 \
+ private/kap_eval_support.f90 \
+ private/condint.f90 \
+ private/load_co_kap.f90 \
+ private/load_kap.f90 \
+ private/kap_eval_fixed.f90 \
+ private/kap_eval_co.f90 \
+ private/kap_eval.f90 \
+ private/kap_ctrls_io.f90 \
+ private/kapcn.f90 \
+ private/kap_aesopus.f90 \
+ public/kap_def.f90 \
+ public/kap_lib.f90 \
+ other/other_elect_cond_opacity.f90 \
+ other/other_compton_opacity.f90 \
+ other/other_radiative_opacity.f90
+SRCS_CHECK = \
+ test/src/test_kap.f90 \
+ test/src/test_kap_support.f90
+INTERNAL_DEPENDS_ON := const utils math auto_diff num chem interp_1d interp_2d forum eos
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+INCLUDE_DIRS := -Iprivate -Ipublic -Idefaults
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := kap_def.mod kap_lib.mod
+EXTRACT_DATA_COMMANDS += install-kap
+
+include $(MAKE_DIR)/Makefile
+
+install-kap:
+ if [ ! -r ../data/kap_data ]; then \
+ mkdir -p ../data/kap_data; \
+ tar -xJf kap_data.tar.xz -C ../data; \
+ tar -xJf kapcn_data.txz -C ../data; \
+ cp AESOPUS_AGSS09.h5 ../data/kap_data; \
+ fi
diff --git a/kap/build_and_test b/kap/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/kap/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/kap/build_and_test_parallel b/kap/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/kap/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/kap/build_data_and_export b/kap/build_data_and_export
deleted file mode 100755
index 242894afd..000000000
--- a/kap/build_data_and_export
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-echo 'create kap_data'
-
-mkdir -p data
-cd data
-check_okay
-
-rm -rf kap_data
-
-echo 'tar xfJ kap_data.tar.xz'
-tar xfJ ../kap_data.tar.xz
-check_okay
-
-echo 'tar xfJ kapcn_data.txz'
-tar xfJ ../kapcn_data.txz
-check_okay
-
-echo 'copy AESOPUS_AGSS09.h5'
-cp ../AESOPUS_AGSS09.h5 kap_data
-check_okay
-
-cd ..
-
-rm -rf ../data/kap_data
-check_okay
-
-mkdir ../data/kap_data
-check_okay
-
-mv data/kap_data/*.data ../data/kap_data
-check_okay
-
-mv data/kap_data/*.h5 ../data/kap_data
-check_okay
-
-mkdir ../data/kap_data/cache
-check_okay
diff --git a/kap/clean b/kap/clean
deleted file mode 100755
index b6c78afc7..000000000
--- a/kap/clean
+++ /dev/null
@@ -1,3 +0,0 @@
-cd make; make clean
-cd ../preprocessor; ./clean
-cd ../test/make; make clean
diff --git a/kap/export b/kap/export
deleted file mode 100755
index db3250885..000000000
--- a/kap/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/kap/i1 b/kap/i1
deleted file mode 100755
index 0d5651693..000000000
--- a/kap/i1
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/i1 && \
-./i1_preprocessors
diff --git a/kap/i1_preprocessors b/kap/i1_preprocessors
deleted file mode 100755
index 5332bde56..000000000
--- a/kap/i1_preprocessors
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "build FAILED"
- echo
- exit 1
- fi
-}
-
-cd preprocessor/make
-make ../ckap
-check_okay
-cd ../..
-
diff --git a/kap/i1p b/kap/i1p
deleted file mode 100755
index 8416268a9..000000000
--- a/kap/i1p
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/i1p && \
-./i1_preprocessors
diff --git a/kap/make/makefile b/kap/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/kap/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/kap/make/makefile_base b/kap/make/makefile_base
deleted file mode 100644
index 4c9e6b22b..000000000
--- a/kap/make/makefile_base
+++ /dev/null
@@ -1,151 +0,0 @@
-# This is the makefile for the mesa opacities library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- cubic_interpolator.f90 \
- kap_def.f90 \
- op_def.f90 \
- op_load.f \
- op_load_master.f90 \
- op_common.f \
- op_ev.f90 \
- op_osc.f \
- op_radacc.f90 \
- op_eval.f90 \
- op_eval_mombarg.f90 \
- kap_eval_support.f90 \
- condint.f90 \
- load_co_kap.f90 \
- load_kap.f90 \
- kap_eval_fixed.f90 \
- kap_eval_co.f90 \
- kap_eval.f90 \
- kap_ctrls_io.f90 \
- kap_lib.f90 \
- kapcn.f90 \
- kap_aesopus.f90 \
- other_elect_cond_opacity.f90 \
- other_compton_opacity.f90 \
- other_radiative_opacity.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = eos chem $(LIBS_MESA_NUMERICS)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lchem $(LOAD_MESA_NUMERICS)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libkap.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-#################################################################
-#
-# COMPILATION RULES
-
-MOD_DEFAULTS_DIR = $(MODULE_DIR)/defaults
-INCLUDE_DEFAULTS = -I$(MOD_DEFAULTS_DIR)
-
-MOD_OTHER_DIR = $(MODULE_DIR)/other
-INCLUDE_OTHER = -I$(MOD_OTHER_DIR)
-
-MOD_INCLUDES = $(INCLUDE_DEFAULTS) $(INCLUDE_OTHER)
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree) $(MOD_INCLUDES)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree) $(MOD_INCLUDES)
-
-COMPILE_CMD = $(COMPILE)
-
-COMPILE_LEGACY_NOCHECKS = $(filter-out -std=f2008, $(COMPILE_NO_CHECKS))
-
-op_load.o op_common.o op_osc.o: %.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_LEGACY_NOCHECKS $<
- @$(COMPILE_LEGACY_NOCHECKS) $(FCfixed) $<
-else
- $(COMPILE_LEGACY_NOCHECKS) $(FCfixed) $<
-endif
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) kap_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) kap_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR):$(MOD_OTHER_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.defaults $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/kap/mk b/kap/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/kap/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/kap/plotter/.gitignore b/kap/plotter/.gitignore
index bd92f9145..8837bffe5 100644
--- a/kap/plotter/.gitignore
+++ b/kap/plotter/.gitignore
@@ -1,4 +1,3 @@
kap_plotter.dat
kap_plotter.png
kap_plotter.pdf
-plotter
diff --git a/kap/plotter/Makefile b/kap/plotter/Makefile
new file mode 100644
index 000000000..4d96bb703
--- /dev/null
+++ b/kap/plotter/Makefile
@@ -0,0 +1,25 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := kap-plotter
+SRCS := src/kap_plotter.f90
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON := kap
+EXTERNAL_DEPENDS_ON :=
+CHECK_RESULTS_GOLDEN :=
+INCLUDE_DIRS := -Isrc
+
+# Install
+
+MODULES :=
+INSTALL_INCLUDES :=
+BINTYPE := executable
+
+include ../../make/Makefile
+
+kap_plotter.dat: $(OBJ_OUT)
+ $(OBJ_OUT)
+
+plot: kap_plotter.dat
+ ./plotter.py
+
+.PHONY: plot
diff --git a/kap/plotter/README.rst b/kap/plotter/README.rst
index ba97e5c79..bc514f59c 100644
--- a/kap/plotter/README.rst
+++ b/kap/plotter/README.rst
@@ -1,28 +1,15 @@
These plotting programs and scripts aim to make it simple to plot opacities.
-To use them, first compile the kap plotter program::
-
- ./clean
- ./mk
-
-The options that control what data is output by the program are
-documented in the file ``inlist_plotter``. This inlist contains two
-namelists: the ``kap`` namelist that controls the MESA ``kap`` module
-and the ``plotter`` namelist that controls the plotter program (see
-source in ``src/kap_plotter.f90``). Edit these namelists so that the
-plotter will output the desired quantities.
+The options that control what data is output by the program are documented in
+the file ``inlist_plotter``. This inlist contains two namelists: the ``kap``
+namelist that controls the MESA ``kap`` module and the ``plotter`` namelist
+that controls the plotter program (see source in ``src/kap_plotter.f90``). Edit
+these namelists so that the plotter will output the desired quantities.
Then, run the plotter::
- ./plotter
-
-This will create an output data file ``kap_plotter.dat``.
-
-A python script that knows how to read this file and plot it using
-matplotlib is provided. You can invoke it via::
-
- ./plotter.py
+ make plot
-This will produce a plot file ``kap_plotter.png`` that you can then
-view. You may need to edit the python file to manually adjust various
-aspects of the plotting (e.g., colorbar limits).
+This will produce a plot file ``kap_plotter.png`` that you can then view. You
+may need to edit the python file to manually adjust various aspects of the
+plotting (e.g., colorbar limits).
diff --git a/kap/plotter/clean b/kap/plotter/clean
deleted file mode 100755
index 356f57db5..000000000
--- a/kap/plotter/clean
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make clean
diff --git a/kap/plotter/make/makefile b/kap/plotter/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/kap/plotter/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/kap/plotter/make/makefile_base b/kap/plotter/make/makefile_base
deleted file mode 100644
index 3f8c1259f..000000000
--- a/kap/plotter/make/makefile_base
+++ /dev/null
@@ -1,92 +0,0 @@
-# This is the makefile for testing the mesa kap_plotter library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-KAP_PLOTTER_SRCS = kap_plotter.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_OTHER = net eos kap rates chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lnet -leos -lkap -lrates -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-KAP_PLOTTER = ../plotter
-
-KAP_PLOTTER_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(KAP_PLOTTER_SRCS)))
-
-all: $(KAP_PLOTTER)
-
-$(KAP_PLOTTER) : $(KAP_PLOTTER_OBJS) $(DEPS_OTHER)
-
-$(KAP_PLOTTER) : OBJS = $(KAP_PLOTTER_OBJS)
-
-$(KAP_PLOTTER) :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER) $(LDFLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER) $(LDFLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(KAP_PLOTTER) *.smod
-
-install:
- @:
-
-#################################################################
-#
-# COMPILATION RULES
-
-MY_FC_FLAGS = $(FCfree)
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo FC $<
- @$(FC) $(FCbasic) $(MY_FC_FLAGS) -I$(MESA_INCLUDE_DIR) -c $<
-else
- $(FC) $(FCbasic) $(MY_FC_FLAGS) -I$(MESA_INCLUDE_DIR) -c $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = ../src
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
-
diff --git a/kap/plotter/mk b/kap/plotter/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/kap/plotter/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/kap/plotter/rn b/kap/plotter/rn
deleted file mode 100755
index 9d5cb987c..000000000
--- a/kap/plotter/rn
+++ /dev/null
@@ -1 +0,0 @@
-./plotter && ./plotter.py
diff --git a/kap/preprocessor/AESOPUS/aesopus.py b/kap/preprocessor/AESOPUS/aesopus.py
index 8598c416a..60d9b0546 100755
--- a/kap/preprocessor/AESOPUS/aesopus.py
+++ b/kap/preprocessor/AESOPUS/aesopus.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
import h5py
-import io
import os
import sys
import yaml
@@ -61,8 +60,11 @@ def _parse_description(self):
def _read_table(self, table):
"""Extract opacities into array"""
- stream = io.StringIO("".join(table))
- data = np.loadtxt(stream, comments="#", dtype="float32")
+ data = np.loadtxt(
+ (r.replace("-250.0000", " -99.0000") for r in table),
+ comments="#",
+ dtype="float32",
+ )
# data has temperatures in decreasing order; reverse
self.data = np.flipud(data[:, 1:])
diff --git a/kap/preprocessor/AESOPUS/build_4_export b/kap/preprocessor/AESOPUS/build_4_export
deleted file mode 100755
index 3308a9ea8..000000000
--- a/kap/preprocessor/AESOPUS/build_4_export
+++ /dev/null
@@ -1,8 +0,0 @@
-cp AESOPUS_AGSS09.h5 ../..
-
-echo "**************"
-echo "**************"
-echo "next step is"
-echo "cd ../.. ; ./build_data_and_export"
-echo "**************"
-echo "**************"
diff --git a/kap/preprocessor/AESOPUS/preprocess b/kap/preprocessor/AESOPUS/preprocess
deleted file mode 100755
index c153bae8f..000000000
--- a/kap/preprocessor/AESOPUS/preprocess
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-# unpack tables
-mkdir -p ags09
-tar xv -C ags09 -f aesopus_ags09.tar.xz
-
-# many of these AESOPUS tables contain lines like
-# 3.200-250.0000-250.0000-250.0000...
-# since there is no space separation, the columns are not correctly detected
-# this replaces "-250.0000" with " -99.0000" to circumvent the issue
-
-for f in ags09/*.tab
-do
- sed -i 's/-250.0000/ -99.0000/g' $f
-done
-
-# run python script
-./aesopus.py AGSS09.yml
diff --git a/kap/preprocessor/Makefile b/kap/preprocessor/Makefile
new file mode 100644
index 000000000..9d89b9068
--- /dev/null
+++ b/kap/preprocessor/Makefile
@@ -0,0 +1,147 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := kap-preprocessor
+SRCS := src/co_enhanced.f90 \
+ src/create_tables.f90 \
+ src/ferg_logP.f90 \
+ src/ferguson.f90 \
+ src/fixed_metal.f90 \
+ src/freedman.f90 \
+ src/kap_support.f90 \
+ src/opal_type1.f \
+ src/opal_type2.f
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON := kap
+EXTERNAL_DEPENDS_ON :=
+CHECK_RESULTS_GOLDEN :=
+INCLUDE_DIRS := -Isrc
+
+# Install
+
+MODULES :=
+INSTALL_INCLUDES :=
+BINTYPE := executable
+
+include ../../make/Makefile
+
+$(BUILD_DIR_MODULE)/kap_input_data/: kap_input_data.tar.xz
+ tar -xf kap_input_data.tar.xz -C $(BUILD_DIR_MODULE)
+
+$(BUILD_DIR_MODULE)/ags09/: AESOPUS/aesopus_ags09.tar.xz
+ mkdir -p $@
+ tar -xf AESOPUS/aesopus_ags09.tar.xz -C $@
+
+$(BUILD_DIR_MODULE)/logT_points_Fe $(BUILD_DIR_MODULE)/logT_points_highT_8.0 $(BUILD_DIR_MODULE)/logT_points_highT_8.7 $(BUILD_DIR_MODULE)/logT_points_lowT_2.7 $(BUILD_DIR_MODULE)/logT_points_lowT_3.0 $(BUILD_DIR_MODULE)/logT_points_lowT_Freedman11:
+ cp $(notdir $@) $@
+
+logT_points: $(BUILD_DIR_MODULE)/logT_points_Fe $(BUILD_DIR_MODULE)/logT_points_highT_8.0 $(BUILD_DIR_MODULE)/logT_points_highT_8.7 $(BUILD_DIR_MODULE)/logT_points_lowT_2.7 $(BUILD_DIR_MODULE)/logT_points_lowT_3.0 $(BUILD_DIR_MODULE)/logT_points_lowT_Freedman11
+
+
+define kap
+@echo kap-preprocessor $1 $2 $3
+@pushd $(BUILD_DIR_MODULE) > /dev/null; $(OBJ_OUT) $(CURDIR)/$1 $2 $3; popd > /dev/null
+endef
+
+define kap-fixed-metal
+$(call kap,$1,0.0000,-1)
+$(call kap,$1,0.0001,-1)
+$(call kap,$1,0.0003,-1)
+$(call kap,$1,0.0010,-1)
+$(call kap,$1,0.0020,-1)
+$(call kap,$1,0.0040,-1)
+$(call kap,$1,0.0100,-1)
+$(call kap,$1,0.0200,-1)
+$(call kap,$1,0.0300,-1)
+$(call kap,$1,0.0400,-1)
+$(call kap,$1,0.0600,-1)
+$(call kap,$1,0.0800,-1)
+$(call kap,$1,0.1000,-1)
+endef
+
+define kap-co-enhanced
+$(call kap,$1,0.001,-1)
+$(call kap,$1,0.004,-1)
+$(call kap,$1,0.010,-1)
+$(call kap,$1,0.020,-1)
+$(call kap,$1,0.030,-1)
+$(call kap,$1,0.050,-1)
+$(call kap,$1,0.100,-1)
+endef
+
+define kap-freedman
+$(call kap,$1,0.01,0)
+$(call kap,$1,0.02,0)
+$(call kap,$1,0.04,0)
+$(call kap,$1,0.10,0)
+$(call kap,$1,0.20,0)
+$(call kap,$1,0.63,0)
+$(call kap,$1,1.00,0)
+endef
+
+define kap-oplib
+python $(CURDIR)/spline_OPLIB_tables.py $(BUILD_DIR_MODULE)/kap_input_data/oplib/$1/ $(BUILD_DIR_MODULE)/data/kap_data/
+endef
+
+build-data: $(BUILD_DIR_MODULE)/kap_input_data/ logT_points $(OBJ_OUT) | $(BUILD_DIR_MODULE)/data/kap_data/
+ # As of r8118 file is empty kap_input_data/opal/A05+Ne
+ # do_one inlist_a05+Ne
+# This is broken (SIGFPE due to negative opacity), 1.0 is way outside the table
+# boundaries (also doesn't seem to be in use)
+# $(call kap,inlist_Fe,1.0,0.0)
+
+ $(call kap-fixed-metal,inlist_a09)
+ $(call kap-co-enhanced,inlist_a09_CO)
+
+ $(call kap-fixed-metal,inlist_OP_a09_nans_removed_by_hand)
+ $(call kap-fixed-metal,inlist_OP_gs98)
+
+ $(call kap-freedman,inlist_lowT_Freedman11)
+
+ $(call kap-fixed-metal,inlist_lowT_fa05_gs98)
+ $(call kap-fixed-metal,inlist_lowT_fa05_gs98_aFe_m2)
+ $(call kap-fixed-metal,inlist_lowT_fa05_gs98_aFe_p2)
+ $(call kap-fixed-metal,inlist_lowT_fa05_gs98_aFe_p4)
+ $(call kap-fixed-metal,inlist_lowT_fa05_gs98_aFe_p6)
+ $(call kap-fixed-metal,inlist_lowT_fa05_gs98_aFe_p8)
+
+ $(call kap-fixed-metal,inlist_lowT_fa05_gn93)
+ $(call kap-fixed-metal,inlist_lowT_fa05_ags04)
+ $(call kap-fixed-metal,inlist_lowT_fa05_a09)
+
+ $(call kap-fixed-metal,inlist_lowT_af94_gn93)
+
+ $(call kap-fixed-metal,inlist_gn93)
+ $(call kap-co-enhanced,inlist_gn93_CO)
+
+ $(call kap-fixed-metal,inlist_gs98)
+ $(call kap-co-enhanced,inlist_gs98_CO)
+ $(call kap-fixed-metal,inlist_gs98_aFe_m2)
+ $(call kap-fixed-metal,inlist_gs98_aFe_p2)
+ $(call kap-fixed-metal,inlist_gs98_aFe_p3)
+ $(call kap-fixed-metal,inlist_gs98_aFe_p4)
+ $(call kap-co-enhanced,inlist_gs98_aFe_p4_CO)
+ $(call kap-fixed-metal,inlist_gs98_aFe_p6)
+ $(call kap-fixed-metal,inlist_gs98_aFe_p8)
+
+ $(call kap-oplib,OPLIB_GS98_LOG_1194_25E)
+ $(call kap-oplib,OPLIB_AGSS09_LOG_1194_25E)
+ $(call kap-oplib,OPLIB_AAG21_LOG_1194_25E)
+ $(call kap-oplib,OPLIB_MB22_LOG_1194_25E)
+
+ $(call kap-fixed-metal,inlist_lowT_fa05_mb22)
+
+ cp -r $(BUILD_DIR_MODULE)/kap_input_data/wichita/AAG21_lowT_MESA_tables/* $(BUILD_DIR_MODULE)/data/kap_data/
+ cp condtable.data $(BUILD_DIR_MODULE)/data/kap_data/
+
+$(BUILD_DIR_MODULE)/AESOPUS_AGSS09.h5: $(BUILD_DIR_MODULE)/ags09/
+ cd $(BUILD_DIR_MODULE); python $(CURDIR)/AESOPUS/aesopus.py $(CURDIR)/AESOPUS/AGSS09.yaml
+
+build-aesopus: $(BUILD_DIR_MODULE)/AESOPUS_AGSS09.h5
+
+export-data:
+ rm -f ../kap_data.tar ../kap_data.tar.xz ../AESOPUS_AGSS09.h5
+ tar -cRf ../kap_data.tar -C $(BUILD_DIR_MODULE)/data kap_data
+ xz ../kap_data.tar
+ cp $(BUILD_DIR_MODULE)/AESOPUS_AGSS09.h5 ..
+
+.PHONY: build-data export-data
diff --git a/kap/preprocessor/build_4_export b/kap/preprocessor/build_4_export
deleted file mode 100755
index bc5d23a6a..000000000
--- a/kap/preprocessor/build_4_export
+++ /dev/null
@@ -1,18 +0,0 @@
-# run this from kap/preprocessor to create kap_data.tar.xz in the kap directory
-rm -rf ../data/kap_data/cache
-cd data
-rm -rf kap_data.tar
-rm -rf kap_data.tar.xz
-cp ../condtabl.d kap_data/condtabl.data
-echo 'tar -cvf kap_data.tar kap_data'
-tar -cvf kap_data.tar kap_data/*.data
-echo 'xz kap_data.tar'
-xz kap_data.tar
-cp kap_data.tar.xz ../..
-
-echo "**************"
-echo "**************"
-echo "next step is"
-echo "cd .. ; ./build_data_and_export"
-echo "**************"
-echo "**************"
diff --git a/kap/preprocessor/build_kap_input_tar b/kap/preprocessor/build_kap_input_tar
deleted file mode 100755
index 3c60ba4ae..000000000
--- a/kap/preprocessor/build_kap_input_tar
+++ /dev/null
@@ -1,3 +0,0 @@
-rm -rf kap_input_data.tar.xz kap_input_data.tar
-tar -cvf kap_input_data.tar kap_input_data
-xz kap_input_data.tar
diff --git a/kap/preprocessor/ck b/kap/preprocessor/ck
deleted file mode 100755
index 01bb09334..000000000
--- a/kap/preprocessor/ck
+++ /dev/null
@@ -1,2 +0,0 @@
-./../../utils/test/ck
-echo "NOTE: ck assumes ckap built with do_kappa_test = .true. in create_tables"
diff --git a/kap/preprocessor/clean b/kap/preprocessor/clean
deleted file mode 100755
index 034ed0e53..000000000
--- a/kap/preprocessor/clean
+++ /dev/null
@@ -1,3 +0,0 @@
-cd make
-make clean
-
diff --git a/kap/preprocessor/cleanup b/kap/preprocessor/cleanup
deleted file mode 100755
index fe8d63c0c..000000000
--- a/kap/preprocessor/cleanup
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/kap/preprocessor/condtabl.d b/kap/preprocessor/condtabl.data
similarity index 100%
rename from kap/preprocessor/condtabl.d
rename to kap/preprocessor/condtabl.data
diff --git a/kap/preprocessor/kap_input_data.tar.xz b/kap/preprocessor/kap_input_data.tar.xz
index 642ca3ad9..5cf719c0f 100644
--- a/kap/preprocessor/kap_input_data.tar.xz
+++ b/kap/preprocessor/kap_input_data.tar.xz
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:148124653fa74bb54fe0d919df7f3ee6beb617d8f6b153401e3e3b86a0efa3a3
-size 47137640
+oid sha256:042eb369c8f15c808758bee7938ed138f686a7d31bb48475bbb719be24cec997
+size 44686256
diff --git a/kap/preprocessor/local_export b/kap/preprocessor/local_export
deleted file mode 100755
index 6ac1e0094..000000000
--- a/kap/preprocessor/local_export
+++ /dev/null
@@ -1,5 +0,0 @@
-rm -rf ../data/kap_data
-mkdir ../data/kap_data
-mkdir ../data/kap_data/cache
-cd data/kap_data
-cp *.data ../../../data/kap_data
diff --git a/kap/preprocessor/make/makefile b/kap/preprocessor/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/kap/preprocessor/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/kap/preprocessor/make/makefile_base b/kap/preprocessor/make/makefile_base
deleted file mode 100644
index 3d22d51dd..000000000
--- a/kap/preprocessor/make/makefile_base
+++ /dev/null
@@ -1,125 +0,0 @@
-# This is the makefile for creating the program that builds the opacities tables
-
-PACKAGE_DIR = ../..
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-COMMON_SRCS = ferguson.f90 freedman.f90 \
- opal_type1.f opal_type2.f \
- kap_support.f90 fixed_metal.f90 co_enhanced.f90
-
-CKAP_SRCS = $(COMMON_SRCS) create_tables.f90
-
-PLOT_SRCS = $(COMMON_SRCS) plot.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_OTHER = eos chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-CKAP = ../ckap
-PLOT = ../plotter
-
-CKAP_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(CKAP_SRCS)))
-PLOT_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(PLOT_SRCS)))
-
-all : $(CKAP) $(PLOT)
-
-$(CKAP) : $(CKAP_OBJS) $(DEPS_OTHER)
-$(PLOT) : $(PLOT_OBJS) $(DEPS_OTHER)
-
-$(CKAP) : OBJS = $(CKAP_OBJS)
-$(PLOT) : OBJS = $(PLOT_OBJS)
-
-../% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(CKAP) $(PLOT)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-#COMPILE = $(COMPILE_NO_CHECKS)
-COMPILE = $(COMPILE_TO_TEST)
-
-INCLUDES = -I$(MESA_DIR)/include
-
-%.o: %.f
-ifneq ($(QUIET),)
- @echo COMPILE $<
- @$(COMPILE) $(FCfree) $<
-else
- $(COMPILE) $(FCfree) $<
-endif
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo COMPILE $<
- @$(COMPILE) $(FCfree) $<
-else
- $(COMPILE) $(FCfree) $<
-endif
-
-COMPILE_OPAL = $(COMPILE_BASIC) $(FCopt) $(FCchecks) $(FCdebug) -c
-
-COMPILE_LEGACY_OPAL = $(filter-out -std=f2008, $(COMPILE_OPAL)) -std=legacy
-
-opal_type1.o opal_type2.o : %.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_LEGACY_OPAL $<
- @$(COMPILE_LEGACY_OPAL) $(FCfixed) -g $<
-else
- $(COMPILE_LEGACY_OPAL) $(FCfixed) -g $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = ../src
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/kap/preprocessor/mk b/kap/preprocessor/mk
deleted file mode 100755
index bf4bf41ac..000000000
--- a/kap/preprocessor/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-if [ ! -d kap_input_data ]
-then
- echo
- echo 'unpacking kap_input_data'
- echo
- tar xf kap_input_data.tar.xz
-fi
-
-echo
-echo 'building preprocessor'
-echo
-cd make
-make
diff --git a/kap/preprocessor/rebuild_all b/kap/preprocessor/rebuild_all
deleted file mode 100755
index b03930362..000000000
--- a/kap/preprocessor/rebuild_all
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- exit 1
- fi
-}
-
-function do_one_freedman {
- echo "using" $1
- echo
- check_okay
- ./rn_freedman $1
- check_okay
- echo 'done' $1
- echo
-}
-
-function do_one {
- echo "using" $1
- echo
- check_okay
- ./rn_fixed_metal $1
- check_okay
- echo 'done' $1
- echo
-}
-
-function do_one_CO {
- echo "using" $1
- check_okay
- ./rn_co_enhanced $1
- check_okay
- echo 'done' $1
- echo
-}
-
-function do_one_oplib {
- echo "using" $1
- echo
- check_okay
- cd kap_input_data/oplib/
- check_okay
- python spline_OPLIB_tables.py $1
- check_okay
- echo $1_spline
- check_okay
- cp -r $1_spline/* ../../data/kap_data/.
- check_okay
- rm -rf $1_spline
- check_okay
- cd ../..
- check_okay
- echo 'done' $1
- echo
-}
-
-mkdir -p data/kap_data
-
-rm -f data/kap_data/*.data
-rm -f data/kap_data.tar.xz
-
-#As of r8118 file is empty kap_input_data/opal/A05+Ne
-# do_one inlist_a05+Ne
-
-./ckap inlist_Fe 1.0 0.0
-check_okay
-
-do_one inlist_a09
-do_one_CO inlist_a09_CO
-
-do_one inlist_OP_a09_nans_removed_by_hand
-do_one inlist_OP_gs98
-
-do_one_freedman inlist_lowT_Freedman11
-
-do_one inlist_lowT_fa05_gs98
-do_one inlist_lowT_fa05_gs98_aFe_m2
-do_one inlist_lowT_fa05_gs98_aFe_p2
-do_one inlist_lowT_fa05_gs98_aFe_p4
-do_one inlist_lowT_fa05_gs98_aFe_p6
-do_one inlist_lowT_fa05_gs98_aFe_p8
-
-do_one inlist_lowT_fa05_gn93
-do_one inlist_lowT_fa05_ags04
-do_one inlist_lowT_fa05_a09
-
-do_one inlist_lowT_af94_gn93
-
-do_one inlist_gn93
-do_one_CO inlist_gn93_CO
-
-do_one inlist_gs98
-do_one_CO inlist_gs98_CO
-do_one inlist_gs98_aFe_m2
-do_one inlist_gs98_aFe_p2
-do_one inlist_gs98_aFe_p3
-do_one inlist_gs98_aFe_p4
-do_one_CO inlist_gs98_aFe_p4_CO
-do_one inlist_gs98_aFe_p6
-do_one inlist_gs98_aFe_p8
-
-do_one_oplib OPLIB_GS98_LOG_1194_25E
-do_one_oplib OPLIB_AGSS09_LOG_1194_25E
-do_one_oplib OPLIB_AAG21_LOG_1194_25E
-do_one_oplib OPLIB_MB22_LOG_1194_25E
-
-
-do_one inlist_lowT_fa05_mb22
-# temporary, until ferguson files issues are addressed
-#do_one inlist_lowT_fa05_aag21
-cp -r kap_input_data/wichita/AAG21_lowT_MESA_tables/* data/kap_data/.
-
-
-
-echo "**************"
-echo "**************"
-echo "next step is"
-echo "./build_4_export"
-echo "**************"
-echo "**************"
diff --git a/kap/preprocessor/rn b/kap/preprocessor/rn
deleted file mode 100755
index f7b0eb99b..000000000
--- a/kap/preprocessor/rn
+++ /dev/null
@@ -1 +0,0 @@
-./ckap $*
\ No newline at end of file
diff --git a/kap/preprocessor/rn_all b/kap/preprocessor/rn_all
deleted file mode 100755
index c3f919047..000000000
--- a/kap/preprocessor/rn_all
+++ /dev/null
@@ -1 +0,0 @@
-./rebuild_all
\ No newline at end of file
diff --git a/kap/preprocessor/rn_co_enhanced b/kap/preprocessor/rn_co_enhanced
deleted file mode 100755
index 4bf9469a2..000000000
--- a/kap/preprocessor/rn_co_enhanced
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-function do_one {
- echo "Doing C/O Z =" $2
- ./ckap $1 $2 -1
- if [ $? -ne 0 ]
- then
- exit 1
- fi
- echo ""
-}
-
-do_one $1 0.000
-do_one $1 0.001
-do_one $1 0.004
-do_one $1 0.010
-do_one $1 0.020
-do_one $1 0.030
-do_one $1 0.050
-do_one $1 0.100
diff --git a/kap/preprocessor/rn_fixed_metal b/kap/preprocessor/rn_fixed_metal
deleted file mode 100755
index f9c484850..000000000
--- a/kap/preprocessor/rn_fixed_metal
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env bash
-
-function do_one {
- echo "Doing fixed Z =" $2
- ./ckap $1 $2 -1
- if [ $? -ne 0 ]
- then
- exit 1
- fi
- echo ""
-}
-
-do_one $1 0.0000
-do_one $1 0.0001
-do_one $1 0.0003
-do_one $1 0.0010
-do_one $1 0.0020
-do_one $1 0.0040
-do_one $1 0.0100
-do_one $1 0.0200
-do_one $1 0.0300
-do_one $1 0.0400
-do_one $1 0.0600
-do_one $1 0.0800
-do_one $1 0.1000
diff --git a/kap/preprocessor/rn_freedman b/kap/preprocessor/rn_freedman
deleted file mode 100755
index 2981c4461..000000000
--- a/kap/preprocessor/rn_freedman
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-
-function do_one {
- echo "Doing Freedman, Z =" $2
- ./ckap $1 $2 0
- if [ $? -ne 0 ]
- then
- exit 1
- fi
- echo ""
-}
-
-do_one $1 0.01
-do_one $1 0.02
-do_one $1 0.04
-do_one $1 0.10
-do_one $1 0.20
-do_one $1 0.63
-do_one $1 1.00
diff --git a/kap/preprocessor/rn_oplib b/kap/preprocessor/rn_oplib
deleted file mode 100755
index 9204beccd..000000000
--- a/kap/preprocessor/rn_oplib
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-
-
-function do_one_oplib {
- echo "using" $1
- echo
- check_okay
- cd kap_input_data/oplib/
- check_okay
- python spline_OPLIB_tables.py $1
- check_okay
- echo $1_spline
- check_okay
- cp -r $1_spline/* ../../data/kap_data/.
- check_okay
- rm -rf $1_spline
- check_okay
- cd ../..
- check_okay
- echo 'done' $1
- echo
-}
-
-
-do_one_oplib kap_input_data/oplib/OPLIB_GS98_LOG_1194_25E
-do_one_oplib kap_input_data/oplib/OPLIB_AGSS09_LOG_1194_25E
-do_one_oplib kap_input_data/oplib/OPLIB_AAG21_LOG_1194_25E
-do_one_oplib kap_input_data/oplib/OPLIB_MB22_LOG_1194_25E
-
-
-echo "**************************"
-echo "**************************"
-echo "done building oplib tables"
-echo "**************************"
-echo "**************************"
diff --git a/kap/preprocessor/rn_test b/kap/preprocessor/rn_test
deleted file mode 100755
index 0d2fa7d50..000000000
--- a/kap/preprocessor/rn_test
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-# 1st arg: inlist file name
-# 2nd arg: whichz
-# 3rd arg: whichx (-1 means all)
-
- ./ckap 'inlist_lowT_fa05_a09_aFe_p3' 0.02 0.95
- if [ $? -ne 0 ]
- then
- exit 1
- fi
- echo "okay"
diff --git a/kap/preprocessor/spline_OPLIB_tables.py b/kap/preprocessor/spline_OPLIB_tables.py
new file mode 100644
index 000000000..4f95c352a
--- /dev/null
+++ b/kap/preprocessor/spline_OPLIB_tables.py
@@ -0,0 +1,77 @@
+"""This python file was made exlusively for calulcating bi-cubic splines of LANL ATOMIC OPLIB opacity tables, not OPAL or OP (which contain 9.999 values in different table locations)"""
+
+from pathlib import Path
+import numpy as np
+import scipy as sp
+import sys
+
+
+def smooth_opac(table_path: Path):
+ # importing files from history.data in each model folder
+ table = table_path.read_text().splitlines()
+ header = table[0:5]
+ header[2] = header[2].replace(
+ " 74 3.764000 9.065000", "213 3.750000 9.050000"
+ )
+ logr_vals = np.loadtxt(table[5:6])
+ data = np.loadtxt(table[6:])
+ logt_vals = data[:, 0]
+ op_values = data[:, 1:]
+
+ """now we remove the 9.9999e+0 values from opacity files"""
+ for i in range(0, len(logr_vals)):
+ interp_number = 0
+ for j in range(0, len(logt_vals)):
+ if (op_values[j, i] >= 9.99e0) and (interp_number == 0):
+ interp_number = 1
+
+ dx_to_interp = logt_vals[j - 1] - logt_vals[j - 2]
+ dy_to_interp = op_values[j - 1, i] - op_values[j - 2, i]
+ op_values[j, i] = (dy_to_interp / dx_to_interp) * (
+ logt_vals[j] - logt_vals[j - interp_number]
+ ) + op_values[j - interp_number, i]
+ elif (op_values[j, i] >= 9.99e0) and (interp_number >= 1):
+ interp_number = interp_number + 1 # add 1 to interpolation number
+ op_values[j, i] = (dy_to_interp / dx_to_interp) * (
+ logt_vals[j] - logt_vals[j - interp_number]
+ ) + op_values[j - interp_number, i]
+
+ """Generate a spline"""
+ spline = sp.interpolate.RectBivariateSpline(
+ logt_vals, logr_vals, op_values, kx=3, bbox=[3.750, None, None, None], ky=3, s=0
+ )
+
+ """spline dimensions"""
+ tarr = np.linspace(3.75, 9.05, 213)
+ rarr = np.linspace(-8, 1.5, 39)
+ tgrid, rgrid = np.meshgrid(tarr, rarr, indexing="ij")
+
+ kap_data_interp = spline(tgrid, rgrid, grid=False)
+
+ """output to new spline file"""
+
+ output_name = output_file_dir / table_path.name
+ with output_name.open("w") as output:
+ # write header
+ output.writelines(header)
+
+ # write log R header
+ index = " ".join((f"{logr: 8.2f}" for logr in rarr))
+ index = " " + index
+ output.write(index)
+ output.write("\n")
+ output.write("\n")
+ # write logt + kap_vals
+ for i in range(0, len(tarr)):
+ kap_row_val = kap_data_interp[i, :]
+ row = " ".join((f"{kap: 8.4f}" for kap in kap_row_val))
+ row = f"{tarr[i]:.3f} {row}"
+ output.write(row)
+ output.write("\n")
+
+
+opacity_file_dir = Path(sys.argv[1])
+output_file_dir = Path(sys.argv[2])
+
+for data_file in opacity_file_dir.glob("*.data"):
+ smooth_opac(data_file)
diff --git a/kap/preprocessor/src/create_tables.f90 b/kap/preprocessor/src/create_tables.f90
index 83f7ff83f..3db4dd69e 100644
--- a/kap/preprocessor/src/create_tables.f90
+++ b/kap/preprocessor/src/create_tables.f90
@@ -31,7 +31,7 @@ program create_tables
double precision :: which_z, which_x
integer :: io_unit, ios, ilgT, cnt, len, status
- character(len=64) :: inlist_fname, whichz_str, whichx_str
+ character(len=512) :: inlist_fname, whichz_str, whichx_str
status = 0
call get_command_argument(1, inlist_fname, len, status)
diff --git a/kap/preprocessor/src/ferg_logP.f90 b/kap/preprocessor/src/ferg_logP.f90
index b0d82342e..ab5787de5 100644
--- a/kap/preprocessor/src/ferg_logP.f90
+++ b/kap/preprocessor/src/ferg_logP.f90
@@ -38,7 +38,7 @@ module ferg_logP
real :: logP_logTs(logP_num_logTs)
real :: logP_logRs(logP_num_logRs)
- real :: logPs(4, logP_num_logRs, logP_num_logTs)
+ real, target :: logPs(4, logP_num_logRs, logP_num_logTs)
! range of (logP,logT) in logK data file
real, parameter :: logK_logT_min = 2.70
@@ -53,7 +53,7 @@ module ferg_logP
real :: logK_logTs(logK_num_logTs)
real :: logK_logPs(logK_num_logPs)
- real :: logKs(4, logK_num_logPs, logK_num_logTs)
+ real, target :: logKs(4, logK_num_logPs, logK_num_logTs)
contains
@@ -114,6 +114,7 @@ subroutine Read_logKs(fname)
integer :: ili_logPs
integer :: ili_logTs
integer :: ier ! =0 on exit if there is no error.
+ real, pointer :: logKs_p(:)
io_logK = 40
open (unit=io_logK, file=trim(fname), action='read', status='old', iostat=ios)
@@ -148,7 +149,8 @@ subroutine Read_logKs(fname)
ibcymin = 0; bcymin(1:logK_num_logPs) = 0
ibcymax = 0; bcymax(1:logK_num_logPs) = 0
- call interp_mkbicub_sg(logK_logPs, logK_num_logPs, logK_logTs, logK_num_logTs, logKs, logK_num_logPs, &
+ logKs_p(1:4 * logK_num_logPs * logK_num_logTs) => logKs
+ call interp_mkbicub_sg(logK_logPs, logK_num_logPs, logK_logTs, logK_num_logTs, logKs_p, logK_num_logPs, &
ibcxmin, bcxmin, ibcxmax, bcxmax, &
ibcymin, bcymin, ibcymax, bcymax, &
ili_logPs, ili_logTs, ier)
@@ -163,10 +165,13 @@ real function Find_logP(logR, logT)
real, intent(IN) :: logR, logT
real :: fval(6)
integer :: ict(6), ier
+ real, pointer :: logPs_p(:)
ict = 0; ict(1) = 1
- call evbicub(logR, logT, logP_logRs, logP_num_logRs, logP_logTs, logP_num_logTs, &
- 0, 0, logPs, logP_num_logRs, ict, fval, ier)
+
+ logPs_p(1:4 * logP_num_logRs * logP_num_logTs) => logPs
+ call interp_evbicub_sg(logR, logT, logP_logRs, logP_num_logRs, logP_logTs, logP_num_logTs, &
+ 0, 0, logPs_p, logP_num_logRs, ict, fval, ier)
Find_logP = fval(1)
end function Find_logP
@@ -175,10 +180,13 @@ real function Eval_lowTemp_logK(logP, logT)
real, intent(IN) :: logP, logT
real :: fval(6)
integer :: ict(6), ier
+ real, pointer :: logKs_p(:)
ict = 0; ict(1) = 1
- call evbicub(logP, logT, logK_logPs, logK_num_logPs, logK_logTs, logK_num_logTs, &
- 0, 0, logKs, logK_num_logPs, ict, fval, ier)
+
+ logKs_p(1:4 * logK_num_logPs * logK_num_logTs) => logKs
+ call interp_evbicub_sg(logP, logT, logK_logPs, logK_num_logPs, logK_logTs, logK_num_logTs, &
+ 0, 0, logKs_p, logK_num_logPs, ict, fval, ier)
Eval_lowTemp_logK = fval(1)
end function Eval_lowTemp_logK
@@ -204,6 +212,7 @@ subroutine Read_logPs(Z, X, dir)
integer :: ili_logRs ! =1: logRho grid is "nearly" equally spaced
integer :: ili_logTs ! =1: logT grid is "nearly" equally spaced
integer :: ier ! =0 on exit if there is no error.
+ real, pointer :: logPs_p(:)
iz = int(Z*1d3 + 0.1d0)
ix = int(X*1d2 + 0.1d0)
@@ -284,7 +293,8 @@ subroutine Read_logPs(Z, X, dir)
ibcymin = 0; bcymin(1:logP_num_logRs) = 0
ibcymax = 0; bcymax(1:logP_num_logRs) = 0
- call interp_mkbicub_sg(logP_logRs, logP_num_logRs, logP_logTs, logP_num_logTs, logPs, logP_num_logRs, &
+ logPs_p(1:4 * logP_num_logRs * logP_num_logTs) => logPs
+ call interp_mkbicub_sg(logP_logRs, logP_num_logRs, logP_logTs, logP_num_logTs, logPs_p, logP_num_logRs, &
ibcxmin, bcxmin, ibcxmax, bcxmax, &
ibcymin, bcymin, ibcymax, bcymax, &
ili_logRs, ili_logTs, ier)
diff --git a/kap/preprocessor/src/opal_type1.f b/kap/preprocessor/src/opal_type1.f
index 8625cfeb4..d7863bee9 100644
--- a/kap/preprocessor/src/opal_type1.f
+++ b/kap/preprocessor/src/opal_type1.f
@@ -272,6 +272,10 @@ subroutine opacgn93 (z,xh,t6,r,filename,OP_file,logK)
dkapz1=quad(is,iw,zzl,dkapdtr(m1),dkapdtr(m2),dkapdtr(m3),zza(m1),zza(m2),zza(m3))
dkapz3=quad(is,iw,zzl,dkapdrt(m1),dkapdrt(m2),dkapdrt(m3),zza(m1),zza(m2),zza(m3))
if (mfm == m3) then
+ if (kapz1 .le. 0) then
+ write(*,*) kapz1,kapz(m1),kapz(m2),kapz(m3),zza(m1),zza(m2),zza(m3),z,zza(mz)
+ call mesa_error(__FILE__,__LINE__)
+ end if
opact=log10(kapz1) ! converts K to logK
dopact=dkapz1
dopacr=dkapz3
diff --git a/kap/preprocessor/src/plot.f90 b/kap/preprocessor/src/plot.f90
deleted file mode 100644
index ecd06c1d5..000000000
--- a/kap/preprocessor/src/plot.f90
+++ /dev/null
@@ -1,157 +0,0 @@
-program plot_kap_builder
-
- use kap_support
-
- implicit none
-
- call Build_Plots
-
-contains
-
- subroutine Build_Plots
-
- logical, parameter :: co_enhanced = .false.
-
- integer, parameter :: io_unit0 = 40
- integer :: info_out, i, j, k
- character(len=256) :: dir
-
- double precision :: X, Zbase, dXC, dXO, Rho, logRho, T, logT, logK, logR
- double precision :: logT_min, logT_max, logR_min, logR_max, dlogT, dlogR
- integer :: logT_points, logR_points
- integer :: io, io_first, io_last, io_params, ioR, io_tmp, num_out
-
- double precision, allocatable :: output_values(:, :, :)
-
- !call read_namelist
-
- Zbase = 0.02d0
- X = 0.00d0
- dXC = 0.00d0
- dXO = 0.00d0
-
- call setup(co_enhanced, data_dir, type1_table, Zbase, X, dXC, dXO)
-
- dir = 'plot_data'
- write (*, *) 'write data for opacity plots to '//trim(dir)
-
- if (co_enhanced) then
- write (*, *) 'co_enhanced'
- else
- write (*, *) 'not co_enhanced'
- end if
-
- if (.true.) then
- logT_points = 351
- logR_points = 351
-
- logT_min = 2.60
- logT_max = 3.8d0
-
- logR_min = -5d0
- logR_max = 1d0
-
- else
- logT_points = 2
- logR_points = 2
-
- logT_min = 7d0
- logT_max = 7.3d0
-
- logR_min = -1d0
- logR_max = 1d0
- end if
-
- !..open the output files
- io_params = io_unit0
- ioR = io_unit0 + 1
- io_tmp = io_unit0 + 2
- io_first = io_unit0 + 3
-
- call Open_Plot_Outfiles(io_first, io_last, io_params, ioR, io_tmp, dir)
- write (io_params, '(4f16.6,6x,2i10)') Zbase, X, dXC, dXO, logR_points, logT_points
- close (io_params)
- num_out = io_last - io_first + 1
- allocate (output_values(logR_points, logT_points, num_out))
-
- !..get the results
-
- dlogT = (logT_max - logT_min)/(logT_points - 1)
- dlogR = (logR_max - logR_min)/(logR_points - 1)
-
- do j = 1, logT_points
- logT = logT_min + dlogT*(j - 1)
- T = 10**logT
-
- do i = 1, logR_points
- logR = logR_min + dlogR*(i - 1)
- logRho = logR + 3*logT - 18
- Rho = 10**logRho
-
- !write(*,*) 'call Get_Results', i, j, logT, logR
- info_out = 0
- call Get_Results( &
- Zbase, X, dXC, dXO, Rho, logRho, T, logT, &
- logK, co_enhanced, data_dir, type1_table, .false., info_out)
-
- if (info_out == 0) then
-
- k = 1; output_values(i, j, k) = logK
-
- else
-
- k = 1; output_values(i, j, k) = -1d99
-
- end if
-
- end do
-
- end do
-
- ! write out the results
- do j = 1, logT_points
- write (io_tmp, '(E30.22)') logT_min + dlogT*(j - 1)
- end do
- close (io_tmp)
-
- do i = 1, logR_points
- write (ioR, '(E30.22)') logR_min + dlogR*(i - 1)
- end do
- close (ioR)
-
- do k = 1, num_out
- write (*, *) k
- write (io_first + k - 1, '(e14.6)') output_values(1:logR_points, 1:logT_points, k)
- end do
-
- do io = io_first, io_last
- close (io)
- end do
-
- end subroutine Build_Plots
-
- subroutine Open_Plot_Outfiles(io_first, io_last, io_params, ioR, io_tmp, dir)
- integer, intent(IN) :: io_first, io_params, ioR, io_tmp
- integer, intent(OUT) :: io_last
- character(len=256), intent(IN) :: dir
- character(len=256) :: fname
- integer :: io
-
- fname = trim(dir)//'/params.data'
- open (unit=io_params, file=trim(fname))
-
- fname = trim(dir)//'/logR.data'
- open (unit=ioR, file=trim(fname))
-
- fname = trim(dir)//'/logT.data'
- open (unit=io_tmp, file=trim(fname))
-
- io = io_first
- fname = trim(dir)//'/logK.data'
- open (unit=io, file=trim(fname))
-
- io_last = io
-
- end subroutine Open_Plot_Outfiles
-
-end program plot_kap_builder
diff --git a/kap/preprocessor/test_output b/kap/preprocessor/test_output
deleted file mode 100644
index 533f2bf6c..000000000
--- a/kap/preprocessor/test_output
+++ /dev/null
@@ -1,39 +0,0 @@
- co_enhanced T
- info 0
- logT 6.0000000000000000E+00
- logRho -6.0000000000000000E+00
- z 2.0000000000000000E-02
- xh 6.9999998807907104E-01
- y 2.8000001192092894E-01
- z 2.0000000000000000E-02
- abar 1.2967609830705349E+00
- zbar 1.1016261573188142E+00
- w4 6.9999998807907104E-01
- w5 2.8000001192092894E-01
- w6 9.0081062857142860E-02
-
- opac_rad 3.6204740682359227E-01
- opac_cond 7.1690669027204224E+10
-
- kap 3.6204740682176390E-01
- logK -4.4123455882291768E-01
-
- co_enhanced F
- logR -3.0000000000000000E+00
- logT 9.3010000000000002E+00
- logRho 6.9029999999999987E+00
- z 1.0000000000000001E-01
- xh 0.0000000000000000E+00
- y 9.0000000000000002E-01
- z 1.0000000000000001E-01
- abar 4.3345059762177884E+00
- zbar 2.1566100266545103E+00
- w4 0.0000000000000000E+00
- w5 9.0000000000000002E-01
- w6 4.5624480714285714E-01
- call Get_Results
-
- info 0
- logK -1.6023449178584344E+00
- kap 2.4983603689590392E-02
-
diff --git a/kap/preprocessor/xcotrin21.f b/kap/preprocessor/xcotrin21.f
deleted file mode 100644
index 64499dd96..000000000
--- a/kap/preprocessor/xcotrin21.f
+++ /dev/null
@@ -1,1647 +0,0 @@
- subroutine instruct
-! ----VERSION of November 20, 1995-----------------------------------------
-! ----------------------------------------------------------------------
-
-! This subroutine contains instructions for using the subroutine
-! OPAC( z, xh, xxc, xxo, t6, r ).
-! The purpose of the subroutine OPAC is to perform 4 or 5 variable
-! interpolation on log10(kappa). The opacity tables to be interpolated
-! are known to have somewhat random numerical errors of a few percent.
-! Consequently, adjusting the data prior to performing the interpolation
-! is justified at this level. The code first reads the original(unsmoothed)
-! tabular data, this data is then passed through a smoothing filter; using
-! a set of routines developed by Mike Seaton (see M.J. Seaton,MNRAS 265,
-! L25,1993). It is the adjusted data that is actually used in carrying out the
-! interpolations in OPAC. Steps are taken, as described below to insure
-! that the interpolated data is also smooth. The initial adjustment step
-! helps improve the smoothness of the OPAC output,particularly at the
-! smallest values of R. The medium to large R output is only slightly
-! effected by this step. It takes only a few seconds to carryout the initial
-! data smoothing step. This step can be skipped by setting the parameter
-! ismdata=1 in subroutine readco.
-
-! The interpolation variables are :
-
-! xh The hydrogen mass fraction, X
-! xx! The enhanced carbon mass fraction, delta Xc.
-! The total C mass fraction, Xc, is the sum of the initial
-! amount included in the metal mass fraction, Z, and
-! delta Xc
-! xxo The enhanced oxygen mass fraction, delta Xo
-! t6 The temperature in millions of degrees Kelvin, T6
-! r =rho(gm/cc)/T6**3, R
-
-! Additional input to OPAC is:
-
-! z The metallicity, Z
-
-! An interpolation between overlapping quadratics is used to obtain
-! smoothed results. A 4x4 grid in logT6 and logR is used to interpolate
-! in four different 3x3 sub-grids. Linear interpolation between quadratic
-! fits in these different sub-grids gives smoothed results in both log T6
-! and Log R directions. This procedure produces results that are similar
-! to bicubic spline interpolation, but require storage of only local
-! information.
-! Each of the individual tables in a file Gx**x**z covers 70 temperatures
-! in the range logT=3.75[T6=0.0056341325]( referred to as temperature 1) to
-! logT=8.7[T6=501.187] and 19 values of log R in the range -8 (referred to as 1)
-! to +1; at half-integer steps. (NOTE: earlier tables were explicitly in
-! terms of T6. For convenience the present tables tabulate log Kappa vs logT. The
-! interpolation however still uses T6 for the temperature variable)
-! For specialized problems, if storage space is a problem, a reduced set of
-! data can be input . This requires a recompilation with altered parameter
-! values. In order to limit the range of R, set the parameter nrb= index of
-! lowest value of log R to use(count from log R=-8). Then set the parameter
-! nre to the index of the largest value of log R to use. (NOTE: nre-nrb must
-! be at least 5). To ignore the first ntb-1 values of T6 (starting from
-! temperature 1) set the parameter ntb to desired value. No other parameters
-! should be modified.
-! A five variable interpolation is done when X is greater than 0. In this
-! case it is assumed that variable values of X are also needed. We have provided
-! sets of tables for X=0, 0.03, 0.1, 0.35 and 0.7, for each of the metallicities
-! 0.0,0.001, 0.004,0.01,0.02,0.03,05 and .1. The five sets of tables associated with
-! a particular value of Z (eg. Gx0z01, Gx03x01,Gx10z01, Gx35z01,
-! Gx70z01) should be placed in files named codataa, codatab, codatac, codatad,
-! and codatae, respectively. To create storage for this data the routines must
-! be recompiled with the parameter mx=5. Again if storage is a problem the T6
-! and log R ranges can be restricted. This version of the interpolation routine
-! does not interpolate in Z. Values of Z not in the table can be obtained by
-! interpolating the existing tables to produce similar tables for the Z of interest.
-! Interpolation in xh,xxo,xxc,t6, and r can be obtained as just described
-! A 4 variable interpolation in xxc, xxo, t6 and r is performed in the special
-! case X=0. The set of 60 data tables in (xxc,xxo) for a given Z that have
-! been provided for X=0 should be placed in a file called 'codataa'. This file
-! will be read from unit 2 in the subroutine readco. In this special case the
-! set of routines provided should be compiled with the parameter mx=1 (there are
-! 4 occurrences). (NOTE: The version of the code described above, intended
-! for X> 0, also handles this case, but takes more storage space since mx=5).
-! If you want to work with a single value of X which is not zero, i.e.,
-! X=0.03, 0.1, 0.35, or 0.70, then compile the code with mx=1 but change the statement
-
-! data (xa(i), i=1,5 )/0.0, 0.03, 0.1, 0.35, 0.7/
-
-! If for example you want to use only the table for X=.70, then
-
-! data (xa(i), i=1,5 )/0.70, 0.03, 0.1, 0.35, 0.0/
-
-! You also need to place the tables for X=0.7 into a file named
-! codataa.
-! ***CAUTION***
-! As a result of the mixing procedure used to calculate the data a few
-! X=0.0, low T-small R, table values fell outside the range of T and R accessible
-! from the X=0.35 data directly calculated for this purpose. These T-R
-! locations are filled in with 9.99 (or for diagnostic purposes in some cases
-! larger values. At the same locations the derivatives are set to 99.9. When
-! T-R falls in this region a message is issued by the interpolation code to
-! inform the user of this situation. Presumable very few users will have
-! applications that take them into this region.
-!
-! Your routine that performs the call to OPAC should include the
-! statement:
-
-! common/e/ opact,dopact,dopacr,dopactd
-
-! These variables have the following meanings:
-!
-! OPACT Is the Log of the Rosseland mean opacity: Log(kappa)
-! DOPACT Is Dlog(kappa)/Dlog(T6) ! at constant R
-! DOPACTD Is Dlog(kappa)/Dlog(T6) ! at constant density
-! DOPACR Is Dlog(kappa)/Dlog(R), ! at constant T6
-
- dum=0.0
- end subroutine instruct
-
-! **********************************************************************
- subroutine opac(z,xh,xxc,xxo,t6,r)
-! .... The purpose of this subroutine is to interpolate log kappa
-! and obtain smooth derivatives.
-! in C/O abundance and in T6, R,i.e. (xc,xo,T6,R)
-! xxc=Xc=carbon mass fraction
-! xxo=Xo=oxygen mass abundance
-! t6=T6=temperature in millions of degrees kelvin
-! r=R=density(g/cm**3)/T6**3
-! .... to use opac insert common/e/ in the calling routine.
-! This common contains interpolated values for kappa and its
-! first derivities.
-
- save
- integer :: w
- parameter (mx=5,mc=8,mo=8,nrm=19,nrb=1,nre=19,nr=nre+1-nrb,ntabs=60,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/aaa/ oxf(mx,mc),cxf(mx,mc),xcdf(mx,mc),xodf(mx,mc),opl(mx,nt,nr),itime(mx),cxdf(mx,mc),oxdf(mx,mc)
- common/aa/ q(4),h(4),xcd(mc),xod(mc),xc(mc),xo(mo),xcs(mc),xos(mo),cxd(mc),oxd(mo),cx(mc),ox(mo),zzz,xxh,xx(mx),nc,no
- common/a/ co(mx,mc,mo,nt,nr), diag(mx,mc,nt,nr),
- & index(101),t6list(nt),alr(nr),n(mx,mc),alt(nt),diago(mx,mo,nt,nr),opk(nt,nr),dfs(nt),dfsr(nr),
- & a(3,mx),b(3),m,mf,xa(8),alrf(nrm),cof(ntm,nrm),t6listf(ntm),opk2(nt,nr),dfsx(mx)
- common/b/ itab(mx,ntabs),nta(nrm),x(mx,ntabs),y(mx,ntabs),zz(mx,ntabs),xca(mx,ntabs),xoa(mx,ntabs)
- common/d/dkap
- common/bb/l1,l2,l3,l4,k1,k2,k3,k4,ip,iq,xodp,xcdp,xxco,cxx,oxx
-! .... OPACT- opacity obtained from a quadraric interpolation at
-! fixed log T6 at three values of log R; followed by quadratic
-! interpolation along log T6. Results smoothed by mixing
-! overlapping quadratics.
-! .... DOPACT- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics.
-! .... DOPACR- is Dlog(k)/Dlog(R) smoothed by mixing quadratics.
- common/e/ opact,dopact,dopacr,dopactd
- common/recoin/ itimeco,mxzero
-
-! .... INDEX refers to the index,i, of xc(i) or xo(i); xc(i) and xo(i)
-! are the abundance grid points.
- iop=1 ! provides smoothed interpolations; iop=0 gives no smoothing
- if(nr < 6) GOTO 65
- if((xh > 1.e-6) .and. (mx < 4)) GOTO 64
-
-! .... set-up C/O axis points
- xxco=xxc+xxo
- if(z+xh+xxco-1.e-6 > 1 ) GOTO 61
- zzz=z+0.001
- xxh=xh
- xxci=xxc
- xxoi=xxo
- xxi=xh
- t6i=t6
- ri=r
-
-! .... convert xxc and xxo to logarithmic shifted by Z
- cxx=log10(zzz+xxc)
- oxx=log10(zzz+xxo)
- xxx=log10(0.005+xh)
- slt=log10(t6)
- slr=log10(r)
-
-! .... set X indices
- ilo=2
- ihi=mx
- 8 if(ihi-ilo > 1) then
- imd=(ihi+ilo)/2
- if(xh <= xa(imd)+1.e-7) then
- ihi=imd
- else
- ilo=imd
- end if
- GOTO 8
- end if
- i=ihi
- mf=i-2
- mg=i-1
- mh=i
- mi=i+1
- mf2=mi
- istep1=1
- if (mx > 1) then
- istep1=mx-1
- if((xh <= xa(2)+1.e-7) .or. (xh >= xa(istep1)-1.e-7)) mf2=mh
- end if
-
- if ((mx == 1) .or. (xh < 1.e-6)) then
- mf=1
- mg=1
- mh=1
- mi=2
- mf2=1
- end if
-
- if (itime(1) /= 12345678) then
- alr(1)=-8.+(nrb-1)*0.5
- do i=2,nr
- alr(i)=alr(i-1)+0.5
- end do
- alt(1)=-2.25+(ntb-1)*0.05
- do i=ntb+1,46
- alt(i)=alt(i-1)+.05
- end do
- ntd=47
- if ((ntb +1) > 47) ntd=ntb+1
- do i=ntd,68
- alt(i)=alt(i-1)+.1
- end do
- do i=68,70
- alt(i)=alt(i-1)+.2
- end do
- do i=1,nt
- t6list(i)=10.**alt(i)
- end do
- end if
- ilo=2
- ihi=nr
- 12 if(ihi-ilo > 1) then
- imd=(ihi+ilo)/2
- if(slr <= alr(imd)+1.e-7) then
- ihi=imd
- else
- ilo=imd
- end if
- GOTO 12
- end if
- i=ihi
- l1=i-2
- l2=i-1
- l3=i
- l4=l3+1
-
- ilo=2
- ihi=nt
- 11 if(ihi-ilo > 1) then
- imd=(ihi+ilo)/2
- if(t6 <= t6list(imd)+1.e-7) then
- ihi=imd
- else
- ilo=imd
- end if
- GOTO 11
- end if
- i=ihi
- k1=i-2
- k2=i-1
- k3=i
- k4=k3+1
- k3s=k3+ntb-1
- l3s=l3+nrb-1
-
-! ----set-up indices to skip when low T&R data missing for X=0.
- kmin=0
- k1in=k1
- iadvance=0
- mfin=mf
- if ((mfin == 1) .and. (co(1,1,1,k1,l1) > 9.)) then! data missing
- do i=1,6
- if (co(1,1,1,i,l1) > 9.) then
- if (xh < .1) then
- kmin=i+1
- else
-
- if (iadvance == 0) then ! sfift X index to avoid X=0.
- iadvance=iadvance+1
- mf=mf+1
- mg=mg+1
- mh=mh+1
- mi=mi+1
- mf2=mf2+1
- end if
- end if
- end if
- end do
- if ((iadvance == 0) .and. (k1 <= kmin) .and. (slt <= alt(kmin))) then
- k1=kmin
- if ((co(1,1,1,kmin,l1+1) < 9.) .and. ((slr+.01) > alr(l1+1))) then
- l1=l1+1
- kmin=0
- k1=k1in
- do i=1,6
- if (co(1,1,1,i,l1) > 9.) kmin=i+1
- end do
- if ((kmin /= 0) .and. (k1in < kmin)) k1=kmin
- end if
- end if
- if ((slt+.001) < alt(k1)) then
- write (*,'("OPAL data not available for X=", f7.5," logT6=", f7.3, " logR=",f7.3)') xh,slt,slr
- opact=30.
- dopact=99.
- dopacr=99.
- dopactd=99.
- return
- end if
- l2=l1+1
- l3=l2+1
- l4=l3+1
- l3s=l3+nrb-1
- k2=k1+1
- k3=k2+1
- k4=k3+1
- k3s=k3+ntb-1
- end if
-! ----end of check for missing data
- do m=mf,mf2
- if(mx >= 4) then
-! .... C and O fractions determined by the ray through the origin that
-! also passes through the point (Xc,Xo). Specific interpolation
-! values determined by tabulated X values;i.e. xa(m). Inter-
-! polation along the ray gives log (kappa(Xc,Xo)). (Advantage
-! of method: keeps indices within table boundaries)
-! Subtract Z to prevent out-of-range C+O values for small X
- if(1.-xh-z > 1.e-6)then
- cmod=(1.-xa(m)-z)/(1.-xh-z)
- else
- cmod=0.
- end if
- xxc=cmod*xxci
- xxo=cmod*xxoi
- cxx=log10(zzz+xxc)
- oxx=log10(zzz+xxo)
- end if
-! ythism=z+xa(m)+xxc+xxo
-
- do i=1,mc
- xhe=1.-xa(m)-z
- nc=i
- no=i
- xc(i)=xcs(i)
- xo(i)=xos(i)
-! if(xcs(i) >= xhe-1.e-6) then
- if(xcs(i) > xhe) then
- xc(i)=xhe
- xo(i)=xhe
- exit
- end if
- end do
-
- if(itime(m) /= 12345678) then
- itime(m)=12345678
- mxzero=0
- do i=1,mx
- xx(i)=log10(0.005+xa(i))
- if(xa(i) == 0.0) mxzero=i
- end do
-! .... this is the first time through this m. Calculate the decadic
-! log of the perimeter points shifted by Z+0.001(to avoid divergence
-! at origin); m refers to xa(m); the hydrogen table value.
-
-! note that the nc-th elements are sometimes needed!
- do i=1,nc
- oxf(m,i)=log10(zzz+xo(i))
- cxf(m,i)=log10(zzz+xc(i))
- xcdf(m,i)=-xo(i)+xo(no)
- xodf(m,i)=-xc(i)+xc(nc)
- cxdf(m,i)=log10(zzz+xcdf(m,i))
- oxdf(m,i)=log10(zzz+xodf(m,i))
- end do
-
-! note that the nc-th elements are sometimes needed!
- do i=1,nc
- ox(i)=oxf(m,i)
- cx(i)=cxf(m,i)
- xcd(i)=xcdf(m,i)
- xod(i)=xodf(m,i)
- cxd(i)=cxdf(m,i)
- oxd(i)=oxdf(m,i)
- end do
-
-! ....read the data files
- call readco
- end if
-
- do i=1,nc
- ox(i)=oxf(m,i)
- cx(i)=cxf(m,i)
- xcd(i)=xcdf(m,i)
- xod(i)=xodf(m,i)
- cxd(i)=cxdf(m,i)
- oxd(i)=oxdf(m,i)
- end do
-
-! .... Determine log R and log T6 grid points to use in the
-! interpolation.
- if((slt < alt(1)).or.(slt > alt(nt))) GOTO 62
- if((slr < alr (1)).or.(slr > alr(nr))) GOTO 62
-
- if (m == mf) then ! calculate table indices
-
- if((mf2 /= mxzero) .and. (k3s > ntm)) GOTO 62
- do i=14,18
- if((l3s > i) .and. (k3s > nta(i+1))) GOTO 62
- end do
- ip=3
- iq=3
- ntlimit=nta(l3s)
- if((k3s == ntlimit) .or. (iop == 0)) then
- ip=2
- iq=2
- end if
- if(t6 <= t6list(2)+1.e-7 .or. iop == 0) ip=2
-
- if((l3 == nr) .or. (iop == 0)) then ! right edge of full table
- iq=2
- ip=2
- end if
- if(slr <= alr(2)+1.e-7 .or. iop == 0) iq=2
- end if
-
- xodp=max(-xxc+xc(nc),0.)
- xcdp=max(-xxo+xo(no),0.)
- is=0
-
- call cointerp(xxc,xxo)
- end do
-
- if((zz(mg,1) /= zz(mf,1)) .or. (zz(mh,1) /= zz(mf,1))) then
- write(*,'("Z does not match Z in codata* files you are using")')
- stop
- end if
- if(z /= zz(mf,1)) GOTO 66
- xxc=xxci ! restores input value; necessary if stop replaced
-! with return
- xxo=xxoi ! restores input value
- is=0
- iw=1
- do ir=l1,l1+iq
- do it=k1,k1+ip
- if((mx == 1) .or. (mf2 == 1)) then
- opk(it,ir)=opl(mf,it,ir)
- cycle
- end if
- opk(it,ir)=quad(is,iw,xxx,opl(mf,it,ir),opl(mg,it,ir),opl(mh,it,ir),xx(mf),xx(mg),xx(mh))
- is=1
- end do
- end do
-
- if (mi == mf2) then ! interpolate between quadratics
- is=0
- iw=1
- dixr=(xx(mh)-xxx)*dfsx(mh)
- do ir=l1,l1+iq
- do it=k1,k1+ip
- opk2(it,ir)=quad(is,iw,xxx,opl(mg,it,ir),opl(mh,it,ir),opl(mi,it,ir),xx(mg),xx(mh),xx(mi))
- opk(it,ir)=opk(it,ir)*dixr+opk2(it,ir)*(1.-dixr)
- is=1
- end do
- end do
-! interpolate X between two overlapping quadratics
- end if
- is=0
-
-! .... completed H,C,O interpolation. Now interpolate T6 and log R on a
-! 4x4 grid. (log(T6(i)),i=i1,i1+3),log(R(j)),j=j1,j1+3)).Procedure
-! mixes overlapping quadratics to obtain smoothed derivatives.
-
- call t6rinterp(slr,slt)
- return
-
- 61 write(*,'(" Mass fractions exceed unity")')
- xxc=xxci ! restores input value; required if stop replaced
-! with a return
- xxo=xxoi ! restores input value
- stop
- 62 write(*,'(" T6/LogR outside of table range")')
- xxc=xxci ! restores input value; required if stop replaced
-! with a return
- xxo=xxoi ! restores input value
- stop
- 64 write(*,'(" X not equal to zero: To run this case it is necessary"/ "to recompile with parameter (mx=5)")')
- stop
- 65 write(*,'("Too few R values; NRE+1-NRB < 6")')
- stop
- 66 write(*,'(" Z does not match Z in codata* files you are using")')
- stop
- end subroutine opac
-
-! ***********************************************************************
- subroutine cointerp(xxc,xxo)
-! The purpose of this subroutine is to interpolate in C and O abund-
-! ances.
- save
- integer :: w
- parameter (mx=5,mc=8,mo=8,nrm=19,nrb=1,nre=19,nr=nre+1-nrb,ntabs=60,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/aaa/ oxf(mx,mc),cxf(mx,mc),xcdf(mx,mc),xodf(mx,mc),opl(mx,nt,nr),itime(mx),cxdf(mx,mc),oxdf(mx,mc)
- common/aa/ q(4),h(4),xcd(mc),xod(mc),xc(mc),xo(mo),xcs(mc),xos(mo),cxd(mc),oxd(mo),cx(mc),ox(mo),zzz,xxh,xx(mx),nc,no
- common/a/ co(mx,mc,mo,nt,nr), diag(mx,mc,nt,nr),
- & index(101),t6list(nt),alr(nr),n(mx,mc),alt(nt),diago(mx,mo,nt,nr),opk(nt,nr),
- & dfs(nt),dfsr(nr),a(3,mx),b(3),m,mf,xa(8),alrf(nrm),cof(ntm,nrm),t6listf(ntm),opk2(nt,nr),dfsx(mx)
- common/bb/l1,l2,l3,l4,k1,k2,k3,k4,ip,iq,xodp,xcdp,xxco,cxx,oxx
- is=0
- if(xxco < 1.e-6) then
- do ir=l1,l1+iq
- do it=k1,k1+ip
- opl(m,it,ir)=co(m,1,1,it,ir)
- end do
- end do
- is=1
- GOTO 123
- end if
-! include boundaries that could later cause division by 0!
- if(xxc > xcd(3)-1.e-6) then
-! _________
- oxdp=log10(zzz+xodp)
-! handle possibility that xodp=0
- fac=max(min((oxx-ox(1))/max(oxdp-ox(1),1.e-6),1.),0.)
- do ir=l1,l1+iq
- do it=k1,k1+ip
-
-! interpolation in region c1
-
-! include boundaries that could later cause division by 0!
- if(xxc > xcd(2)-1.e-6) then
- iw=1
- a(1,m)=quad(is,iw,cxx,co(m,nc-2,1,it,ir),co(m,nc-1,1,it,ir),diag(m,1,it,ir),cx(nc-2),cx(nc-1),cx(nc))
- iw=iw+1
- a(2,m)=quad(is,iw,cxx,diag(m,1,it,ir),diag(m,2,it,ir),diag(m,3,it,ir),cxd(1),cxd(2),cxd(3))
- do w=1,2
- b(w)=a(w,m)
- end do
-! handle possibility that xodp=0
- opl(m,it,ir)=b(1)+(b(2)-b(1))*fac
- is=1
- cycle
- end if
-! interpolation in region c2
-
- iw=1
- a(1,m)=quad(is,iw,cxx,co(m,nc-2,1,it,ir),co(m,nc-1,1,it,ir),diag(m,1,it,ir),cx(nc-2),cx(nc-1),cx(nc))
- iw=iw+1
- a(2,m)=quad(is,iw,cxx,co(m,n(m,2)-2,2,it,ir),co(m,n(m,2)-1,2,it,ir),diag(m,2,it,ir),cx(n(m,2)-2),cx(n(m,2)-1),cxd(2))
- iw=iw+1
- a(3,m)=quad(is,iw,cxx,diag(m,1,it,ir),diag(m,2,it,ir),diag(m,3,it,ir),cxd(1),cxd(2),cxd(3))
- do w=1,3
- b(w)=a(w,m)
- end do
- iw=iw+1
- opl(m,it,ir)=quad(is,iw,oxx,b(1),b(2),b(3),ox(1),ox(2),oxdp)
- is=1
- end do
- end do
- if(is == 1) GOTO 123
-! _________
- end if
-
-! interpolation in region c3 to c6
- is=0
-
- if(nc >= 5) then
-! _________
- do i=4,nc-1
-! do not go beyond middle (where c3-c6 overlaps o3-o6), and
- if((xxc > xcd(i)-1.e-6) .and. (xxo > (i-1)-1.e-6) .and. (xcd(i-1) > xc(i-1))) then
- do ir=l1,l1+iq
- do it=k1,k1+ip
- oxdp=log10(zzz+xodp)
- iw=1
- m1=i-1
- m2=i-2
- a(1,m)=quad(is,iw,cxx,co(m,n(m,m2)-2,m2,it,ir),co(m,n(m,m2)-1,m2,it,ir),
- & diag(m,m2,it,ir),cx(n(m,m2)-2),cx(n(m,m2)-1),cxd(m2))
- iw=iw+1
- a(2,m)=quad(is,iw,cxx,co(m,n(m,m1)-2,m1,it,ir),co(m,n(m,m1)-1,m1,it,ir),
- & diag(m,m1,it,ir),cx(n(m,m1)-2),cx(n(m,m1)-1),cxd(m1))
- iw=iw+1
- a(3,m)=quad(is,iw,cxx,diag(m,m2,it,ir),diag(m,m1,it,ir),diag(m,i,it,ir),cxd(m2),cxd(m1),cxd(i))
- do w=1,3
- b(w)=a(w,m)
- end do
- iw=iw+1
- opl(m,it,ir)=quad(is,iw,oxx,b(1),b(2),b(3),ox(i-2),ox(i-1),oxdp)
- is=1
- end do
- end do
- if (is == 1) GOTO 123
- end if
- end do
-! _________
- end if
-
- if (is == 1) GOTO 123
-
-! include boundaries that could later cause division by 0!
- if(xxo > xod(3)-1.e-6) then
-! _________
- cxdp=log10(zzz+xcdp)
-! handle possibility that xcdp=0
- fac=max(min((cxx-cx(1))/max(cxdp-cx(1),1.e-6),1.),0.)
- do ir=l1,l1+iq
- do it=k1,k1+ip
-
-! interpolation in region o1
-
-! include boundaries that could later cause division by 0!
- if(xxo > xod(2)-1.e-6) then
- iw=1
- a(1,m)=quad(is,iw,oxx,co(m,1,no-2,it,ir),co(m,1,no-1,it,ir),diago(m,no-1,it,ir),ox(no-2),ox(no-1),ox(no))
- iw=iw+1
- a(2,m)=quad(is,iw,oxx,diago(m,no-1,it,ir),diago(m,no-2,it,ir),diago(m,no-3,it,ir),oxd(1),oxd(2),oxd(3))
- do w=1,2
- b(w)=a(w,m)
- end do
-! handle possibility that xcdp=0
- opl(m,it,ir)=b(1)+(b(2)-b(1))*fac
- is=1
- exit
- end if
-! interpolation in region o2
-
- iw=1
- a(1,m)=quad(is,iw,oxx,co(m,1,no-2,it,ir),co(m,1,no-1,it,ir), diago(m,no-1,it,ir),ox(no-2),ox(no-1),ox(no))
- iw=iw+1
- a(2,m)=quad(is,iw,oxx,co(m,2,n(m,2)-2,it,ir),co(m,2,n(m,2)-1,it, ir),diago(m,no-2,it,ir),ox(n(m,2)-2),ox(n(m,2)-1),oxd(2))
- iw=iw+1
- a(3,m)=quad(is,iw,oxx,diago(m,no-1,it,ir),diago(m,no-2,it,ir),diago(m,nc-3,it,ir),oxd(1),oxd(2),oxd(3))
- do w=1,3
- b(w)=a(w,m)
- end do
- iw=iw+1
- opl(m,it,ir)=quad(is,iw,cxx,b(1),b(2),b(3),cx(1),cx(2),cxdp)
- is=1
- end do
- end do
- if(is == 1) GOTO 123
-! _________
- end if
-
-! interpolation in region o3 to o6
- is=0
- if(no >= 5) then
-! _________
- do i=4,no-1
-! do not go beyond middle (where o3-o6 overlaps c3-c6), and
- if((xxo > xod(i)-1.e-6) .and. (xxc > xc(i-1)-1.e-6) .and. (xod(i-1) > xo(i-1)-1.e-6)) then
- do ir=l1,l1+iq
- do it=k1,k1+ip
- cxdp=log10(zzz+xcdp)
- iw=1
- m2=i-2
- m1=i-1
- a(1,m)=quad(is,iw,oxx,co(m,m2,n(m,m2)-2,it,ir),co(m,m2,n(m,m2)-1,it,ir),
- & diago(m,no-m2,it,ir),ox(n(m,m2)-2),ox(n(m,m2)-1),oxd(m2))
- iw=iw+1
- a(2,m)=quad(is,iw,oxx,co(m,m1,n(m,m1)-2,it,ir),co(m,m1,n(m,m1)-1,it,ir),
- & diago(m,no-m1,it,ir),ox(n(m,m1)-2),ox(n(m,m1)-1),oxd(m1))
- iw=iw+1
- a(3,m)=quad(is,iw,oxx,diago(m,no-m2,it,ir),diago(m,no-m1,it,ir),diago(m,no-i,it,ir),oxd(m2),oxd(m1),oxd(i))
- do w=1,3
- b(w)=a(w,m)
- end do
- iw=iw+1
- opl(m,it,ir)=quad(is,iw,cxx,b(1),b(2),b(3),cx(m2),cx(m1),cxdp)
- is=1
- end do
- end do
- if (is == 1) GOTO 123
- end if
- end do
-! _________
- end if
-
- if (is == 1) GOTO 123
-
-! ....find index of C grid.
- 52 ie=100*xxc+1
- iei=index(ie)+1
-! must also allow index = nc, to avoid extrapolation
- if (iei > nc) iei=nc
-
- if(iei > 3) then
- i1=iei-2
- i2=iei-1
- i3=iei
- else
- i1=1
- i2=2
- i3=3
- end if
-
-! ....find index of O grid
- ie=100*xxo+1
- iej=index(ie)+1
-! must also allow index = no, to avoid extrapolation
- if (iej > no) iej=no
-
- if(iej > 3) then
- j1=iej-2
- j2=iej-1
- j3=iej
- else
- j1=1
- j2=2
- j3=3
- end if
-
-! lower-O part of grid: interpolate C before O
- if(j3 < no .and. i3 <= n(m,j3) .and. (xxc < xcd(j3)+1.e-6 .or. xxc >= xxo))then
- do ir=l1,l1+iq
- do it=k1,k1+ip
- iw=0
- do jx=j1,j1+2
- iw=iw+1
-! if i3=n(m,jx), then must replace cx(i3) with cxd(jx)
- a(iw,m)=quad(is,iw,cxx,co(m,i1,jx,it,ir),co(m,i2,jx,it,ir),co(m,i3,jx,it,ir),cx(i1),cx(i2),min(cx(i3),cxd(jx)))
- end do
- do w=1,3
- b(w)=a(w,m)
- end do
- iw=iw+1
- opl(m,it,ir)=quad(is,iw,oxx,b(1),b(2),b(3),ox(j1),ox(j2),ox(j3))
- is=1
- end do
- end do
-! else: high-O part of grid: must interpolate O before C
- else
- do ir=l1,l1+iq
- do it=k1,k1+ip
- iw=0
- do ix=i1,i1+2
- iw=iw+1
- if(j3 < n(m,ix))then
- a(iw,m)=quad(is,iw,oxx,co(m,ix,j1,it,ir),co(m,ix,j2,it,ir),co(m,ix,j3,it,ir),ox(j1),ox(j2),ox(j3))
- else
- a(iw,m)=quad(is,iw,oxx,co(m,ix,j1,it,ir),co(m,ix,j2,it,ir),diago(m,no-ix,it,ir),ox(j1),ox(j2),oxd(ix))
- end if
- end do
- do w=1,3
- b(w)=a(w,m)
- end do
- iw=iw+1
- opl(m,it,ir)=quad(is,iw,cxx,b(1),b(2),b(3),cx(i1),cx(i2),cx(i3))
- is=1
- end do
- end do
- end if
- 123 continue
- return
- end subroutine cointerp
-
-! **********************************************************************
- subroutine t6rinterp(slr,slt)
-! The purpose of this subroutine is to interpolate in logT6 and logR
- save
- parameter (mx=5,mc=8,mo=8,nrm=19,nrb=1,nre=19,nr=nre+1-nrb,ntabs=60,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/aaa/ oxf(mx,mc),cxf(mx,mc),xcdf(mx,mc),xodf(mx,mc),opl(mx,nt,nr),itime(mx),cxdf(mx,mc),oxdf(mx,mc)
- common/aa/ q(4), h(4), xcd(mc),xod(mc), xc(mc),xo(mo),xcs(mc),xos(mo), cxd(mc),oxd(mo),cx(mc),ox(mo),zzz,xxh,xx(mx),nc,no
- common/a/ co(mx,mc,mo,nt,nr), diag(mx,mc,nt,nr),
- & index(101), t6list(nt),alr(nr),n(mx,mc),alt(nt),diago(mx,mo,nt,nr),opk(nt,nr),
- & dfs(nt),dfsr(nr),a(3,mx),b(3),m,mf,xa(8),alrf(nrm),cof(ntm,nrm),t6listf(ntm),opk2(nt,nr),dfsx(mx)
- common/d/dkap
- common/bb/l1,l2,l3,l4,k1,k2,k3,k4,ip,iq,xodp,xcdp,xxco,cxx,oxx
- common/e/ opact,dopact,dopacr,dopactd
-
- is=0
- iu=0
- do kx=k1,k1+ip
- iw=1
- iu=iu+1
- h(iu)=quad(is,iw,slr,opk(kx,l1),opk(kx,l2),opk(kx,l3), alr(l1),alr(l2),alr(l3))
- if(iq. eq. 3) then
- iw=2
- q(iu)=quad(is,iw,slr,opk(kx,l2),opk(kx,l3),opk(kx,l4),alr(l2),alr(l3),alr(l4))
- end if
- is=1
- end do
-
- is=0
- iw=1
-! .... k and Dlog(k)/dlog(T6) in lower-right 3x3(i=i1,i1+2 j=j1,j1+2)
- opact=quad(is,iw,slt,h(1),h(2),h(3),alt(k1),alt(k2),alt(k3))
- dopact=dkap
- dkap1=dkap
- if (iq. eq. 3) then
-! .... k and Dlog(k)/Dlog(T6) upper-right 3x3(i=i1+1,i1+3 j=j1,j1+2)
- opactq=quad(is,iw,slt,q(1),q(2),q(3),alt(k1),alt(k2),alt(k3))
- dkapq1=dkap
- end if
- if(ip == 3) then
-! .... k and Dlog(k)/Dlog(T6) in lower-left 3x3.
- opact2=quad(is,iw,slt,h(2),h(3),h(4),alt(k2),alt(k3),alt(k4))
- dkap2=dkap
-! .... k and Dlog(k)/Dlog(T6) smoothed in left 3x4
- dix=(alt(k3)-slt)*dfs(k3)
- dopact=dkap1*dix+dkap2*(1.-dix)
- opact=opact*dix+opact2*(1.-dix)
- if(iq == 3) then
-
-! .... k and Dlog(k)/Dlog(T6) in upper-right 3x3.
- opactq2=quad(is,iw,slt,q(2),q(3),q(4),alt(k2),alt(k3),alt(k4))
- dkapq2=dkap
- dopactq=dkapq1*dix+dkapq2*(1.-dix)
- opactq=opactq*dix+opactq2*(1.-dix)
- end if
- end if
-
- iu=0
- do lx=l1,l1+iq
- iw=1
- iu=iu+1
- h(iu)=quad(is,iw,slt,opk(k1,lx),opk(k2,lx),opk(k3,lx),alt(k1),alt(k2),alt(k3))
- if(ip == 3) then
- iw=2
- q(iu)=quad(is,iw,slt,opk(k2,lx),opk(k3,lx),opk(k4,lx),alt(k2),alt(k3),alt(k4))
- end if
- is=1
- end do
-
- is=0
- iw=1
-! .... k and Dlog(k)/Dlog(R) in lower-left 3x3
- opacr=quad(is,iw,slr,h(1),h(2),h(3),alr(l1),alr(l2),alr(l3))
- dopacr=dkap
- if(ip == 3) then
- opacrq=quad(is,iw,slr,q(1),q(2),q(3),alr(l1),alr(l2),alr(l3))
-! .... k and Dlog(k)/Dlog(R) in upper-left 3x3.
- dopacrq=dkap
- end if
- if(iq == 3) then
-! .... k and Dlog(k)/Dlog(R) in lower-right 3x3.
- opact2=quad(is,iw,slr,h(2),h(3),h(4),alr(l2),alr(l3),alr(l4))
- dix2=(alr(l3)-slr)*dfsr(l3)
- dopacr=dopacr*dix2+dkap*(1.-dix2)
-! .... k and Dlog(k)/Dlog(T6) smoothed in both log(T6) and log(R)
- dopact=dopact*dix2+dopactq*(1.-dix2)
- opact=opact*dix2+opactq*(1.-dix2)
- end if
- if(ip == 3) then
- if(iq == 3) then
-! .... k and Dlog(k)/Dlog(R) in upper-right 3x3.
- opacrq=quad(is,iw,slr,q(2),q(3),q(4),alr(l2),alr(l3),alr(l4))
-! .... Dlog(k)/Dlog(R) smoothed in both log(T6) and Log(R).
- dopacrq=dopacrq*dix2+dkap*(1.-dix2)
- end if
- dopacr=dopacr*dix+dopacrq*(1.-dix)
- end if
- dopactd=dopact-3.*dopacr
- if (opact > 1.e+15) then
- write(*,'("Interpolation indices out of range; please report conditions.")')
- stop
- end if
- if (opact > 9) then
- opact=30.
- dopact=99.
- dopactr=99.
- dopactd=99.
- end if
- return
- end subroutine t6rinterp
-
-! ***********************************************************************
- subroutine readco
-! .... The purpose of this subroutine is to read the data tables
- save
- parameter (ismdata=0) ! modified
- parameter (mx=5,mc=8,mo=8,nrm=19,nrb=1,nre=19,nr=nre+1-nrb,ntabs=60,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/aa/ q(4), h(4), xcd(mc),xod(mc), xc(mc),xo(mo),xcs(mc),xos(mo), cxd(mc),oxd(mo),cx(mc),ox(mo),zzz,xxh,xx(mx),nc,no
- common/a/ co(mx,mc,mo,nt,nr), diag(mx,mc,nt,nr), index(101),t6list(nt),alr(nr),n(mx,mc),alt(nt),
- & diago(mx,mo,nt,nr),opk(nt,nr),dfs(nt),dfsr(nr),a(3,mx),b(3),m,mf,xa(8),
- & alrf(nrm),cof(ntm,nrm),t6listf(ntm),opk2(nt,nr),dfsx(mx)
- common/b/ itab(mx,ntabs),nta(nrm),x(mx,ntabs),y(mx,ntabs),zz(mx,ntabs),xca(mx,ntabs),xoa(mx,ntabs)
- common/alink/ NTEMP,NSM,nrlow,nrhigh,RLE,t6arr(100),coff(100,nr)
- COMMON/CST/NRL,RLS,nset,tmax ! modified
- common/e/ opact,dopact,dopacr,dopacrd
- character(len=1) :: dumarra(250)
- common/recoin/ itimeco,mxzero
-
- if (itimeco /= 12345678) then
- do i=1,mx
- do j=1,mc
- do k=1,mo
- do l=1,nt
- do mq=1,nr
- co(i,j,k,l,mq)=1.e+35
- end do
- end do
- end do
- end do
- end do
- do i=1,mx
- do j=1,mc
- do l=1,nt
- do mq=1,nr
- diag(i,j,l,mq)=1.e+35
- diago(i,j,l,mq)=1.e+35
- end do
- end do
- end do
- end do
- itimeco=12345678
- end if
- do j=1,nc-1
- do i=1,nc
- if(xcd(j) >= xc(i)) then
- n(m,j)=i+1
- if(xcd(j) < xc(i)+1.e-6) n(m,j)=i
- end if
- end do
- end do
- n(m,nc)=0
-
- close (2)
-! .... read X=0.0 tables
- if(m == 1) open(2, FILE='codataa')
-! .... read X=0.03 tables
- if(m == 2) open(2, FILE='codatab')
-! .... read X=0.10 tables
- if(m == 3) open(2, FILE='codatac')
-! .... read X=0.35 tables
- if(m == 4) open(2, FILE='codatad')
-! ....read X=0.70 tables
- if(m == 5) open(2, FILE='codatae')
-
-! read header
- read(2,'(a)') (dumarra(i),i=1,240)
-
- int=0
- do j=1,no-1
- do i=1,n(m,j)
- int=int+1
-
- read(2,'(f10.5)') dum
- read (2,'(7x,i3,26x,f6.4,3x,f6.4,3x,f6.4,5x,f6.4,5x,f6.4)') itab(m,int),x(m,int),y(m,int),zz(m,int),xca(m,int),xoa(m,int)
- xca(m,int)=min(xca(m,int),1.-x(m,int)-zz(m,int)-xoa(m,int))
-
- read(2,'(f10.5)') dum,dum,dum
- read(2,'(4x,f6.1,18f7.1)') (alrf(kk),kk=1,nrm)
- read(2,'(f10.5)') dum
- do k=1,ntm
- read(2,'(f4.2,19f7.3)') altin,(cof(k,l), l=1,nrm)
-
- do ll=1,nrm ! modified
- coff(k,ll)=cof(k,ll)
- end do
- end do
- if (isett6 /= 1234567) then
- do k=1,ntm
- t6arr(k)=t6list(k)
- end do
- end if
- isett6=1234567
-
- if (ismdata == 0) then
- if ((nrm /= nr) .or. (ntm /= nt)) then
- write (*,'("Not set up to smooth data with reduced T-Rho grid")')
- stop
- end if
- tmax=10. ! modified
- nset=67 ! 65 in earlier version
- RLS=-8.
- nsm=1
- RLE=1.0
- nrlow=1
- nrhigh=2*(RLE-RLS)+1
-
- call opaltab !modified
- end if
-
- ll=1
- do kk=nrb,nre
- alr(ll)=alrf(kk)
- do k=1,nt
- if (ismdata == 0) then
- if ((m == 1) .and. (k <= 9)) then
- co(m,i,j,k,ll)=cof(k+ntb-1,kk)
- else
- co(m,i,j,k,ll)=coff(k+ntb-1,kk)
- end if
- else
- co(m,i,j,k,ll)=coff(k+ntb-1,kk)
- end if
- end do
- ll=ll+1
- end do
- end do
- end do
- if(x(m,1) /= xa(m)) then
- write(*,'(" X in the codata? file does not match xa(m)")')
- stop
- end if
-
- do i=1, nc-1
- do k=1,nt
- do l=1,nr
- diag(m,i,k,l)=co(m,n(m,i),i,k,l)
- end do
- end do
- end do
-
- do j=1,no-1
- int=int+1
- read(2,'(f10.5)') dum
- read (2,'(7x,i3,26x,f6.4,3x,f6.4,3x,f6.4,5x,f6.4,5x,f6.4)') itab(m,int),x(m,int),y(m,int),zz(m,int),xca(m,int),xoa(m,int)
- read(2,'(f10.5)') dum,dum,dum
- read(2,'(4x,f6.1,18f7.1)') (alrf(kk),kk=1,nrm)
- read(2,'(f10.5)') dum
- do k=1,ntm
- read (2,'(f4.2,19f7.3)') dum, (cof(k,l), l=1,nrm)
-! set up to smooth final "diago" opacity tables
- do l=1,nrm
- coff(k,l)=cof(k,l)
- end do
- end do
-! smooth final "diago" opacity tables too!
- if (ismdata == 0) then
- tmax=10. ! modified
- nset=67 !65 in earlier version
- RLS=-8.
- nsm=1
- RLE=1.0
- nrlow=1
- nrhigh=2*(RLE-RLS)+1
- call opaltab !modified
- do k=3,NTEMP-2
- do ll=nrlow,nrhigh
-! Following skip required because, due to missing data,
-! the X=0 low T data cannot be smoothed
- if ((m == 1) .and. (k <= 9)) then
- cof(k,ll)=cof(k,ll)
- else
- cof(k,ll)=coff(k,ll)
- end if
-
- end do
- end do
- ll=1
- do kk=nrb,nre
- do k=1,nt
- diago(m,j,k,ll)=cof(k+ntb-1,kk)
- end do
- ll=ll+1
- end do
- end if
- end do
-
- do i=2,nt
- dfs(i)=1./(alt(i)-alt(i-1))
- end do
- do i=2,nr
- dfsr(i)=1./(alr(i)-alr(i-1))
- end do
- istep=-1
- if (mx > 1 ) then
- istep=1
- do i=2,mx,istep
- dfsx(i)=1./(xx(i)-xx(i-1))
- end do
- end if
-
- end subroutine readco
-
-! ***********************************************************************
- function quad(ic,i,x,y1,y2,y3,x1,x2,x3)
-! .... this function performs a quadratic interpolation.
- save
- common/d/dkap
- common/coquad/ xx(3),yy(3),xx12(30),xx13(30),xx23(30),xx1sq(30),xx1pxx2(30)
- xx(1)=x1
- xx(2)=x2
- xx(3)=x3
- yy(1)=y1
- yy(2)=y2
- yy(3)=y3
- if(ic == 0) then
- xx12(i)=1./(xx(1)-xx(2))
- xx13(i)=1./(xx(1)-xx(3))
- xx23(i)=1./(xx(2)-xx(3))
- xx1sq(i)=xx(1)*xx(1)
- xx1pxx2(i)=xx(1)+xx(2)
- end if
- c3=(yy(1)-yy(2))*xx12(i)
- c3=c3-(yy(2)-yy(3))*xx23(i)
- c3=c3*xx13(i)
- c2=(yy(1)-yy(2))*xx12(i)-(xx1pxx2(i))*c3
- c1=yy(1)-xx(1)*c2-xx1sq(i)*c3
- dkap=c2+(x+x)*c3
- quad=c1+x*(c2+x*c3)
-
- end function quad
-
-! ***********************************************************************
- block data
- parameter (mx=5,mc=8,mo=8,nrm=19,nrb=1,nre=19,nr=nre+1-nrb,ntabs=60,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/aa/ q(4), h(4), xcd(mc),xod(mc), xc(mc),xo(mo) ,xcs(mc),xos(mo), cxd(mc),oxd(mo),cx(mc),ox(mo),zzz,xxh,xx(mx),nc,no
- common/a/ co(mx,mc,mo,nt,nr), diag(mx,mc,nt,nr), index(101),t6list(nt),alr(nr),n(mx,mc),alt(nt),
- & diago(mx,mo,nt,nr),opk(nt,nr),dfs(nt),dfsr(nr),a(3,mx),b(3),m,mf,xa(8),
- & alrf(nrm),cof(ntm,nrm),t6listf(ntm),opk2(nt,nr),dfsx(mx)
- common/b/ itab(mx,ntabs),nta(nrm),x(mx,ntabs),y(mx,ntabs),zz(mx,ntabs),xca(mx,ntabs),xoa(mx,ntabs)
- common/aaa/ oxf(mx,mc),cxf(mx,mc),xcdf(mx,mc),xodf(mx,mc),opl(mx,nt,nr),itime(mx),cxdf(mx,mc),oxdf(mx,mc)
- common/recoin/ itimeco,mxzero
- data itime/mx*0/
- data itimeco/0/
- data ( index(i),i=1,101)/1,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,
- & 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
- & 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
- & 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7/
- data (xcs(i),i= 1,mc)/ 0.0,0.01,0.03,0.1,0.2,0.4,0.6,1.0/
- data (xos(i),i= 1,mc)/0.0,0.01,0.03,0.1,0.2,0.4,0.6,1.0/
- data (xa(i),i=1,5)/0.0,0.03,0.1,0.35,0.7/
- data (nta(i),i=1,nrm)/14*70,69,64,60,58,57/
- end
-
-! ********************************************************************
- subroutine SPLINE(X,Y,N,Y2)
- parameter (NMAX=100)
- dimension X(N),Y(N),Y2(N),U(NMAX)
-
-! FIRST DERIVATIVES AT end POINTS USING CUBIC FIT
- YP1=((Y(3)-Y(1))*(X(2)-X(1))**2-(Y(2)-Y(1))*(X(3)-X(1))**2)/((X(3)-X(1))*(X(2)-X(1))*(X(2)-X(3)))
- YPN=((Y(N-2)-Y(N))*(X(N-1)-X(N))**2-(Y(N-1)-Y(N))*(X(N-2)-X(N))**2)/((X(N-2)-X(N))*(X(N-1)-X(N))*(X(N-1)-X(N-2)))
-
- Y2(1)=-0.5
- U(1)=(3./(X(2)-X(1)))*((Y(2)-Y(1))/(X(2)-X(1))-YP1)
- do I=2,N-1
- SIG=(X(I)-X(I-1))/(X(I+1)-X(I-1))
- P=SIG*Y2(I-1)+2.
- Y2(I)=(SIG-1.)/P
- U(I)=(6.*((Y(I+1)-Y(I))/(X(I+1)-X(I))-(Y(I)-Y(I-1))/(X(I)-X(I-1)))/(X(I+1)-X(I-1))-SIG*U(I-1))/P
- end do
- QN=0.5
- UN=(3./(X(N)-X(N-1)))*(YPN-(Y(N)-Y(N-1))/(X(N)-X(N-1)))
- Y2(N)=(UN-QN*U(N-1))/(QN*Y2(N-1)+1.)
- do K=N-1,1,-1
- Y2(K)=Y2(K)*Y2(K+1)+U(K)
- end do
- end subroutine SPLINE
-! ********************************************************************
- subroutine SPLINT(XA,YA,N,Y2A,X,Y,YP)
- dimension XA(N),YA(N),Y2A(N)
- KLO=1
- KHI=N
-1 if (KHI-KLO > 1) then
- K=(KHI+KLO)/2
- if(XA(K) > X)then
- KHI=K
- else
- KLO=K
- end if
- GOTO 1
- end if
- H=XA(KHI)-XA(KLO)
- if (H == 0.) PAUSE 'Bad XA input.'
- A=(XA(KHI)-X)/H
- B=(X-XA(KLO))/H
- Y=A*YA(KLO)+B*YA(KHI)+((A**3-A)*Y2A(KLO)+(B**3-B)*Y2A(KHI))*(H**2)/6.
- YP=0.05* ( (-YA(KLO)+YA(KHI))/H + ( -(3*A**2-1)*Y2A(KLO)+(3*B**2-1)*Y2A(KHI) )*H/6. )
- return
- end subroutine SPLINE
-! ********************************************************************
- subroutine FITY
-
-! THIS ROUTINE MAKES SPLINE FITS FOR F AND FX, AND OBTAINS
-! FY AND FXY
-
- COMMON/CST/NRL,RLS,nset,tmax ! modified
-
- parameter(IPR=20)
- dimension A(IPR),B(IPR),AD(IPR),BD(IPR)
- COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
-
- do I=1,nset ! modified
- do J=1,NRL
- A(J)=F(I,J)
- B(J)=FX(I,J)
- end do
-
- call GETD(A,NRL,AD,AP1,APN)
- call GETD(B,NRL,BD,BP1,BPN)
-
- FY(I,1)=AP1
- FY(I,NRL)=APN
- FXY(I,1)=BP1
- FXY(I,NRL)=BPN
- do J=2,NRL-1
- FY(I,J)= -A(J)+A(J+1)-2.*AD(J)-AD(J+1)
- FXY(I,J)=-B(J)+B(J+1)-2.*BD(J)-BD(J+1)
- end do
- end do
-
- end subroutine FITY
-! ********************************************************************
- subroutine FITX
-
-! THIS ROUTINE IS USED ONLY AFTER SMOOTHING.
-! ITS FUNCTION IS TO RECOMPUTE FX USING SMOOTHED F.
-
- parameter(IPR=20)
- dimension A(85),D(85)
-
- COMMON/CST/NRL,RLS,nset,tmax ! modified
- COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
-
- do J=1,NRL
- do I=1,nset ! modified
- A(I)=F(I,J)
- end do
- call GETD(A,nset,D,AP1,APN) ! modified
- FX(1,J)=AP1
- FX(nset,J)=APN ! modified
- do I=2,nset-1 ! modified
- FX(I,J)=-A(I)+A(I+1)-2.*D(I)-D(I+1)
- end do
- end do
-
- end subroutine FITX
-
-! ***********************************************************************
- subroutine GETD(F,N,D,FP1,FPN)
-
-! SIMPLIFIED CODE FOR SPLINE COEFFICIENTS, FOR CASE OF INTERVALS
-! OF UNITY.
-
- dimension F(N),D(N),T(85)
-
- FP1=(-11.*F(1)+18.*F(2)-9.*F(3)+2.*F(4))/6.
- FPN=(11.*F(N)-18.*F(N-1)+9.*F(N-2)-2.*F(N-3))/6.
-
- D(1)=-.5
- T(1)=.5*(-F(1)+F(2)-FP1)
-
- do J=2,N-1
- D(J)=-1./(4.+D(J-1))
- T(J)=-D(J)*(F(J-1)-2.*F(J)+F(J+1)-T(J-1))
- end do
-
- D(N)=(FPN+F(N-1)-F(N)-T(N-1))/(2.+D(N-1))
-
- do J=N-1,1,-1
- D(J)=D(J)*D(J+1)+T(J)
- end do
-
- end subroutine GETD
-
-! ********************************************************************
- subroutine INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR)
-
-! GIVEN F,FX,FY AND FXY ON THE GRID POINTS, THIS ROUTINE
-! DOES BI-CUBIC INTERPOLATIONS USING METHODS DESCRIBED IN
-! Numerical Recipes, PP. 118 TO 120
-
-
- parameter(IPR=20)
- COMMON/CF/ F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
- dimension B(16)
- logical :: IERR
-
- COMMON/CST/NRL,RLS,nset,tmax ! modified
-
-! EXTREME LIMITS ALLOWED ARE:-
-! (3.800-0.0125) TO (8.000+0.0125) FOR LOG10(T)
-! (RLS-0.125) TO (RLE+0.1254) FOR LOG10(R)
-! (ALLOWING FOR SMALL EXTRAPOLATIONS BEYOND TABULAR VALUES)
-
-! FUNCTION DEFINITIONS FOR CUBIC EXPANSION
-
- FF(S,T)= B( 1)+T*(B( 2)+T*(B( 3)+T*B( 4)))
- & +S*( B( 5)+T*(B( 6)+T*(B( 7)+T*B( 8)))
- & +S*( B( 9)+T*(B(10)+T*(B(11)+T*B(12)))
- & +S*( B(13)+T*(B(14)+T*(B(15)+T*B(16))) )))
-
- FFX(S,T)= B( 5)+T*(B( 6)+T*(B( 7)+T*B( 8)))
- & +S*( 2*(B( 9)+T*(B(10)+T*(B(11)+T*B(12))))
- & +S*( 3*(B(13)+T*(B(14)+T*(B(15)+T*B(16)))) ))
-
- FFY(S,T)= B( 2)+S*(B( 6)+S*(B(10)+S*B(14)))
- & +T*( 2*(B( 3)+S*(B( 7)+S*(B(11)+S*B(15))))
- & +T*( 3*(B( 4)+S*(B( 8)+S*(B(12)+S*B(16)))) ))
-
- FFXY(S,T)= B( 6)+T*(2*B( 7)+3*T*B( 8))
- & +S*( 2*B(10)+T*(4*B(11)+6*T*B(12))
- & +S*( 3*B(14)+T*(6*B(15)+9*T*B(16)) ))
-
-
- IERR=.false.
-
- X=20.*(FLT-3.800)+1
- FLR=FLRHO+18.-3.*FLT
- Y=2*( FLR - RLS )+1
-
- if(X < 2.)then
- if(X < 0.75)then
- IERR=.true.
- else
- I=1
- end if
- else if(X > 84)then
- if(X > 85.25)then
- IERR=.true.
- else
- I=84
- end if
- else
- I=X
- end if
- U=X-I
-
- if(Y < 2.)then
- if(Y < 0.75)then
- IERR=.true.
- else
- J=1
- end if
- else if(Y > NRL-1)then
- if(Y > NRL+.25)then
- IERR=.true.
- else
- J=NRL-1
- end if
- else
- J=Y
- end if
- V=Y-J
-
- if(IERR)then
- G=9.999
- DGDT=9.999
- DGDRHO=9.999
- return
- end if
-
-
-! GIVEN FUNCTIONS AND DERIVATIVES AT GRID POINTS, COMPUTE COEFFICIENTS.
- B(1)=F(I,J)
- B(2)=FY(I,J)
- B(3)=3*(-F(I,J)+F(I,J+1))-2*FY(I,J)-FY(I,J+1)
- B(4)=2*(F(I,J)-F(I,J+1))+FY(I,J)+FY(I,J+1)
-
- B(5)=FX(I,J)
- B(6)=FXY(I,J)
- B(7)=3*(-FX(I,J)+FX(I,J+1))-2*FXY(I,J)-FXY(I,J+1)
- B(8)=2*(FX(I,J)-FX(I,J+1))+FXY(I,J)+FXY(I,J+1)
-
- B(9)=3*(-F(I,J)+F(I+1,J))-2*FX(I,J)-FX(I+1,J)
- B(10)=3*(-FY(I,J)+FY(I+1,J))-2*FXY(I,J)-FXY(I+1,J)
- B(11)=9*(F(I,J)-F(I+1,J)+F(I+1,J+1)-F(I,J+1))
- & +6*(FX(I,J)-FX(I,J+1)+FY(I,J)-FY(I+1,J))
- & +4*FXY(I,J)
- & +3*(FX(I+1,J)-FX(I+1,J+1)-FY(I+1,J+1)+FY(I,J+1))
- & +2*(FXY(I,J+1)+FXY(I+1,J))
- & +FXY(I+1,J+1)
- B(12)=6*(-F(I,J)+F(I+1,J)-F(I+1,J+1)+F(I,J+1))
- & +4*(-FX(I,J)+FX(I,J+1))
- & +3*(-FY(I,J)+FY(I+1,J)+FY(I+1,J+1)-FY(I,J+1))
- & +2*(-FX(I+1,J)+FX(I+1,J+1)-FXY(I,J)-FXY(I,J+1))
- & -FXY(I+1,J)-FXY(I+1,J+1)
-
- B(13)=2*(F(I,J)-F(I+1,J))+FX(I,J)+FX(I+1,J)
- B(14)=2*(FY(I,J)-FY(I+1,J))+FXY(I,J)+FXY(I+1,J)
- B(15)=6*(-F(I,J)+F(I+1,J)-F(I+1,J+1)+F(I,J+1))
- & +4*(-FY(I,J)+FY(I+1,J))
- & +3*(-FX(I,J)-FX(I+1,J)+FX(I+1,J+1)+FX(I,J+1))
- & +2*(FY(I+1,J+1)-FY(I,J+1)-FXY(I,J)-FXY(I+1,J))
- & -FXY(I+1,J+1)-FXY(I,J+1)
- B(16)=4*(F(I,J)-F(I+1,J)+F(I+1,J+1)-F(I,J+1))
- & +2*(FX(I,J)+FX(I+1,J)-FX(I+1,J+1)-FX(I,J+1)
- & +FY(I,J)-FY(I+1,J)-FY(I+1,J+1)+FY(I,J+1))
- & +FXY(I,J)+FXY(I+1,J)+FXY(I+1,J+1)+FXY(I,J+1)
-
-! GET G=LOG10(ROSS), DGDT=d LOG10(ROSS)/d LOG10(T),
-! DGDRHO=d LOG10(ROSS)/d LOG10(RHO)
- G=FF(U,V)
- DGDT=20.*FFX(U,V)-6.*FFY(U,V)
- DGDRHO=2.*FFY(U,V)
-
- end subroutine INTERP
-
-! ********************************************************************
- subroutine SMOOTH
-
-! THIS subroutine USES A 2-dimensionAL GENERALISATION OF THE SMOOTHING
-! TECHNIQUES DESCRIBED ON PP. 644 TO 649 OF Numerical Recipes.
-
-! CONSIDER THE 25 POINTS DEFINED BY
-! I+n, n=-2,-1,0,1,2 AND J+m, m=-2,-1,0,1,2.
-! THE FUNCTION TO BE SMOOTHED IS FITTED TO A BI-CUBIC, INVOLVING
-! 16 COEFFICIENTS, USING TECHNIQUES OF LEAST-SQUARES. THE SMOOTHED
-! FUNCTION (TEMPORARILY STORED IN FXY) IS GIVEN BY THE FITTED VALUE
-! AT THE POINT I AND J.
-
-! THE FITTING IS SHIFTED FOR POINTS CLOSE TO BOUNDARIES.
-
- parameter(IPR=20)
-
- COMMON/CST/NRL,RLS,nset,tmax ! modified
- COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
-
- dimension GAM(6)
- DATA GAM/+0.0073469388,-0.0293877551,-0.0416326531,+0.1175510204,+0.1665306122,+0.2359183673/
- dimension BET(11)
- DATA BET/
- & -0.0048979592,-0.0661224490,-0.0293877551,+0.0195918367,
- & 0.2644897959,+0.1175510204,-0.0783673469,+0.0277551020,
- & 0.3746938776,+0.1665306122,-0.1110204082/
- dimension ALP(11)
- DATA ALP/
- & -0.0844897959,-0.0048979592,+0.0073469388,+0.0012244898,
- & 0.3379591837,+0.0195918367,-0.0293877551,+0.4787755102,
- & 0.0277551020,-0.0416326531,-0.0069387755/
-
-
- do I=3,nset-2
-
- J=1
- FXY(I,J)=
- & ALP(1)*( F(I-2,J )+F(I+2,J ) )
- & +ALP(2)*( F(I-2,J+1)+F(I+2,J+1)+F(I-2,J+3)+F(I+2,J+3)
- & +F(I-1,J+4)+F(I+1,J+4) )
- & +ALP(3)*( F(I-2,J+2)+F(I+2,J+2) )
- & +ALP(4)*( F(I-2,J+4)+F(I+2,J+4) )
- & +ALP(5)*( F(I-1,J )+F(I+1,J ) )
- & +ALP(6)*( F(I-1,J+1)+F(I+1,J+1)+F(I-1,J+3)+F(I+1,J+3) )
- & +ALP(7)*( F(I-1,J+2)+F(I+1,J+2) )
- & +ALP(8)* F(I ,J )
- & +ALP(9)*( F(I ,J+1)+F(I ,J+3) )
- & +ALP(10)* F(I ,J+2) +ALP(11)*F(I ,J+4)
-
- J=2
- FXY(I,J)=
- & BET(1)*( F(I-2,J-1)+F(I+2,J-1)+F(I-2,J+3)+F(I+2,J+3) )
- & +BET(2)*( F(I-2,J )+F(I+2,J ) )
- & +BET(3)*( F(I-2,J+1)+F(I+2,J+1) )
- & +BET(4)*( F(I-2,J+2)+F(I+2,J+2)+F(I-1,J-1)+F(I+1,J-1)
- & +F(I-1,J+3)+F(I+1,J+3) )
- & +BET(5)*( F(I-1,J )+F(I+1,J ) )
- & +BET(6)*( F(I-1,J+1)+F(I+1,J+1) )
- & +BET(7)*( F(I-1,J+2)+F(I+1,J+2) )
- & +BET(8)*( F(I ,J-1)+F(I ,J+3) )
- & +BET(9)*F(I ,J ) +BET(10)*F(I ,J+1) +BET(11)*F(I ,J+2)
-
- do J=3,NRL-2
- FXY(I,J)=
- & GAM(1)*( F(I-2,J-2)+F(I-2,J+2)+F(I+2,J-2)+F(I+2,J+2) )
- & +GAM(2)*( F(I-2,J+1)+F(I-2,J-1)+F(I-1,J-2)+F(I-1,J+2)
- & +F(I+1,J-2)+F(I+1,J+2)+F(I+2,J-1)+F(I+2,J+1) )
- & +GAM(3)*( F(I-2,J )+F(I+2,J )+F(I ,J-2)+F(I ,J+2) )
- & +GAM(4)*( F(I-1,J-1)+F(I-1,J+1)+F(I+1,J-1)+F(I+1,J+1) )
- & +GAM(5)*( F(I-1,J )+F(I ,J-1)+F(I ,J+1)+F(I+1,J ) )
- & +GAM(6)* F(I ,J )
- end do
-
- J=NRL-1
- FXY(I,J)=
- & BET(1)*( F(I-2,J+1)+F(I+2,J+1)+F(I-2,J-3)+F(I+2,J-3) )
- & +BET(2)*( F(I-2,J )+F(I+2,J ) )
- & +BET(3)*( F(I-2,J-1)+F(I+2,J-1) )
- & +BET(4)*( F(I-2,J-2)+F(I+2,J-2)+F(I-1,J+1)+F(I+1,J+1)
- & +F(I-1,J-3)+F(I+1,J-3) )
- & +BET(5)*( F(I-1,J )+F(I+1,J ) )
- & +BET(6)*( F(I-1,J-1)+F(I+1,J-1) )
- & +BET(7)*( F(I-1,J-2)+F(I+1,J-2) )
- & +BET(8)*( F(I ,J+1)+F(I ,J-3) )
- & +BET(9)*F(I ,J ) +BET(10)*F(I ,J-1) +BET(11)*F(I ,J-2)
-
- J=NRL
- FXY(I,J)=
- & ALP(1)*( F(I-2,J )+F(I+2,J ) )
- & +ALP(2)*( F(I-2,J-1)+F(I+2,J-1)+F(I-2,J-3)+F(I+2,J-3)
- & +F(I-1,J-4)+F(I+1,J-4) )
- & +ALP(3)*( F(I-2,J-2)+F(I+2,J-2) )
- & +ALP(4)*( F(I-2,J-4)+F(I+2,J-4) )
- & +ALP(5)*( F(I-1,J )+F(I+1,J ) )
- & +ALP(6)*( F(I-1,J-1)+F(I+1,J-1)+F(I-1,J-3)+F(I+1,J-3) )
- & +ALP(7)*( F(I-1,J-2)+F(I+1,J-2) )
- & +ALP(8)* F(I ,J )
- & +ALP(9)*( F(I ,J-1)+F(I ,J-3) )
- & +ALP(10)* F(I ,J-2) +ALP(11)*F(I ,J-4)
-
- end do
-
- do I=3,nset-2 ! modified
- do J=1,NRL
- F(I,J)=FXY(I,J)
- end do
- end do
-
- end subroutine SMOOTH
-
-! ********************************************************************
- subroutine opaltab
-
-! CODE FOR FITTING AND SMOOTHING OPAL DATA. ADAPTED FROM A CODE
-! WRITTEN BY MIKE SEATON(obtained june 1993)
-
-! OPAL DATA.
-! ASSUMES FIRST T6=0.006, LAST T6=10.OR 0.04). Depending on position
-! in the table.
-! USES RECTANGULAR ARRAY FOR VARIABLES T6 AND LOG10(R)
-
-! (1) NSM=NUMBER OF PASSES THROUGH SMOOTHING FILTER.
-! USE OF NSM=1 OR 2 IS RECOMMENDED.
-! NO SMOOTHING WITH NSM=0
-! (2) RANGE FOR LOG10(R),
-! RLS=FIRST VALUE, RLE=LAST VALE
-! (RLS MUST BE FIRST VALUYE IN TABLE)
-
-! subroutine INTERP
-! AFTER PROCESSING, DATA ARE IN A FORM FOR USE OF
-! subroutine INTERP
-! WHICH GIVES LOG(ROSS) AND TWO FIRST DERIVATIVES FOR ANY
-! VALUES OF LOG(T) AND LOG(RHO). SEE BELOW FOR FURTHER
-! EXPLANATION.
-
-! OUTPUT FOR THE CASE OF NSM > 0.
-! INTERP IS USED TO OBTAIN SMOOTHED DATA INTERPOLATED
-! BACK TO THE ORIGINAL OPAL MESH. TWO FILES ARE WRITTEN.
-
-
-! THE subroutineS SPLINE AND SPLINT ARE ADAPTED FROM THOSE GIVE BY
-! W.H. Press, S.A. Teulolsky, W.T. Vettering and B.P. Flannery,
-! "Numerical Recipes in FORTRAN", 2nd ed., 1992, C.U.P.
-! OTHER REFERENCES ARE MADE TO METHODS DESCRIBED IN THAT BOOK.
-
- parameter(IP=100,IPR=20)
- dimension U(IP),ROSSL(IP,IPR),V(IP),V2(IP)
- parameter (mx=5,mc=8,mo=8,nrm=19,nrb=1,nre=19,nr=nre+1-nrb,ntabs=60,ntm=70,ntb=1,nt=ntm+1-ntb)
- COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
- character(len=1) :: HEAD(100)
- COMMON/CST/NRL,RLS,nset,tmax ! modified
- common/alink/ N,NSM,nrlow,nrhigh,RLE,t6arr(100),coff(100,nr)
- logical :: IERR
-
- NRL=2*(RLE-RLS)+1
-
-! STORE LOG10(T) IN U AND LOG10(ROSS) IN ROSSL
-! CHECK FIRST VALUE OF T6
- T6=t6arr(1)
- do j=1,NRL
- ROSSL(1,j)=coff(1,j)
- end do
-
- if( abs(T6 -.0056341325) < 1.e-8) then
- U(1)=6.+LOG10(T6)
- end if
-! SET ROSSL UP TO T6=t6arr(nset)
- I=1
- 5 I=I+1
- T6=t6arr(I)
- do j=1,NRL
- ROSSL(I,j)=coff(I,j)
- end do
- U(I)=6+LOG10(T6)
- if(T6 < tmax)GOTO 5
- N=I
- if(N > IP)then
- PRINT*,' REQUIRE parameter IP OF AT LEAST ',N
- STOP
- end if
-
-
-! DEFINE VARIABLES
-! X=20.0*(LOG10(T)-3.80)+1
-! Y=2.0*(LOG10(R)-RLS)+1
-! USE INDICES I=1 TO nset AND J=1 TO NRL
-! X AND Y ARE SUCH THAT, ON MESH-POINT (I,J), X=I AND Y=J
-! OBTAIN:-
-! F(I,J)=LOG10(ROSS)
-! FX(I,J)=dF/dX
-! FY(I,J)=dF/dY
-! FXY(I,J)=ddF/dXdY
-
-
-! FIRST GET F AND FX, INTERPOLATING FROM OPAL T6 TO
-! INTERVAL OF 0.05 IN LOG10(T).
- do J=1,NRL
-! FOR EACH LOG10(R), STORE LOG10(ROSS) IN V(I)
- do I=1,N
- V(I)=ROSSL(I,J)
- end do
-
-! GET FIRST DERIVATIVES AT end POINTS
-
-! GET SECOND DERIVATIVES FOR SPLINE FIT
- call SPLINE(U,V,N,V2)
-
-! INTERPOLATE TO LOG10(T)=FLT, FLT=3.8(0.05)8.0
- do I=1,nset ! modified
- FLT=3.75+0.05*I
- call SPLINT(U,V,N,V2,FLT,F(I,J),FX(I,J))
- end do
-
- end do
-
-
-! OPTION FOR SMOOTHING
- if(NSM > 0)then
- do NS=1,NSM
- call SMOOTH
- end do
- call FITX
- end if
-
-
-! GET FY AND FXY
- call FITY
-
-! THE ARRAYS F, FX, FY AND FXY ARE NOW STORED
-
-! CAN NOW do INTERPOLATIONS USING
-! call INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR)
-! INPUT IS FLT=LOG10(T), FLRHO=LOG10(RHO)
-! OUTPUT IS G=LOG10(ROSS)
-! DGDT=dG/d(LOG10(T))
-! DGDRHO=dG/d(LOG10(RHO))
-! IERR=.true. if INPUT FLT, FLRHO ARE OUT-OF-RANGE,
-! else IERR=.false.
-
-! INTERPOLATE BACK TO OPAL POINTS
- if(NSM > 0)then
- do l=1,NRL
- coff(1,l)=ROSSL(1,l)
- end do
-
- do K=2,N
- FLT=U(K)
- do L=nrlow,nrhigh
- FLR=RLS+.5*(L-1)
- FLRHO=FLR-18.+3.*FLT
- call INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR)
- if(IERR)then
- end if
- V(L)=G
- end do
- T6=t6arr(K)
- do l=nrlow,nrhigh
- coff(K,l)=V(l)
-
- end do
-
- end do
- end if
- return
-
- 1000 FORMAT(' SMOOTHED OPAL DATA')
- 1100 FORMAT(' OPAL DATA, (SMOOTHED-ORIGINAL)')
- 2000 FORMAT(100A1)
- 2222 FORMAT(F8.3,20F7.3)
- 6000 FORMAT(/' FIRST T6=',1P,E10.3,', SHOULD BE 0.006')
- 6003 FORMAT(/' !!! OUT-OF-RANGE !!!'/' FLT=',1P,E10.3,', FLRHO=',E10.3,', FLR=',E10.3)
-
- end subroutine opaltab
diff --git a/kap/preprocessor/xztrin21.f b/kap/preprocessor/xztrin21.f
deleted file mode 100644
index f524a5097..000000000
--- a/kap/preprocessor/xztrin21.f
+++ /dev/null
@@ -1,1302 +0,0 @@
- subroutine instruct
-! ----VERSION of October 5, 1995-----------------------------------------
-! ----------------------------------------------------------------------
-
-! This subroutine contains instructions for using the subroutine
-! OPACGN93( z, xh, t6, R ) and OPAC(izi,mzin,xh,t6,r).
-! The purpose of these subroutines is to perform 3 or 4 variable
-! interpolation on log10(kappa). The opacity tables to be interpolated
-! are known to have somewhat random numerical errors of a few percent.
-! Consequently, adjusting the data prior to performing the interpolation is
-! justified at this level. These codes are set-up to read the original
-! (unsmoothed) tabular data, this data is then passed through a smoothing
-! filter; using a set of routines developed by Mike Seaton (see M. J. Seaton
-! MNRAS 265,L25(1993)). It is the adjusted data that is actually used in
-! carrying out the interpolations in OPACGN93 and OPAC. The interpolation
-! method, described below, also produces smooth values for logK and its
-! first derivatives. The initial adjustment step helps improve the smoothness
-! of the OPACGn93 and OPA! output,particularly at the smallest values of R.
-! The medium to large R output is only slightly effected by this step. It
-! takes only a few seconds to carryout the initial data smoothing step. This
-! step can be skipped by setting the parameter ismdata in subroutine
-! readco =1.
-
-! The interpolation variables are :
-
-! z The metallicity, Z
-! xh The hydrogen mass fraction, X
-! t6 The temperature in millions of degrees Kelvin, T6
-! r =rho(gm/cc)/T6**3, R
-
-! Additional input to OPAC is:
-
-! izi Keeps or recalculates table indices. The value 0 causes
-! the table indices to be recalculated. A value other than 0
-! causes the previous indices to be used.
-
-! mzin The integer value of i of the Z value to use. The
-! choices are:
-! 1=0.0 2=0.0001 3=0.0003 4=0.001 5=0.002 6=0.004 7=0.01
-! 8=0.02 9=0.03 10=0.04 11=0.06 12=0.08 13=0.1
-
-
-! An interpolation between overlapping quadratics is used to obtain
-! smoothed results. A 4x4 grid in logT6 and logR is used to interpolate
-! in four different 3x3 sub-grids. Linear interpolation between quadratic
-! fits in these different sub-grids gives smoothed results in both log T6
-! and Log R directions. Compared to earlier versions of this code, the
-! interpolation in Z is in Kappa vs. Z; not log Kappa vs. Z.
-! The overlapping quadratic procedure produces results that are smooth,
-! similar to bicubic spline interpolation, but require storage of only local
-! information.
-
-! The code OPACGN93 performs interpolation in Z, X, T6, and R. It calls
-! the subroutine OPAC at each Z. If you are working with a fixed Z, as
-! listed above, it is more efficient to call OPAC directly. In this case use
-! izi=0 and the appropriate value of mzin. The opacity data will be read
-! from unit 2 in the subroutine readco. you will need to have the file
-! GN93hz available on disk.
-! Each of the individual tables in the GN93hz file cover 70 temperatures
-! in the range logT=3.75[T6=0.0056341325]( referred to as temperature 1) to
-! logT=8.7[T6=500]. and 19 values of log R in the range -8 (referred to as 1)
-! to +1; at half-integer steps. (NOTE: earlier tables were explicitly in
-! terms of T6. For convenience the present tables tabulate log Kappa vs logT. The
-! interpolation however still uses T6 for the temperature variable)
-! For specialized problems, if storage space is a problem, a reduced set of
-! data can be input . This requires a recompilation with altered parameter
-! values. In order to limit the range of R, set the parameter nrb= index of
-! lowest value of log R to use(count from log R=-8). Then set the parameter
-! nre to the index of the largest value of log R to use. (NOTE: nre-nrb must
-! be at least 5). To ignore the first ntb-1 values of T6 (starting from
-! temperature 1) set the parameter ntb to desired value. No other parameters
-! should be modified.
-
-! ***CAUTION***
-! As a result of the mixing procedure used to calculate the data a few
-! X=0.0, low T-small R, table values fell outside the range of T and R accessible
-! from the X=0.35 data directly calculated for this purpose. These T-R
-! locations are filled in with 9.99 (or for diagnostic purposes in some cases
-! larger values. At the same locations the derivatives are set to 99.9. When
-! T-R falls in this region a message is issued by the interpolation code to
-! inform the user of this situation. Presumable very few users will have
-! applications that take them into this region.
-!
-! Your routine that performs the call to OPAC should include the
-! statement:
-
-! common/e/ opact,dopact,dopacr,dopactd
-
-! These variables have the following meanings:
-!
-! OPACT Is the Log of the Rosseland mean opacity: Log(kappa)
-! DOPACT Is Dlog(kappa)/Dlog(T6) at constant R
-! DOPACR Is Dlog(kappa)/Dlog(R) at constant T
-! DOPACTD Is Dlog(kappa)/Dlog(T6) at constant Rho
-
- dum=0.0
- end subroutine instruct
-
-! ********************************************************************
- subroutine opacgn93(z,xh,t6,r,filename)
-! ....The purpose of this subroutine is to interpolate the data along Z
- save
- character (len=*) :: filename
- parameter (mx=10,mz=13,nrm=19,nrb=1,nre=19,nr=nrm+1-nrb,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/a/ mzz, xz(mx,mz,nt,nr),t6list(nt),alr(nr),n(mx),alt(nt),opk(nt,nr),opk2(nt,nr),
- & dfsx(mx),dfs(nt),dfsr(nr),dfsz(mz),a(3,mx),b(3),m,mf,xa(mx),alrf(nrm),xzf(nt,nr),t6listf(ntm),za(mz)
-! .... OPACT- opacity obtained from a quadraric interpolation at
-! fixed log T6 at three values of log R; followed by quadratic
-! interpolation along log T6. Results smoothed bt mixing
-! overlapping quadratics.
-! .... DOPACT- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics
-! at fixed R
-! .... DOPACR- is Dlog(k)/Dlog(R) smoothed by mixing quadratics.
-! .... DOPACTD- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics
-! at fixed rho
- common/e/ opact,dopact,dopacr,dopactd
- common/ee/ opl(mx,nt,nr),xx(mx),zza(mz)
- common/eee/m1,zval
- real :: kapz,kapz1,kapz2
- dimension :: kapz(mz),dkapdtr(mz),dkapdrt(mz)
- zval=z
- zzl=z ! use zzl=log10(.0001+z) for log interpolation
- if(itime /= 12345678) then
- do i=1,mz
- zza(i)=za(i) ! use zza=log10(0.0001+za(i)) for log interpolation
- end do
- end if
- if(itime /= 12345678) then
- itime=12345678
- end if
-
- do i=1,mz
- if(abs(z-za(i)) < 1.e-7 ) then
- izz=i
- call opac (0,izz,xh,t6,r,filename)
- if (opact > 9.0) write (*,'(" logK > 9.0, X=",f7.5," Z=",f7.5," T6=",f10.5," R=",e12.4)') xh,z,t6,r
- return
- end if
- end do
-
- ilo=2
- ihi=mz
- 8 if(ihi-ilo > 1) then
- imd=(ihi+ilo)/2
- if(z <= za(imd)+1.e-7) then
- ihi=imd
- else
- ilo=imd
- end if
- GOTO 8
- end if
- i=ihi
- m1=i-2
- m2=i-1
- m3=i
- m4=i+1
- mfm=m4
-! ....check whether Z is near a table limit
- if((z <= za(2)+1.e-7) .or. (z >= za(mz-1))) mfm=m3
-! .... Check if Z+X interpolation sums exceed unity at needed indices.
-! If so, backup to lower Z indices to perform interpolation.
-! This should work OK, due to density of Z-grid points and the
-! slow Z variation(except at very small Z)
- if(xh+za(mfm) > 1.) mfm=m3
- if(xh+za(mfm) > 1.) then
- if(m1 <= 1) then
- write(*,'("special case: X,Z location not covered by logic")')
- stop
- end if
- m1=m1-1
- m2=m2-1
- m3=m3-1
- end if
-
- izi=0
- do iz=m1,mfm
- izz=iz
- call opac(izi,izz,xh,t6,r,filename)
- if (opact > 9.0) write (*,'(" logK > 9.0, X=",f7.5," Z=",f7.5," T6=",f10.5," R=",e12.4)') xh,z,t6,r
- izi=1
- kapz(iz)=10.**opact ! converts logK to K
- dkapdtr(iz)=dopact
- dkapdrt(iz)=dopacr
- end do
- is=0
- iw=1
- kapz1=quad(is,iw,zzl,kapz(m1),kapz(m2),kapz(m3),zza(m1),zza(m2),zza(m3))
- is=1
- dkapz1=quad(is,iw,zzl,dkapdtr(m1),dkapdtr(m2),dkapdtr(m3),zza(m1),zza(m2),zza(m3))
- dkapz3=quad(is,iw,zzl,dkapdrt(m1),dkapdrt(m2),dkapdrt(m3),zza(m1),zza(m2),zza(m3))
- if (mfm == m3) then
- opact=log10(kapz1) ! converts K to logK
- dopact=dkapz1
- dopacr=dkapz3
- dopactd=-3.*dopacr+dopact
- is=0
-
- return
-
- end if
- is=0
- iw=2
- kapz2=quad(is,iw,zzl,kapz(m2),kapz(m3),kapz(m4),zza(m2),zza(m3),zza(m4))
- is=1
- dkapz2=quad(is,iw,zzl,dkapdtr(m2),dkapdtr(m3),dkapdtr(m4),zza(m2),zza(m3),zza(m4))
- dkapz4=quad(is,iw,zzl,dkapdrt(m2),dkapdrt(m3),dkapdrt(m4),zza(m2),zza(m3),zza(m4))
- dix=(zza(m3)-zzl)*dfsz(m3)
- opact=log10(kapz1*dix+kapz2*(1.-dix)) ! converts K to logK
- dopact=dkapz1*dix+dkapz2*(1.-dix)
- dopacr=dkapz3*dix+dkapz4*(1.-dix)
- dopactd=-3.*dopacr+dopact
- is=0
-
- end subroutine opacgn93
-! **********************************************************************
-
- subroutine opac(izi,mzin,xh,t6,r,filename)
-! .... The purpose of this subroutine is to interpolate log kappa
-! in in X, T6, R
-! izi=0 recalculate table indices to use; =1 keep previous
-! mzin=index of za(i) in block data. za(i) are metallicities
-! t6=T6=temperature in millions of degrees kelvin
-! r=R=density(g/cm**3)/T6**3
-! .... to use opac insert common/e/ in the calling routine.
-! This common contains interpolated values for kappa and its
-! first derivities.
-
- save
- integer :: w
- character (len=*) :: filename
- parameter (mx=10,mz=13,nrm=19,nrb=1,nre=19,nr=nrm+1-nrb,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/aa/ q(4),h(4),xxh
- common/a/ mzz, xz(mx,mz,nt,nr),t6list(nt),alr(nr),n(mx),alt(nt),opk(nt,nr),opk2(nt,nr),
- & dfsx(mx),dfs(nt),dfsr(nr),dfsz(mz),a(3,mx),b(3),m,mf,xa(mx),alrf(nrm),xzf(nt,nr),t6listf(ntm),za(mz)
- common/b/ itab(mx,mz),nta(nr),x(mx,mz),y(mx,mz),zz(mx,mz)
- common/d/dkap
- common/bb/l1,l2,l3,l4,k1,k2,k3,k4,ip,iq
- common/ee/ opl(mx,nt,nr),xx(mx),zza(mz)
- common/eee/m1,zval
-! .... OPACT- opacity obtained from a quadraric interpolation at
-! fixed log T6 at three values of log R; followed by quadratic
-! interpolation along log T6. Results smoothed bt mixing
-! overlapping quadratics.
-! .... DOPACT- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics
-! at fixed R
-! .... DOPACR- is Dlog(k)/Dlog(R) smoothed by mixing quadratics.
-! .... DOPACTD- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics
-! at fixed rho
- common/e/ opact,dopact,dopacr,dopactd
-
- iop=1 ! provides smoothed interpolations; iop=0 gives no smoothing
- mzz=mzin
- z=za(mzz)
-
- if(nre < 6) GOTO 65
-
- if((izi == 0) .and. (z+xh-1.e-6 > 1 )) GOTO 61
- if((izi /= 0) .and. (zval+xh-1.e-6 > 1 )) GOTO 61
- xxh=xh
- xxi=xh
- t6i=t6
- ri=r
-
- xxx=log10(.005+xh)
- slt=log10(t6)
- slr=log10(r)
-
- if(itime /= 12345678) then
- itime=12345678
- do i=1,mx
- xx(i)=log10(.005+xa(i))
- end do
-! .... this is the first time through. Calculate the decadic
-! log of the perimeter points shifted by Z. m refers to
-! xa(m); the hydrogen table value.
-
-! .... read the data files
- call readco(filename)
- xamx1=xa(mx-1)
- xxmx1=xx(mx-1)
- dfsxmx1=dfsx(mx-1)
- end if
- mxend=mx
- xa(mx)=1.-z
- xa(mx-1)=xamx1
- xx(mx-1)=xxmx1
- dfsx(mx-1)=dfsxmx1
- if (xa(mx) < xa(mx-1)) then
- mxend=mx-1
- xa(mxend)=xa(mx)
- end if
- if (xh >= 0.8 ) then
- xx(mxend)=log10 (0.005+xa(mxend))
- dfsx(mxend)=1./(xx(mxend)-xx(mxend-1))
- end if
-
-
-! .... Determine log R and log T6 grid points to use in the
-! interpolation.
- if((slt < alt(1)).or.(slt > alt(nt))) GOTO 62
- if((slr < alr (1)).or.(slr > alr(nre))) GOTO 62
-
- if (izi == 0) then ! freeze table indices
- ilo=2
- ihi=mx
- 8 if(ihi-ilo > 1) then
- imd=(ihi+ilo)/2
- if(xh <= xa(imd)+1.e-7) then
- ihi=imd
- else
- ilo=imd
- end if
- GOTO 8
- end if
- i=ihi
- mf=i-2
- mg=i-1
- mh=i
- mi=i+1
- mf2=mi
- if (xh < 1.e-6) then
- mh=1
- mg=1
- mi=2
- mf2=1
- end if
- if((xh <= xa(2)+1.e-7) .or. (xh >= xa(mx-2)-1.e-7)) mf2=mh
-
- ilo=2
- ihi=nre
- 12 if(ihi-ilo > 1) then
- imd=(ihi+ilo)/2
- if(slr <= alr(imd)+1.e-7) then
- ihi=imd
- else
- ilo=imd
- end if
- GOTO 12
- end if
- i=ihi
- l1=i-2
- l2=i-1
- l3=i
- l4=l3+1
-
- ilo=2
- ihi=nt
- 11 if(ihi-ilo > 1) then
- imd=(ihi+ilo)/2
- if(t6 <= t6list(imd)+1.e-7) then
- ihi=imd
- else
- ilo=imd
- end if
- GOTO 11
- end if
- i=ihi
- k1=i-2
- k2=i-1
- k3=i
- k4=k3+1
- l3s=l3+nrb-1
- k3s=k3+ntb-1
- end if
-
- kmin=0
- k1in=k1
- iadvance=0
- mfin=mf
- if ((mfin == 1) .and. (xz(1,mzz,k1,l1) > 9.)) then ! no data
- do i=1,6
- if (xz(1,mzz,i,l1) > 9.) then
- if (xh < .1) then
- kmin=i+1
- else
-
- if (iadvance == 0) then
- iadvance=iadvance+1
- mf=mf+1
- mg=mg+1
- mh=mh+1
- mi=mi+1
- mf2=mf2+1
- end if
- end if
- end if
- end do
- if ((iadvance == 0) .and. (k1 <= kmin) .and. (slt <= alt(kmin))) then
- k1=kmin
- if ((xz(1,mzz,kmin,l1+1) < 9.) .and. ((slr+.01) > alr(l1+1))) then
- l1=l1+1
- kmin=0
- k1=k1in
- do i=1,6
- if (xz(1,mzz,i,l1) > 9.) kmin=i+1
- end do
- if ((kmin /= 0) .and. (k1in < kmin)) k1=kmin
- end if
- end if
- if ((slt+.001) < alt(k1)) then
- opact=30.
- dopact=99.
- dopacr=99.
- return
- end if
- l2=l1+1
- l3=l2+1
- l4=l3+1
- l3s=l3+nrb-1
- k2=k1+1
- k3=k2+1
- k4=k3+1
- k3s=k3+ntb-1
- end if
- do i=14,18 ! allows jagged edge at high T,rho
- if((l3s > i) .and. (k3s > nta(i+1))) GOTO 62
- end do
- do m=mf,mf2
- ip=3
- iq=3
- ntlimit=nta(l3s)
- if((k3. eq. ntlimit) .or. (iop == 0)) then
- ip=2
- iq=2
- end if
- if(t6 <= t6list(2)+1.e-7) ip=2
-
- if((l3 == nre) .or. (iop == 0)) then
- iq=2
- ip=2
- end if
- if ((l4 <= nr) .and. (xz(m,mzz,k3,l4) == .0)) iq=2
- if(slr <= alr(2)+1.e-7) iq=2
-
- is=0
-
-! _________
- do ir=l1,l1+iq
- do it=k1,k1+ip
- opl(m,it,ir)=xz(m,mzz,it,ir)
- is=1
- end do
- end do
- end do
- if((zz(mg,mzin) /= zz(mf,mzin)) .or. (zz(mh,mzin) /= zz(mf,mzin))) then
- write(*,'("Z does not match Z in GN93hz files you are using")')
- stop
- end if
- if(z /= zz(mf,mzin)) GOTO 66
-! with return
- is=0
- iw=1
- do ir=l1,l1+iq
- do it=k1,k1+ip
- if (mf2 == 1) then
- opk(it,ir)=opl(mf,it,ir)
- cycle
- end if
- opk(it,ir)=quad(is,iw,xxx,opl(mf,it,ir),opl(mg,it,ir),opl(mh,it,ir),xx(mf),xx(mg),xx(mh))
- is=1
- end do
- end do
- end do
-
- if (mi == mf2) then ! interpolate between quadratics
- is=0
- iw=1
- dixr=(xx(mh)-xxx)*dfsx(mh)
- do ir=l1,l1+iq
- do it=k1,k1+ip
- opk2(it,ir)=quad(is,iw,xxx,opl(mg,it,ir),opl(mh,it,ir),opl(mi,it,ir),xx(mg),xx(mh),xx(mi))
- opk(it,ir)=opk(it,ir)*dixr+opk2(it,ir)*(1.-dixr)
- is=1
- end do
- end do
-! interpolate X between two overlapping quadratics
- end if
-
- is=0
-
-! .... completed H,Z interpolation. Now interpolate T6 and log R on a
-! 4x4 grid. (log(T6(i)),i=i1,i1+3),log(R(j)),j=j1,j1+3)).Procedure
-! mixes overlapping quadratics to obtain smoothed derivatives.
-
-
- call t6rinterp(slr,slt)
- return
-
- 61 write(*,'(" Mass fractions exceed unity")')
-! with a return
- stop
- 62 write(*,'(" T6/LogR outside of table range")')
-! write(*,'("slt,alt(1),alt(nt),slr,alr(1),alr(nre),l3s,i,k3s, &
-! nta(i+1)",6e12.5,4i5)') slt,alt(1),alt(nt),slr,alr(1),alr(nre),l3s,i,k3s,nta(i+1)
-! with a return
- stop
- 64 write(*,'(" X not equal to zero: To run this case it is necessary"/ "to recompile with parameter (mx=1)")')
- stop
- 65 write(*,'("Too few R values; NRE+1-NRB < 6")')
- return
- 66 write(*,'(" Z does not match Z in codata* files you are using")')
- stop
- end
-
-! **********************************************************************
- subroutine t6rinterp(slr,slt)
-! The purpose of this subroutine is to interpolate in logT6 and logR
- save
- parameter (mx=10,mz=13,nrm=19,nrb=1,nre=19,nr=nrm+1-nrb,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/ee/ opl(mx,nt,nr),xx(mx),zza(mz)
- common/aa/ q(4),h(4),xxh
- common/a/ mzz, xz(mx,mz,nt,nr),t6list(nt),alr(nr),n(mx),alt(nt),opk(nt,nr),opk2(nt,nr),
- & dfsx(mx),dfs(nt),dfsr(nr),dfsz(mz),a(3,mx),b(3),m,mf,xa(mx),alrf(nrm),xzf(nt,nr),t6listf(ntm),za(mz)
- common/d/dkap
- common/bb/l1,l2,l3,l4,k1,k2,k3,k4,ip,iq
- common/e/ opact,dopact,dopacr,dopactd
-
- iu=0
- is=0
- do kx=k1,k1+ip
- iw=1
- iu=iu+1
- h(iu)=quad(is,iw,slr,opk(kx,l1),opk(kx,l2),opk(kx,l3),alr(l1),alr(l2),alr(l3))
- if(iq. eq. 3) then
- iw=2
- q(iu)=quad(is,iw,slr,opk(kx,l2),opk(kx,l3),opk(kx,l4),alr(l2),alr(l3),alr(l4))
- end if
- is=1
- end do
-
- is=0
- iw=1
-! .... k and Dlog(k)/dlog(T6) in lower-right 3x3(i=i1,i1+2 j=j1,j1+2)
- opact=quad(is,iw,slt,h(1),h(2),h(3),alt(k1),alt(k2),alt(k3))
- dopact=dkap
- dkap1=dkap
- if (iq. eq. 3) then
-! .... k and Dlog(k)/Dlog(T6) upper-right 3x3(i=i1+1,i1+3 j=j1,j1+2)
- opactq=quad(is,iw,slt,q(1),q(2),q(3),alt(k1),alt(k2),alt(k3))
- dkapq1=dkap
- end if
- if(ip == 3) then
-! .... k and Dlog(k)/Dlog(T6) in lower-left 3x3.
- opact2=quad(is,iw,slt,h(2),h(3),h(4),alt(k2),alt(k3),alt(k4))
- dkap2=dkap
-! .... k and Dlog(k)/Dlog(T6) smoothed in left 3x4
- dix=(alt(k3)-slt)*dfs(k3)
- dopact=dkap1*dix+dkap2*(1.-dix)
- opact=opact*dix+opact2*(1.-dix)
- end if
- if(iq == 3) then
-
-! .... k and Dlog(k)/Dlog(T6) in upper-right 3x3.
- opactq2=quad(is,iw,slt,q(2),q(3),q(4),alt(k2),alt(k3),alt(k4))
- dkapq2=dkap
- dopactq=dkapq1*dix+dkapq2*(1.-dix)
- opactq=opactq*dix+opactq2*(1.-dix)
- end if
-
- iu=0
- do lx=l1,l1+iq
- iw=1
- iu=iu+1
- h(iu)=quad(is,iw,slt,opk(k1,lx),opk(k2,lx),opk(k3,lx),alt(k1),alt(k2),alt(k3))
- if(ip == 3) then
- iw=2
- q(iu)=quad(is,iw,slt,opk(k2,lx),opk(k3,lx),opk(k4,lx),alt(k2),alt(k3),alt(k4))
- end if
- is=1
- end do
-
- is=0
- iw=1
-! .... k and Dlog(k)/Dlog(R) in lower-left 3x3
- opacr=quad(is,iw,slr,h(1),h(2),h(3),alr(l1),alr(l2),alr(l3))
- dopacr=dkap
- if(ip == 3) then
- opacrq=quad(is,iw,slr,q(1),q(2),q(3),alr(l1),alr(l2),alr(l3))
-! .... k and Dlog(k)/Dlog(R) in upper-left 3x3.
- dkapq3=dkap
- end if
- if(iq == 3) then
-! .... k and Dlog(k)/Dlog(R) in lower-right 3x3.
- opact2=quad(is,iw,slr,h(2),h(3),h(4),alr(l2),alr(l3),alr(l4))
- dix2=(alr(l3)-slr)*dfsr(l3)
- dopacr=dopacr*dix2+dkap*(1.-dix2)
- if(ip == 3) then
-! .... k and Dlog(k)/Dlog(T6) smoothed in both log(T6) and log(R)
- dopact=dopact*dix2+dopactq*(1.-dix2)
- opact=opact*dix2+opactq*(1-dix2)
- end if
- end if
- if(ip == 3) then
-! .... k and Dlog(k)/Dlog(R) in upper-right 3x3.
- opacrq=quad(is,iw,slr,q(2),q(3),q(4),alr(l2),alr(l3),alr(l4))
- if(iq == 3) then
-! .... Dlog(k)/Dlog(R) smoothed in both log(T6) and Log(R).
- dopacrq=dkapq3*dix2+dkap*(1.-dix2)
- dopacr=dopacr*dix+dopacrq*(1.-dix)
- end if
- end if
- dopactd=dopact-3.*dopacr
- if (opact > 1.e+15) then
- write(*,'("Interpolation indices out of range; please report conditions.")')
- stop
- end if
- if (opact > 9.) then
- dopact=99.
- dopacr=99.
- dopactd=99.
- end if
-
- end subroutine t6rinterp
-
-
-! *********************************************************************
- subroutine readco(filename)
-! .... The purpose of this subroutine is to read the data tables
- save
- parameter (ismdata=0) ! modified
- parameter (mx=10,mz=13,nrm=19,nrb=1,nre=19,nr=nrm+1-nrb,ntm=70,ntb=1,nt=ntm+1-ntb)
- character(len=1) :: dumarra(250)
- character (len=*) :: filename
- common/aa/ q(4),h(4),xxh
- common/a/ mzz, xz(mx,mz,nt,nr),t6list(nt),alr(nr),n(mx),alt(nt),opk(nt,nr),opk2(nt,nr),
- & dfsx(mx),dfs(nt),dfsr(nr),dfsz(mz),a(3,mx),b(3),m,mf,xa(mx),alrf(nrm),xzf(nt,nr),t6listf(ntm),za(mz)
- common/b/ itab(mx,mz),nta(nr),x(mx,mz),y(mx,mz),zz(mx,mz)
- common/e/ opact,dopact,dopacr,dopactd
- common/ee/ opl(mx,nt,nr),xx(mx),zza(mz)
- common/alink/ NTEMP,NSM,nrlow,nrhigh,RLE,t6arr(100),xzff(100,nr)
- COMMON/CST/NRL,RLS,nset,tmax ! modified
-
- if (itimeco /= 12345678) then
- do i=1,mx
- do j=1,mz
- do k=1,nt
- do l=1,nr
- xz(i,j,k,l)=1.e+35
- end do
- end do
- end do
- end do
- itimeco=12345678
- end if
-
- close (2)
-! .... read tables
- open(2, FILE=trim(filename))
-
-! read header
- do i=1,240
- read (2,'(a)') dumarra(i)
- end do
-
- do m=1,mx
- do i=1,n(m)
-
- read(2,'(f10.5)') dum
- read (2,'(7x,i3,26x,f6.4,3x,f6.4,3x,f6.4)') itab(m,i),x(m,i),y(m,i),zz(m,i)
- read(2,'(f10.5)') dum,dum,dum
- read(2,'(4x,f6.1,18f7.1)') (alrf(kk),kk=1,nrm)
- read(2,'(f10.5)') dum
- do k=1,ntm
- read(2,'(f4.2,19f7.3)') alt(k),(xzf(k,l), l=1,nrm)
- alt(k)=alt(k)-6.
- if (isett6 /= 1234567) then
- t6listf(k)=10.**alt(k)
- t6arr(k)=t6listf(k)
- end if
- do ll=1,nrm ! modified
- xzff(k,ll)=xzf(k,ll)
- end do
- end do
- isett6=1234567
-
- if (ismdata == 0) then
- tmax=10. ! modified
- nset=65
- RLS=-8.
- nsm=1
- RLE=1.
- nrlow=1
- nrhigh=2*(RLE-RLS)+1
-
- call opaltab !modified
- end if
-
- ll=1
- do kk=1,nre
- alr(ll)=alrf(kk)
- do k=1,nt
- t6list(k)=t6listf(k+ntb-1)
- if(ismdata == 0) then
-! Following skip required because, due to missing data,
-! the X=0 low T data cannot be smoothed
- if ((m == 1) .and. (k <= 9)) then
- xz(m,i,k,ll)=xzf(k+ntb-1,kk)
- else
- xz(m,i,k,ll)=xzff(k+ntb-1,kk)
- end if
- else
- xz(m,i,k,ll)=xzf(k+ntb-1,kk)
- end if
- end do
- ll=ll+1
- end do
-
- end do
- end do
-
- do i=2,nt
- dfs(i)=1./(alt(i)-alt(i-1))
- end do
- do i=2,nr
- dfsr(i)=1./(alr(i)-alr(i-1))
- end do
- do i=2,mx-1
- dfsx(i)=1./(xx(i)-xx(i-1))
- end do
- do i=2,mz
- dfsz(i)=1./(zza(i)-zza(i-1))
- end do
- end subroutine readco
-
-! **********************************************************************
- function quad(ic,i,x,y1,y2,y3,x1,x2,x3)
-! .... this function performs a quadratic interpolation.
- save
- common/d/dkap
- dimension xx(3),yy(3),xx12(30),xx13(30),xx23(30),xx1sq(30),xx1pxx2(30)
- xx(1)=x1
- xx(2)=x2
- xx(3)=x3
- yy(1)=y1
- yy(2)=y2
- yy(3)=y3
- if(ic == 0) then
- xx12(i)=1./(xx(1)-xx(2))
- xx13(i)=1./(xx(1)-xx(3))
- xx23(i)=1./(xx(2)-xx(3))
- xx1sq(i)=xx(1)*xx(1)
- xx1pxx2(i)=xx(1)+xx(2)
- end if
- c3=(yy(1)-yy(2))*xx12(i)
- c3=c3-(yy(2)-yy(3))*xx23(i)
- c3=c3*xx13(i)
- c2=(yy(1)-yy(2))*xx12(i)-(xx1pxx2(i))*c3
- c1=yy(1)-xx(1)*c2-xx1sq(i)*c3
- dkap=c2+(x+x)*c3
- quad=c1+x*(c2+x*c3)
-
- end function quad
-
-! **********************************************************************
- block data
- parameter (mx=10,mz=13,nrm=19,nrb=1,nre=19,nr=nrm+1-nrb,ntm=70,ntb=1,nt=ntm+1-ntb)
- common/aa/ q(4),h(4),xxh
- common/a/ mzz, xz(mx,mz,nt,nr),t6list(nt),alr(nr),n(mx),alt(nt),opk(nt,nr),opk2(nt,nr),
- & dfsx(mx),dfs(nt),dfsr(nr),dfsz(mz),a(3,mx),b(3),m,mf,xa(mx),alrf(nrm),xzf(nt,nr),t6listf(ntm),za(mz)
- common/b/ itab(mx,mz),nta(nr),x(mx,mz),y(mx,mz),zz(mx,mz)
- data (xa(i),i=1,mx-1)/0.0,0.1,0.2,0.35,0.5,.7,.8,.9,.95/
- data (za(i),i=1,mz)/.0,0.0001,.0003,.001,.002,.004,.01,.02,.03, .04,.06,.08,.1/
- data (nta(i),i=1,nrm)/14*70,69,64,60,58,57/
- data (n(i),i=1,mx)/13,13,13,13,13,13,13,13,10,12/
- end
-
-! **********************************************************************
- subroutine opaltab
-
-! CODE FOR FITTING AND SMOOTHING OPAL DATA. ADAPTED FROM A CODE
-! WRITTEN BY MIKE SEATON(obtained june 1993)
-
-! OPAL DATA.
-! ASSUMES FIRST T6=0.006, LAST T6=10.OR 0.04). Depending on position
-! in the table.
-! USES RECTANGULAR ARRAY FOR VARIABLES T6 AND LOG10(R)
-
-! (1) NSM=NUMBER OF PASSES THROUGH SMOOTHING FILTER.
-! USE OF NSM=1 OR 2 IS RECOMMENDED.
-! NO SMOOTHING WITH NSM=0
-! (2) RANGE FOR LOG10(R),
-! RLS=FIRST VALUE, RLE=LAST VALE
-! (RLS MUST BE FIRST VALUYE IN TABLE)
-
-! subroutine INTERP
-! AFTER PROCESSING, DATA ARE IN A FORM FOR USE OF
-! subroutine INTERP
-! WHICH GIVES LOG(ROSS) AND TWO FIRST DERIVATIVES FOR ANY
-! VALUES OF LOG(T) AND LOG(RHO). SEE BELOW FOR FURTHER
-! EXPLANATION.
-
-! OUTPUT FOR THE CASE OF NSM > 0.
-! INTERP IS USED TO OBTAIN SMOOTHED DATA INTERPOLATED
-! BACK TO THE ORIGINAL OPAL MESH. TWO FILES ARE WRITTEN.
-
-
-! THE subroutineS SPLINE AND SPLINT ARE ADAPTED FROM THOSE GIVE BY
-! W.H. Press, S.A. Teulolsky, W.T. Vettering and B.P. Flannery,
-! "Numerical Recipes in FORTRAN", 2nd ed., 1992, C.U.P.
-! OTHER REFERENCES ARE MADE TO METHODS DESCRIBED IN THAT BOOK.
-
- parameter(IP=100,IPR=20)
- parameter (mx=10,mz=13,nrm=19,nrb=1,nre=19,nr=nrm+1-nrb,ntm=70,ntb=1,nt=ntm+1-ntb)
- dimension U(IP),ROSSL(IP,IPR),V(IP),V2(IP)
- COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
- character(len=1) :: HEAD(100)
- COMMON/CST/NRL,RLS,nset,tmax ! modified
- common/alink/ N,NSM,nrlow,nrhigh,RLE,t6arr(100),xzff(100,nr)
- logical :: IERR
-
-
- NRL=2*(RLE-RLS)+1
-
-! STORE LOG10(T) IN U AND LOG10(ROSS) IN ROSSL
-! CHECK FIRST VALUE OF T6
- T6=t6arr(1)
- do j=1,NRL
- ROSSL(1,j)=xzff(1,j)
- end do
-
- if (abs(T6-.0056341325) < 1.e-8) then
- U(1)=6.+LOG10(T6)
- end if
-! SET ROSSL UP TO T6=t6arr(nset)
- I=1
- 5 I=I+1
- T6=t6arr(I)
- do j=1,NRL
- ROSSL(I,j)=xzff(I,j)
- end do
- U(I)=6+LOG10(T6)
- if(T6 < tmax)GOTO 5
- N=I
- if(N > IP)then
- PRINT*,' REQUIRE parameter IP OF AT LEAST ',N
- STOP
- end if
-
-
-! DEFINE VARIABLES
-! X=20.0*(LOG10(T)-3.80)+1
-! Y=2.0*(LOG10(R)-RLS)+1
-! USE INDICES I=1 TO nset AND J=1 TO NRL
-! X AND Y ARE SUCH THAT, ON MESH-POINT (I,J), X=I AND Y=J
-! OBTAIN:-
-! F(I,J)=LOG10(ROSS)
-! FX(I,J)=dF/dX
-! FY(I,J)=dF/dY
-! FXY(I,J)=ddF/dXdY
-
-
-! FIRST GET F AND FX, INTERPOLATING FROM OPAL T6 TO
-! INTERVAL OF 0.05 IN LOG10(T).
- do J=1,NRL
-! FOR EACH LOG10(R), STORE LOG10(ROSS) IN V(I)
- do I=1,N
- V(I)=ROSSL(I,J)
- end do
-
-! GET FIRST DERIVATIVES AT end POINTS
-
-! GET SECOND DERIVATIVES FOR SPLINE FIT
- call SPLINE(U,V,N,V2)
-
-! INTERPOLATE TO LOG10(T)=FLT, FLT=3.8(0.05)8.0
- do I=1,nset ! modified
- FLT=3.75+0.05*I
- call SPLINT(U,V,N,V2,FLT,F(I,J),FX(I,J))
- end do
-
- end do
-
-
-! OPTION FOR SMOOTHING
- if(NSM > 0)then
- do NS=1,NSM
- call SMOOTH
- end do
- call FITX
- end if
-
-
-! GET FY AND FXY
- call FITY
-
-! THE ARRAYS F, FX, FY AND FXY ARE NOW STORED
-
-! CAN NOW do INTERPOLATIONS USING
-! call INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR)
-! INPUT IS FLT=LOG10(T), FLRHO=LOG10(RHO)
-! OUTPUT IS G=LOG10(ROSS)
-! DGDT=dG/d(LOG10(T))
-! DGDRHO=dG/d(LOG10(RHO))
-! IERR=.true. if INPUT FLT, FLRHO ARE OUT-OF-RANGE,
-! else IERR=.false.
-
-! INTERPOLATE BACK TO OPAL POINTS
- if(NSM > 0)then
- do l=1,NRL
- xzff(1,l)=ROSSL(1,l)
- end do
-
- do K=2,N
- FLT=U(K)
- do L=nrlow,nrhigh
- FLR=RLS+.5*(L-1)
- FLRHO=FLR-18.+3.*FLT
- call INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR)
- if(IERR)then
- end if
- V(L)=G
- end do
- T6=t6arr(K)
- do l=nrlow,nrhigh
- xzff(K,l)=V(l)
-
- end do
-
- end do
- end if
-
-
- 1000 FORMAT(' SMOOTHED OPAL DATA')
- 1100 FORMAT(' OPAL DATA, (SMOOTHED-ORIGINAL)')
- 2000 FORMAT(100A1)
- 2222 FORMAT(F8.3,20F7.3)
- 6000 FORMAT(/' FIRST T6=',1P,E10.3,', SHOULD BE 0.006')
- 6003 FORMAT(/' !!! OUT-OF-RANGE !!!'/' FLT=',1P,E10.3,', FLRHO=',E10.3,', FLR=',E10.3)
-
- end subroutine opaltab
-
-! ********************************************************************
- subroutine SPLINE(X,Y,N,Y2)
- parameter (NMAX=100)
- dimension X(N),Y(N),Y2(N),U(NMAX)
-
-! FIRST DERIVATIVES AT end POINTS USING CUBIC FIT
- YP1=((Y(3)-Y(1))*(X(2)-X(1))**2
- & -(Y(2)-Y(1))*(X(3)-X(1))**2)/
- & ((X(3)-X(1))*(X(2)-X(1))*(X(2)-X(3)))
- YPN=((Y(N-2)-Y(N))*(X(N-1)-X(N))**2
- & -(Y(N-1)-Y(N))*(X(N-2)-X(N))**2)/
- & ((X(N-2)-X(N))*(X(N-1)-X(N))*(X(N-1)-X(N-2)))
-
- Y2(1)=-0.5
- U(1)=(3./(X(2)-X(1)))*((Y(2)-Y(1))/(X(2)-X(1))-YP1)
- do I=2,N-1
- SIG=(X(I)-X(I-1))/(X(I+1)-X(I-1))
- P=SIG*Y2(I-1)+2.
- Y2(I)=(SIG-1.)/P
- U(I)=(6.*((Y(I+1)-Y(I))/(X(I+1)-X(I))-(Y(I)-Y(I-1)) /(X(I)-X(I-1)))/(X(I+1)-X(I-1))-SIG*U(I-1))/P
- end do
- QN=0.5
- UN=(3./(X(N)-X(N-1)))*(YPN-(Y(N)-Y(N-1))/(X(N)-X(N-1)))
- Y2(N)=(UN-QN*U(N-1))/(QN*Y2(N-1)+1.)
- do K=N-1,1,-1
- Y2(K)=Y2(K)*Y2(K+1)+U(K)
- end do
- end subroutine SPLINE
-! ********************************************************************
- subroutine SPLINT(XA,YA,N,Y2A,X,Y,YP)
- dimension XA(N),YA(N),Y2A(N)
- KLO=1
- KHI=N
-1 if (KHI-KLO > 1) then
- K=(KHI+KLO)/2
- if(XA(K) > X)then
- KHI=K
- else
- KLO=K
- end if
- GOTO 1
- end if
- H=XA(KHI)-XA(KLO)
- if (H == 0.) PAUSE 'Bad XA input.'
- A=(XA(KHI)-X)/H
- B=(X-XA(KLO))/H
- Y=A*YA(KLO)+B*YA(KHI)+ ((A**3-A)*Y2A(KLO)+(B**3-B)*Y2A(KHI))*(H**2)/6.
- YP=0.05* ( (-YA(KLO)+YA(KHI))/H + ( -(3*A**2-1)*Y2A(KLO) +(3*B**2-1)*Y2A(KHI) )*H/6. )
-
- end subroutine SPLINT
-! ********************************************************************
- subroutine FITY
-
-! THIS ROUTINE MAKES SPLINE FITS FOR F AND FX, AND OBTAINS
-! FY AND FXY
-
- COMMON/CST/NRL,RLS,nset,tmax ! modified
-
- parameter(IPR=20)
- dimension A(IPR),B(IPR),AD(IPR),BD(IPR)
- COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
-
- do I=1,nset ! modified
- do J=1,NRL
- A(J)=F(I,J)
- B(J)=FX(I,J)
- end do
-
- call GETD(A,NRL,AD,AP1,APN)
- call GETD(B,NRL,BD,BP1,BPN)
-
- FY(I,1)=AP1
- FY(I,NRL)=APN
- FXY(I,1)=BP1
- FXY(I,NRL)=BPN
- do J=2,NRL-1
- FY(I,J)= -A(J)+A(J+1)-2.*AD(J)-AD(J+1)
- FXY(I,J)=-B(J)+B(J+1)-2.*BD(J)-BD(J+1)
- end do
- end do
-
- end subroutine FITY
-! ********************************************************************
- subroutine FITX
-
-! THIS ROUTINE IS USED ONLY AFTER SMOOTHING.
-! ITS FUNCTION IS TO RECOMPUTE FX USING SMOOTHED F.
-
- parameter(IPR=20)
- dimension A(85),D(85)
-
- COMMON/CST/NRL,RLS,nset,tmax ! modified
- COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
-
- do J=1,NRL
- do I=1,nset ! modified
- A(I)=F(I,J)
- end do
- call GETD(A,nset,D,AP1,APN) ! modified
- FX(1,J)=AP1
- FX(nset,J)=APN ! modified
- do I=2,nset-1 ! modified
- FX(I,J)=-A(I)+A(I+1)-2.*D(I)-D(I+1)
- end do
- end do
-
- end subroutine FITX
-
-! ***********************************************************************
- subroutine GETD(F,N,D,FP1,FPN)
-
-! SIMPLIFIED CODE FOR SPLINE COEFFICIENTS, FOR CASE OF INTERVALS
-! OF UNITY.
-
-
- dimension F(N),D(N),T(85)
-
- FP1=(-11.*F(1)+18.*F(2)-9.*F(3)+2.*F(4))/6.
- FPN=(11.*F(N)-18.*F(N-1)+9.*F(N-2)-2.*F(N-3))/6.
-
- D(1)=-.5
- T(1)=.5*(-F(1)+F(2)-FP1)
-
- do J=2,N-1
- D(J)=-1./(4.+D(J-1))
- T(J)=-D(J)*(F(J-1)-2.*F(J)+F(J+1)-T(J-1))
- end do
-
- D(N)=(FPN+F(N-1)-F(N)-T(N-1))/(2.+D(N-1))
-
- do J=N-1,1,-1
- D(J)=D(J)*D(J+1)+T(J)
- end do
-
- end subroutine GETD
-
-! ********************************************************************
- subroutine INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR)
-
-! GIVEN F,FX,FY AND FXY ON THE GRID POINTS, THIS ROUTINE
-! DOES BI-CUBIC INTERPOLATIONS USING METHODS DESCRIBED IN
-! Numerical Recipes, PP. 118 TO 120
-
-
- parameter(IPR=20)
- COMMON/CF/ F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
- dimension B(16)
- logical :: IERR
-
- COMMON/CST/NRL,RLS,nset,tmax ! modified
-
-! EXTREME LIMITS ALLOWED ARE:-
-! (3.800-0.0125) TO (8.000+0.0125) FOR LOG10(T)
-! (RLS-0.125) TO (RLE+0.1254) FOR LOG10(R)
-! (ALLOWING FOR SMALL EXTRAPOLATIONS BEYOND TABULAR VALUES)
-
-! FUNCTION DEFINITIONS FOR CUBIC EXPANSION
-
- FF(S,T)= B( 1)+T*(B( 2)+T*(B( 3)+T*B( 4)))+S*( B( 5)+T*(B( 6)+T*(B( 7)+T*B( 8)))+S*( B( 9)+T*(B(10)+T*(B(11)+T*B(12)))
- & +S*( B(13)+T*(B(14)+T*(B(15)+T*B(16))) )))
-
- FFX(S,T)= B(5)+T*(B(6)+T*(B(7)+T*B(8))) +S*(2*(B(9)+T*(B(10)+T*(B(11)+T*B(12))))+S*(3*(B(13)+T*(B(14)+T*(B(15)+T*B(16))))))
-
- FFY(S,T)= B(2)+S*(B(6)+S*(B(10)+S*B(14)))+T*(2*(B(3)+S*(B(7)+S*(B(11)+S*B(15)))) +T*(3*(B(4)+S*(B(8)+S*(B(12)+S*B(16))))))
-
- FFXY(S,T)= B(6)+T*(2*B(7)+3*T*B( 8)) +S*(2*B(10)+T*(4*B(11)+6*T*B(12)) +S*(3*B(14)+T*(6*B(15)+9*T*B(16)) ))
-
-
- IERR=.false.
-
- X=20.*(FLT-3.800)+1
- FLR=FLRHO+18.-3.*FLT
- Y=2*( FLR - RLS )+1
-
- if(X < 2.)then
- if(X < 0.75)then
- IERR=.true.
- else
- I=1
- end if
- else if(X > 84)then
- if(X > 85.25)then
- IERR=.true.
- else
- I=84
- end if
- else
- I=X
- end if
- U=X-I
-
- if(Y < 2.)then
- if(Y < 0.75)then
- IERR=.true.
- else
- J=1
- end if
- else if(Y > NRL-1)then
- if(Y > NRL+.25)then
- IERR=.true.
- else
- J=NRL-1
- end if
- else
- J=Y
- end if
- V=Y-J
-
- if(IERR)then
- G=9.999
- DGDT=9.999
- DGDRHO=9.999
- return
- end if
-
-
-! GIVEN FUNCTIONS AND DERIVATIVES AT GRID POINTS, COMPUTE COEFFICIENTS.
- B(1)=F(I,J)
- B(2)=FY(I,J)
- B(3)=3*(-F(I,J)+F(I,J+1))-2*FY(I,J)-FY(I,J+1)
- B(4)=2*(F(I,J)-F(I,J+1))+FY(I,J)+FY(I,J+1)
-
- B(5)=FX(I,J)
- B(6)=FXY(I,J)
- B(7)=3*(-FX(I,J)+FX(I,J+1))-2*FXY(I,J)-FXY(I,J+1)
- B(8)=2*(FX(I,J)-FX(I,J+1))+FXY(I,J)+FXY(I,J+1)
-
- B(9)=3*(-F(I,J)+F(I+1,J))-2*FX(I,J)-FX(I+1,J)
- B(10)=3*(-FY(I,J)+FY(I+1,J))-2*FXY(I,J)-FXY(I+1,J)
- B(11)=9*(F(I,J)-F(I+1,J)+F(I+1,J+1)-F(I,J+1))
- & +6*(FX(I,J)-FX(I,J+1)+FY(I,J)-FY(I+1,J))
- & +4*FXY(I,J)
- & +3*(FX(I+1,J)-FX(I+1,J+1)-FY(I+1,J+1)+FY(I,J+1))
- & +2*(FXY(I,J+1)+FXY(I+1,J))
- & + FXY(I+1,J+1)
- B(12)=6*(-F(I,J)+F(I+1,J)-F(I+1,J+1)+F(I,J+1))
- & +4*(-FX(I,J)+FX(I,J+1))
- & +3*(-FY(I,J)+FY(I+1,J)+FY(I+1,J+1)-FY(I,J+1))
- & +2*(-FX(I+1,J)+FX(I+1,J+1)-FXY(I,J)-FXY(I,J+1))
- & -FXY(I+1,J)-FXY(I+1,J+1)
-
- B(13)=2*(F(I,J)-F(I+1,J))+FX(I,J)+FX(I+1,J)
- B(14)=2*(FY(I,J)-FY(I+1,J))+FXY(I,J)+FXY(I+1,J)
- B(15)=6*(-F(I,J)+F(I+1,J)-F(I+1,J+1)+F(I,J+1))
- & +4*(-FY(I,J)+FY(I+1,J))
- & +3*(-FX(I,J)-FX(I+1,J)+FX(I+1,J+1)+FX(I,J+1))
- & +2*(FY(I+1,J+1)-FY(I,J+1)-FXY(I,J)-FXY(I+1,J))
- & -FXY(I+1,J+1)-FXY(I,J+1)
- B(16)=4*(F(I,J)-F(I+1,J)+F(I+1,J+1)-F(I,J+1))
- & +2*(FX(I,J)+FX(I+1,J)-FX(I+1,J+1)-FX(I,J+1)
- & +FY(I,J)-FY(I+1,J)-FY(I+1,J+1)+FY(I,J+1))
- & +FXY(I,J)+FXY(I+1,J)+FXY(I+1,J+1)+FXY(I,J+1)
-
-! GET G=LOG10(ROSS), DGDT=d LOG10(ROSS)/d LOG10(T),
-! DGDRHO=d LOG10(ROSS)/d LOG10(RHO)
- G=FF(U,V)
- DGDT=20.*FFX(U,V)-6.*FFY(U,V)
- DGDRHO=2.*FFY(U,V)
-
- end subroutine INTERP
-
-! ********************************************************************
- subroutine SMOOTH
-
-! THIS subroutine USES A 2-dimensionAL GENERALISATION OF THE SMOOTHING
-! TECHNIQUES DESCRIBED ON PP. 644 TO 649 OF Numerical Recipes.
-
-! CONSIDER THE 25 POINTS DEFINED BY
-! I+n, n=-2,-1,0,1,2 AND J+m, m=-2,-1,0,1,2.
-! THE FUNCTION TO BE SMOOTHED IS FITTED TO A BI-CUBIC, INVOLVING
-! 16 COEFFICIENTS, USING TECHNIQUES OF LEAST-SQUARES. THE SMOOTHED
-! FUNCTION (TEMPORARILY STORED IN FXY) IS GIVEN BY THE FITTED VALUE
-! AT THE POINT I AND J.
-
-! THE FITTING IS SHIFTED FOR POINTS CLOSE TO BOUNDARIES.
-
- parameter(IPR=20)
-
- COMMON/CST/NRL,RLS,nset,tmax ! modified
- COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR)
-
- dimension GAM(6)
- DATA GAM/+0.0073469388,-0.0293877551,-0.0416326531,+0.1175510204,+0.1665306122,+0.2359183673/
- dimension BET(11)
- DATA BET/
- & -0.0048979592,-0.0661224490,-0.0293877551,+0.0195918367,
- & 0.2644897959,+0.1175510204,-0.0783673469,+0.0277551020,
- & 0.3746938776,+0.1665306122,-0.1110204082/
- dimension ALP(11)
- DATA ALP/
- & -0.0844897959,-0.0048979592,+0.0073469388,+0.0012244898,
- & 0.3379591837,+0.0195918367,-0.0293877551,+0.4787755102,
- & 0.0277551020,-0.0416326531,-0.0069387755/
-
-
- do I=3,nset-2
-
- J=1
- FXY(I,J)=
- & ALP(1)*( F(I-2,J )+F(I+2,J ) )
- & +ALP(2)*( F(I-2,J+1)+F(I+2,J+1)+F(I-2,J+3)+F(I+2,J+3)
- & +F(I-1,J+4)+F(I+1,J+4) )
- & +ALP(3)*( F(I-2,J+2)+F(I+2,J+2) )
- & +ALP(4)*( F(I-2,J+4)+F(I+2,J+4) )
- & +ALP(5)*( F(I-1,J )+F(I+1,J ) )
- & +ALP(6)*( F(I-1,J+1)+F(I+1,J+1)+F(I-1,J+3)+F(I+1,J+3) )
- & +ALP(7)*( F(I-1,J+2)+F(I+1,J+2) )
- & +ALP(8)* F(I ,J )
- & +ALP(9)*( F(I ,J+1)+F(I ,J+3) )
- & +ALP(10)* F(I ,J+2) +ALP(11)*F(I ,J+4)
-
- J=2
- FXY(I,J)=
- & BET(1)*( F(I-2,J-1)+F(I+2,J-1)+F(I-2,J+3)+F(I+2,J+3) )
- & +BET(2)*( F(I-2,J )+F(I+2,J ) )
- & +BET(3)*( F(I-2,J+1)+F(I+2,J+1) )
- & +BET(4)*( F(I-2,J+2)+F(I+2,J+2)+F(I-1,J-1)+F(I+1,J-1)
- & +F(I-1,J+3)+F(I+1,J+3) )
- & +BET(5)*( F(I-1,J )+F(I+1,J ) )
- & +BET(6)*( F(I-1,J+1)+F(I+1,J+1) )
- & +BET(7)*( F(I-1,J+2)+F(I+1,J+2) )
- & +BET(8)*( F(I ,J-1)+F(I ,J+3) )
- & +BET(9)*F(I ,J ) +BET(10)*F(I ,J+1) +BET(11)*F(I ,J+2)
-
- do J=3,NRL-2
- FXY(I,J)=
- & GAM(1)*( F(I-2,J-2)+F(I-2,J+2)+F(I+2,J-2)+F(I+2,J+2) )
- & +GAM(2)*( F(I-2,J+1)+F(I-2,J-1)+F(I-1,J-2)+F(I-1,J+2)
- & +F(I+1,J-2)+F(I+1,J+2)+F(I+2,J-1)+F(I+2,J+1) )
- & +GAM(3)*( F(I-2,J )+F(I+2,J )+F(I ,J-2)+F(I ,J+2) )
- & +GAM(4)*( F(I-1,J-1)+F(I-1,J+1)+F(I+1,J-1)+F(I+1,J+1) )
- & +GAM(5)*( F(I-1,J )+F(I ,J-1)+F(I ,J+1)+F(I+1,J ) )
- & +GAM(6)* F(I ,J )
- end do
-
- J=NRL-1
- FXY(I,J)=
- & BET(1)*( F(I-2,J+1)+F(I+2,J+1)+F(I-2,J-3)+F(I+2,J-3) )
- & +BET(2)*( F(I-2,J )+F(I+2,J ) )
- & +BET(3)*( F(I-2,J-1)+F(I+2,J-1) )
- & +BET(4)*( F(I-2,J-2)+F(I+2,J-2)+F(I-1,J+1)+F(I+1,J+1)
- & +F(I-1,J-3)+F(I+1,J-3) )
- & +BET(5)*( F(I-1,J )+F(I+1,J ) )
- & +BET(6)*( F(I-1,J-1)+F(I+1,J-1) )
- & +BET(7)*( F(I-1,J-2)+F(I+1,J-2) )
- & +BET(8)*( F(I ,J+1)+F(I ,J-3) )
- & +BET(9)*F(I ,J ) +BET(10)*F(I ,J-1) +BET(11)*F(I ,J-2)
-
- J=NRL
- FXY(I,J)=
- & ALP(1)*( F(I-2,J )+F(I+2,J ) )
- & +ALP(2)*( F(I-2,J-1)+F(I+2,J-1)+F(I-2,J-3)+F(I+2,J-3)
- & +F(I-1,J-4)+F(I+1,J-4) )
- & +ALP(3)*( F(I-2,J-2)+F(I+2,J-2) )
- & +ALP(4)*( F(I-2,J-4)+F(I+2,J-4) )
- & +ALP(5)*( F(I-1,J )+F(I+1,J ) )
- & +ALP(6)*( F(I-1,J-1)+F(I+1,J-1)+F(I-1,J-3)+F(I+1,J-3) )
- & +ALP(7)*( F(I-1,J-2)+F(I+1,J-2) )
- & +ALP(8)* F(I ,J )
- & +ALP(9)*( F(I ,J-1)+F(I ,J-3) )
- & +ALP(10)* F(I ,J-2) +ALP(11)*F(I ,J-4)
-
- end do
-
- do I=3,nset-2 ! modified
- do J=1,NRL
- F(I,J)=FXY(I,J)
- end do
- end do
-
- end subroutine SMOOTH
diff --git a/kap/test/ck b/kap/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/kap/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/kap/test/clean b/kap/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/kap/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/kap/test/cleanup b/kap/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/kap/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/kap/test/export b/kap/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/kap/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/kap/test/make/makefile b/kap/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/kap/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/kap/test/make/makefile_base b/kap/test/make/makefile_base
deleted file mode 100644
index 18a30c752..000000000
--- a/kap/test/make/makefile_base
+++ /dev/null
@@ -1,104 +0,0 @@
-# This is the makefile for testing the mesa opacities library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-TEST_SRCS = test_kap_support.f90 test_kap.f90
-
-TESTQ_SRCS = test_kap_support.f90 test_kap_quietly.f90
-
-SAMPLE_SRCS = sample_kap.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = kap
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = eos chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-TESTQ = $(TEST_DIR)/test_quietly
-SAMPLE = $(TEST_DIR)/sample_kap
-
-TEST_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TEST_SRCS)))
-TESTQ_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TESTQ_SRCS)))
-SAMPLE_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SAMPLE_SRCS)))
-
-all : $(TEST) $(TESTQ) $(PLOT) $(SAMPLE)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(TESTQ) : $(TESTQ_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(SAMPLE) : $(SAMPLE_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-$(TESTQ) : OBJS = $(TESTQ_OBJS)
-$(SAMPLE) : OBJS = $(SAMPLE_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST) $(TESTQ) $(SAMPLE)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/kap/test/mk b/kap/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/kap/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/kap/test/mkx b/kap/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/kap/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/kap/test/rn b/kap/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/kap/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/kap/test/src/test_kap_quietly.f90 b/kap/test/src/test_kap_quietly.f90
deleted file mode 100644
index c5bee58df..000000000
--- a/kap/test/src/test_kap_quietly.f90
+++ /dev/null
@@ -1,10 +0,0 @@
-program test_kap_quietly
-
- use test_kap_support
- use kap_lib
-
- implicit none
-
- call Do_One(.true.)
-
-end program test_kap_quietly
diff --git a/make/Makefile b/make/Makefile
new file mode 100644
index 000000000..cc5dbd0fe
--- /dev/null
+++ b/make/Makefile
@@ -0,0 +1,64 @@
+# Don't forget to update the documentation when you change something here!
+# Makefile sanity
+MAKEFLAGS += --no-builtin-rules
+MAKEFLAGS += --no-builtin-variables
+
+.DELETE_ON_ERROR:
+.SHELLFLAGS := -eu -c
+.DEFAULT_GOAL := all
+.PHONY: clean print-mesa-deps install all check extract-data
+
+NOCOMPILE := $(or \
+ $(filter clean,$(MAKECMDGOALS)), \
+ $(filter print-mesa-deps,$(MAKECMDGOALS)), \
+ $(filter extract-data,$(MAKECMDGOALS)), \
+)
+
+include $(MAKE_DIR)/helpers.mk
+include $(MAKE_DIR)/setup-builddir.mk
+BUILD_DIR_MODULE := $(BUILD_DIR_)/$(MODULE_NAME)
+
+ifeq ($(NOCOMPILE),)
+ include $(MAKE_DIR)/setup-depends.mk
+
+ ifeq ($(MODULE_NAME),)
+ $(error Missing module name)
+ endif
+
+ INCLUDE_DIRS ?= -Iprivate -Ipublic
+ ifeq ($(COMPILER),gfortran)
+ include $(MAKE_DIR)/compile-settings-gnu.mk
+ else
+ $(error Unknown or unset COMPILER)
+ endif
+
+ include $(MAKE_DIR)/compile.mk
+ include $(MAKE_DIR)/install-commands.mk
+
+ ifeq ($(BINTYPE), static-lib)
+ include $(MAKE_DIR)/link-static.mk
+ else ifeq ($(BINTYPE), dynamic-lib)
+ include $(MAKE_DIR)/link-dynamic.mk
+ else ifeq ($(BINTYPE), executable)
+ include $(MAKE_DIR)/link-exec.mk
+ else ifeq ($(BINTYPE), manual)
+ else
+ $(error Unknown or unset BINTYPE)
+ endif
+
+ ALL_DEPS += $(OBJ_OUT) $(MODULES) $(INSTALL_INCLUDES_BUILD)
+
+ all: $(ALL_DEPS)
+
+ install: $(INSTALL_COMMANDS)
+
+ include $(MAKE_DIR)/check.mk
+endif
+
+extract-data: $(EXTRACT_DATA_COMMANDS)
+
+clean:
+ @rm -rf $(BUILD_DIR_MODULE)
+
+print-mesa-deps:
+ @echo $(INTERNAL_DEPENDS_ON)
diff --git a/make/check.mk b/make/check.mk
new file mode 100644
index 000000000..5e34b2a7a
--- /dev/null
+++ b/make/check.mk
@@ -0,0 +1,20 @@
+CHECKER := $(BUILD_DIR_MODULE)/bin/checker
+CHECK_RESULT_DIR := $(BUILD_DIR_MODULE)
+CHECK_RESULTS := $(CHECK_RESULT_DIR)/check-results
+CHECK_DIFF_PROG ?= diff -b
+
+$(CHECKER): $(ALL_DEPS) $(OBJS_CHECK) | $(BUILD_DIR_MODULE)/bin/.
+ $(EXECUTABLE) -o $(CHECKER) $(OBJS_CHECK) $(call pkg-config,--libs --static,mesa-$(MODULE_NAME))
+
+# Can be disabled by setting CHECK_FILTER_PROG = cat
+CHECK_FILTER_PROG ?= grep -Ev "^(write)|(create rate data for)|( read )|( write )|( number not already in cache:)"
+
+ifneq ($(OBJS_CHECK),)
+ $(CHECK_RESULTS) : $(CHECKER) | $(CHECK_RESULT_DIR)/.
+ cd test; ../$(CHECKER) | $(CHECK_FILTER_PROG) > ../$(CHECK_RESULTS)
+ $(CHECK_DIFF_PROG) $(CHECK_RESULTS) $(CHECK_RESULTS_GOLDEN)
+
+ check: $(CHECK_RESULTS)
+else
+ check:
+endif
diff --git a/make/compile-settings-gnu.mk b/make/compile-settings-gnu.mk
new file mode 100644
index 000000000..ed0dbc1fb
--- /dev/null
+++ b/make/compile-settings-gnu.mk
@@ -0,0 +1,67 @@
+FLAGS_CODE_SANITY := \
+ -Wall \
+ -Wextra \
+ -Wno-unused-label \
+ -Wno-unused-parameter \
+ -fstack-protector-all \
+ -fstack-clash-protection \
+ -fcheck=bounds \
+ -D_FORTIFY_SOURCE=2
+FFLAGS_FP_SANITY := -finit-derived
+ifeq ($(WITH_FPE_CHECKS),yes)
+FFLAGS_FP_SANITY += -ffpe-trap=invalid,overflow,zero -finit-real=snan
+endif
+FFLAGS_FORTRAN_SANITY := -std=f2008 -ffree-line-length-none -ffixed-line-length-none -Wno-unused-dummy-argument -Wno-compare-reals -Wno-do-subscript
+FLAGS_REPRO := -ffp-contract=off
+FFLAGS_PREPROCESSOR := -cpp
+
+ifeq ($(PROFILE),release)
+ FLAGS_OPT := -O2
+ FLAGS_DEBUG :=
+else ifeq ($(PROFILE),release-with-dbg-info)
+ FLAGS_OPT := -O2
+ FLAGS_DEBUG := -ggdb
+else ifeq ($(PROFILE),debug)
+ FLAGS_OPT := -Og
+ FLAGS_DEBUG := -ggdb
+else
+ $(error Unknown or unset PROFILE)
+endif
+
+ifeq ($(WITH_OPENMP),yes)
+ FLAGS_OPENMP := -fopenmp
+else
+ FLAGS_OPENMP :=
+endif
+
+# no-sign-zero only affects output formatting
+FFLAGS_COMPAT := -fno-sign-zero
+FFLAGS_FREE := -ffree-form -x f95-cpp-input -fimplicit-none
+FFLAGS_FIXED := -ffixed-form -x f77-cpp-input
+FLAGS_DEPS := $(call pkg-config,--cflags,$(EXTERNAL_DEPENDS_ON) $(INTERNAL_DEPENDS_ON)) $(INCLUDE_DIRS)
+
+FFLAGS_SHARED := \
+ $(FLAGS_CODE_SANITY) \
+ $(FFLAGS_FP_SANITY) \
+ $(FFLAGS_FORTRAN_SANITY) \
+ $(FLAGS_REPRO) \
+ $(FFLAGS_PREPROCESSOR) \
+ $(FLAGS_OPT) \
+ $(FLAGS_DEBUG) \
+ $(FLAGS_OPENMP) \
+ $(FFLAGS_COMPAT) \
+ $(FLAGS_DEPS)
+FFLAGS_FIXED := $(FFLAGS_SHARED) $(FFLAGS_FIXED) $(FFLAGS)
+_FFLAGS := $(FFLAGS_SHARED) $(FFLAGS_FREE) $(FFLAGS)
+_CFLAGS := $(FLAGS_CODE_SANITY) $(FLAGS_REPRO) $(FLAGS_OPT) $(FLAGS_DEBUG) $(FLAGS_DEPS) $(FLAGS_OPENMP) $(CFLAGS)
+
+PREPROCESS := gfortran -cpp -E
+FCOMPILE := gfortran $(_FFLAGS) -c
+FCOMPILE_MODULE := gfortran $(_FFLAGS) -w -c -fsyntax-only
+FCOMPILE_FIXED := gfortran $(FFLAGS_FIXED) -c
+FCOMPILE_MODULE_FIXED:= gfortran $(FFLAGS_FIXED) -w -c -fsyntax-only
+CCOMPILE := gcc $(_CFLAGS) -c
+LIB_DEP_ARGS := $(call pkg-config, --libs,$(EXTERNAL_DEPENDS_ON)) $(call pkg-config, --libs --static,$(INTERNAL_DEPENDS_ON))
+LIB_TOOL_STATIC := ar rcs
+LIB_TOOL_DYNAMIC := gfortran -shared $(FLAGS_OPENMP)
+EXECUTABLE := gfortran $(FLAGS_OPENMP)
diff --git a/make/compile.mk b/make/compile.mk
new file mode 100644
index 000000000..404883c08
--- /dev/null
+++ b/make/compile.mk
@@ -0,0 +1,38 @@
+MODULE_SUBDIR := modules
+MODULE_DIR := $(BUILD_DIR_MODULE)/$(MODULE_SUBDIR)
+SCRATCH_DIR := $(BUILD_DIR_MODULE)/scratch
+
+escape = '$(subst ','\'',$(1))'
+
+define to_obj_ext
+ $(patsubst %.f90,%.o, \
+ $(patsubst %.F90,%.o, \
+ $(patsubst %.f,%.o, \
+ $(patsubst %.c,%.o, \
+ $(addprefix $(BUILD_DIR_MODULE)/, $(1) \
+ )))))
+endef
+
+OBJS = $(call to_obj_ext,$(SRCS) $(SRCS_GENERATED))
+ifneq ($(SRCS_CHECK),)
+ OBJS_CHECK = $(call to_obj_ext,$(SRCS_CHECK) $(SRCS_CHECK_GENERATED))
+endif
+MODULES := $(addprefix $(MODULE_DIR)/, $(MODULES))
+
+FORTRAN_SOURCES := $(filter-out %.c, $(SRCS) $(SRCS_CHECK) $(addprefix $(BUILD_DIR_MODULE)/,$(SRCS_GENERATED) $(SRCS_CHECK_GENERATED)))
+
+$(BUILD_DIR_MODULE)/depend : $(FORTRAN_SOURCES) | $(BUILD_DIR_MODULE)/.
+ INSTALL_INCLUDES=$(call escape,$(INSTALL_INCLUDES)) \
+ MODULES=$(call escape,$(MODULES)) \
+ BUILD_DIR_MODULE=$(call escape,$(BUILD_DIR_MODULE)) \
+ $(MAKE_DIR)/gen-compile-tree $(FLAGS_DEPS) $(FORTRAN_SOURCES) > $(BUILD_DIR_MODULE)/depend
+
+include $(BUILD_DIR_MODULE)/depend
+
+# Rule specific variables get filled too late for variable expansion
+# in dependencies. The following option enables a second round of
+# expansions when these variables are set.
+.SECONDEXPANSION:
+
+$(BUILD_DIR_MODULE)/%.o: %.c | $$(dir $$@0)/.
+ $(CCOMPILE) $< -o $@
diff --git a/make/defaults-module.mk b/make/defaults-module.mk
new file mode 100644
index 000000000..653d70646
--- /dev/null
+++ b/make/defaults-module.mk
@@ -0,0 +1,18 @@
+MAKE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
+MAKE_DIR := $(MAKE_DIR:/=)
+
+ifeq ($(MAKE_DIR),)
+ $(error extracting `make` directory based on defaults-module.mk location failed)
+endif
+
+BUILD_DIR ?= build
+COMPILER ?= gfortran
+VERSION ?= $(file <$(MAKE_DIR)../data/version_number)
+PROFILE ?= release-with-dbg-info
+WITH_OPENMP ?= yes
+WITH_CRLIBM ?= yes
+WITH_GYRE ?= yes
+WITH_ADIPLS ?= yes
+WITH_PGSTAR ?= yes
+WITH_FPE_CHECKS ?= no
+PREFIX ?= $(MAKE_DIR)/..
diff --git a/make/gen-compile-tree b/make/gen-compile-tree
new file mode 100755
index 000000000..ca29d4c44
--- /dev/null
+++ b/make/gen-compile-tree
@@ -0,0 +1,137 @@
+#!/usr/bin/env perl
+use feature 'signatures';
+use strict;
+use warnings "all";
+use File::Basename;
+use Getopt::Long;
+
+Getopt::Long::Configure ("bundling_values", "ignorecase_always");
+GetOptions('i=s', \my @include_dirs);
+
+# ARGV will now only contain the main source files
+
+my %include_files;
+
+my $build_dir_module = $ENV{'BUILD_DIR_MODULE'};
+my $install_includes = $ENV{'INSTALL_INCLUDES'};
+my $modules = $ENV{'MODULES'};
+
+foreach my $include_dir (@include_dirs) {
+ opendir my $include_dir_handle, $include_dir or do { warn "Could not open $include_dir"; next };
+ foreach my $include_file (readdir $include_dir_handle) {
+ $include_files{$include_file} = "$include_dir/$include_file";
+ }
+ closedir $include_dir_handle;
+}
+
+
+sub trim {
+ return $_[0] =~ s/^\s+|\s+$//rg;
+}
+
+my @provided_modules;
+my @parsed_files;
+
+sub process_file ($filename) {
+ my @output_files;
+ my @not_found_mod_dependency;
+ my @dependency;
+ my $current_mod = '';
+ my $has_submod = 0;
+
+ open(my $fh, '<:encoding(UTF-8)', $filename) or die "Could not open file '$filename' $!";
+
+ my @handles = ($fh);
+
+ while (@handles) {
+ my $fh = pop(@handles);
+ while (my $line = <$fh>) {
+ $line = trim($line);
+ if ($line =~ /^module ([^\s!]*)\s*(!.*)?$/i) {
+ $current_mod = lc $1;
+ push(@output_files, "$build_dir_module/modules/$current_mod.mod");
+ $has_submod = 0;
+ } elsif ($line =~ /^module\s+(subroutine|function)/i and !$has_submod) {
+ push(@output_files, "$build_dir_module/modules/$current_mod.smod");
+ $has_submod = 1;
+ } elsif ($line =~ /^use\s+([^\s,]*)/i) {
+ my $mod = lc $1;
+ if (exists $include_files{"$mod.mod"}) {
+ push(@dependency, $include_files{"$mod.mod"});
+ } else {
+ push(@not_found_mod_dependency, "$build_dir_module/modules/$mod.mod");
+ }
+ } elsif ($line =~ /^submodule\s+\((?:[^:]*:)*([^\)])\)\s+(.*)$/i) {
+ my $parent_mod = lc $1;
+ $current_mod = lc $2;
+ push(@dependency, "$build_dir_module/modules/$parent_mod.smod");
+ push(@output_files, "$build_dir_module/modules/$current_mod.mod");
+ $has_submod = 0;
+ } elsif ($line =~ /^include (?:'|")([^'"]*)(?:'|")/i) {
+ push(@handles, $fh);
+ my $inc_file = $include_files{$1} or do { warn "Could not find include file $1"; next };
+ push(@dependency, $inc_file);
+ open(my $fh2, '<:encoding(UTF-8)', $inc_file) or die "Could not open file '$inc_file' $!";
+ $fh = $fh2;
+ }
+ }
+ }
+
+ push(@provided_modules, @output_files);
+ push(@parsed_files, [$filename, \@output_files, \@not_found_mod_dependency, \@dependency]);
+}
+
+sub output_make ($filename, $output_files, $not_found_mod_dependency, $dependency) {
+ my @output_files = @$output_files;
+ my @not_found_mod_dependency = @$not_found_mod_dependency;
+ my @dependency = @$dependency;
+ foreach my $mod (@not_found_mod_dependency) {
+ foreach my $othermod (@provided_modules) {
+ if ($mod eq $othermod) {
+ push(@dependency, $mod);
+ }
+ }
+ }
+
+ my $obj = "$build_dir_module/$filename";
+ $obj =~ s{$build_dir_module/$build_dir_module}{$build_dir_module};
+ $obj =~ s/(.*)\.([^\.]*)/$1.o/;
+ my $obj_dir = dirname($obj);
+ my $obj_fname = basename($obj);
+ my $compiler = "FCOMPILE";
+ my $module_compiler = "FCOMPILE_MODULE";
+
+ if ($filename =~ /(.*).f$/) {
+ $compiler = "FCOMPILE_FIXED";
+ $module_compiler = "FCOMPILE_MODULE_FIXED";
+ }
+
+ print <<~"MAKEFILE"
+ $obj.anc : $filename ${ \join(" ", @dependency) } | \$(MODULE_DIR)/. $obj_dir/.
+ \t\@touch \$@
+ \t\@echo $module_compiler $filename && \$($module_compiler) $filename -J \$(MODULE_DIR)
+ ${ \join(" ", @output_files) } : $obj.anc
+ $obj : $filename ${ \join(" ", @dependency) } | \$(SCRATCH_DIR)/. $obj_dir/. \$(MODULE_DIR)/.
+ \t\@rm -rf \$(SCRATCH_DIR)/$obj_fname/
+ \t\@mkdir \$(SCRATCH_DIR)/$obj_fname/
+ \t\@echo $compiler $filename && \$($compiler) $filename -o $obj -I \$(MODULE_DIR) -J \$(SCRATCH_DIR)/$obj_fname/
+ \t\@rm -rf \$(SCRATCH_DIR)/$obj_fname/
+ MAKEFILE
+}
+
+foreach my $file (@ARGV) {
+ process_file($file);
+}
+
+foreach my $pars (@parsed_files) {
+ my ($filename, $output_files, $not_found_mod_dependency, $dependency) = @$pars;
+ output_make($filename, $output_files, $not_found_mod_dependency, $dependency)
+}
+
+foreach my $f (split " ","$install_includes $modules") {
+ my $basename_f = basename($f);
+ print <<~"MAKEFILE"
+ $build_dir_module/include/$basename_f : $f | $build_dir_module/include/.
+ \tcp \$^ \$@
+ MAKEFILE
+}
diff --git a/make/gen-folder-deps b/make/gen-folder-deps
new file mode 100755
index 000000000..99a9e60d6
--- /dev/null
+++ b/make/gen-folder-deps
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+set -e
+
+MAKE=$1
+shift
+
+for subdir in $@; do \
+ DEPS=`$MAKE --no-print-directory -sC ${subdir} print-mesa-deps`
+ cat <abs2rel(Cwd::realpath('${BUILD_DIR}'))")
+PKG_CONFIG_PATH="$BUILD_DIR/$1/lib/pkgconfig"
+
+shift
+
+for m in $@; do
+ PKG_CONFIG_PATH=$BUILD_DIR/$m/lib/pkgconfig:$PKG_CONFIG_PATH
+done
+
+echo $PKG_CONFIG_PATH
diff --git a/make/helpers.mk b/make/helpers.mk
new file mode 100644
index 000000000..9fef8abe6
--- /dev/null
+++ b/make/helpers.mk
@@ -0,0 +1,3 @@
+define clean-comp
+$(shell perl -e 'use Cwd; use File::Spec; print File::Spec->abs2rel(Cwd::realpath("$1"))' )
+endef
diff --git a/make/install-commands.mk b/make/install-commands.mk
new file mode 100644
index 000000000..779548d17
--- /dev/null
+++ b/make/install-commands.mk
@@ -0,0 +1,23 @@
+install-pkgconfig:
+ install -pd $(PREFIX)/lib/pkgconfig
+ install -pm 644 $(PKG_CONFIG) $(PREFIX)/lib/pkgconfig
+
+install-lib:
+ install -pd $(PREFIX)/lib
+ install -p $(OBJ_OUT) $(PREFIX)/lib
+
+install-exec:
+ install -pd $(PREFIX)/bin
+ install -p $(OBJ_OUT) $(PREFIX)/bin
+
+INSTALL_INCLUDES_BUILD := $(addprefix $(BUILD_DIR_MODULE)/include/,$(notdir $(INSTALL_INCLUDES) $(MODULES)))
+
+install-includes:
+ install -pd $(PREFIX)/include
+ if [ "$(INSTALL_INCLUDES_BUILD)" ]; then \
+ for f in "$(INSTALL_INCLUDES_BUILD)"; do \
+ install -pm 644 $$f $(PREFIX)/include; \
+ done; \
+ fi
+
+INSTALL_COMMANDS += install-includes
diff --git a/make/link-dynamic.mk b/make/link-dynamic.mk
new file mode 100644
index 000000000..01da30861
--- /dev/null
+++ b/make/link-dynamic.mk
@@ -0,0 +1,8 @@
+OBJ_OUT := $(BUILD_DIR_MODULE)/lib/lib$(MODULE_NAME).so
+LIB_NAMES := $(MODULE_NAME)
+INSTALL_COMMANDS += install-lib
+
+$(OBJ_OUT): $(OBJS) | $(BUILD_DIR_MODULE)/lib/.
+ $(LIB_TOOL_DYNAMIC) -o $(OBJ_OUT) $(OBJS) $(LIB_DEP_ARGS)
+
+include $(MAKE_DIR)/pkg-config.mk
diff --git a/make/link-exec.mk b/make/link-exec.mk
new file mode 100644
index 000000000..5a1e933e4
--- /dev/null
+++ b/make/link-exec.mk
@@ -0,0 +1,5 @@
+OBJ_OUT := $(BUILD_DIR_MODULE)/bin/$(MODULE_NAME)
+INSTALL_COMMANDS += install-exec
+
+$(OBJ_OUT): $(OBJS) | $(BUILD_DIR_MODULE)/bin/.
+ $(EXECUTABLE) -o $(OBJ_OUT) $(OBJS) $(LIB_DEP_ARGS)
diff --git a/make/link-static.mk b/make/link-static.mk
new file mode 100644
index 000000000..5f9d78c49
--- /dev/null
+++ b/make/link-static.mk
@@ -0,0 +1,8 @@
+OBJ_OUT := $(BUILD_DIR_MODULE)/lib/lib$(MODULE_NAME).a
+LIB_NAMES := $(MODULE_NAME)
+INSTALL_COMMANDS += install-lib
+
+$(OBJ_OUT): $(OBJS) | $(BUILD_DIR_MODULE)/lib/.
+ $(LIB_TOOL_STATIC) $(OBJ_OUT) $(OBJS)
+
+include $(MAKE_DIR)/pkg-config.mk
diff --git a/make/pkg-config.mk b/make/pkg-config.mk
new file mode 100644
index 000000000..12a468936
--- /dev/null
+++ b/make/pkg-config.mk
@@ -0,0 +1,20 @@
+PKG_CONFIG := $(BUILD_DIR_MODULE)/lib/pkgconfig/mesa-$(MODULE_NAME).pc
+ALL_DEPS += $(PKG_CONFIG)
+INSTALL_COMMANDS += install-pkgconfig
+
+define PKG_CONFIG_CONTENTS
+prefix=$${pcfiledir}/../..
+
+Version: $(VERSION)
+Name: mesa-$(MODULE_NAME)
+Requires.private: $(INTERNAL_DEPENDS_ON)
+Description: MESA $(MODULE_NAME) module
+Cflags: -I$${prefix}/include
+Libs: -L$${prefix}/lib $(addprefix -l,$(LIB_NAMES))
+Libs.private: $(call pkg-config, --libs,$(EXTERNAL_DEPENDS_ON))
+endef
+
+export PKG_CONFIG_CONTENTS
+
+$(PKG_CONFIG): | $(BUILD_DIR_MODULE)/lib/pkgconfig/. $(BUILD_DIR_MODULE)/include/.
+ echo "$${PKG_CONFIG_CONTENTS}" > $@
diff --git a/make/pkgconfig/crlibm-fortran.pc b/make/pkgconfig/crlibm-fortran.pc
new file mode 100644
index 000000000..1503bf43d
--- /dev/null
+++ b/make/pkgconfig/crlibm-fortran.pc
@@ -0,0 +1,5 @@
+Name: crlibm-fortran
+Version: 1.1
+Description: FORTRAN bindings for crlibm
+Cflags: -I${MESASDK_ROOT}/include
+Libs: -L${MESASDK_ROOT}/lib -lcrmath
diff --git a/make/pkgconfig/hdf5_fortran.pc b/make/pkgconfig/hdf5_fortran.pc
new file mode 100644
index 000000000..2adfe709c
--- /dev/null
+++ b/make/pkgconfig/hdf5_fortran.pc
@@ -0,0 +1,5 @@
+Name: hdf5_fortran
+Description: HDF5 (Hierarchical Data Format 5) Software Library
+Version: 1.14.2
+Cflags: -I${MESASDK_ROOT}/include
+Libs: -L${MESASDK_ROOT}/lib -lhdf5_fortran
diff --git a/make/pkgconfig/lapack.pc b/make/pkgconfig/lapack.pc
new file mode 100644
index 000000000..dd26c8ab9
--- /dev/null
+++ b/make/pkgconfig/lapack.pc
@@ -0,0 +1,4 @@
+Name: lapack
+Version: 3.0
+Description: LAPACK
+Libs: -L${MESASDK_ROOT}/math-slots/${MATH_SLOT}/lib/ -llapack -lblas
diff --git a/make/pkgconfig/lapack95.pc b/make/pkgconfig/lapack95.pc
new file mode 100644
index 000000000..c045bffe8
--- /dev/null
+++ b/make/pkgconfig/lapack95.pc
@@ -0,0 +1,4 @@
+Name: lapack
+Version: 3.0
+Description: LAPACK FORTRAN 95 wrapper
+Libs: -L${MESASDK_ROOT}/math-slots/${MATH_SLOT}/lib/ -llapack95
diff --git a/make/pkgconfig/pgplot.pc b/make/pkgconfig/pgplot.pc
new file mode 100644
index 000000000..28c84272c
--- /dev/null
+++ b/make/pkgconfig/pgplot.pc
@@ -0,0 +1,4 @@
+Name: pgplot
+Version: 5.2
+Description: pgplot
+Libs: -L${MESASDK_ROOT}/lib -lpgplot
diff --git a/make/setup-builddir.mk b/make/setup-builddir.mk
new file mode 100644
index 000000000..1f04a8bbf
--- /dev/null
+++ b/make/setup-builddir.mk
@@ -0,0 +1,7 @@
+BUILD_DIR_ := $(call clean-comp,$(MAKE_DIR)/../$(BUILD_DIR))
+
+$(BUILD_DIR_):
+ mkdir -p $@
+
+$(BUILD_DIR_)%/.:
+ mkdir -p $@
diff --git a/make/setup-depends.mk b/make/setup-depends.mk
new file mode 100644
index 000000000..3987dba8c
--- /dev/null
+++ b/make/setup-depends.mk
@@ -0,0 +1,38 @@
+INTERNAL_DEPENDS_ON := $(addprefix mesa-,$(INTERNAL_DEPENDS_ON))
+
+include $(MAKE_DIR)/subdirs.mk
+
+PKG_CONFIG_FLAGS =
+
+ifneq ($(MESASDK_ROOT),)
+ PKG_CONFIG_PATH := $(MAKE_DIR)/pkgconfig:$(PKG_CONFIG_PATH)
+ PKG_CONFIG_FLAGS += --define-variable=MESASDK_ROOT=$(MESASDK_ROOT)
+
+ ifeq ($(WITH_CRLIBM),yes)
+ PKG_CONFIG_FLAGS += --define-variable=MATH_SLOT=crmath
+ MESASDK_MATH_SLOT = crmath
+ else
+ PKG_CONFIG_FLAGS += --define-variable=MATH_SLOT=default
+ MESASDK_MATH_SLOT = default
+ endif
+ export MESASDK_MATH_SLOT
+endif
+
+PKG_CONFIG_PATH := $(shell BUILD_DIR=$(BUILD_DIR_) $(MAKE_DIR)/gen-pkgconfig-path $(SUBDIRS)):$(PKG_CONFIG_PATH)
+export PKG_CONFIG_PATH
+
+define pkg-config-inner
+ifneq ($(2),)
+ TMP_VAR := $$(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config $(PKG_CONFIG_FLAGS) $(1) $(2))
+ ifeq ($$(TMP_VAR),)
+ $$(warning PKG_CONFIG_PATH is $$(PKG_CONFIG_PATH))
+ $$(error pkg-config failed to find some of $(2), check PKG_CONFIG_PATH is correct)
+ endif
+else
+ TMP_VAR :=
+endif
+endef
+
+define pkg-config
+ $(eval $(call pkg-config-inner,$(1),$(2)))$(TMP_VAR)
+endef
diff --git a/make/subdir-deps.mk b/make/subdir-deps.mk
new file mode 100644
index 000000000..59c53b2f7
--- /dev/null
+++ b/make/subdir-deps.mk
@@ -0,0 +1,7 @@
+NODEPS := $(filter clean,$(MAKECMDGOALS))
+
+ifeq ($(NODEPS),)
+$(BUILD_DIR_)/depend: $(addsuffix /Makefile,$(SUBDIRS)) make/gen-folder-deps | $(BUILD_DIR_)
+ make/gen-folder-deps "$(MAKE)" $(SUBDIRS) > $(BUILD_DIR_)/depend
+include $(BUILD_DIR_)/depend
+endif
diff --git a/make/subdirs.mk b/make/subdirs.mk
new file mode 100644
index 000000000..f54c1c93b
--- /dev/null
+++ b/make/subdirs.mk
@@ -0,0 +1,7 @@
+include $(MAKE_DIR)/defaults-module.mk
+
+SUBDIRS := const utils math mtx auto_diff num interp_1d interp_2d chem eos forum colors rates neu net gyre kap ionization atm turb star_data star astero binary
+
+ifeq ($(WITH_ADIPLS),yes)
+ SUBDIRS += adipls
+endif
diff --git a/make/version.mk b/make/version.mk
new file mode 100644
index 000000000..c4f0e4289
--- /dev/null
+++ b/make/version.mk
@@ -0,0 +1,2 @@
+data/version_number:
+ @git describe --tags --dirty --always > data/version_number
diff --git a/make/work.mk b/make/work.mk
new file mode 100644
index 000000000..df5814037
--- /dev/null
+++ b/make/work.mk
@@ -0,0 +1,49 @@
+# Makefile sanity
+MAKEFLAGS += --no-builtin-rules
+MAKEFLAGS += --no-builtin-variables
+
+.DELETE_ON_ERROR:
+.SHELLFLAGS := -eu -c
+.DEFAULT_GOAL := all
+.PHONY: clean all
+
+NOCOMPILE := $(filter clean,$(MAKECMDGOALS))
+
+include $(MAKE_DIR)/subdirs.mk
+include $(MAKE_DIR)/helpers.mk
+
+include $(MAKE_DIR)/setup-builddir.mk
+
+BUILD_DIR_MODULE := $(call clean-comp,$(shell echo $(dir $(firstword $(MAKEFILE_LIST))) | sed "s|/$$||")/$(BUILD_DIR))
+
+$(BUILD_DIR_MODULE)/:
+ mkdir -p $@
+
+$(BUILD_DIR_MODULE)%/:
+ mkdir -p $@
+
+INTERNAL_DEPENDS_ON += $(SUBDIRS)
+INCLUDE_DIRS ?=
+
+ifeq ($(NOCOMPILE),)
+ # Only the dependencies need to come from the original build dir
+ include $(MAKE_DIR)/setup-depends.mk
+
+ ifeq ($(MODULE_NAME),)
+ $(error Missing module name)
+ endif
+
+ ifeq ($(COMPILER),gfortran)
+ include $(MAKE_DIR)/compile-settings-gnu.mk
+ else
+ $(error Unknown or unset COMPILER)
+ endif
+
+ include $(MAKE_DIR)/compile.mk
+ include $(MAKE_DIR)/link-exec.mk
+
+ all: $(OBJ_OUT)
+endif
+
+clean:
+ @rm -rf $(BUILD_DIR_MODULE)
diff --git a/math/Makefile b/math/Makefile
new file mode 100644
index 000000000..20d39b4f3
--- /dev/null
+++ b/math/Makefile
@@ -0,0 +1,34 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := math
+SRCS := public/math_def.f90 \
+ private/math_io.f90 \
+ private/math_pown.f90
+SRCS_CHECK = test/src/test_math.f90
+INTERNAL_DEPENDS_ON := const utils
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+ifeq ($(WITH_CRLIBM),yes)
+SRCS += public/math_lib_crmath.f90
+EXTERNAL_DEPENDS_ON += crlibm-fortran
+else
+SRCS += public/math_lib_intrinsic.f90
+endif
+
+# Testing
+
+ifeq ($(WITH_CRLIBM),yes)
+CHECK_RESULTS_GOLDEN := test/test_output.CRMATH
+else
+CHECK_RESULTS_GOLDEN := test/test_output.INTRINSIC
+endif
+
+# Install
+
+MODULES := math_def.mod math_lib.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/math/build_and_test b/math/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/math/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/math/build_and_test_parallel b/math/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/math/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/math/clean b/math/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/math/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/math/export b/math/export
deleted file mode 100755
index db3250885..000000000
--- a/math/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/math/i1 b/math/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/math/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/math/i1p b/math/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/math/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/math/make/makefile b/math/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/math/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/math/make/makefile_base b/math/make/makefile_base
deleted file mode 100644
index 98e4d9562..000000000
--- a/math/make/makefile_base
+++ /dev/null
@@ -1,117 +0,0 @@
-# This is the makefile for the mesa math library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-ifeq ($(USE_CRMATH),YES)
- SRCS = math_lib_crmath.f90 math_io.f90 math_pown.f90 math_def.f90
-else
- SRCS = math_lib_intrinsic.f90 math_io.f90 math_pown.f90 math_def.f90
-endif
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = utils const
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- ifeq ($(USE_CRMATH), YES)
- LOAD_OTHER = -L$(MESA_LIB_DIR) -lutils -lconst $(LOAD_CRMATH)
-else
- LOAD_OTHER = -L$(MESA_LIB_DIR) -lutils -lconst
-endif
-endif
-
-#################################################################
-#
-# LIBRARIES
-
-#################################################################
-#
-# TARGETS
-
-LIB = libmath.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) math_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) math_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-vpath %.inc $(SRC_PATH)
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/math/mk b/math/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/math/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/math/test/ck b/math/test/ck
deleted file mode 100755
index c0e23483e..000000000
--- a/math/test/ck
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-./rn >& tmp.txt
-check_okay
-diff -b tmp.txt test_output.`head -1 tmp.txt | tr -d '[:space:]'`
diff --git a/math/test/clean b/math/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/math/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/math/test/cleanup b/math/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/math/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/math/test/export b/math/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/math/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/math/test/make/makefile b/math/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/math/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/math/test/make/makefile_base b/math/test/make/makefile_base
deleted file mode 100644
index aa6afe535..000000000
--- a/math/test/make/makefile_base
+++ /dev/null
@@ -1,86 +0,0 @@
-# This is the makefile for testing the interp_1d library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_math.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = math
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = const utils
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_OTHER)) $(LOAD_CRMATH)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/math/test/mk b/math/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/math/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/math/test/mkx b/math/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/math/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/math/test/rn b/math/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/math/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/mtx/Makefile b/mtx/Makefile
new file mode 100644
index 000000000..355c2a54d
--- /dev/null
+++ b/mtx/Makefile
@@ -0,0 +1,45 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := mtx
+SRCS := public/mtx_def.f90 \
+ public/mtx_lib.f90 \
+ private/DGBSVX_wrapper.f90 \
+ private/bcyclic.f90 \
+ private/mtx_support.f90 \
+ private/pre_conditioners.f90 \
+ private/my_lapack95.f90
+SRCS_CHECK := test/src/test_mtx.f90 \
+ test/src/test_mtx_support.f90 \
+ test/src/test_square.f90 \
+ test/src/test_block_tridiagonal.f90
+# TODO: Also contains test dependencies sadly, I should fix this at some point
+INTERNAL_DEPENDS_ON := const utils math
+EXTERNAL_DEPENDS_ON := lapack
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := mtx_def.mod mtx_lib.mod
+INSTALL_INCLUDES := public/mtx_bcyclic_dble_decsol.dek \
+ public/mtx_dble_decsol.dek \
+ public/mtx_debug_decsol.dek \
+ public/mtx_decsol.dek \
+ public/mtx_decsolblk.dek \
+ public/mtx_decsolblk_dble.dek \
+ public/mtx_decsolc.dek \
+ public/mtx_decsolcs.dek \
+ public/mtx_decsols.dek \
+ public/mtx_jac.dek \
+ public/mtx_lapack95.dek \
+ public/mtx_null_decsol.dek \
+ public/mtx_rcond.dek \
+ public/mtx_tridiag_decsol.dek \
+ public/mtx_solve_routines.inc
+
+include $(MAKE_DIR)/Makefile
diff --git a/mtx/build_and_test b/mtx/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/mtx/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/mtx/build_and_test_parallel b/mtx/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/mtx/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/mtx/clean b/mtx/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/mtx/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/mtx/export b/mtx/export
deleted file mode 100755
index db3250885..000000000
--- a/mtx/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/mtx/i1 b/mtx/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/mtx/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/mtx/i1p b/mtx/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/mtx/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/mtx/make/makefile b/mtx/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/mtx/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/mtx/make/makefile_base b/mtx/make/makefile_base
deleted file mode 100644
index 4085256f1..000000000
--- a/mtx/make/makefile_base
+++ /dev/null
@@ -1,117 +0,0 @@
-# This is the makefile for the mesa matrix library (a subset of lapack)
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-MTX_SRCS = \
- mtx_def.f90 \
- my_lapack95.f90 \
- mtx_support.f90 \
- DGBSVX_wrapper.f90 \
- pre_conditioners.f90 \
- bcyclic.f90 \
- mtx_lib.f90 \
-
-#################################################################
-#
-# TARGETS
-
-MTX_LIB = libmtx.$(LIB_SUFFIX)
-
-MTX_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(MTX_SRCS)))
-
-all : $(MTX_LIB)
-
-$(MTX_LIB) :$(MTX_OBJS)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $@
- @$(LIB_TOOL) $@ $(MTX_OBJS)
-else
- $(LIB_TOOL) $@ $(MTX_OBJS)
-endif
-
-clean:
- -@rm -f *.o *.f90 *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) mtx_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) mtx_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../public/mtx_*.dek $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../public/mtx_*.inc $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(MTX_LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-CC += $(SPECIAL_C_FLAGS)
-
-#COMPILE = $(COMPILE_TO_TEST) $(FCfixed)
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfixed)
-#COMPILE_FREE = $(COMPILE_TO_TEST) $(FCfree)
-COMPILE_FREE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_XTRA = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCopt) -c $(FCfixed)
-COMPILE_XTRA_NO_OPT = $(COMPILE_BASIC) $(FCnowarn) $(FCfixed) -c
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_FREE $<
- @$(COMPILE_FREE) $<
-else
- $(COMPILE_FREE) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.dek $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(MTX_SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(MTX_SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/mtx/mk b/mtx/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/mtx/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/mtx/public/mtx_lib.f90 b/mtx/public/mtx_lib.f90
index b01ff7f0d..134b504ad 100644
--- a/mtx/public/mtx_lib.f90
+++ b/mtx/public/mtx_lib.f90
@@ -28,7 +28,6 @@ module mtx_lib
! mesa includes sources for a subset of BLAS and dble.
! you can use those, or, better yet, you can use a package optimized
! for your machine such as GotoBLAS or Intel's MKL.
- ! see utils/makefile_header for details.
! see mtx/blas_src for the subset of BLAS routines included in mtx_lib
! see mtx/dble_src for the subset of dble routines included in mtx_lib
diff --git a/mtx/test/ck b/mtx/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/mtx/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/mtx/test/clean b/mtx/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/mtx/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/mtx/test/cleanup b/mtx/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/mtx/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/mtx/test/export b/mtx/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/mtx/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/mtx/test/make/makefile b/mtx/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/mtx/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/mtx/test/make/makefile_base b/mtx/test/make/makefile_base
deleted file mode 100644
index 15e335478..000000000
--- a/mtx/test/make/makefile_base
+++ /dev/null
@@ -1,92 +0,0 @@
-# This is the makefile for testing mesa mtx package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-SRCS = \
- test_mtx_support.f90 test_block_tridiagonal.f90 \
- test_square.f90 test_mtx.f90
-
-#################################################################
-#
-# SOURCES
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = mtx
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = const utils math
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_OTHER)) $(LOAD_LAPACK) $(LOAD_BLAS) $(LOAD_CRMATH)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f90,%.o,$(patsubst %.c,%.o,$(SRCS)))
-
-all : $(TEST)
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-PREPROCESS = $(FC) $(FCfree) $(FC_free_preprocess) -E
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend : $(SRCS)
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/mtx/test/mk b/mtx/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/mtx/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/mtx/test/mkx b/mtx/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/mtx/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/mtx/test/mrn b/mtx/test/mrn
deleted file mode 100755
index 08ab7bcce..000000000
--- a/mtx/test/mrn
+++ /dev/null
@@ -1,2 +0,0 @@
-#mpirun -machinefile $PBS_NODEFILE -np $1 ./test_mpi
-mpirun -np $1 ./test_mpi
diff --git a/mtx/test/rn b/mtx/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/mtx/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/net/Makefile b/net/Makefile
new file mode 100644
index 000000000..8d98b044d
--- /dev/null
+++ b/net/Makefile
@@ -0,0 +1,37 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := net
+SRCS := public/net_def.f90 \
+ public/net_lib.f90 \
+ private/net_screen.f90 \
+ private/net_derivs_support.f90 \
+ private/net_derivs.f90 \
+ private/net_approx21.f90 \
+ private/net_burn_support.f90 \
+ private/net_initialize.f90 \
+ private/net_eval.f90 \
+ private/net_burn.f90 \
+ private/net_burn_const_density.f90 \
+ private/net_burn_const_p.f90
+SRCS_CHECK := test/src/test_net.f90 \
+ test/src/mod_test_net.f90 \
+ test/src/mod_one_zone_burn.f90 \
+ test/src/test_net_support.f90 \
+ test/src/test_net_do_one.f90
+INTERNAL_DEPENDS_ON := const utils math mtx num chem rates interp_1d eos
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := net_def.mod net_lib.mod
+INSTALL_INCLUDES := public/burner_const_density_get_eos_info.inc \
+ public/burner_finish_substep.inc
+
+include $(MAKE_DIR)/Makefile
diff --git a/net/build_and_test b/net/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/net/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/net/build_and_test_parallel b/net/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/net/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/net/clean b/net/clean
deleted file mode 100755
index 8318408b8..000000000
--- a/net/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean; cd ..
-cd test/make; make clean
\ No newline at end of file
diff --git a/net/export b/net/export
deleted file mode 100755
index db3250885..000000000
--- a/net/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/net/i1 b/net/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/net/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/net/i1p b/net/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/net/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/net/make/makefile b/net/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/net/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/net/make/makefile_base b/net/make/makefile_base
deleted file mode 100644
index cd142d6cc..000000000
--- a/net/make/makefile_base
+++ /dev/null
@@ -1,125 +0,0 @@
-# This is the makefile for the mesa nuclear reaction networks library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- net_def.f90 \
- net_screen.f90 \
- net_derivs_support.f90 \
- net_derivs.f90 \
- net_approx21.f90 \
- net_burn_support.f90 \
- net_initialize.f90 \
- net_eval.f90 \
- net_burn.f90 \
- net_burn_const_density.f90 \
- net_burn_const_p.f90 \
- net_lib.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = eos rates chem $(LIBS_MESA_NUMERICS)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lrates -lchem $(LOAD_MESA_NUMERICS)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libnet.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-
-clean:
- -@rm -f *.o *.mod *.smod *genmod.f90 *.so *.a .depend
-
-install:
- -@rm -f $(MESA_DIR)/data/net/cache/*.bin
- @$(CP_IF_NEWER) net_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) net_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
- @$(CP_IF_NEWER) ../public/burner_finish_substep.inc $(MESA_DIR)/include
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-#COMPILE = $(COMPILE_NO_OPT) $(FCfree)
-
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-vpath %.inc $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/net/mk b/net/mk
deleted file mode 100755
index a2232de33..000000000
--- a/net/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make; cd ..
diff --git a/net/private/net_initialize.f90 b/net/private/net_initialize.f90
index 4a3038d48..829c4bba5 100644
--- a/net/private/net_initialize.f90
+++ b/net/private/net_initialize.f90
@@ -1974,6 +1974,17 @@ subroutine setup_reaction_info(g, ierr) ! assumes have already called setup_iso
call mesa_error(__FILE__,__LINE__,'setup_reaction_info')
end if
+ g% num_wk_reactions = num_wk_reactions
+ allocate( &
+ g% weak_reaction_num(num_wk_reactions), &
+ g% reaction_id_for_weak_reactions(num_wk_reactions), &
+ g% weaklib_ids(num_wk_reactions), &
+ g% weak_reaction_index(num_reactions), &
+ stat=ierr)
+ if (ierr /= 0) return
+
+ if (num_reactions == 0) return
+
call check_for_hardwired_pairs
! need to order reactions to ensure bit-for-bit results
@@ -2085,15 +2096,6 @@ subroutine setup_reaction_info(g, ierr) ! assumes have already called setup_iso
end do
- g% num_wk_reactions = num_wk_reactions
- allocate( &
- g% weak_reaction_num(num_wk_reactions), &
- g% reaction_id_for_weak_reactions(num_wk_reactions), &
- g% weaklib_ids(num_wk_reactions), &
- g% weak_reaction_index(num_reactions), &
- stat=ierr)
- if (ierr /= 0) return
-
j = 0
do i = 1, reaction_num
ir = reaction_id(i)
diff --git a/net/test/ck b/net/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/net/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/net/test/clean b/net/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/net/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/net/test/cleanup b/net/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/net/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/net/test/export b/net/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/net/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/net/test/make/makefile b/net/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/net/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/net/test/make/makefile_base b/net/test/make/makefile_base
deleted file mode 100644
index b088fdd90..000000000
--- a/net/test/make/makefile_base
+++ /dev/null
@@ -1,116 +0,0 @@
-# This is the makefile for testing the mesa net library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-COMMON_SRCS = \
- test_net_do_one.f90 \
- test_net_support.f90 \
- mod_one_zone_burn.f90
-
-TEST_SRCS = $(COMMON_SRCS) mod_test_net.f90 test_net.f90
-
-TESTQ_SRCS = $(COMMON_SRCS) mod_test_net.f90 test_net_quietly.f90
-
-SAMPLE_SRCS = sample_net.f90
-
-ONE_ZONE_SRCS = $(COMMON_SRCS) one_zone_burn.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = net
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = eos rates chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lrates -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-TESTQ = $(TEST_DIR)/test_quietly
-SAMPLE = $(TEST_DIR)/sample
-ONE_ZONE = $(TEST_DIR)/burn
-
-TEST_OBJS = $(patsubst %.f90,%.o,$(TEST_SRCS))
-TESTQ_OBJS = $(patsubst %.f90,%.o,$(TESTQ_SRCS))
-SAMPLE_OBJS = $(patsubst %.f90,%.o,$(SAMPLE_SRCS))
-ONE_ZONE_OBJS = $(patsubst %.f90,%.o,$(ONE_ZONE_SRCS))
-
-all : $(TEST) $(TESTQ) $(SAMPLE) $(ONE_ZONE)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(TESTQ) : $(TESTQ_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(SAMPLE) : $(SAMPLE_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(ONE_ZONE) : $(ONE_ZONE_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-$(TESTQ) : OBJS = $(TESTQ_OBJS)
-$(SAMPLE) : OBJS = $(SAMPLE_OBJS)
-$(ONE_ZONE) : OBJS = $(ONE_ZONE_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST) $(TESTQ) \
- $(SAMPLE) $(ONE_ZONE)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/net/test/mk b/net/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/net/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/net/test/mkx b/net/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/net/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/net/test/rn b/net/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/net/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/neu/Makefile b/neu/Makefile
new file mode 100644
index 000000000..a198e73f1
--- /dev/null
+++ b/neu/Makefile
@@ -0,0 +1,23 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := neu
+SRCS := public/neu_def.f90 \
+ public/neu_lib.f90 \
+ private/mod_neu.f90
+SRCS_CHECK := test/src/test_neu.f90 test/src/neu_support.f90
+INTERNAL_DEPENDS_ON := const utils math
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := neu_def.mod neu_lib.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/neu/build_and_test b/neu/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/neu/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/neu/build_and_test_parallel b/neu/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/neu/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/neu/clean b/neu/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/neu/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/neu/export b/neu/export
deleted file mode 100755
index db3250885..000000000
--- a/neu/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/neu/i1 b/neu/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/neu/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/neu/i1p b/neu/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/neu/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/neu/make/makefile b/neu/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/neu/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/neu/make/makefile_base b/neu/make/makefile_base
deleted file mode 100644
index 702d2135c..000000000
--- a/neu/make/makefile_base
+++ /dev/null
@@ -1,111 +0,0 @@
-# This is the makefile for the mesa neutrino losses library
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- neu_def.f90 \
- mod_neu.f90 \
- neu_lib.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MESA_NUMERICS)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_NUMERICS)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libneu.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) neu_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) neu_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-#COMPILE = $(COMPILE_NO_OPT) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/neu/mk b/neu/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/neu/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/neu/plotter/Makefile b/neu/plotter/Makefile
new file mode 100644
index 000000000..5d717e02c
--- /dev/null
+++ b/neu/plotter/Makefile
@@ -0,0 +1,13 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := neu-plotter
+SRCS := src/neu_plotter.f90
+INTERNAL_DEPENDS_ON := utils neu num
+INCLUDE_DIRS :=
+BINTYPE := executable
+
+include ../../make/Makefile
+
+plot: $(OBJ_OUT)
+ $(OBJ_OUT)
+ ./plotter.py
diff --git a/neu/plotter/clean b/neu/plotter/clean
deleted file mode 100755
index 356f57db5..000000000
--- a/neu/plotter/clean
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make clean
diff --git a/neu/plotter/make/makefile b/neu/plotter/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/neu/plotter/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/neu/plotter/make/makefile_base b/neu/plotter/make/makefile_base
deleted file mode 100644
index 7f3a570dc..000000000
--- a/neu/plotter/make/makefile_base
+++ /dev/null
@@ -1,92 +0,0 @@
-# This is the makefile for testing the mesa neu_plotter library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-NEU_PLOTTER_SRCS = neu_plotter.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_OTHER = neu $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lneu $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-NEU_PLOTTER = ../plotter
-
-NEU_PLOTTER_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(NEU_PLOTTER_SRCS)))
-
-all: $(NEU_PLOTTER)
-
-$(NEU_PLOTTER) : $(NEU_PLOTTER_OBJS) $(DEPS_OTHER)
-
-$(NEU_PLOTTER) : OBJS = $(NEU_PLOTTER_OBJS)
-
-$(NEU_PLOTTER) :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER) $(LDFLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER) $(LDFLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(NEU_PLOTTER) *.smod
-
-install:
- @:
-
-#################################################################
-#
-# COMPILATION RULES
-
-MY_FC_FLAGS = $(FCfree)
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo FC $<
- @$(FC) $(FCbasic) $(MY_FC_FLAGS) -I$(MESA_INCLUDE_DIR) -c $<
-else
- $(FC) $(FCbasic) $(MY_FC_FLAGS) -I$(MESA_INCLUDE_DIR) -c $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = ../src
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
-
diff --git a/neu/plotter/mk b/neu/plotter/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/neu/plotter/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/neu/plotter/rn b/neu/plotter/rn
deleted file mode 100755
index 9d5cb987c..000000000
--- a/neu/plotter/rn
+++ /dev/null
@@ -1 +0,0 @@
-./plotter && ./plotter.py
diff --git a/neu/plotter/src/neu_plotter.f90 b/neu/plotter/src/neu_plotter.f90
index 239bdc1c7..e318f531e 100644
--- a/neu/plotter/src/neu_plotter.f90
+++ b/neu/plotter/src/neu_plotter.f90
@@ -6,6 +6,7 @@ program neu_plotter
use const_lib, only: const_init
use math_lib
use num_lib, only: dfridr
+ use utils_lib, only: mesa_error
implicit none
diff --git a/neu/test/ck b/neu/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/neu/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/neu/test/clean b/neu/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/neu/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/neu/test/cleanup b/neu/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/neu/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/neu/test/export b/neu/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/neu/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/neu/test/make/makefile b/neu/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/neu/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/neu/test/make/makefile_base b/neu/test/make/makefile_base
deleted file mode 100644
index 306f71503..000000000
--- a/neu/test/make/makefile_base
+++ /dev/null
@@ -1,92 +0,0 @@
-# This is the makefile for testing the mesa neutrino losses library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-TEST_SRCS = neu_support.f90 test_neu.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = neu
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-TEST_OBJS = $(patsubst %.f90,%.o,$(TEST_SRCS))
-
-all : $(TEST)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(TEST_SRC_DIR)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/neu/test/mk b/neu/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/neu/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/neu/test/mkx b/neu/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/neu/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/neu/test/rn b/neu/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/neu/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/num/Makefile b/num/Makefile
new file mode 100644
index 000000000..b46f0bb86
--- /dev/null
+++ b/num/Makefile
@@ -0,0 +1,93 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := num
+SRCS := public/accurate_sum.f90 \
+ public/accurate_sum_auto_diff_star_order1.f90 \
+ public/num_def.f90 \
+ public/num_lib.f90 \
+ private/mod_dc_decsol.f \
+ private/mod_dop853.f \
+ private/mod_dopri5.f \
+ private/mod_integrate.f90 \
+ private/mod_qsort.f90 \
+ private/mod_random.f90 \
+ private/mod_root.f90 \
+ private/mod_rosenbrock.f \
+ private/mod_simplex.f90 \
+ private/mod_solout_root.f90 \
+ private/mod_bobyqa.f \
+ private/mod_brent.f90 \
+ private/mod_newton.f90 \
+ private/mod_newuoa.f
+SRCS_CHECK := test/src/bari_beam.f90 \
+ test/src/bari_chemakzo.f90 \
+ test/src/bari_medakzo.f90 \
+ test/src/bari_vdpol.f90 \
+ test/src/test_beam.f90 \
+ test/src/test_bobyqa.f90 \
+ test/src/test_brent.f90 \
+ test/src/test_chemakzo.f90 \
+ test/src/test_diffusion.f90 \
+ test/src/test_int_support.f90 \
+ test/src/test_integrate.f90 \
+ test/src/test_medakzo.f90 \
+ test/src/test_newton.f90 \
+ test/src/test_newuoa.f90 \
+ test/src/test_num.f90 \
+ test/src/test_simplex.f90 \
+ test/src/test_support.f90 \
+ test/src/test_vdpol.f90
+INTERNAL_DEPENDS_ON := const utils math mtx auto_diff
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := num_def.mod num_lib.mod accurate_sum.mod accurate_sum_auto_diff_star_order1.mod
+INSTALL_INCLUDES := public/newton_procs.dek \
+ public/num_binary_search.dek \
+ public/num_bobyqa.dek \
+ public/num_bobyqa_proc.dek \
+ public/num_brent.dek \
+ public/num_dfridr.dek \
+ public/num_dfx.dek \
+ public/num_dop853.dek \
+ public/num_dopri5.dek \
+ public/num_fcn.dek \
+ public/num_fcn_blk_dble.dek \
+ public/num_interp_y.dek \
+ public/num_isolve.dek \
+ public/num_jac.dek \
+ public/num_jac_blk_dble.dek \
+ public/num_mas.dek \
+ public/num_newton.dek \
+ public/num_newuoa.dek \
+ public/num_newuoa_proc.dek \
+ public/num_radau5_debug_routine.dek \
+ public/num_rk2.dek \
+ public/num_rk4.dek \
+ public/num_rodas3.dek \
+ public/num_rodas4.dek \
+ public/num_rodasp.dek \
+ public/num_root_fcn.dek \
+ public/num_ros2.dek \
+ public/num_ros3p.dek \
+ public/num_ros3pl.dek \
+ public/num_rose2.dek \
+ public/num_safe_root.dek \
+ public/num_safe_root_x.dek \
+ public/num_simplex.dek \
+ public/num_simplex_fcn.dek \
+ public/num_sjac.dek \
+ public/num_solout.dek \
+ public/num_solout_root.dek \
+ public/num_solout_root_fcn.dek \
+ public/num_solvers_options.dek
+
+include $(MAKE_DIR)/Makefile
diff --git a/num/build_and_test b/num/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/num/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/num/build_and_test_parallel b/num/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/num/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/num/clean b/num/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/num/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/num/copy_extras b/num/copy_extras
deleted file mode 100755
index 034974c33..000000000
--- a/num/copy_extras
+++ /dev/null
@@ -1,5 +0,0 @@
-mkdir new/test/plot_out
-mkdir new/test/test_data
-cp -r include new
-cp test/*.rb new/test
-
diff --git a/num/export b/num/export
deleted file mode 100755
index db3250885..000000000
--- a/num/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/num/i1 b/num/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/num/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/num/i1p b/num/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/num/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/num/make/makefile b/num/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/num/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/num/make/makefile_base b/num/make/makefile_base
deleted file mode 100644
index 2f1d74219..000000000
--- a/num/make/makefile_base
+++ /dev/null
@@ -1,137 +0,0 @@
-# This is the makefile for the mesa library of numerical routines
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCE FILES
-
-SRCS = \
- num_def.f90 \
- mod_dop853.f mod_dopri5.f mod_dc_decsol.f \
- mod_rosenbrock.f mod_brent.f90 mod_qsort.f90 mod_root.f90 mod_solout_root.f90 \
- mod_random.f90 mod_newton.f90 mod_bobyqa.f mod_newuoa.f \
- accurate_sum_auto_diff_star_order1.f90 \
- accurate_sum.f90 mod_simplex.f90 mod_integrate.f90 num_lib.f90 \
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MATRIX)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libnum.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) num_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) num_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) accurate_sum.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) accurate_sum_auto_diff_star_order1.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) mod_integrate.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../public/num_fcn.dek $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../public/num_jac.dek $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../public/num_sjac.dek $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../public/num_solout.dek $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../public/num_mas.dek $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../public/num_interp_y.dek $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPULATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfixed)
-
-COMPILE_FREE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-#COMPILE_XTRA = $(COMPILE_NO_CHECKS) $(FCfixed) -c
-COMPILE_XTRA = $(COMPILE_BASIC) $(FCopt) $(FCfixed) -c
-
-COMPILE_CMD = $(COMPILE)
-
-mod_bobyqa.o mod_newuoa.o mod_dop853.o mod_dopri5.o mod_dc_decsol.o mod_rosenbrock.o : %.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_XTRA $<
- @$(COMPILE_XTRA) $<
-else
- $(COMPILE_XTRA) $<
-endif
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- @$(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_FREE $<
- @$(COMPILE_FREE) $<
-else
- @$(COMPILE_FREE) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.dek $(SRC_PATH)
-vpath %.inc $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/num/mk b/num/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/num/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/num/test/ck b/num/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/num/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/num/test/clean b/num/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/num/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/num/test/cleanup b/num/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/num/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/num/test/export b/num/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/num/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/num/test/make/makefile b/num/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/num/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/num/test/make/makefile_base b/num/test/make/makefile_base
deleted file mode 100644
index 7e0d3d9a6..000000000
--- a/num/test/make/makefile_base
+++ /dev/null
@@ -1,114 +0,0 @@
-# This is the makefile for testing the mesa num library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-COMMON_SRCS = test_support.f90 test_int_support.f90 \
- bari_beam.f90 test_beam.f90 \
- bari_chemakzo.f90 test_chemakzo.f90 \
- bari_medakzo.f90 test_medakzo.f90 \
- bari_vdpol.f90 test_vdpol.f90 \
- test_diffusion.f90 test_brent.f90 test_bobyqa.f90 test_newuoa.f90 \
- test_simplex.f90 test_newton.f90 test_integrate.f90
-
-TEST_SRCS = $(COMMON_SRCS) test_num.o
-
-TEST_MPI_SRCS = $(COMMON_SRCS) test_num_mpi.o
-
-SAMPLE_SRCS = $(COMMON_SRCS) sample_ode_solver.o
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = num
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = $(LIBS_MATRIX)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX) -lauto_diff
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-TEST_MPI = $(TEST_DIR)/test_mpi
-SAMPLE = $(TEST_DIR)/sample
-
-TEST_OBJS = $(patsubst %.f90,%.o,$(TEST_SRCS))
-TEST_MPI_OBJS = $(patsubst %.f90,%.o,$(TEST_MPI_SRCS))
-SAMPLE_OBJS = $(patsubst %.f90,%.o,$(SAMPLE_SRCS))
-
-all : $(TEST) $(SAMPLE)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(TEST_MPI) : $(TEST_MPI_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(SAMPLE) : $(SAMPLE_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-$(TEST_MPI) : OBJS = $(TEST_MPI_OBJS)
-$(SAMPLE) : OBJS = $(SAMPLE_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST) $(TEST_MPI) $(SAMPLE)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(FCbasic) $(FCopenmp) $(FCopt) $(FCfree)
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(COMPILE) $<
-else
- $(TEST_COMPILE) $(COMPILE) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/num/test/mk b/num/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/num/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/num/test/mkx b/num/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/num/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/num/test/rn b/num/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/num/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/package_template/Makefile b/package_template/Makefile
new file mode 100644
index 000000000..bab310529
--- /dev/null
+++ b/package_template/Makefile
@@ -0,0 +1,21 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := pkg
+SRCS := public/pkg_def.f90 public/pkg_lib.f90 private/pkg_mod.f90
+SRCS_CHECK := test/src/test_pkg.f90
+INTERNAL_DEPENDS_ON :=
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := pkg_def.mod pkg_lib.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/package_template/README b/package_template/README
new file mode 100644
index 000000000..8fe557ac6
--- /dev/null
+++ b/package_template/README
@@ -0,0 +1 @@
+This folder containts a template one can use to start creating a new module. To do that, copy this folder and change all occurences of `pkg` to the name of the new module. To ensure that the module is built and made available to other modules, add the location of the module to `make/subdirs.mk`.
diff --git a/package_template/build_and_test b/package_template/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/package_template/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/package_template/clean b/package_template/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/package_template/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/package_template/export b/package_template/export
deleted file mode 100755
index db3250885..000000000
--- a/package_template/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/package_template/i1 b/package_template/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/package_template/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/package_template/install b/package_template/install
deleted file mode 100755
index 9026e932d..000000000
--- a/package_template/install
+++ /dev/null
@@ -1,8 +0,0 @@
-./build_and_test
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-echo "export"
-./export
-echo "done"
\ No newline at end of file
diff --git a/package_template/make/makefile b/package_template/make/makefile
deleted file mode 100644
index 7f5ead4ef..000000000
--- a/package_template/make/makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-# This is the makefile for the package template
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCE FILES
-
-SRCS = pkg_mod.f90 \
- pkg_def.f90 \
- pkg_lib.f90
-
-#################################################################
-#
-# TARGETS
-
-LIB = libpkg.$(LIB_SUFFIX)
-ifeq ($(USE_SHARED), YES)
- LIB_DEPENDS =
-endif
-LIB_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-$(LIB) : $(LIB_OBJS)
- $(LIB_TOOL) $(LIB) $(LIB_OBJS) $(LIB_DEPENDS)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-
-COMPILE_FIXED = $(COMPILE_TO_DEPLOY) $(FCfixed)
-#COMPILE_FIXED = $(COMPILE_TO_TEST) $(FCfixed)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.f
- $(COMPILE_CMD) $<
-%.o : %.f90
- $(COMPILE_CMD) $<
-%.mod : %.o
- @true
-%.o : %.mod
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend
-
-install:
- @cp xxx_lib.mod $(MESA_DIR)/include
- @cp xxx_def.mod $(MESA_DIR)/include
- @cp libxxx.$(LIB_SUFFIX) $(MESA_DIR)/lib
-
-
-#################################################################
-#
-# DEPENDENCIES
-
-# Paths to search for source & include files
-
-VPATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-# Automatic dependency generation using makedepf90
-
-nodeps : $(.DEFAULT_GOAL)
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- DEPEND_DIRS = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
- .depend :
- makedepf90 -m %m.mod -I$(DEPEND_DIRS) $(SRCS) > .depend
- -include .depend
-
-endif
-
-### END ###
diff --git a/package_template/mk b/package_template/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/package_template/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/package_template/test/ck b/package_template/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/package_template/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/package_template/test/clean b/package_template/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/package_template/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/package_template/test/cleanup b/package_template/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/package_template/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/package_template/test/export b/package_template/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/package_template/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/package_template/test/make/makefile b/package_template/test/make/makefile
deleted file mode 100644
index 3680a5b9b..000000000
--- a/package_template/test/make/makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-
-MESA_DIR = ../../..
-
-#################################################################
-
-# STEP 1: set up the standard info
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-
-# STEP 2: info about the libraries
-
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) -lpkg
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_MICRO)
-#### change LOAD_OTHER as needed. e.g., $(LOAD_MESA_STAR)
-
-#################################################################
-
-# STEP 3: build the test program
-
-TEST_OBJS = test_pkg.o
-TEST = tester
-
-$(TEST) : $(TEST_OBJS)
- $(LOADER) $(FCopenmp) -o $(TEST_DIR)/$(TEST) $(TEST_OBJS) \
- $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-
-#################################################################
-
-%.o: $(TEST_SRC_DIR)/%.f90
- $(TEST_COMPILE) $(FCfree) $<
-
-clean:
- -@rm -f *.o *.mod $(TEST_LIB) $(TEST_DIR)/$(TEST)
diff --git a/package_template/test/mk b/package_template/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/package_template/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/package_template/test/rn b/package_template/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/package_template/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/package_template_make_copy b/package_template_make_copy
deleted file mode 100755
index 7d458164a..000000000
--- a/package_template_make_copy
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-mkdir pkg
-mkdir pkg/make
-mkdir pkg/public
-mkdir pkg/private
-mkdir pkg/test
-mkdir pkg/test/make
-mkdir pkg/test/src
-
-cd package_template || exit
-cp build_and_test ../pkg
-cp clean ../pkg
-cp i1 ../pkg
-cp export ../pkg
-cp install ../pkg
-cp mk ../pkg
-cp make/makefile ../pkg/make
-cp private/*.f90 ../pkg/private
-cp public/*.f90 ../pkg/public
-cd test || exit
-cp ck ../../pkg/test
-cp clean ../../pkg/test
-cp cleanup ../../pkg/test
-cp export ../../pkg/test
-cp mk ../../pkg/test
-cp rn ../../pkg/test
-cp make/makefile ../../pkg/test/make
-cp src/*.f90 ../../pkg/test/src
-
-echo 'done - rename "pkg" to be whatever you want.'
diff --git a/rates/Makefile b/rates/Makefile
new file mode 100644
index 000000000..06a88f614
--- /dev/null
+++ b/rates/Makefile
@@ -0,0 +1,48 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := rates
+SRCS := public/rates_def.f90 \
+ public/rates_lib.f90 \
+ private/rates_names.f90 \
+ private/rates_reverses.f90 \
+ private/weak_support.f90 \
+ private/weaklib_tables.f90 \
+ private/suzuki_tables.f90 \
+ private/load_weak.f90 \
+ private/eval_weak.f90 \
+ private/coulomb.f90 \
+ private/load_ecapture.f90 \
+ private/eval_psi.f90 \
+ private/eval_coulomb.f90 \
+ private/eval_ecapture.f90 \
+ private/reaclib_eval.f90 \
+ private/reaclib_support.f90 \
+ private/reaclib_print.f90 \
+ private/reaclib_input.f90 \
+ private/ratelib.f90 \
+ private/pycno.f90 \
+ private/raw_rates.f90 \
+ private/rates_initialize.f90 \
+ private/rates_support.f90 \
+ private/screen5.f90 \
+ private/screen_chugunov.f90 \
+ private/screen.f90
+SRCS_CHECK := test/src/test_rates.f90 test/src/test_screen.f90 test/src/test_weak.f90 test/src/test_ecapture.f90
+INTERNAL_DEPENDS_ON := const utils math auto_diff interp_1d interp_2d chem eos forum
+# Test dependency
+INTERNAL_DEPENDS_ON += num
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := rates_def.mod rates_lib.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/rates/build_and_test b/rates/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/rates/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/rates/build_and_test_parallel b/rates/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/rates/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/rates/clean b/rates/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/rates/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/rates/export b/rates/export
deleted file mode 100755
index db3250885..000000000
--- a/rates/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/rates/i1 b/rates/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/rates/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/rates/i1p b/rates/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/rates/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/rates/make/makefile b/rates/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/rates/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/rates/make/makefile_base b/rates/make/makefile_base
deleted file mode 100644
index 7d2438bc0..000000000
--- a/rates/make/makefile_base
+++ /dev/null
@@ -1,143 +0,0 @@
-# This is the makefile for the mesa nuclear reaction rates package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCE FILES
-
-SRCS = \
- rates_def.f90 \
- rates_names.f90 \
- rates_reverses.f90 \
- weak_support.f90 \
- weaklib_tables.f90 \
- suzuki_tables.f90 \
- load_weak.f90 \
- eval_weak.f90 \
- coulomb.f90 \
- load_ecapture.f90 \
- eval_psi.f90 \
- eval_coulomb.f90 \
- eval_ecapture.f90 \
- reaclib_eval.f90 \
- reaclib_support.f90 \
- reaclib_print.f90 \
- reaclib_input.f90 \
- ratelib.f90 \
- pycno.f90 \
- raw_rates.f90 \
- rates_initialize.f90 \
- rates_support.f90 \
- screen5.f90 \
- screen_chugunov.f90 \
- screen.f90 \
- rates_lib.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = chem eos $(LIBS_MESA_NUMERICS)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) -lchem -leos $(LOAD_MESA_NUMERICS)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = librates.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) rates_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) rates_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree)
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-rates_names.o : rates_names.f90
-ifneq ($(QUIET),)
- @echo COMPILE_BASIC $<
- @$(COMPILE_BASIC) $(FCfree) $(FCchecks) -c -O0 $<
-else
- $(COMPILE_BASIC) $(FCfree) $(FCchecks) -c -O0 $<
-endif
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- DEPEND_FLAGS =
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) $(DEPEND_FLAGS) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) $(DEPEND_FLAGS) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/rates/mk b/rates/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/rates/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/rates/test/ck b/rates/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/rates/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/rates/test/clean b/rates/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/rates/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/rates/test/cleanup b/rates/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/rates/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/rates/test/export b/rates/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/rates/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/rates/test/make/makefile b/rates/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/rates/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/rates/test/make/makefile_base b/rates/test/make/makefile_base
deleted file mode 100644
index 8b187ddd4..000000000
--- a/rates/test/make/makefile_base
+++ /dev/null
@@ -1,101 +0,0 @@
-# This is the makefile for testing the mesa rates package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-TEST_SRCS = test_screen.f90 test_weak.f90 test_ecapture.f90 test_rates.f90
-
-SHOW_RATES_SRCS = reaction_rate_from_cache.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = rates
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = eos chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -leos -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-TESTQ = $(TEST_DIR)/test_quietly
-SHOW_RATES = $(TEST_DIR)/show_rates
-
-TEST_OBJS = $(patsubst %.f90,%.o,$(patsubst %.c,%.o,$(TEST_SRCS)))
-SHOW_RATES_OBJS = $(patsubst %.f90,%.o,$(patsubst %.c,%.o,$(SHOW_RATES_SRCS)))
-
-all : $(TEST) $(TESTQ) $(SHOW_RATES)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(TESTQ) : $(TEST_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-$(SHOW_RATES) : $(SHOW_RATES_OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-
-$(TEST) : OBJS= $(TEST_OBJS)
-$(TESTQ) : OBJS = $(TEST_OBJS)
-$(SHOW_RATES) : OBJS = $(SHOW_RATES_OBJS)
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod .depend $(TEST) $(TESTQ) $(SHOW_RATES)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/rates/test/mk b/rates/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/rates/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/rates/test/mkx b/rates/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/rates/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/rates/test/rn b/rates/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/rates/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/sample/.gitignore b/sample/.gitignore
deleted file mode 100644
index b1477dcfe..000000000
--- a/sample/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-diff.txt
-eoscorr
-test
-tmp.txt
diff --git a/sample/README b/sample/README
deleted file mode 100644
index 217ab714d..000000000
--- a/sample/README
+++ /dev/null
@@ -1,13 +0,0 @@
-You can put the sample directory anywhere and rename it as you wish.
-
-Then do the following:
-
-1) edit make/makefile to set MESA_DIR to the path to your mesa directory.
-
-2) edit src/sample.f90 to set 'data_dir' to be the path to the mesa data directory.
-
-3) run the 'mk' script to make.
-
-4) run the 'rn' script to run.
-
-5) run the 'ck' script to check that the code produces the expected results.
diff --git a/sample/build_and_test b/sample/build_and_test
deleted file mode 100755
index 7ef7c3d5f..000000000
--- a/sample/build_and_test
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-
-function error {
- echo
- more diff.txt
- echo
- pwd
- echo "TEST FAILED -- compare test_output to tmp.txt"
- echo
- exit 1
-}
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-if [ ! -f ../skip_build ]
-then
- if [ ! -f skip_build ]
- then
- ./mk
- check_okay
- fi
-fi
-
-if [ ! -f ../skip_test ]
-then
- if [ ! -f skip_test ]
- then
- ./ck >& diff.txt
- if [ $? -eq 0 ]
- then
- if [ -s diff.txt ]
- then
- error
- fi
- else
- error
- fi
- fi
-fi
diff --git a/sample/ck b/sample/ck
deleted file mode 100755
index d9e1631c6..000000000
--- a/sample/ck
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-./rn > tmp.txt
-# run twice to avoid problems with cache reports
-./rn > tmp.txt
-check_okay
-diff -b tmp.txt test_output
diff --git a/sample/clean b/sample/clean
deleted file mode 100755
index 356f57db5..000000000
--- a/sample/clean
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make clean
diff --git a/sample/i1 b/sample/i1
deleted file mode 100755
index 9c437d074..000000000
--- a/sample/i1
+++ /dev/null
@@ -1,6 +0,0 @@
-./build_and_test
-if [ $? -ne 0 ]
-then
- exit 1
-fi
-echo "done"
\ No newline at end of file
diff --git a/sample/make/makefile b/sample/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/sample/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/sample/make/makefile_base b/sample/make/makefile_base
deleted file mode 100644
index 140215b24..000000000
--- a/sample/make/makefile_base
+++ /dev/null
@@ -1,106 +0,0 @@
-# This is the sample makefile for using a mesa module
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-TEST_SRCS = sample.f90
-
-EOS_CORR_SRCS = eos_correction.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_OTHER = net eos kap rates chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lnet -leos -lkap -lrates -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST_DIR = ..
-
-TEST = $(TEST_DIR)/test
-EOS_CORR = $(TEST_DIR)/eoscorr
-
-TEST_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TEST_SRCS)))
-EOS_CORR_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(EOS_CORR_SRCS)))
-
-all: $(EOS_CORR) $(TEST)
-
-$(TEST) : $(TEST_OBJS) $(DEPS_OTHER)
-$(EOS_CORR) : $(EOS_CORR_OBJS) $(DEPS_OTHER)
-
-$(TEST) : OBJS = $(TEST_OBJS)
-$(EOS_CORR) : OBJS = $(EOS_CORR_OBJS)
-
-# We need to do this as the test code does not live in a test/ so the relative paths
-# in LD_FLAGS do not work. Normal folders with a test/ folder should use $(LD_FLAGS)
-ifeq ($(USE_SHARED), YES)
- LDFLAGS = -Wl,-rpath=make:../lib
-endif
-
-$(TEST_DIR)/% :
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER) $(LDFLAGS)
-else
- $(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_OTHER) $(LDFLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST) $(EOS_CORR) *.smod
-
-install:
- @:
-
-#################################################################
-#
-# COMPILATION RULES
-
-MY_FC_FLAGS = $(FCfree)
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo FC $<
- @$(FC) $(FCbasic) $(MY_FC_FLAGS) -I$(MESA_INCLUDE_DIR) -c $<
-else
- $(FC) $(FCbasic) $(MY_FC_FLAGS) -I$(MESA_INCLUDE_DIR) -c $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = ../src
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
-
diff --git a/sample/mk b/sample/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/sample/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/sample/rn b/sample/rn
deleted file mode 100755
index 569345b66..000000000
--- a/sample/rn
+++ /dev/null
@@ -1 +0,0 @@
-./test
diff --git a/sample/src/eos_correction.f90 b/sample/src/eos_correction.f90
deleted file mode 100644
index 0c3f0b433..000000000
--- a/sample/src/eos_correction.f90
+++ /dev/null
@@ -1,240 +0,0 @@
-! ***********************************************************************
-!
-! Copyright (C) 2011-2019 The MESA Team
-!
-! This program is free software: you can redistribute it and/or modify
-! it under the terms of the GNU Lesser General Public License
-! as published by the Free Software Foundation,
-! either version 3 of the License, or (at your option) any later version.
-!
-! This program is distributed in the hope that it will be useful,
-! but WITHOUT ANY WARRANTY; without even the implied warranty of
-! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-! See the GNU Lesser General Public License for more details.
-!
-! You should have received a copy of the GNU Lesser General Public License
-! along with this program. If not, see .
-!
-! ***********************************************************************
-
-program eos_correction
- use eos_def
- use eos_lib
- use chem_def
- use chem_lib
- use const_def, only: dp, amu, clight, me
- use const_lib, only: const_init
- use math_lib
-
- implicit none
-
- integer :: handle
- real(dp) :: X, Z, Y, abar, zbar, z2bar, z53bar, ye, WoA
- integer, parameter :: species = 2
- integer, parameter :: h1 = 1, c12 = 2
- integer, pointer, dimension(:) :: net_iso, chem_id
- real(dp) :: xa(species)
-
- integer, parameter :: num_lgRhos = 601
- integer, parameter :: num_lgTs = 321
- real(dp), parameter :: lg_Tmin = 6.0_dp, lg_Tmax = 9.2_dp, &
- lg_Rhomin = 4.0_dp, lg_Rhomax = 10.0_dp
- real(dp), dimension(num_lgTs) :: lg_Ts
- real(dp), dimension(num_lgRhos) :: lg_Rhos
- real(dp), dimension(num_lgTs, num_lgRhos) :: tab, Ytab, Etab
- integer :: i
- character(len=256) :: my_mesa_dir
-
- call setup
-
- do i = 1, num_lgts
- lg_Ts(i) = lg_Tmax + real(i - 1)*(lg_Tmin - lg_Tmax)/real(num_lgTs - 1)
- end do
- do i = 1, num_lgrhos
- lg_Rhos(i) = lg_Rhomin + real(i - 1)*(lg_Rhomax - lg_Rhomin)/real(num_lgRhos - 1)
- end do
- call write_axes_to_file
-
- X = 0.0_dp; Y = 0.0_dp; Z = 1.0_dp
- call make_correction_table(X, Z, tab, Ytab, Etab)
- call write_correction_table('correction_C12.data', tab)
- call write_correction_table('Yfree_C12.data', Ytab)
- call write_correction_table('EoC2_C12.data', Etab)
-
- call shutdown
-
-contains
-
- subroutine setup()
- use math_lib
- integer :: ierr
-
- ierr = 0
- my_mesa_dir = '..' ! if empty string, uses environment variable MESA_DIR
- call const_init(my_mesa_dir, ierr)
- if (ierr /= 0) then
- write (*, *) 'const_init failed'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- call math_init()
-
- call chem_init('isotopes.data', ierr)
- if (ierr /= 0) then
- write (*, *) 'failed in chem_init'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- ! allocate and initialize the eos tables
- call Setup_eos(handle)
-
- allocate (net_iso(num_chem_isos), chem_id(species), stat=ierr)
- if (ierr /= 0) call mesa_error(__FILE__, __LINE__, 'allocate failed')
- end subroutine setup
-
- subroutine make_correction_table(X, Z, Ecorr, Ytab, Etab)
- real(dp), intent(in) :: X, Z
- real(dp), dimension(num_lgTs, num_lgRhos) :: Ecorr, Ytab, Etab
- real(dp) :: Rho, T, log10Rho, log10T
- real(dp), dimension(num_eos_basic_results) :: res, d_dlnd, d_dlnT
- real(dp), dimension(num_eos_d_dxa_results, species) :: d_dxa
- real(dp) :: Yplus, Yfree, Eoc2
- integer :: i, j, ierr
-
- call Init_Composition(X, Z)
-
- do i = 1, num_lgRhos
- log10Rho = lg_Rhos(i)
- Rho = exp10(log10Rho)
- do j = 1, num_lgTs
- log10T = lg_Ts(j)
- T = exp10(log10T)
-
- call eosDT_get( &
- handle, &
- species, chem_id, net_iso, xa, &
- Rho, log10Rho, T, log10T, res, d_dlnd, d_dlnT, &
- d_dxa, ierr)
-
- Yfree = exp(res(i_lnfree_e))
- Yplus = max(Yfree - ye, 0.0_dp)
- Eoc2 = exp(res(i_lnE))/(clight*clight)
-
- Ecorr(j, i) = WoA + Yplus*me/amu + Eoc2
- Ytab(j, i) = Yplus
- Etab(j, i) = Eoc2
- end do
- end do
- write (*, '(a16,"=",2f13.6)') 'Ecorr min, max', minval(Ecorr(1:num_lgTs, 1:num_lgRhos)), &
- maxval(Ecorr(1:num_lgTs, 1:num_lgRhos))
- write (*, '(a16,"=",2f13.6)') 'Yfree min, max', minval(Ytab(1:num_lgTs, 1:num_lgRhos)), &
- maxval(Ytab(1:num_lgTs, 1:num_lgRhos))
- write (*, '(a16,"=",2f13.6)') 'E/c**2 min, max', minval(Etab(1:num_lgTs, 1:num_lgRhos)), &
- maxval(Etab(1:num_lgTs, 1:num_lgRhos))
- end subroutine make_correction_table
-
- subroutine shutdown()
- ! deallocate the eos tables
- call Shutdown_eos(handle)
-
- deallocate (net_iso, chem_id)
-
- end subroutine shutdown
-
- subroutine Setup_eos(handle)
- ! allocate and load the eos tables
- integer, intent(out) :: handle
-
- integer :: ierr
- logical, parameter :: use_cache = .true.
-
- call eos_init('', use_cache, ierr)
- if (ierr /= 0) then
- write (*, *) 'eos_init failed in Setup_eos'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- write (*, *) 'loading eos tables'
-
- handle = alloc_eos_handle(ierr)
- if (ierr /= 0) then
- write (*, *) 'failed trying to allocate eos handle'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- end subroutine Setup_eos
-
- subroutine Shutdown_eos(handle)
- use eos_def
- use eos_lib
- integer, intent(in) :: handle
- call free_eos_handle(handle)
- call eos_shutdown
- end subroutine Shutdown_eos
-
- subroutine Init_Composition(X, Z)
- use chem_lib
- real(dp), intent(in) :: X, Z
- real(dp) :: dabar_dx(species), dzbar_dx(species), dmc_dx(species), sumx, xh, xhe, xz
-
- xa(h1) = X
- xa(c12) = Z
-
- net_iso(:) = 0
- chem_id(h1) = ih1; net_iso(ih1) = h1
- chem_id(c12) = ic12; net_iso(ic12) = c12
-
- call composition_info( &
- & species, chem_id, xa, xh, xhe, xz, abar, zbar, z2bar, z53bar, ye, &
- & WoA, sumx, dabar_dx, dzbar_dx, dmc_dx)
-
- end subroutine Init_Composition
-
- subroutine write_axes_to_file()
- use utils_lib
- character(len=*), parameter :: form = '(f6.2)'
- integer :: iounit, ierr
-
- open (newunit=iounit, file='data/lgTs', iostat=ierr, action="write")
- if (ierr /= 0) then
- write (*, *) "Error opening file data/lgTs"
- stop
- end if
-
- write (iounit, form) lg_Ts
- close (iounit)
-
- open (newunit=iounit, file='data/lgRhos', iostat=ierr, action="write")
- if (ierr /= 0) then
- write (*, *) "Error opening file data/lgRhos"
- stop
- end if
-
- write (iounit, form) lg_Rhos
- close (iounit)
-
- end subroutine write_axes_to_file
-
- subroutine write_correction_table(filename, tab)
- use utils_lib
- character(len=*), intent(in) :: filename
- real(dp), dimension(num_lgTs, num_lgRhos), intent(in) :: tab
- integer :: iounit, ierr
- character(len=32) :: form
-
- open (newunit=iounit, file='data/'//trim(filename), iostat=ierr, action="write")
- if (ierr /= 0) then
- write (*, *) "Error opening file data/Ecorrection.data"
- stop
- end if
-
- write (form, '("(",i0,"f11.6)")') num_lgRhos
-
- do i = 1, num_lgTs
- write (iounit, form) tab(i, :)
- end do
-
- close (iounit)
- end subroutine write_correction_table
-
-end program eos_correction
diff --git a/sample/src/sample.f90 b/sample/src/sample.f90
deleted file mode 100644
index 96800086d..000000000
--- a/sample/src/sample.f90
+++ /dev/null
@@ -1,217 +0,0 @@
-! ***********************************************************************
-!
-! Copyright (C) 2011-2019 The MESA Team
-!
-! This program is free software: you can redistribute it and/or modify
-! it under the terms of the GNU Lesser General Public License
-! as published by the Free Software Foundation,
-! either version 3 of the License, or (at your option) any later version.
-!
-! This program is distributed in the hope that it will be useful,
-! but WITHOUT ANY WARRANTY; without even the implied warranty of
-! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-! See the GNU Lesser General Public License for more details.
-!
-! You should have received a copy of the GNU Lesser General Public License
-! along with this program. If not, see .
-!
-! ***********************************************************************
-
-program sample_eos
- use eos_def
- use eos_lib
- use chem_def
- use chem_lib
- use const_def, only: dp, ln10
- use const_lib, only: const_init
- use math_lib
-
- implicit none
-
- real(dp) :: X, Z, Y, abar, zbar, z2bar, z53bar, ye
- integer, parameter :: species = 7
- integer, parameter :: h1 = 1, he4 = 2, c12 = 3, n14 = 4, o16 = 5, ne20 = 6, mg24 = 7
- integer, pointer, dimension(:) :: net_iso, chem_id
- real(dp) :: xa(species)
- character(len=256) :: my_mesa_dir
-
- call Sample
-
-contains
-
- subroutine Sample
-
- integer :: handle
- real(dp) :: Rho, T, Pgas, log10Rho, log10T
- real(dp) :: dlnRho_dlnPgas_const_T, dlnRho_dlnT_const_Pgas
- real(dp), dimension(num_eos_basic_results) :: res, d_dlnd, d_dlnT
- real(dp), dimension(num_eos_d_dxa_results, species) :: d_dxa
- integer :: ierr
- character(len=*), parameter :: fmt1 = "(a20, 3x, e20.12)"
-
- ierr = 0
-
- my_mesa_dir = '..' ! if empty string, uses environment variable MESA_DIR
- call const_init(my_mesa_dir, ierr)
- if (ierr /= 0) then
- write (*, *) 'const_init failed'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- call math_init()
-
- call chem_init('isotopes.data', ierr)
- if (ierr /= 0) then
- write (*, *) 'failed in chem_init'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- ! allocate and initialize the eos tables
- call Setup_eos(handle)
-
- allocate (net_iso(num_chem_isos), chem_id(species), stat=ierr)
- if (ierr /= 0) call mesa_error(__FILE__, __LINE__, 'allocate failed')
- X = 0.70_dp
- Z = 0.02_dp
- call Init_Composition
-
- Rho = 1.3519d2
- log10T = 8.15_dp
- T = exp10(log10T)
-
- ! get a set of results for given temperature and density
- call eosDT_get( &
- handle, &
- species, chem_id, net_iso, xa, &
- Rho, log10(Rho), T, log10T, &
- res, d_dlnd, d_dlnT, &
- d_dxa, ierr)
-
- Pgas = exp(res(i_lnPgas))
-
- ! the indices for the results are defined in eos_def.f90
- write (*, '(A)')
- write (*, fmt1) 'temperature', T
- write (*, fmt1) 'density', Rho
- write (*, fmt1) 'logT', log10T
- write (*, fmt1) 'logRho', log10(Rho)
- write (*, '(A)')
- write (*, fmt1) 'Z', Z
- write (*, fmt1) 'X', X
- write (*, fmt1) 'abar', abar
- write (*, fmt1) 'zbar', zbar
- write (*, '(A)')
- write (*, fmt1) 'Pgas', Pgas
- write (*, fmt1) 'logPgas', res(i_lnPgas)/ln10
- write (*, fmt1) 'grad_ad', res(i_grad_ad)
- write (*, fmt1) 'c_P', res(i_Cp)
- write (*, '(A)')
-
- call eosPT_get( &
- handle, &
- species, chem_id, net_iso, xa, &
- Pgas, log10(Pgas), T, log10(T), &
- Rho, log10Rho, dlnRho_dlnPgas_const_T, dlnRho_dlnT_const_Pgas, &
- res, d_dlnd, d_dlnT, d_dxa, ierr)
-
- ! the indices for the results are defined in eos_def.f90
- write (*, '(A)')
- write (*, fmt1) 'temperature', T
- write (*, fmt1) 'Pgas', Pgas
- write (*, fmt1) 'logT', log10(T)
- write (*, fmt1) 'logPgas', res(i_lnPgas)/ln10
- write (*, '(A)')
- write (*, fmt1) 'Z', Z
- write (*, fmt1) 'X', X
- write (*, fmt1) 'abar', abar
- write (*, fmt1) 'zbar', zbar
- write (*, '(A)')
- write (*, fmt1) 'density', Rho
- write (*, fmt1) 'logRho', log10Rho
- write (*, fmt1) 'grad_ad', res(i_grad_ad)
- write (*, fmt1) 'c_P', res(i_Cp)
- write (*, '(A)')
-
- ! deallocate the eos tables
- call Shutdown_eos(handle)
-
- deallocate (net_iso, chem_id)
-
- if (ierr /= 0) then
- write (*, *) 'bad result from eos_get'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- end subroutine Sample
-
- subroutine Setup_eos(handle)
- ! allocate and load the eos tables
- use eos_def
- use eos_lib
- integer, intent(out) :: handle
-
- integer :: ierr
- logical, parameter :: use_cache = .true.
-
- call eos_init('', use_cache, ierr)
- if (ierr /= 0) then
- write (*, *) 'eos_init failed in Setup_eos'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- write (*, *) 'loading eos tables'
-
- handle = alloc_eos_handle(ierr)
- if (ierr /= 0) then
- write (*, *) 'failed trying to allocate eos handle'
- call mesa_error(__FILE__, __LINE__)
- end if
-
- end subroutine Setup_eos
-
- subroutine Shutdown_eos(handle)
- use eos_def
- use eos_lib
- integer, intent(in) :: handle
- call free_eos_handle(handle)
- call eos_shutdown
- end subroutine Shutdown_eos
-
- subroutine Init_Composition
- use chem_lib
-
- real(dp), parameter :: Zfrac_C = 0.173312d0
- real(dp), parameter :: Zfrac_N = 0.053177d0
- real(dp), parameter :: Zfrac_O = 0.482398d0
- real(dp), parameter :: Zfrac_Ne = 0.098675d0
-
- real(dp) :: dabar_dx(species), dzbar_dx(species), &
- sumx, xh, xhe, xz, mass_correction, dmc_dx(species)
-
- net_iso(:) = 0
-
- chem_id(h1) = ih1; net_iso(ih1) = h1
- chem_id(he4) = ihe4; net_iso(ihe4) = he4
- chem_id(c12) = ic12; net_iso(ic12) = c12
- chem_id(n14) = in14; net_iso(in14) = n14
- chem_id(o16) = io16; net_iso(io16) = o16
- chem_id(ne20) = ine20; net_iso(ine20) = ne20
- chem_id(mg24) = img24; net_iso(img24) = mg24
-
- Y = 1 - (X + Z)
-
- xa(h1) = X
- xa(he4) = Y
- xa(c12) = Z*Zfrac_C
- xa(n14) = Z*Zfrac_N
- xa(o16) = Z*Zfrac_O
- xa(ne20) = Z*Zfrac_Ne
- xa(species) = 1 - sum(xa(1:species - 1))
-
- call composition_info( &
- species, chem_id, xa, xh, xhe, xz, abar, zbar, z2bar, z53bar, ye, &
- mass_correction, sumx, dabar_dx, dzbar_dx, dmc_dx)
-
- end subroutine Init_Composition
-
-end program sample_eos
diff --git a/sample/test_output b/sample/test_output
deleted file mode 100644
index b6409266e..000000000
--- a/sample/test_output
+++ /dev/null
@@ -1,33 +0,0 @@
- loading eos tables
-
- temperature 0.141253754462E+09
- density 0.135190000000E+03
- logT 0.815000000000E+01
- logRho 0.213094456804E+01
-
- Z 0.200000000000E-01
- X 0.700000000000E+00
- abar 0.129663534103E+01
- zbar 0.110214003987E+01
-
- Pgas 0.257500413399E+19
- logPgas 0.184107779306E+02
- grad_ad 0.278410774027E+00
- c_P 0.172176072695E+10
-
-
- temperature 0.141253754462E+09
- Pgas 0.257500413399E+19
- logT 0.815000000000E+01
- logPgas 0.184107779385E+02
-
- Z 0.200000000000E-01
- X 0.700000000000E+00
- abar 0.129663534103E+01
- zbar 0.110214003987E+01
-
- density 0.135190002448E+03
- logRho 0.213094457591E+01
- grad_ad 0.278410774540E+00
- c_P 0.172176069604E+10
-
diff --git a/utils/check_sdk_version b/scripts/check_sdk_version
similarity index 100%
rename from utils/check_sdk_version
rename to scripts/check_sdk_version
diff --git a/scripts/shmesa/README.md b/scripts/shmesa/README.md
index 6faf3860e..39b1848fd 100644
--- a/scripts/shmesa/README.md
+++ b/scripts/shmesa/README.md
@@ -42,7 +42,6 @@ You can use this for example to make a grid of models, and e.g. include the outp
# copy over a new work directory
shmesa work "grid_dir"
cd grid_dir
-./mk
# output asteroseismic quantities in `LOGS/history.data`
shmesa defaults delta_nu nu_max
@@ -54,7 +53,7 @@ for M in 1.0 1.5 2.0; do
initial_mass $M \
Zbase $Z \
initial_z $Z
- ./star inlist_project
+ ./rn
mv LOGS "M='$M'_'Z='$Z'"
done
done
diff --git a/scripts/shmesa/shmesa b/scripts/shmesa/shmesa
index fad583a1d..f7a5b8d42 100755
--- a/scripts/shmesa/shmesa
+++ b/scripts/shmesa/shmesa
@@ -249,7 +249,7 @@ shmesa_zip () {
echo "Warning: No inlist files found in the directory '$dir_to_zip'."
fi
- zip -r "$zip_name" "$dir_to_zip" -x "*/make/*mod" "*/make/*.o" "*.bak" "star" "binary" "*LOGS*" "*photos*" "*png*" "*.mesa_temp_cache"
+ zip -r "$zip_name" "$dir_to_zip" -x "*build*" "*.bak" "*LOGS*" "*photos*" "*png*" "*.mesa_temp_cache"
}
@@ -351,7 +351,7 @@ shmesa_test () {
run_shmesa_test "work" \
"(shmesa work $MESA_SHMESA_TEST && \
cd $MESA_SHMESA_TEST && \
- ./mk)"
+ make)"
# shmesa change
run_shmesa_test "change" \
diff --git a/star/Makefile b/star/Makefile
new file mode 100644
index 000000000..e6f022c0f
--- /dev/null
+++ b/star/Makefile
@@ -0,0 +1,281 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := star
+SRCS := \
+ other/other_accreting_state.f90 \
+ other/other_adjust_mdot.f90 \
+ other/other_adjust_mlt_gradt_fraction.f90 \
+ other/other_after_set_mixing_info.f90 \
+ other/other_after_solver_setmatrix.f90 \
+ other/other_alpha_mlt.f90 \
+ other/other_am_mixing.f90 \
+ other/other_astero_freq_corr.f90 \
+ other/other_brunt.f90 \
+ other/other_brunt_smoothing.f90 \
+ other/other_build_initial_model.f90 \
+ other/other_cgrav.f90 \
+ other/other_close_gaps.f90 \
+ other/other_d_mix.f90 \
+ other/other_diffusion.f90 \
+ other/other_diffusion_coefficients.f90 \
+ other/other_diffusion_factor.f90 \
+ other/other_energy.f90 \
+ other/other_energy_implicit.f90 \
+ other/other_eps_grav.f90 \
+ other/other_eval_fp_ft.f90 \
+ other/other_eval_i_rot.f90 \
+ job/other_extras.f90 \
+ other/other_gradr_factor.f90 \
+ other/other_j_for_adjust_j_lost.f90 \
+ other/other_kap.f90 \
+ other/other_mesh_delta_coeff_factor.f90 \
+ other/other_mesh_functions.f90 \
+ other/other_mlt_results.f90 \
+ other/other_momentum.f90 \
+ other/other_momentum_implicit.f90 \
+ other/other_net_derivs.f90 \
+ other/other_net_get.f90 \
+ other/other_neu.f90 \
+ other/other_opacity_factor.f90 \
+ other/other_overshooting_scheme.f90 \
+ other/other_pgstar_plots.f90 \
+ other/other_photo_read.f90 \
+ other/other_photo_write.f90 \
+ other/other_pressure.f90 \
+ other/other_rate_get.f90 \
+ other/other_remove_surface.f90 \
+ other/other_rsp_build_model.f90 \
+ other/other_rsp_linear_analysis.f90 \
+ other/other_screening.f90 \
+ other/other_set_pgstar_controls.f90 \
+ other/other_solver_monitor.f90 \
+ other/other_split_burn.f90 \
+ other/other_surface_pt.f90 \
+ other/other_timestep_limit.f90 \
+ other/other_torque.f90 \
+ other/other_torque_implicit.f90 \
+ other/other_wind.f90 \
+ private/adjust_mass.f90 \
+ private/adjust_mesh.f90 \
+ private/adjust_mesh_split_merge.f90 \
+ private/adjust_mesh_support.f90 \
+ private/adjust_net.f90 \
+ private/adjust_xyz.f90 \
+ private/alloc.f90 \
+ private/atm_support.f90 \
+ private/auto_diff_support.f90 \
+ private/brunt.f90 \
+ private/conv_premix.f90 \
+ private/create_initial_model.f90 \
+ private/ctrls_io.f90 \
+ private/diffusion.f90 \
+ private/diffusion_procs.f90 \
+ private/diffusion_support.f90 \
+ private/do_one_utils.f90 \
+ private/element_diffusion.f90 \
+ private/eos_support.f90 \
+ private/eps_grav.f90 \
+ private/eps_mdot.f90 \
+ private/evolve.f90 \
+ private/evolve_support.f90 \
+ private/gravity_darkening.f90 \
+ private/history.f90 \
+ private/history_specs.f90 \
+ private/hydro_alpha_rti_eqns.f90 \
+ private/hydro_chem_eqns.f90 \
+ private/hydro_energy.f90 \
+ private/hydro_eqns.f90 \
+ private/hydro_momentum.f90 \
+ private/hydro_riemann.f90 \
+ private/hydro_rotation.f90 \
+ private/hydro_rsp2.f90 \
+ private/hydro_rsp2_support.f90 \
+ private/hydro_temperature.f90 \
+ private/hydro_vars.f90 \
+ private/init.f90 \
+ private/init_model.f90 \
+ private/ionization_potentials.f90 \
+ private/kap_support.f90 \
+ private/magnetic_diffusion.f90 \
+ private/mass_utils.f90 \
+ private/mesh_adjust.f90 \
+ private/mesh_functions.f90 \
+ private/mesh_plan.f90 \
+ private/micro.f90 \
+ private/mix_info.f90 \
+ private/mod_typical_charge.f90 \
+ private/net.f90 \
+ private/neu.f90 \
+ private/overshoot.f90 \
+ private/overshoot_exp.f90 \
+ private/overshoot_step.f90 \
+ private/overshoot_utils.f90 \
+ private/paquette_coeffs.f90 \
+ private/phase_separation.f90 \
+ private/photo_in.f90 \
+ private/photo_out.f90 \
+ private/pre_ms_model.f90 \
+ private/predictive_mix.f90 \
+ private/profile.f90 \
+ private/profile_getval.f90 \
+ private/pulse.f90 \
+ private/pulse_cafein.f90 \
+ private/pulse_fgong.f90 \
+ private/pulse_gr1d.f90 \
+ private/pulse_gsm.f90 \
+ private/pulse_gyre.f90 \
+ private/pulse_osc.f90 \
+ private/pulse_saio.f90 \
+ private/pulse_utils.f90 \
+ private/read_model.f90 \
+ private/relax.f90 \
+ private/remove_shells.f90 \
+ private/report.f90 \
+ private/rotation_mix_info.f90 \
+ private/rsp.f90 \
+ private/rsp_build.f90 \
+ private/rsp_def.f90 \
+ private/rsp_eval_eos_and_kap.f90 \
+ private/rsp_lina.f90 \
+ private/rsp_relax_env.f90 \
+ private/rsp_step.f90 \
+ job/run_star_support.f90 \
+ private/set_flags.f90 \
+ private/solve_omega_mix.f90 \
+ private/solver_support.f90 \
+ private/star_bcyclic.f90 \
+ private/star_history_def.f90 \
+ private/star_job_ctrls_io.f90 \
+ private/star_private_def.f90 \
+ private/star_profile_def.f90 \
+ private/star_solver.f90 \
+ private/star_utils.f90 \
+ private/starspots.f90 \
+ private/struct_burn_mix.f90 \
+ private/timestep.f90 \
+ private/turb_info.f90 \
+ private/turb_support.f90 \
+ private/winds.f90 \
+ private/write_model.f90 \
+ public/star_def.f90 \
+ public/star_lib.f90 \
+ job/run_star.f90
+
+ifeq ($(WITH_PGSTAR),yes)
+SRCS += \
+ other/pgstar_decorator.f90 \
+ private/pgstar_ctrls_io.f90 \
+ private/pgstar_colors.f90 \
+ private/pgstar_support.f90 \
+ private/pgstar_hist_track.f90 \
+ private/pgstar_kipp.f90 \
+ private/pgstar_dpg_dnu.f90 \
+ private/pgstar_trho.f90 \
+ private/pgstar_tmaxrho.f90 \
+ private/pgstar_hr.f90 \
+ private/pgstar_r_l.f90 \
+ private/pgstar_r_teff.f90 \
+ private/pgstar_l_teff.f90 \
+ private/pgstar_l_r.f90 \
+ private/pgstar_l_v.f90 \
+ private/pgstar_logl_teff.f90 \
+ private/pgstar_logl_r.f90 \
+ private/pgstar_logl_v.f90 \
+ private/pgstar_logg_teff.f90 \
+ private/pgstar_logg_logt.f90 \
+ private/pgstar_history_panels.f90 \
+ private/pgstar_trho_profile.f90 \
+ private/pgstar_mode_prop.f90 \
+ private/pgstar_power.f90 \
+ private/pgstar_production.f90 \
+ private/pgstar_abundance.f90 \
+ private/pgstar_dynamo.f90 \
+ private/pgstar_mixing_ds.f90 \
+ private/pgstar_summary_burn.f90 \
+ private/pgstar_summary_profile.f90 \
+ private/pgstar_summary_history.f90 \
+ private/pgstar_summary.f90 \
+ private/pgstar_color_magnitude.f90 \
+ private/pgstar_profile_panels.f90 \
+ private/pgstar_grid.f90 \
+ private/pgstar_network.f90 \
+ other/sample_pgstar_plot.f90 \
+ private/pgstar_full.f90
+EXTERNAL_DEPENDS_ON := pgplot
+else
+SRCS += private/pgstar_stub.f90
+EXTERNAL_DEPENDS_ON :=
+endif
+
+SRCS_CHECK = test/src/run.f90 test/src/run_star_extras.f90
+INTERNAL_DEPENDS_ON := const utils math mtx neu num colors kap eos rates net chem interp_1d interp_2d star_data ionization atm turb auto_diff forum
+BINTYPE := static-lib
+INCLUDE_DIRS := -Iprivate -Ipublic -Idefaults -Ijob
+CHECK_FILTER_PROG := grep 'stop because star_age >= max_age'
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := star_lib.mod \
+ star_def.mod \
+ run_star.mod \
+ run_star_support.mod \
+ other_extras.mod \
+ pgstar.mod \
+ pulse.mod
+
+ifeq ($(WITH_PGSTAR),yes)
+MODULES += pgstar_abundance.mod \
+ pgstar_color_magnitude.mod \
+ pgstar_colors.mod \
+ pgstar_ctrls_io.mod \
+ pgstar_decorator.mod \
+ pgstar_dpg_dnu.mod \
+ pgstar_dynamo.mod \
+ pgstar_grid.mod \
+ pgstar_history_panels.mod \
+ pgstar_hist_track.mod \
+ pgstar_hr.mod \
+ pgstar_kipp.mod \
+ pgstar_logg_logt.mod \
+ pgstar_logg_teff.mod \
+ pgstar_logl_r.mod \
+ pgstar_logl_teff.mod \
+ pgstar_logl_v.mod \
+ pgstar_l_r.mod \
+ pgstar_l_teff.mod \
+ pgstar_l_v.mod \
+ pgstar_mixing_ds.mod \
+ pgstar_mode_prop.mod \
+ pgstar_network.mod \
+ pgstar_power.mod \
+ pgstar_production.mod \
+ pgstar_profile_panels.mod \
+ pgstar_r_l.mod \
+ pgstar_r_teff.mod \
+ pgstar_summary_burn.mod \
+ pgstar_summary_history.mod \
+ pgstar_summary.mod \
+ pgstar_summary_profile.mod \
+ pgstar_support.mod \
+ pgstar_tmaxrho.mod \
+ pgstar_trho.mod \
+ pgstar_trho_profile.mod
+endif
+
+INSTALL_INCLUDES := \
+ job/gyre_in_mesa_extras_finish_step.inc \
+ job/gyre_in_mesa_extras_set_velocities.inc \
+ job/multi_stars_extras_def.inc \
+ job/multi_stars_extras.inc \
+ job/standard_run_star_extras.inc \
+ job/test_suite_extras_def.inc \
+ job/test_suite_extras.inc \
+ job/standard_run_star_extras.dek \
+
+include $(MAKE_DIR)/Makefile
diff --git a/star/build_and_test b/star/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/star/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/star/build_and_test_parallel b/star/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/star/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/star/clean b/star/clean
deleted file mode 100755
index 1de3a7b2e..000000000
--- a/star/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd test; ./cleanup
-cd ../test_suite; ./each_test_clean >& /dev/null
diff --git a/star/cpv b/star/cpv
deleted file mode 100755
index d93992d19..000000000
--- a/star/cpv
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-cd ../star_data
-./cpv $1
-cd ../star
-if [ -d defaults_$1 ]
-then
- echo defaults_$1 "already exists, so abort cpv"
-else
- mkdir defaults_$1
- cp defaults/* defaults_$1
- mkdir job_$1
- cp job/* job_$1
- mkdir other_$1
- cp other/* other_$1
- mkdir private_$1
- cp private/* private_$1
- mkdir public_$1
- cp public/* public_$1
- cp make/makefile make/makefile_$1
- cp make/makefile_base make/makefile_base_$1
- echo star $1
-fi
diff --git a/star/defaults/pgstar.README b/star/defaults/pgstar.README
index 95758cc0d..f3ce04491 100644
--- a/star/defaults/pgstar.README
+++ b/star/defaults/pgstar.README
@@ -144,7 +144,7 @@ Hands-on Tutorial
Go to the directory, mesa/star/test_suite/1M_pre_ms_to_wd, and open
"inlist_1.0" in your text editor. Set pgstar_flag = .true. and
check the &pgstar section to make sure it starts empty.
- Then do the usual ./mk and ./rn to start the test case.
+ Then do the usual ./rn to start the test case.
First, open some plot windows and take a look at what's available.
Just edit your pgstar inlist to set the "win_flag" for the plot;
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/Makefile b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/clean b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/make/makefile b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/mk b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/re b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/re
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/rn1 b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/rn1
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/Makefile b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/clean b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/make/makefile b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/mk b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/re b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/re
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/rn1 b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/rn1
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/Makefile b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/clean b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/make/makefile b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/mk b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/re b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/re
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/rn1 b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/rn1
+++ b/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_BEP/Makefile b/star/dev_cases_star_to_RSP2/dev_BEP/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_BEP/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_BEP/clean b/star/dev_cases_star_to_RSP2/dev_BEP/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BEP/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_BEP/make/makefile b/star/dev_cases_star_to_RSP2/dev_BEP/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BEP/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_star_to_RSP2/dev_BEP/mk b/star/dev_cases_star_to_RSP2/dev_BEP/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BEP/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_BEP/re b/star/dev_cases_star_to_RSP2/dev_BEP/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_BEP/re
+++ b/star/dev_cases_star_to_RSP2/dev_BEP/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_BEP/rn1 b/star/dev_cases_star_to_RSP2/dev_BEP/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_BEP/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_BEP/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_BLAP/Makefile b/star/dev_cases_star_to_RSP2/dev_BLAP/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_BLAP/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_BLAP/clean b/star/dev_cases_star_to_RSP2/dev_BLAP/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BLAP/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_BLAP/make/makefile b/star/dev_cases_star_to_RSP2/dev_BLAP/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BLAP/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_star_to_RSP2/dev_BLAP/mk b/star/dev_cases_star_to_RSP2/dev_BLAP/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BLAP/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_BLAP/re b/star/dev_cases_star_to_RSP2/dev_BLAP/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_BLAP/re
+++ b/star/dev_cases_star_to_RSP2/dev_BLAP/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_BLAP/rn1 b/star/dev_cases_star_to_RSP2/dev_BLAP/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_BLAP/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_BLAP/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_BW_Vul/Makefile b/star/dev_cases_star_to_RSP2/dev_BW_Vul/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_BW_Vul/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_BW_Vul/clean b/star/dev_cases_star_to_RSP2/dev_BW_Vul/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_BW_Vul/make/makefile b/star/dev_cases_star_to_RSP2/dev_BW_Vul/make/makefile
deleted file mode 100644
index c4867207c..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/make/makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-
-MESA_DIR = ../../../..
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA) -lgyre
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/dev_cases_star_to_RSP2/dev_BW_Vul/mk b/star/dev_cases_star_to_RSP2/dev_BW_Vul/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_BW_Vul/re b/star/dev_cases_star_to_RSP2/dev_BW_Vul/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/re
+++ b/star/dev_cases_star_to_RSP2/dev_BW_Vul/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_BW_Vul/rn1 b/star/dev_cases_star_to_RSP2/dev_BW_Vul/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_BW_Vul/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_BW_Vul/src/run_star_extras.f90 b/star/dev_cases_star_to_RSP2/dev_BW_Vul/src/run_star_extras.f90
index 28be71560..7f5e4d349 100644
--- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/src/run_star_extras.f90
+++ b/star/dev_cases_star_to_RSP2/dev_BW_Vul/src/run_star_extras.f90
@@ -171,7 +171,7 @@ subroutine extras_startup(id, restart, ierr)
call gyre_set_constant('M_SUN', Msun)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
- call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
else
call gyre_linear_analysis_and_set_velocities(s,restart,ierr)
end if
@@ -219,7 +219,7 @@ subroutine gyre_linear_analysis_and_set_velocities(s,restart,ierr)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
- call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
mode_l = 0 ! mode l (e.g. 0 for p modes, 1 for g modes)
! should match gyre.in mode l
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid/Makefile b/star/dev_cases_star_to_RSP2/dev_Cepheid/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid/clean b/star/dev_cases_star_to_RSP2/dev_Cepheid/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid/make/makefile b/star/dev_cases_star_to_RSP2/dev_Cepheid/make/makefile
deleted file mode 100644
index c4867207c..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid/make/makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-
-MESA_DIR = ../../../..
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA) -lgyre
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid/mk b/star/dev_cases_star_to_RSP2/dev_Cepheid/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid/re b/star/dev_cases_star_to_RSP2/dev_Cepheid/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid/re
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid/rn1 b/star/dev_cases_star_to_RSP2/dev_Cepheid/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid/src/run_star_extras.f90 b/star/dev_cases_star_to_RSP2/dev_Cepheid/src/run_star_extras.f90
index f27913b2f..1dceda703 100644
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid/src/run_star_extras.f90
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid/src/run_star_extras.f90
@@ -194,7 +194,7 @@ subroutine extras_startup(id, restart, ierr)
call gyre_set_constant('M_SUN', Msun)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
- call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
else
call gyre_linear_analysis_and_set_velocities(s,restart,ierr)
end if
@@ -548,7 +548,7 @@ subroutine gyre_linear_analysis_and_set_velocities(s,restart,ierr)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
- call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
mode_l = 0 ! mode l (e.g. 0 for p modes, 1 for g modes)
! should match gyre.in mode l
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/Makefile b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/clean b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/make/makefile b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/make/makefile
deleted file mode 100644
index c4867207c..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/make/makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-
-MESA_DIR = ../../../..
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA) -lgyre
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/mk b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/re b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/re
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/rn1 b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/Makefile b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/clean b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/make/makefile b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/make/makefile
deleted file mode 100644
index c4867207c..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/make/makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-
-MESA_DIR = ../../../..
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA) -lgyre
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/mk b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/re b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/re
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/rn1 b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/Makefile b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/clean b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/make/makefile b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/mk b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/re b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/re
+++ b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/rn1 b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Mira/Makefile b/star/dev_cases_star_to_RSP2/dev_Mira/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_Mira/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_Mira/clean b/star/dev_cases_star_to_RSP2/dev_Mira/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Mira/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_Mira/make/makefile b/star/dev_cases_star_to_RSP2/dev_Mira/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Mira/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_star_to_RSP2/dev_Mira/mk b/star/dev_cases_star_to_RSP2/dev_Mira/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Mira/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_Mira/re b/star/dev_cases_star_to_RSP2/dev_Mira/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_Mira/re
+++ b/star/dev_cases_star_to_RSP2/dev_Mira/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Mira/rn1 b/star/dev_cases_star_to_RSP2/dev_Mira/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_Mira/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_Mira/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/Makefile b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/clean b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/make/makefile b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/mk b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/re b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/re
+++ b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/rn1 b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_RSG/Makefile b/star/dev_cases_star_to_RSP2/dev_RSG/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_RSG/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_RSG/clean b/star/dev_cases_star_to_RSP2/dev_RSG/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_RSG/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_RSG/make/makefile b/star/dev_cases_star_to_RSP2/dev_RSG/make/makefile
deleted file mode 100644
index c4867207c..000000000
--- a/star/dev_cases_star_to_RSP2/dev_RSG/make/makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-
-MESA_DIR = ../../../..
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA) -lgyre
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/dev_cases_star_to_RSP2/dev_RSG/mk b/star/dev_cases_star_to_RSP2/dev_RSG/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_RSG/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_RSG/re b/star/dev_cases_star_to_RSP2/dev_RSG/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_RSG/re
+++ b/star/dev_cases_star_to_RSP2/dev_RSG/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_RSG/rn1 b/star/dev_cases_star_to_RSP2/dev_RSG/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_RSG/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_RSG/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/Makefile b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/clean b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/make/makefile b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/mk b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/re b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/re
+++ b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/rn1 b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/Makefile b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/clean b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/make/makefile b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/mk b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/re b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/re
+++ b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/rn1 b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/rn1
+++ b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BEP/Makefile b/star/dev_cases_test_RSP2/dev_rsp2_BEP/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_RSP2/dev_rsp2_BEP/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BEP/clean b/star/dev_cases_test_RSP2/dev_rsp2_BEP/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_BEP/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BEP/make/makefile b/star/dev_cases_test_RSP2/dev_rsp2_BEP/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_BEP/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BEP/mk b/star/dev_cases_test_RSP2/dev_rsp2_BEP/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_BEP/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BEP/re b/star/dev_cases_test_RSP2/dev_rsp2_BEP/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_BEP/re
+++ b/star/dev_cases_test_RSP2/dev_rsp2_BEP/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BEP/rn1 b/star/dev_cases_test_RSP2/dev_rsp2_BEP/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_BEP/rn1
+++ b/star/dev_cases_test_RSP2/dev_rsp2_BEP/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/Makefile b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/clean b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/make/makefile b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/mk b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/re b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/re
+++ b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/rn1 b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/rn1
+++ b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/Makefile b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/clean b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/make/makefile b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/mk b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/re b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/re
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/rn1 b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/rn1
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/Makefile b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/clean b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/make/makefile b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/mk b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/re b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/re
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/rn1 b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/rn1
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/Makefile b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/clean b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/make/makefile b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/mk b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/re b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/re
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/rn1 b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/rn1
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/Makefile b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/clean b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/make/makefile b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/mk b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/re b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/re
+++ b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/rn1 b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/rn1
+++ b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/Makefile b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/clean b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/make/makefile b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/mk b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/re b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/re
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/rn1 b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/rn1
+++ b/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/Makefile b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/clean b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/make/makefile b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/mk b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/re b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/re
+++ b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/rn1 b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/rn1
+++ b/star/dev_cases_test_TDC/dev_TDC_he_core_flash/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/Makefile b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/clean b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/make/makefile b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/mk b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/re b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/re
index 7fd60020a..7093783a3 100755
--- a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/re
+++ b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/rn1 b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/rn1
+++ b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/Makefile b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/clean b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/make/makefile b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/mk b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/re b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/re
+++ b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/rn1 b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/rn1
+++ b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/src/run_star_extras.f90 b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/src/run_star_extras.f90
index b8b6b8dd7..8bcc47d83 100644
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/src/run_star_extras.f90
+++ b/star/dev_cases_test_TDC/dev_TDC_to_cc_12/src/run_star_extras.f90
@@ -23,7 +23,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
- use gyre_lib
+ use gyre_mesa_m
implicit none
@@ -131,8 +131,7 @@ subroutine extras_startup(id, restart, ierr)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
- call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
-
+ call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/Makefile b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/clean b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/make/makefile b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/mk b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/re b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/re
+++ b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/rn1 b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/rn1
+++ b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/src/run_star_extras.f90 b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/src/run_star_extras.f90
index b8b6b8dd7..8bcc47d83 100644
--- a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/src/run_star_extras.f90
+++ b/star/dev_cases_test_TDC/dev_TDC_to_cc_80/src/run_star_extras.f90
@@ -23,7 +23,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
- use gyre_lib
+ use gyre_mesa_m
implicit none
@@ -131,8 +131,7 @@ subroutine extras_startup(id, restart, ierr)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
- call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
-
+ call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/Makefile b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/clean b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/make/makefile b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/mk b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/re b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/re
+++ b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/rn1 b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/rn1
+++ b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/src/run_star_extras.f90 b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/src/run_star_extras.f90
index b8b6b8dd7..8bcc47d83 100644
--- a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/src/run_star_extras.f90
+++ b/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/src/run_star_extras.f90
@@ -23,7 +23,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
- use gyre_lib
+ use gyre_mesa_m
implicit none
@@ -131,8 +131,7 @@ subroutine extras_startup(id, restart, ierr)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
- call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
-
+ call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/Makefile b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/clean b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/make/makefile b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/mk b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/re b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/re
+++ b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/rn1 b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/rn1
+++ b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/src/run_star_extras.f90 b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/src/run_star_extras.f90
index b8b6b8dd7..8bcc47d83 100644
--- a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/src/run_star_extras.f90
+++ b/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/src/run_star_extras.f90
@@ -23,7 +23,7 @@ module run_star_extras
use star_def
use const_def
use math_lib
- use gyre_lib
+ use gyre_mesa_m
implicit none
@@ -131,8 +131,7 @@ subroutine extras_startup(id, restart, ierr)
call gyre_set_constant('R_SUN', Rsun)
call gyre_set_constant('L_SUN', Lsun)
- call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
-
+ call gyre_set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/Makefile b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/clean b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/make/makefile b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/mk b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/re b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/re
index e3f36a106..7093783a3 100755
--- a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/re
+++ b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/rn1 b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/rn1
+++ b/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/export b/star/export
deleted file mode 100755
index 91c636fe6..000000000
--- a/star/export
+++ /dev/null
@@ -1,4 +0,0 @@
-
-../utils/e1
-
-
diff --git a/star/i1 b/star/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/star/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/star/i1p b/star/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/star/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/star/job/gyre_in_mesa_extras_set_velocities.inc b/star/job/gyre_in_mesa_extras_set_velocities.inc
index e2d2a702f..058a3be56 100644
--- a/star/job/gyre_in_mesa_extras_set_velocities.inc
+++ b/star/job/gyre_in_mesa_extras_set_velocities.inc
@@ -52,7 +52,7 @@
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
mode_l = 0 ! mode l (e.g. 0 for p modes, 1 for g modes)
! should match gyre.in mode l
diff --git a/star/job/other_extras.f90 b/star/job/other_extras.f90
index 467d47d7e..88f4698d3 100644
--- a/star/job/other_extras.f90
+++ b/star/job/other_extras.f90
@@ -191,7 +191,7 @@ subroutine warn_run_star_extras(warn, routine)
write(*,*) "See $MESA_DIR/star/job/standard_run_star_extras.inc for the standard example."
write(*,'(A)')
write(*,*) "This error can also occur if you switched MESA versions without recompiling."
- write(*,*) "Do a ./clean and ./mk in your work directory to get recompiled."
+ write(*,*) "Do a make clean in your work directory to get recompiled."
write(*,'(A)')
write(*,*) "To disable this warning set"
write(*,*) " warn_run_star_extras = .false."
diff --git a/star/make/makefile b/star/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/star/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/star/make/makefile_base b/star/make/makefile_base
deleted file mode 100644
index b8701709d..000000000
--- a/star/make/makefile_base
+++ /dev/null
@@ -1,425 +0,0 @@
-# This is the makefile for the mesa star package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCE FILES
-
-ifeq ($(USE_PGSTAR),YES)
- PGSTAR_SRCS = \
- pgstar_decorator.f90 \
- pgstar_ctrls_io.f90 \
- pgstar_support.f90 \
- pgstar_colors.f90 \
- pgstar_hist_track.f90 \
- pgstar_kipp.f90 \
- pgstar_dpg_dnu.f90 \
- pgstar_trho.f90 \
- pgstar_tmaxrho.f90 \
- pgstar_hr.f90 \
- pgstar_r_l.f90 \
- pgstar_r_teff.f90 \
- pgstar_l_teff.f90 \
- pgstar_l_r.f90 \
- pgstar_l_v.f90 \
- pgstar_logl_teff.f90 \
- pgstar_logl_r.f90 \
- pgstar_logl_v.f90 \
- pgstar_logg_teff.f90 \
- pgstar_logg_logt.f90 \
- pgstar_history_panels.f90 \
- pgstar_trho_profile.f90 \
- pgstar_mode_prop.f90 \
- pgstar_power.f90 \
- pgstar_production.f90 \
- pgstar_abundance.f90 \
- pgstar_dynamo.f90 \
- pgstar_mixing_ds.f90 \
- pgstar_summary_burn.f90 \
- pgstar_summary_profile.f90 \
- pgstar_summary_history.f90 \
- pgstar_summary.f90 \
- pgstar_color_magnitude.f90 \
- pgstar_profile_panels.f90 \
- pgstar_grid.f90 \
- pgstar_network.f90 \
- sample_pgstar_plot.f90 \
- pgstar.f90
- ifneq ($(MAKECMDGOALS),clean)
- $(shell ln -sf $(MOD_PRIVATE_DIR)/pgstar_full.f90 pgstar.f90)
- endif
-else
- PGSTAR_SRCS = pgstar.f90 pgstar_decorator.f90
- ifneq ($(MAKECMDGOALS),clean)
- $(shell ln -sf $(MOD_PRIVATE_DIR)/pgstar_stub.f90 pgstar.f90)
- endif
-endif
-
-SRCS = \
- star_def.f90 \
- star_profile_def.f90 \
- star_history_def.f90 \
- star_private_def.f90 \
- other_extras.f90 \
- other_d_mix.f90 \
- other_alpha_mlt.f90 \
- other_am_mixing.f90 \
- other_wind.f90 \
- other_accreting_state.f90 \
- other_adjust_mdot.f90 \
- other_j_for_adjust_j_lost.f90 \
- other_brunt.f90 \
- other_brunt_smoothing.f90 \
- other_build_initial_model.f90 \
- other_torque.f90 \
- other_torque_implicit.f90 \
- other_pressure.f90 \
- other_energy.f90 \
- other_energy_implicit.f90 \
- other_cgrav.f90 \
- other_opacity_factor.f90 \
- other_adjust_mlt_gradt_fraction.f90 \
- other_after_set_mixing_info.f90 \
- other_after_solver_setmatrix.f90 \
- other_mlt_results.f90 \
- other_neu.f90 \
- other_net_get.f90 \
- other_diffusion_coefficients.f90 \
- other_diffusion.f90 \
- other_diffusion_factor.f90 \
- other_kap.f90 \
- other_eps_grav.f90 \
- other_overshooting_scheme.f90 \
- other_remove_surface.f90 \
- other_rsp_build_model.f90 \
- other_rsp_linear_analysis.f90 \
- other_gradr_factor.f90 \
- other_momentum_implicit.f90 \
- other_momentum.f90 \
- other_pgstar_plots.f90 \
- other_mesh_functions.f90 \
- other_mesh_delta_coeff_factor.f90 \
- other_surface_pt.f90 \
- other_solver_monitor.f90 \
- other_photo_write.f90 \
- other_photo_read.f90 \
- other_set_pgstar_controls.f90 \
- other_astero_freq_corr.f90 \
- other_eval_fp_ft.f90 \
- other_eval_i_rot.f90 \
- other_timestep_limit.f90 \
- other_screening.f90 \
- other_rate_get.f90 \
- other_net_derivs.f90 \
- other_split_burn.f90 \
- other_close_gaps.f90 \
- star_utils.f90 \
- ctrls_io.f90 \
- alloc.f90 \
- auto_diff_support.f90 \
- predictive_mix.f90 \
- conv_premix.f90 \
- overshoot.f90 \
- overshoot_utils.f90 \
- overshoot_exp.f90 \
- overshoot_step.f90 \
- turb_support.f90 \
- turb_info.f90 \
- magnetic_diffusion.f90 \
- rotation_mix_info.f90 \
- mix_info.f90 \
- kap_support.f90 \
- eos_support.f90 \
- atm_support.f90 \
- net.f90 \
- neu.f90 \
- micro.f90 \
- hydro_rotation.f90 \
- brunt.f90 \
- hydro_riemann.f90 \
- hydro_vars.f90 \
- report.f90 \
- rsp_eval_eos_and_kap.f90 \
- rsp_def.f90 \
- rsp_step.f90 \
- rsp_relax_env.f90 \
- rsp_lina.f90 \
- rsp_build.f90 \
- rsp.f90 \
- read_model.f90 \
- write_model.f90 \
- photo_in.f90 \
- photo_out.f90 \
- pulse.f90 \
- pulse_cafein.f90 \
- pulse_fgong.f90 \
- pulse_osc.f90 \
- pulse_gyre.f90 \
- pulse_gsm.f90 \
- pulse_saio.f90 \
- pulse_gr1d.f90 \
- pulse_utils.f90 \
- ionization_potentials.f90 \
- mod_typical_charge.f90 \
- profile_getval.f90 \
- profile.f90 \
- mesh_functions.f90 \
- mesh_plan.f90 \
- mesh_adjust.f90 \
- eps_grav.f90 \
- hydro_chem_eqns.f90 \
- hydro_alpha_rti_eqns.f90 \
- hydro_energy.f90 \
- hydro_momentum.f90 \
- hydro_temperature.f90 \
- hydro_rsp2.f90 \
- hydro_rsp2_support.f90 \
- hydro_eqns.f90 \
- solve_omega_mix.f90 \
- history_specs.f90 \
- history.f90 \
- $(PGSTAR_SRCS) \
- timestep.f90 \
- do_one_utils.f90 \
- adjust_xyz.f90 \
- adjust_net.f90 \
- adjust_mass.f90 \
- adjust_mesh_split_merge.f90 \
- adjust_mesh_support.f90 \
- adjust_mesh.f90 \
- paquette_coeffs.f90 \
- diffusion_support.f90 \
- diffusion_procs.f90 \
- diffusion.f90 \
- element_diffusion.f90 \
- phase_separation.f90 \
- evolve_support.f90 \
- star_bcyclic.f90 \
- solver_support.f90 \
- star_solver.f90 \
- struct_burn_mix.f90 \
- winds.f90 \
- starspots.f90 \
- gravity_darkening.f90 \
- mass_utils.f90 \
- eps_mdot.f90 \
- evolve.f90 \
- relax.f90 \
- set_flags.f90 \
- create_initial_model.f90 \
- pre_ms_model.f90 \
- init_model.f90 \
- remove_shells.f90 \
- init.f90 \
- star_job_ctrls_io.f90 \
- star_lib.f90 \
- run_star_support.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MESA_STAR_SUPPORT)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR_SUPPORT)
-
-ifeq ($(USE_PGSTAR), YES)
- LOAD_OTHER += $(LOAD_PGPLOT)
-endif
-
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libstar.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.f90 *.o *.mod *.smod *genmod.f90 *.so *.a .depend .order
-
-install:
- @$(CP_IF_NEWER) pgstar*.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) star_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) star_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) run_star_support.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) other_extras.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) pulse.mod $(MESA_DIR)/include
-
-ifneq (,$(findstring ifort,$(FC)))
- @$(CP_IF_NEWER) overshoot_utils.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) auto_diff_support.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) star_private_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) star_utils.mod $(MESA_DIR)/include
-endif
- @$(CP_IF_NEWER) ../job/*.inc $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../job/*.dek $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-#################################################################
-#
-# COMPILATION RULES
-
-MOD_DEFAULTS_DIR = $(MODULE_DIR)/defaults
-MOD_JOB_DIR = $(MODULE_DIR)/job
-MOD_OTHER_DIR = $(MODULE_DIR)/other
-
-INCLUDE_DEFAULTS = -I$(MOD_DEFAULTS_DIR)
-INCLUDE_JOB = -I$(MOD_JOB_DIR)
-INCLUDE_OTHER = -I$(MOD_OTHER_DIR)
-
-STAR_INCLUDES = \
- $(INCLUDE_DEFAULTS) $(INCLUDE_JOB) $(INCLUDE_OTHER)
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree) $(STAR_INCLUDES)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree) $(STAR_INCLUDES)
-
-#COMPILE = $(COMPILE_NO_OPENMP_NO_OPT) $(FCfree) $(STAR_INCLUDES)
-#COMPILE = $(COMPILE_TO_TEST) $(FCfree) $(FCwarn_unused) $(STAR_INCLUDES)
-#COMPILE = $(COMPILE_FAST) $(FCfree) -g $(STAR_INCLUDES)
-
-COMPILE_XTRA = $(COMPILE_BASIC) $(FCopt) $(FCfixed) -c
-
-STAR_COMPILE_BASIC = $(COMPILE_BASIC) $(FCfree) $(STAR_INCLUDES) -c -O${OPT_LEVEL}
-
-COMPILE_CMD = $(COMPILE)
-
-COMPILE_LEGACY = $(filter-out -std=f2008, $(COMPILE))
-
-star_def.o star_lib.o ctrls_io.o star_job_ctrls_io.o : %.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE $<
- @$(COMPILE) $<
-else
- $(COMPILE) $<
-endif
-
-se_support_full.o se_support_stub.o report.o profile.o : %.o : %.f90
-ifneq ($(QUIET),)
- @echo STAR_COMPILE_BASIC $<
- @$(STAR_COMPILE_BASIC) $<
-else
- $(STAR_COMPILE_BASIC) $<
-endif
-
-############################################################################################
-
-# NOTE: fixed format must have .f and free format must have .f90
-
-# comments from Rich:
-
-# Free source form was introduced in Fortran 90,
-# hence the .f90 extension convention
-# (which in retrospect was a bad choice, but we're stuck with it).
-# In our build system, we pass flags to the compiler explicitly
-# telling it that .f files should be compiled as fixed-form,
-# and .f90 files as free-form. Trying to compile a free-form file
-# as a fixed-form file, or vice versa, will lead to syntax errors.
-# We also use the makedepf90 dependency tool, which determines
-# which modules are 'use'd in a given source file. A mixed-up file
-# extension will usually lead to incorrect dependency generation,
-# which can then in turn produce weird make errors.
-
-############################################################################################
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-# Paths to search for source & include files
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR):$(MOD_JOB_DIR):$(MOD_OTHER_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.inc $(SRC_PATH)
-vpath %.defaults $(MOD_DEFAULTS_DIR)
-
-vpath %.mod $(MESA_DIR)/include
-
-# Automatic dependency generation using makedepf90. If full
-# dependencies are required, set FULLDEPS to the value 'yes';
-# otherwise, order-only dependencies will be generated. Note that
-# the default value given below can be overridden from the command
-# line and/or the shell environment; this provides a simple way
-# to turn off full dependencies without editing this file
-
-FULLDEPS ?= yes
-
-# Turning off FULLDEPS makes Bill happy because eliminates unnecessary extra compiles
-# but beware; here are comments from Rich:
-#
-# Generally speaking, we *DON'T* want to make the order-only checking the default,
-# because then a modification to a module which changes its public interface
-# would not trigger a rebuild of all the modules which depend on it.
-# Bad things would result.
-#
-# However, for when one is playing around with internals, in a way that doesn't
-# affect public interfaces, it can be a time-saving measure to use order-only checking.
-
-# reminders for Bill: the name of the file must be the same as the name of the module
- # and no upper case letters in filenames.
- # use COMPILE_LEGACY for old files that do not comply with f2008 standards.
- # use .f for fixed format, .f90 for free
-
-ifeq ($(filter clean,$(MAKECMDGOALS)),)
-
- DEPEND_DIRS = .:$(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR):$(MOD_DEFAULTS_DIR):$(MOD_JOB_DIR):$(MOD_OTHER_DIR)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(DEPEND_DIRS) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(DEPEND_DIRS) $(SRCS) > .depend
- endif
-
- .order : .depend
- @sed -e 's/:/:|/g' .depend > .order
-
- ifeq ($(FULLDEPS),yes)
- -include .depend
- else
- -include .order
- endif
-
-endif
diff --git a/star/mk b/star/mk
deleted file mode 100755
index e98ec1713..000000000
--- a/star/mk
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-cd make; make
diff --git a/star/other/README b/star/other/README
index 948d1af44..9767cc39d 100644
--- a/star/other/README
+++ b/star/other/README
@@ -5,8 +5,8 @@ physical and numerical aspects of MESA.
In your working copy of run_star_extras, replace
include 'standard_run_star_extras.inc'
-by the contents of the included file from star/job or mesa/include
-In your work directory, do ./mk and ./rn to check that it is okay.
+by the contents of the included file from star/job or mesa/include.
+In your work directory, do ./rn to check that it is okay.
Do not make any edits to any of the files in star/job or mesa/include,
or to the files in star/other. You do all of this in your private copy
diff --git a/star/private/do_one_utils.f90 b/star/private/do_one_utils.f90
index 5208b25c0..fc97a6924 100644
--- a/star/private/do_one_utils.f90
+++ b/star/private/do_one_utils.f90
@@ -744,17 +744,17 @@ integer function do_check_limits(id)
call mesa_error(__FILE__,__LINE__,'test do_one_utils')
end if
- if (s% fe_core_infall < s% fe_core_infall_limit .and. &
+ if (.not. s% RSP_flag .and. s% fe_core_infall < s% fe_core_infall_limit .and. &
s% fe_core_infall > 0.99d0*s% fe_core_infall_limit) &
write(*,1) 'nearing fe_core_infall limit', &
s% fe_core_infall, s% fe_core_infall_limit
- if (s% non_fe_core_infall < s% non_fe_core_infall_limit .and. &
+ if (.not. s% RSP_flag .and. s% non_fe_core_infall < s% non_fe_core_infall_limit .and. &
s% non_fe_core_infall > 0.99d0*s% non_fe_core_infall_limit) &
write(*,1) 'nearing non_fe_core_infall limit', &
s% non_fe_core_infall, s% non_fe_core_infall_limit
- if (s% non_fe_core_rebound > 0.99d0*s% non_fe_core_rebound_limit) &
+ if (.not. s% RSP_flag .and. s% non_fe_core_rebound > 0.99d0*s% non_fe_core_rebound_limit) &
write(*,1) 'nearing non_fe_core_rebound limit', &
s% non_fe_core_rebound, s% non_fe_core_rebound_limit
@@ -1098,7 +1098,7 @@ integer function do_check_limits(id)
call compare_to_target('R_center < center_R_lower_limit', &
s% R_center, s% center_R_lower_limit, t_center_R_lower_limit)
- else if (s% fe_core_infall > s% fe_core_infall_limit) then
+ else if (.not. s% RSP_flag .and. s% fe_core_infall > s% fe_core_infall_limit) then
if (abs(s% error_in_energy_conservation/s% total_energy_end) < &
s% hard_limit_for_rel_error_in_energy_conservation) then
do_check_limits = terminate
@@ -1112,11 +1112,11 @@ integer function do_check_limits(id)
s% model_number, s% error_in_energy_conservation/abs(s% total_energy_end)
end if
- else if (s% non_fe_core_infall > s% non_fe_core_infall_limit) then
+ else if (.not. s% RSP_flag .and. s% non_fe_core_infall > s% non_fe_core_infall_limit) then
call compare_to_target('non_fe_core_infall > non_fe_core_infall_limit', &
s% non_fe_core_infall, s% non_fe_core_infall_limit, t_non_fe_core_infall_limit)
- else if (s% non_fe_core_rebound > s% non_fe_core_rebound_limit) then
+ else if (.not. s% RSP_flag .and. s% non_fe_core_rebound > s% non_fe_core_rebound_limit) then
call compare_to_target('non_fe_core_rebound > non_fe_core_rebound_limit', &
s% non_fe_core_rebound, s% non_fe_core_rebound_limit, t_non_fe_core_rebound_limit)
diff --git a/star/private/evolve.f90 b/star/private/evolve.f90
index 39d56d4d7..f9f2c0be4 100644
--- a/star/private/evolve.f90
+++ b/star/private/evolve.f90
@@ -1272,7 +1272,11 @@ logical function okay_energy_conservation()
s% total_extra_heating = dt*dot_product(s% dm(1:nz), s% extra_heat(1:nz)%val)
- phase2_work = dt*(s% work_outward_at_surface - s% work_inward_at_center)
+ if (.not. s% RSP_flag) then
+ phase2_work = dt*(s% work_outward_at_surface - s% work_inward_at_center)
+ else
+ phase2_work = 0d0
+ endif
if (.not. s% RSP_flag) then
if (s% using_velocity_time_centering .and. &
@@ -1305,9 +1309,13 @@ logical function okay_energy_conservation()
total_energy_from_fixed_m_grav = 0
end if
- phase1_total_energy_from_mdot = &
- s% energy_change_from_do_adjust_mass_and_calculate_eps_mdot &
- + s% mdot_adiabatic_surface ! ??
+ if (.not. s% RSP_flag) then
+ phase1_total_energy_from_mdot = &
+ s% energy_change_from_do_adjust_mass_and_calculate_eps_mdot &
+ + s% mdot_adiabatic_surface ! ??
+ else
+ phase1_total_energy_from_mdot = 0
+ endif
phase1_sources_and_sinks = &
phase1_total_energy_from_mdot &
diff --git a/star/private/rsp.f90 b/star/private/rsp.f90
index f0df32cf3..3dbb49123 100644
--- a/star/private/rsp.f90
+++ b/star/private/rsp.f90
@@ -823,6 +823,8 @@ subroutine begin_calculation(s,restart,ierr)
ierr = 0
FIRST = 0
TT1 = 0.d0
+ EDE_start = 0.d0
+ ULL = 0.d0
EKMAX = -10.d50
EKMIN = -EKMAX
EKMAXL = EKMAX
@@ -972,10 +974,11 @@ subroutine check_cycle_completed(s,cycle_complete)
TET = s% time
cycle_complete = .false.
UN=s% v(1)
+ ! ULL is not set for the first model
+ if (s% model_number==1) return
if(UN>0.d0.and.ULL<=0.d0) then
RMIN=s% r(1)/SUNR
end if
- if (s% model_number==1) return
if (.not. s% RSP_have_set_velocities) return
if (s% r(1)/SUNR < s% RSP_min_max_R_for_periods) return
if (UN/s% csound(1) > VMAX) then
diff --git a/star/replace_v b/star/replace_v
deleted file mode 100755
index d2af4c82b..000000000
--- a/star/replace_v
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-cd ../star_data
-./replace_v $1
-cd ../star
-cp defaults_$1/* defaults/
-cp job_$1/* job/
-cp other_$1/* other/
-cp private_$1/* private/
-cp public_$1/* public/
-cp make/makefile_$1 make/makefile
-cp make/makefile_base_$1 make/makefile_base
-echo star $1
diff --git a/star/rsp2_utils/run_star_extras_rsp2.inc b/star/rsp2_utils/run_star_extras_rsp2.inc
index 992276a0a..d82230fcc 100644
--- a/star/rsp2_utils/run_star_extras_rsp2.inc
+++ b/star/rsp2_utils/run_star_extras_rsp2.inc
@@ -83,7 +83,7 @@
call set_constant('M_SUN', Msun)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
else
call gyre_in_mesa_extras_set_velocities(s,restart,ierr)
end if
diff --git a/star/test/ck b/star/test/ck
deleted file mode 100755
index ad15a2135..000000000
--- a/star/test/ck
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-rm -f restart_photo
-./star > log
-grep 'stop because star_age >= max_age' log > tmp.txt
-check_okay
-diff tmp.txt test_output
diff --git a/star/test/clean b/star/test/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test/cleanup b/star/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/star/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/star/test/export b/star/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/star/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/star/test/make/makefile b/star/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/star/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/star/test/make/makefile_base b/star/test/make/makefile_base
deleted file mode 100644
index e24264969..000000000
--- a/star/test/make/makefile_base
+++ /dev/null
@@ -1,84 +0,0 @@
-# This is the makefile for testing the mesa star package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = star
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = $(LIBS_MESA_STAR_SUPPORT)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR_SUPPORT) $(LOAD_SE)
-
-ifeq ($(USE_PGSTAR), YES)
- LOAD_OTHER += $(LOAD_PGPLOT)
-endif
-
-#################################################################
-#
-# TARGETS
-
-STAR = $(TEST_DIR)/star
-
-OBJS = $(STAR_WORK_OBJS) run.o
-
-$(STAR) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCbasic) $(FCopenmp) $(FCstatic) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCbasic) $(FCopenmp) $(FCstatic) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(STAR)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR):$(MESA_DIR)/star/job
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/star/test/mk b/star/test/mk
deleted file mode 100755
index 321b31705..000000000
--- a/star/test/mk
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make; check_okay
-
-cd ..
diff --git a/star/test/mkx b/star/test/mkx
deleted file mode 100755
index 5d0957b64..000000000
--- a/star/test/mkx
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make -j12; check_okay
-cd ../test/make; make; check_okay
-
-cd ..
-
-
-
-
-./export
diff --git a/star/test/re b/star/test/re
deleted file mode 100755
index e3f36a106..000000000
--- a/star/test/re
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-photo_directory=photos
-
-function most_recent_photo {
- ls -t "$photo_directory" | head -1
-}
-
-if [ $# -eq 0 ]
-then
- photo=$(most_recent_photo)
-else
- photo=$1
-fi
-
-if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
-then
- echo "specified photo does not exist"
- exit 1
-fi
-
-echo "restart from $photo"
-if ! cp "$photo_directory/$photo" restart_photo
-then
- echo "failed to copy photo"
- exit 1
-fi
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test/rn b/star/test/rn
deleted file mode 100755
index 25a1a7b16..000000000
--- a/star/test/rn
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-rm -f restart_photo
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test/src/run_star_extras.f90 b/star/test/src/run_star_extras.f90
index 08e61ded2..e2315cb9c 100644
--- a/star/test/src/run_star_extras.f90
+++ b/star/test/src/run_star_extras.f90
@@ -29,6 +29,6 @@ module run_star_extras
! these routines are called by the standard run_star
contains
- include '../../job/standard_run_star_extras.inc'
+ include 'standard_run_star_extras.inc'
end module run_star_extras
diff --git a/star/test_suite/1.3M_ms_high_Z/Makefile b/star/test_suite/1.3M_ms_high_Z/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/1.3M_ms_high_Z/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/1.3M_ms_high_Z/clean b/star/test_suite/1.3M_ms_high_Z/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/1.3M_ms_high_Z/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/1.3M_ms_high_Z/make/makefile b/star/test_suite/1.3M_ms_high_Z/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/1.3M_ms_high_Z/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/1.3M_ms_high_Z/mk b/star/test_suite/1.3M_ms_high_Z/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/1.3M_ms_high_Z/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/1.3M_ms_high_Z/re b/star/test_suite/1.3M_ms_high_Z/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/1.3M_ms_high_Z/re
+++ b/star/test_suite/1.3M_ms_high_Z/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1.3M_ms_high_Z/rn1 b/star/test_suite/1.3M_ms_high_Z/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/1.3M_ms_high_Z/rn1
+++ b/star/test_suite/1.3M_ms_high_Z/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1.4M_ms_op_mono/Makefile b/star/test_suite/1.4M_ms_op_mono/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/1.4M_ms_op_mono/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/1.4M_ms_op_mono/clean b/star/test_suite/1.4M_ms_op_mono/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/1.4M_ms_op_mono/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/1.4M_ms_op_mono/make/makefile b/star/test_suite/1.4M_ms_op_mono/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/1.4M_ms_op_mono/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/1.4M_ms_op_mono/mk b/star/test_suite/1.4M_ms_op_mono/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/1.4M_ms_op_mono/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/1.4M_ms_op_mono/re b/star/test_suite/1.4M_ms_op_mono/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/1.4M_ms_op_mono/re
+++ b/star/test_suite/1.4M_ms_op_mono/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1.4M_ms_op_mono/rn1 b/star/test_suite/1.4M_ms_op_mono/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/1.4M_ms_op_mono/rn1
+++ b/star/test_suite/1.4M_ms_op_mono/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1.5M_with_diffusion/Makefile b/star/test_suite/1.5M_with_diffusion/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/1.5M_with_diffusion/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/1.5M_with_diffusion/clean b/star/test_suite/1.5M_with_diffusion/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/1.5M_with_diffusion/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/1.5M_with_diffusion/make/makefile b/star/test_suite/1.5M_with_diffusion/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/1.5M_with_diffusion/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/1.5M_with_diffusion/mk b/star/test_suite/1.5M_with_diffusion/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/1.5M_with_diffusion/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/1.5M_with_diffusion/re b/star/test_suite/1.5M_with_diffusion/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/1.5M_with_diffusion/re
+++ b/star/test_suite/1.5M_with_diffusion/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1.5M_with_diffusion/rn1 b/star/test_suite/1.5M_with_diffusion/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/1.5M_with_diffusion/rn1
+++ b/star/test_suite/1.5M_with_diffusion/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/Makefile b/star/test_suite/12M_pre_ms_to_core_collapse/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/12M_pre_ms_to_core_collapse/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/clean b/star/test_suite/12M_pre_ms_to_core_collapse/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/12M_pre_ms_to_core_collapse/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/make/makefile b/star/test_suite/12M_pre_ms_to_core_collapse/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/12M_pre_ms_to_core_collapse/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/mk b/star/test_suite/12M_pre_ms_to_core_collapse/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/12M_pre_ms_to_core_collapse/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/re b/star/test_suite/12M_pre_ms_to_core_collapse/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/12M_pre_ms_to_core_collapse/re
+++ b/star/test_suite/12M_pre_ms_to_core_collapse/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/re_nomodfiles b/star/test_suite/12M_pre_ms_to_core_collapse/re_nomodfiles
deleted file mode 100755
index d447f6665..000000000
--- a/star/test_suite/12M_pre_ms_to_core_collapse/re_nomodfiles
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-#echo $#
-#echo $1
-#echo $2
-
-photo_directory=photos
-
-function most_recent_photo {
- ls -t "$photo_directory" | head -1
-}
-
-if [ "$#" -ne 2 ]
-then
- echo "must pass two arguments, photo string and inlist name"
- exit 1
-fi
-
-if [ $1 = "." ]
-then
- photo=$(most_recent_photo)
-else
- photo=$1
-fi
-
-if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
-then
- echo "specified photo does not exist"
- exit 1
-fi
-
-echo "restart from $photo"
-if ! cp "$photo_directory/$photo" restart_photo
-then
- echo "failed to copy photo"
- exit 1
-fi
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star $2
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/rn1 b/star/test_suite/12M_pre_ms_to_core_collapse/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/12M_pre_ms_to_core_collapse/rn1
+++ b/star/test_suite/12M_pre_ms_to_core_collapse/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/rn_all b/star/test_suite/12M_pre_ms_to_core_collapse/rn_all
deleted file mode 100755
index 03b39ce7c..000000000
--- a/star/test_suite/12M_pre_ms_to_core_collapse/rn_all
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-do_one inlist_make_late_pre_zams_header late_pre_zams.mod
-cp late_pre_zams.mod standard_late_pre_zams.mod
-
-do_one inlist_to_zams_header zams.mod
-cp zams.mod standard_zams.mod
-
-do_one inlist_to_end_core_he_burn_header after_core_he_burn.mod
-cp after_core_he_burn.mod standard_after_core_he_burn.mod
-
-do_one inlist_to_end_core_c_burn_header after_core_c_burn.mod
-cp after_core_c_burn.mod standard_after_core_c_burn.mod
-
-do_one inlist_to_lgTmax_header lgTmax.mod
-cp lgTmax.mod standard_lgTmax.mod
-
-do_one inlist_to_cc_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished'
-
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/rn_nomodfiles b/star/test_suite/12M_pre_ms_to_core_collapse/rn_nomodfiles
deleted file mode 100755
index c898ce52c..000000000
--- a/star/test_suite/12M_pre_ms_to_core_collapse/rn_nomodfiles
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-rm -f restart_photo
-echo $1
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star $1
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/rn_standard b/star/test_suite/12M_pre_ms_to_core_collapse/rn_standard
deleted file mode 100755
index 3beb58a00..000000000
--- a/star/test_suite/12M_pre_ms_to_core_collapse/rn_standard
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_late_pre_zams.mod late_pre_zams.mod
-else
- do_one inlist_make_late_pre_zams_header late_pre_zams.mod
- cp late_pre_zams.mod standard_late_pre_zams.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_zams.mod zams.mod
-else
- do_one inlist_to_zams_header zams.mod
- cp zams.mod standard_zams.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_after_core_he_burn.mod after_core_he_burn.mod
-else
- do_one inlist_to_end_core_he_burn_header after_core_he_burn.mod
- cp after_core_he_burn.mod standard_after_core_he_burn.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_after_core_c_burn.mod after_core_c_burn.mod
-else
- do_one inlist_to_end_core_c_burn_header after_core_c_burn.mod
- cp after_core_c_burn.mod standard_after_core_c_burn.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_lgTmax.mod lgTmax.mod
-else
- do_one inlist_to_lgTmax_header lgTmax.mod
- cp lgTmax.mod standard_lgTmax.mod
-fi
-
-do_one inlist_to_cc_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished'
-
diff --git a/star/test_suite/12M_pre_ms_to_core_collapse/run_all b/star/test_suite/12M_pre_ms_to_core_collapse/run_all
deleted file mode 100755
index e0b9ab8d7..000000000
--- a/star/test_suite/12M_pre_ms_to_core_collapse/run_all
+++ /dev/null
@@ -1,6 +0,0 @@
-./rn_nomodfiles inlist_make_late_pre_zams_header
-./re_nomodfiles . inlist_to_zams_header
-./re_nomodfiles . inlist_to_end_core_he_burn_header
-./re_nomodfiles . inlist_to_end_core_c_burn_header
-./re_nomodfiles . inlist_to_lgTmax_header
-./re_nomodfiles . inlist_to_cc_header
diff --git a/star/test_suite/15M_dynamo/Makefile b/star/test_suite/15M_dynamo/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/15M_dynamo/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/15M_dynamo/clean b/star/test_suite/15M_dynamo/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/15M_dynamo/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/15M_dynamo/make/makefile b/star/test_suite/15M_dynamo/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/15M_dynamo/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/15M_dynamo/mk b/star/test_suite/15M_dynamo/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/15M_dynamo/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/15M_dynamo/re b/star/test_suite/15M_dynamo/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/15M_dynamo/re
+++ b/star/test_suite/15M_dynamo/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/15M_dynamo/rn1 b/star/test_suite/15M_dynamo/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/15M_dynamo/rn1
+++ b/star/test_suite/15M_dynamo/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/16M_conv_premix/Makefile b/star/test_suite/16M_conv_premix/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/16M_conv_premix/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/16M_conv_premix/clean b/star/test_suite/16M_conv_premix/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/16M_conv_premix/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/16M_conv_premix/make/makefile b/star/test_suite/16M_conv_premix/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/16M_conv_premix/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/16M_conv_premix/mk b/star/test_suite/16M_conv_premix/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/16M_conv_premix/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/16M_conv_premix/re b/star/test_suite/16M_conv_premix/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/16M_conv_premix/re
+++ b/star/test_suite/16M_conv_premix/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/16M_conv_premix/rn1 b/star/test_suite/16M_conv_premix/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/16M_conv_premix/rn1
+++ b/star/test_suite/16M_conv_premix/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/16M_predictive_mix/Makefile b/star/test_suite/16M_predictive_mix/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/16M_predictive_mix/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/16M_predictive_mix/clean b/star/test_suite/16M_predictive_mix/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/16M_predictive_mix/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/16M_predictive_mix/make/makefile b/star/test_suite/16M_predictive_mix/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/16M_predictive_mix/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/16M_predictive_mix/mk b/star/test_suite/16M_predictive_mix/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/16M_predictive_mix/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/16M_predictive_mix/re b/star/test_suite/16M_predictive_mix/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/16M_predictive_mix/re
+++ b/star/test_suite/16M_predictive_mix/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/16M_predictive_mix/rn1 b/star/test_suite/16M_predictive_mix/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/16M_predictive_mix/rn1
+++ b/star/test_suite/16M_predictive_mix/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1M_pre_ms_to_wd/Makefile b/star/test_suite/1M_pre_ms_to_wd/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/1M_pre_ms_to_wd/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/1M_pre_ms_to_wd/clean b/star/test_suite/1M_pre_ms_to_wd/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/1M_pre_ms_to_wd/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/1M_pre_ms_to_wd/make/makefile b/star/test_suite/1M_pre_ms_to_wd/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/1M_pre_ms_to_wd/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/1M_pre_ms_to_wd/mk b/star/test_suite/1M_pre_ms_to_wd/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/1M_pre_ms_to_wd/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/1M_pre_ms_to_wd/re b/star/test_suite/1M_pre_ms_to_wd/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/1M_pre_ms_to_wd/re
+++ b/star/test_suite/1M_pre_ms_to_wd/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1M_pre_ms_to_wd/rn1 b/star/test_suite/1M_pre_ms_to_wd/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/1M_pre_ms_to_wd/rn1
+++ b/star/test_suite/1M_pre_ms_to_wd/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1M_pre_ms_to_wd/rn_standard b/star/test_suite/1M_pre_ms_to_wd/rn_standard
deleted file mode 100755
index 0e907d0ce..000000000
--- a/star/test_suite/1M_pre_ms_to_wd/rn_standard
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-do_one inlist_start_header start.mod LOGS_start
-do_one inlist_to_end_core_h_burn_header end_core_h_burn.mod LOGS_to_end_core_h_burn
-
-# check if can skip the slow climb up the red giant branch
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_start_he_core_flash.mod start_he_core_flash.mod
-else
- do_one inlist_to_start_he_core_flash_header start_he_core_flash.mod LOGS_to_start_he_core_flash
- cp start_he_core_flash.mod standard_start_he_core_flash.mod
-fi
-
-do_one inlist_to_end_core_he_burn_header end_core_he_burn.mod LOGS_to_end_core_he_burn
-do_one inlist_to_end_agb_header end_agb.mod LOGS_to_end_agb
-do_one inlist_to_wd_header final.mod LOGS_to_wd
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished'
-
diff --git a/star/test_suite/1M_thermohaline/Makefile b/star/test_suite/1M_thermohaline/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/1M_thermohaline/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/1M_thermohaline/clean b/star/test_suite/1M_thermohaline/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/1M_thermohaline/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/1M_thermohaline/make/makefile b/star/test_suite/1M_thermohaline/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/1M_thermohaline/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/1M_thermohaline/mk b/star/test_suite/1M_thermohaline/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/1M_thermohaline/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/1M_thermohaline/re b/star/test_suite/1M_thermohaline/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/1M_thermohaline/re
+++ b/star/test_suite/1M_thermohaline/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/1M_thermohaline/rn1 b/star/test_suite/1M_thermohaline/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/1M_thermohaline/rn1
+++ b/star/test_suite/1M_thermohaline/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/Makefile b/star/test_suite/20M_pre_ms_to_core_collapse/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/20M_pre_ms_to_core_collapse/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/clean b/star/test_suite/20M_pre_ms_to_core_collapse/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/20M_pre_ms_to_core_collapse/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/make/makefile b/star/test_suite/20M_pre_ms_to_core_collapse/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/20M_pre_ms_to_core_collapse/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/mk b/star/test_suite/20M_pre_ms_to_core_collapse/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/20M_pre_ms_to_core_collapse/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/re b/star/test_suite/20M_pre_ms_to_core_collapse/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/20M_pre_ms_to_core_collapse/re
+++ b/star/test_suite/20M_pre_ms_to_core_collapse/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/re_nomodfiles b/star/test_suite/20M_pre_ms_to_core_collapse/re_nomodfiles
deleted file mode 100755
index d447f6665..000000000
--- a/star/test_suite/20M_pre_ms_to_core_collapse/re_nomodfiles
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-#echo $#
-#echo $1
-#echo $2
-
-photo_directory=photos
-
-function most_recent_photo {
- ls -t "$photo_directory" | head -1
-}
-
-if [ "$#" -ne 2 ]
-then
- echo "must pass two arguments, photo string and inlist name"
- exit 1
-fi
-
-if [ $1 = "." ]
-then
- photo=$(most_recent_photo)
-else
- photo=$1
-fi
-
-if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
-then
- echo "specified photo does not exist"
- exit 1
-fi
-
-echo "restart from $photo"
-if ! cp "$photo_directory/$photo" restart_photo
-then
- echo "failed to copy photo"
- exit 1
-fi
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star $2
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/rn1 b/star/test_suite/20M_pre_ms_to_core_collapse/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/20M_pre_ms_to_core_collapse/rn1
+++ b/star/test_suite/20M_pre_ms_to_core_collapse/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/rn_all b/star/test_suite/20M_pre_ms_to_core_collapse/rn_all
deleted file mode 100755
index da782bf57..000000000
--- a/star/test_suite/20M_pre_ms_to_core_collapse/rn_all
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-do_one inlist_make_late_pre_zams_header late_pre_zams.mod
-cp late_pre_zams.mod standard_late_pre_zams.mod
-
-do_one inlist_to_zams_header zams.mod
-cp zams.mod standard_zams.mod
-
-do_one inlist_to_end_core_he_burn_header after_core_he_burn.mod
-cp after_core_he_burn.mod standard_after_core_he_burn.mod
-
-do_one inlist_remove_envelope_header removed_envelope.mod
-cp removed_envelope.mod standard_removed_envelope.mod
-
-do_one inlist_to_end_core_c_burn_header after_core_c_burn.mod
-cp after_core_c_burn.mod standard_after_core_c_burn.mod
-
-do_one inlist_to_lgTmax_header lgTmax.mod
-cp lgTmax.mod standard_lgTmax.mod
-
-do_one inlist_to_cc_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished'
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/rn_nomodfiles b/star/test_suite/20M_pre_ms_to_core_collapse/rn_nomodfiles
deleted file mode 100755
index c898ce52c..000000000
--- a/star/test_suite/20M_pre_ms_to_core_collapse/rn_nomodfiles
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-rm -f restart_photo
-echo $1
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star $1
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/rn_standard b/star/test_suite/20M_pre_ms_to_core_collapse/rn_standard
deleted file mode 100755
index ffbb94859..000000000
--- a/star/test_suite/20M_pre_ms_to_core_collapse/rn_standard
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_late_pre_zams.mod late_pre_zams.mod
-else
- do_one inlist_make_late_pre_zams_header late_pre_zams.mod
- cp late_pre_zams.mod standard_late_pre_zams.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_zams.mod zams.mod
-else
- do_one inlist_to_zams_header zams.mod
- cp zams.mod standard_zams.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_after_core_he_burn.mod after_core_he_burn.mod
-else
- do_one inlist_to_end_core_he_burn_header after_core_he_burn.mod
- cp after_core_he_burn.mod standard_after_core_he_burn.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_removed_envelope.mod removed_envelope.mod
-else
- do_one inlist_remove_envelope_header removed_envelope.mod
- cp removed_envelope.mod standard_removed_envelope.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_after_core_c_burn.mod after_core_c_burn.mod
-else
- do_one inlist_to_end_core_c_burn_header after_core_c_burn.mod
- cp after_core_c_burn.mod standard_after_core_c_burn.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_lgTmax.mod lgTmax.mod
-else
- do_one inlist_to_lgTmax_header lgTmax.mod
- cp lgTmax.mod standard_lgTmax.mod
-fi
-
-do_one inlist_to_cc_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished'
-
diff --git a/star/test_suite/20M_pre_ms_to_core_collapse/run_all b/star/test_suite/20M_pre_ms_to_core_collapse/run_all
deleted file mode 100755
index e0b9ab8d7..000000000
--- a/star/test_suite/20M_pre_ms_to_core_collapse/run_all
+++ /dev/null
@@ -1,6 +0,0 @@
-./rn_nomodfiles inlist_make_late_pre_zams_header
-./re_nomodfiles . inlist_to_zams_header
-./re_nomodfiles . inlist_to_end_core_he_burn_header
-./re_nomodfiles . inlist_to_end_core_c_burn_header
-./re_nomodfiles . inlist_to_lgTmax_header
-./re_nomodfiles . inlist_to_cc_header
diff --git a/star/test_suite/20M_z2m2_high_rotation/Makefile b/star/test_suite/20M_z2m2_high_rotation/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/20M_z2m2_high_rotation/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/20M_z2m2_high_rotation/clean b/star/test_suite/20M_z2m2_high_rotation/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/20M_z2m2_high_rotation/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/20M_z2m2_high_rotation/make/makefile b/star/test_suite/20M_z2m2_high_rotation/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/20M_z2m2_high_rotation/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/20M_z2m2_high_rotation/mk b/star/test_suite/20M_z2m2_high_rotation/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/20M_z2m2_high_rotation/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/20M_z2m2_high_rotation/re b/star/test_suite/20M_z2m2_high_rotation/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/20M_z2m2_high_rotation/re
+++ b/star/test_suite/20M_z2m2_high_rotation/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/20M_z2m2_high_rotation/rn1 b/star/test_suite/20M_z2m2_high_rotation/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/20M_z2m2_high_rotation/rn1
+++ b/star/test_suite/20M_z2m2_high_rotation/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/5M_cepheid_blue_loop/Makefile b/star/test_suite/5M_cepheid_blue_loop/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/5M_cepheid_blue_loop/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/5M_cepheid_blue_loop/clean b/star/test_suite/5M_cepheid_blue_loop/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/5M_cepheid_blue_loop/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/5M_cepheid_blue_loop/make/makefile b/star/test_suite/5M_cepheid_blue_loop/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/5M_cepheid_blue_loop/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/5M_cepheid_blue_loop/mk b/star/test_suite/5M_cepheid_blue_loop/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/5M_cepheid_blue_loop/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/5M_cepheid_blue_loop/re b/star/test_suite/5M_cepheid_blue_loop/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/5M_cepheid_blue_loop/re
+++ b/star/test_suite/5M_cepheid_blue_loop/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/5M_cepheid_blue_loop/rn1 b/star/test_suite/5M_cepheid_blue_loop/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/5M_cepheid_blue_loop/rn1
+++ b/star/test_suite/5M_cepheid_blue_loop/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/7M_prems_to_AGB/Makefile b/star/test_suite/7M_prems_to_AGB/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/7M_prems_to_AGB/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/7M_prems_to_AGB/clean b/star/test_suite/7M_prems_to_AGB/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/7M_prems_to_AGB/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/7M_prems_to_AGB/make/makefile b/star/test_suite/7M_prems_to_AGB/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/7M_prems_to_AGB/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/7M_prems_to_AGB/mk b/star/test_suite/7M_prems_to_AGB/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/7M_prems_to_AGB/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/7M_prems_to_AGB/re b/star/test_suite/7M_prems_to_AGB/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/7M_prems_to_AGB/re
+++ b/star/test_suite/7M_prems_to_AGB/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/7M_prems_to_AGB/rn1 b/star/test_suite/7M_prems_to_AGB/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/7M_prems_to_AGB/rn1
+++ b/star/test_suite/7M_prems_to_AGB/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/R_CrB_star/Makefile b/star/test_suite/R_CrB_star/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/R_CrB_star/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/R_CrB_star/clean b/star/test_suite/R_CrB_star/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/R_CrB_star/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/R_CrB_star/make/makefile b/star/test_suite/R_CrB_star/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/R_CrB_star/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/R_CrB_star/mk b/star/test_suite/R_CrB_star/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/R_CrB_star/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/R_CrB_star/re b/star/test_suite/R_CrB_star/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/R_CrB_star/re
+++ b/star/test_suite/R_CrB_star/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/R_CrB_star/rn1 b/star/test_suite/R_CrB_star/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/R_CrB_star/rn1
+++ b/star/test_suite/R_CrB_star/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/T_tau_gradr/Makefile b/star/test_suite/T_tau_gradr/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/T_tau_gradr/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/T_tau_gradr/clean b/star/test_suite/T_tau_gradr/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/T_tau_gradr/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/T_tau_gradr/make/makefile b/star/test_suite/T_tau_gradr/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/T_tau_gradr/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/T_tau_gradr/mk b/star/test_suite/T_tau_gradr/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/T_tau_gradr/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/T_tau_gradr/re b/star/test_suite/T_tau_gradr/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/T_tau_gradr/re
+++ b/star/test_suite/T_tau_gradr/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/T_tau_gradr/rn1 b/star/test_suite/T_tau_gradr/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/T_tau_gradr/rn1
+++ b/star/test_suite/T_tau_gradr/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/accreted_material_j/Makefile b/star/test_suite/accreted_material_j/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/accreted_material_j/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/accreted_material_j/clean b/star/test_suite/accreted_material_j/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/accreted_material_j/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/accreted_material_j/make/makefile b/star/test_suite/accreted_material_j/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/accreted_material_j/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/accreted_material_j/mk b/star/test_suite/accreted_material_j/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/accreted_material_j/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/accreted_material_j/re b/star/test_suite/accreted_material_j/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/accreted_material_j/re
+++ b/star/test_suite/accreted_material_j/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/accreted_material_j/rn1 b/star/test_suite/accreted_material_j/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/accreted_material_j/rn1
+++ b/star/test_suite/accreted_material_j/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/adjust_net/Makefile b/star/test_suite/adjust_net/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/adjust_net/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/adjust_net/clean b/star/test_suite/adjust_net/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/adjust_net/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/adjust_net/make/makefile b/star/test_suite/adjust_net/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/adjust_net/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/adjust_net/mk b/star/test_suite/adjust_net/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/adjust_net/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/adjust_net/re b/star/test_suite/adjust_net/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/adjust_net/re
+++ b/star/test_suite/adjust_net/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/adjust_net/rn1 b/star/test_suite/adjust_net/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/adjust_net/rn1
+++ b/star/test_suite/adjust_net/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/build_and_run b/star/test_suite/build_and_run
deleted file mode 100755
index da7946df7..000000000
--- a/star/test_suite/build_and_run
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-rm -f out.txt rn.txt
-./clean
-check_okay
-./mk
-check_okay
-./rn > rn.txt
-check_okay
-mv rn.txt out.txt
diff --git a/star/test_suite/c13_pocket/Makefile b/star/test_suite/c13_pocket/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/c13_pocket/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/c13_pocket/clean b/star/test_suite/c13_pocket/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/c13_pocket/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/c13_pocket/make/makefile b/star/test_suite/c13_pocket/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/c13_pocket/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/c13_pocket/mk b/star/test_suite/c13_pocket/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/c13_pocket/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/c13_pocket/re b/star/test_suite/c13_pocket/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/c13_pocket/re
+++ b/star/test_suite/c13_pocket/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/c13_pocket/rn1 b/star/test_suite/c13_pocket/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/c13_pocket/rn1
+++ b/star/test_suite/c13_pocket/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/carbon_kh/Makefile b/star/test_suite/carbon_kh/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/carbon_kh/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/carbon_kh/clean b/star/test_suite/carbon_kh/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/carbon_kh/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/carbon_kh/make/makefile b/star/test_suite/carbon_kh/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/carbon_kh/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/carbon_kh/mk b/star/test_suite/carbon_kh/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/carbon_kh/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/carbon_kh/re b/star/test_suite/carbon_kh/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/carbon_kh/re
+++ b/star/test_suite/carbon_kh/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/carbon_kh/rn1 b/star/test_suite/carbon_kh/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/carbon_kh/rn1
+++ b/star/test_suite/carbon_kh/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/carbon_kh/rnall b/star/test_suite/carbon_kh/rnall
deleted file mode 100755
index aa69c07c3..000000000
--- a/star/test_suite/carbon_kh/rnall
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-
-do_one(){
- ln -sf inlists/inlist_$1 inlist_equations
- ln -sf inlists/inlist_$2 inlist_resolution
- MESA_SKIP_OPTIONAL=t ./rn
- mv LOGS/history.data LOGS/$1-$2.data
- mv final_profile.data LOGS/$1-$2.profile
-}
-
-
-do_set(){
- do_one $1 lr
- do_one $1 mr
- do_one $1 hr
- do_one $1 ur
-}
-
-do_set dedt_total
-do_set eps_grav_old
-do_set eps_grav
-
diff --git a/star/test_suite/cburn_inward/Makefile b/star/test_suite/cburn_inward/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/cburn_inward/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/cburn_inward/clean b/star/test_suite/cburn_inward/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/cburn_inward/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/cburn_inward/make/makefile b/star/test_suite/cburn_inward/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/cburn_inward/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/cburn_inward/mk b/star/test_suite/cburn_inward/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/cburn_inward/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/cburn_inward/re b/star/test_suite/cburn_inward/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/cburn_inward/re
+++ b/star/test_suite/cburn_inward/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/cburn_inward/rn1 b/star/test_suite/cburn_inward/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/cburn_inward/rn1
+++ b/star/test_suite/cburn_inward/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ccsn_IIp/Makefile b/star/test_suite/ccsn_IIp/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/ccsn_IIp/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/ccsn_IIp/clean b/star/test_suite/ccsn_IIp/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/ccsn_IIp/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/ccsn_IIp/make/makefile b/star/test_suite/ccsn_IIp/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/ccsn_IIp/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/ccsn_IIp/mk b/star/test_suite/ccsn_IIp/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/ccsn_IIp/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/ccsn_IIp/re b/star/test_suite/ccsn_IIp/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/ccsn_IIp/re
+++ b/star/test_suite/ccsn_IIp/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ccsn_IIp/rn1 b/star/test_suite/ccsn_IIp/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/ccsn_IIp/rn1
+++ b/star/test_suite/ccsn_IIp/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ccsn_IIp/rn_all b/star/test_suite/ccsn_IIp/rn_all
deleted file mode 100755
index 4e28aad5c..000000000
--- a/star/test_suite/ccsn_IIp/rn_all
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-do_one inlist_infall_header finished_infall.mod LOGS_part_infall
-do_one inlist_end_infall_header ready_for_edep.mod LOGS_part_end_infall
-do_one inlist_edep_header done_with_edep.mod LOGS_part_edep
-do_one inlist_shock_part1_header shock_part1.mod LOGS_part1
-do_one inlist_shock_part2_header shock_part2.mod LOGS_part2
-cp shock_part2.mod standard_shock_part2.mod
-do_one inlist_shock_part3_header shock_part3.mod LOGS_part3
-cp shock_part3.mod standard_shock_part3.mod
-do_one inlist_shock_part4_header shock_part4.mod LOGS_part4
-cp shock_part4.mod standard_shock_part4.mod
-do_one inlist_shock_part5_header shock_part5.mod LOGS_part5
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test_suite/ccsn_IIp/rn_standard b/star/test_suite/ccsn_IIp/rn_standard
deleted file mode 100755
index e69c2fb69..000000000
--- a/star/test_suite/ccsn_IIp/rn_standard
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-do_one inlist_infall_header finished_infall.mod LOGS_part_infall
-do_one inlist_end_infall_header ready_for_edep.mod LOGS_part_end_infall
-do_one inlist_edep_header done_with_edep.mod LOGS_part_edep
-do_one inlist_shock_part1_header shock_part1.mod LOGS_part1
-
-# check if can skip shock_part2
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_shock_part2.mod shock_part2.mod
-else
- do_one inlist_shock_part2_header shock_part2.mod LOGS_part2
- cp shock_part2.mod standard_shock_part32.mod
-fi
-
-# check if can skip shock_part3
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_shock_part3.mod shock_part3.mod
-else
- do_one inlist_shock_part3_header shock_part3.mod LOGS_part3
- cp shock_part3.mod standard_shock_part3.mod
-fi
-
-do_one inlist_shock_part4_header shock_part4.mod LOGS_part4
-do_one inlist_shock_part5_header shock_part5.mod LOGS_part5
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-if [ -r LOGS_for_ccsn_run ]
-then
- rm -rf LOGS_for_ccsn_run_old
- mv LOGS_for_ccsn_run LOGS_for_ccsn_run_old
-fi
-mkdir LOGS_for_ccsn_run
-mv LOGS_part* LOGS_for_ccsn_run
-rm -rf inlists
-mkdir inlists
-cp inlist_* inlists
-mv inlists LOGS_for_ccsn_run
-cp shock_part*.mod LOGS_for_ccsn_run
-echo 'created LOGS_for_ccsn_run'
-echo
-
diff --git a/star/test_suite/check_pulse_atm/Makefile b/star/test_suite/check_pulse_atm/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/check_pulse_atm/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/check_pulse_atm/clean b/star/test_suite/check_pulse_atm/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/check_pulse_atm/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/check_pulse_atm/make/makefile b/star/test_suite/check_pulse_atm/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/check_pulse_atm/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/check_pulse_atm/mk b/star/test_suite/check_pulse_atm/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/check_pulse_atm/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/check_pulse_atm/re b/star/test_suite/check_pulse_atm/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/check_pulse_atm/re
+++ b/star/test_suite/check_pulse_atm/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/check_pulse_atm/rn1 b/star/test_suite/check_pulse_atm/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/check_pulse_atm/rn1
+++ b/star/test_suite/check_pulse_atm/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/check_redo/Makefile b/star/test_suite/check_redo/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/check_redo/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/check_redo/clean b/star/test_suite/check_redo/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/check_redo/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/check_redo/make/makefile b/star/test_suite/check_redo/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/check_redo/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/check_redo/mk b/star/test_suite/check_redo/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/check_redo/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/check_redo/re b/star/test_suite/check_redo/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/check_redo/re
+++ b/star/test_suite/check_redo/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/check_redo/rn1 b/star/test_suite/check_redo/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/check_redo/rn1
+++ b/star/test_suite/check_redo/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/conductive_flame/Makefile b/star/test_suite/conductive_flame/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/conductive_flame/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/conductive_flame/clean b/star/test_suite/conductive_flame/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/conductive_flame/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/conductive_flame/make/makefile b/star/test_suite/conductive_flame/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/conductive_flame/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/conductive_flame/mk b/star/test_suite/conductive_flame/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/conductive_flame/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/conductive_flame/re b/star/test_suite/conductive_flame/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/conductive_flame/re
+++ b/star/test_suite/conductive_flame/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/conductive_flame/rn1 b/star/test_suite/conductive_flame/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/conductive_flame/rn1
+++ b/star/test_suite/conductive_flame/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/conserve_angular_momentum/Makefile b/star/test_suite/conserve_angular_momentum/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/conserve_angular_momentum/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/conserve_angular_momentum/clean b/star/test_suite/conserve_angular_momentum/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/conserve_angular_momentum/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/conserve_angular_momentum/make/makefile b/star/test_suite/conserve_angular_momentum/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/conserve_angular_momentum/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/conserve_angular_momentum/mk b/star/test_suite/conserve_angular_momentum/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/conserve_angular_momentum/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/conserve_angular_momentum/re b/star/test_suite/conserve_angular_momentum/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/conserve_angular_momentum/re
+++ b/star/test_suite/conserve_angular_momentum/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/conserve_angular_momentum/rn1 b/star/test_suite/conserve_angular_momentum/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/conserve_angular_momentum/rn1
+++ b/star/test_suite/conserve_angular_momentum/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/conv_core_cpm/Makefile b/star/test_suite/conv_core_cpm/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/conv_core_cpm/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/conv_core_cpm/clean b/star/test_suite/conv_core_cpm/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/conv_core_cpm/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/conv_core_cpm/make/makefile b/star/test_suite/conv_core_cpm/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/conv_core_cpm/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/conv_core_cpm/mk b/star/test_suite/conv_core_cpm/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/conv_core_cpm/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/conv_core_cpm/re b/star/test_suite/conv_core_cpm/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/conv_core_cpm/re
+++ b/star/test_suite/conv_core_cpm/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/conv_core_cpm/rn1 b/star/test_suite/conv_core_cpm/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/conv_core_cpm/rn1
+++ b/star/test_suite/conv_core_cpm/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/custom_colors/Makefile b/star/test_suite/custom_colors/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/custom_colors/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/custom_colors/clean b/star/test_suite/custom_colors/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/custom_colors/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/custom_colors/make/makefile b/star/test_suite/custom_colors/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/custom_colors/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/custom_colors/mk b/star/test_suite/custom_colors/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/custom_colors/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/custom_colors/re b/star/test_suite/custom_colors/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/custom_colors/re
+++ b/star/test_suite/custom_colors/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/custom_colors/rn1 b/star/test_suite/custom_colors/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/custom_colors/rn1
+++ b/star/test_suite/custom_colors/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/custom_rates/Makefile b/star/test_suite/custom_rates/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/custom_rates/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/custom_rates/clean b/star/test_suite/custom_rates/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/custom_rates/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/custom_rates/make/makefile b/star/test_suite/custom_rates/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/custom_rates/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/custom_rates/mk b/star/test_suite/custom_rates/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/custom_rates/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/custom_rates/re b/star/test_suite/custom_rates/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/custom_rates/re
+++ b/star/test_suite/custom_rates/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/custom_rates/rn1 b/star/test_suite/custom_rates/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/custom_rates/rn1
+++ b/star/test_suite/custom_rates/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/diffusion_smoothness/Makefile b/star/test_suite/diffusion_smoothness/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/diffusion_smoothness/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/diffusion_smoothness/clean b/star/test_suite/diffusion_smoothness/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/diffusion_smoothness/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/diffusion_smoothness/make/makefile b/star/test_suite/diffusion_smoothness/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/diffusion_smoothness/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/diffusion_smoothness/mk b/star/test_suite/diffusion_smoothness/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/diffusion_smoothness/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/diffusion_smoothness/re b/star/test_suite/diffusion_smoothness/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/diffusion_smoothness/re
+++ b/star/test_suite/diffusion_smoothness/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/diffusion_smoothness/rn1 b/star/test_suite/diffusion_smoothness/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/diffusion_smoothness/rn1
+++ b/star/test_suite/diffusion_smoothness/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/each_test_clean b/star/test_suite/each_test_clean
index 5f763a5f7..2b1bdbd11 100755
--- a/star/test_suite/each_test_clean
+++ b/star/test_suite/each_test_clean
@@ -6,7 +6,7 @@ if [ "$DO_ALL" == 1 ] || [ "$curr_id" == "$id" ] ; then
cd "$1" || return
echo "clean $1"
- ./clean
+ make clean
rm -f LOGS/*
rm -f LOGS1/*
rm -f LOGS2/*
diff --git a/star/test_suite/each_test_compile b/star/test_suite/each_test_compile
index 6db19098a..390ea3466 100755
--- a/star/test_suite/each_test_compile
+++ b/star/test_suite/each_test_compile
@@ -13,8 +13,8 @@ if [ "$DO_ALL" == 1 ] || [ "$curr_id" == "$id" ] ; then
cd "$1" || return
echo "clean $1"
- ./clean
- ./mk
+ make clean
+ make
check_okay
cd ..
fi
diff --git a/star/test_suite/each_test_run b/star/test_suite/each_test_run
index 3d899170f..1b68cf4c1 100755
--- a/star/test_suite/each_test_run
+++ b/star/test_suite/each_test_run
@@ -281,11 +281,11 @@ function build_and_run {
start_time=`date +%s`
- if ! ./clean; then
+ if ! make clean; then
return 1
fi
- if ! ./mk &> mk.txt; then
+ if ! make &> mk.txt; then
failure_msg "$1 failed: does not compile"
testhub_log "failure_type: :compilation"
testhub_log "outcome: :fail"
diff --git a/star/test_suite/extended_convective_penetration/Makefile b/star/test_suite/extended_convective_penetration/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/extended_convective_penetration/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/extended_convective_penetration/clean b/star/test_suite/extended_convective_penetration/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/extended_convective_penetration/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/extended_convective_penetration/make/makefile b/star/test_suite/extended_convective_penetration/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/extended_convective_penetration/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/extended_convective_penetration/mk b/star/test_suite/extended_convective_penetration/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/extended_convective_penetration/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/extended_convective_penetration/re b/star/test_suite/extended_convective_penetration/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/extended_convective_penetration/re
+++ b/star/test_suite/extended_convective_penetration/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/extended_convective_penetration/rn1 b/star/test_suite/extended_convective_penetration/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/extended_convective_penetration/rn1
+++ b/star/test_suite/extended_convective_penetration/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_bcep/Makefile b/star/test_suite/gyre_in_mesa_bcep/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/test_suite/gyre_in_mesa_bcep/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/gyre_in_mesa_bcep/clean b/star/test_suite/gyre_in_mesa_bcep/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/gyre_in_mesa_bcep/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/gyre_in_mesa_bcep/make/makefile b/star/test_suite/gyre_in_mesa_bcep/make/makefile
deleted file mode 100644
index da1cf8efd..000000000
--- a/star/test_suite/gyre_in_mesa_bcep/make/makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_GYRE) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/test_suite/gyre_in_mesa_bcep/mk b/star/test_suite/gyre_in_mesa_bcep/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/gyre_in_mesa_bcep/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/gyre_in_mesa_bcep/re b/star/test_suite/gyre_in_mesa_bcep/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/gyre_in_mesa_bcep/re
+++ b/star/test_suite/gyre_in_mesa_bcep/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_bcep/rn1 b/star/test_suite/gyre_in_mesa_bcep/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/gyre_in_mesa_bcep/rn1
+++ b/star/test_suite/gyre_in_mesa_bcep/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_bcep/src/run_star_extras.f90 b/star/test_suite/gyre_in_mesa_bcep/src/run_star_extras.f90
index 0631fa689..074631af0 100644
--- a/star/test_suite/gyre_in_mesa_bcep/src/run_star_extras.f90
+++ b/star/test_suite/gyre_in_mesa_bcep/src/run_star_extras.f90
@@ -91,7 +91,7 @@ subroutine extras_startup(id, restart, ierr)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/test_suite/gyre_in_mesa_envelope/Makefile b/star/test_suite/gyre_in_mesa_envelope/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/test_suite/gyre_in_mesa_envelope/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/gyre_in_mesa_envelope/clean b/star/test_suite/gyre_in_mesa_envelope/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/gyre_in_mesa_envelope/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/gyre_in_mesa_envelope/make/makefile b/star/test_suite/gyre_in_mesa_envelope/make/makefile
deleted file mode 100644
index da1cf8efd..000000000
--- a/star/test_suite/gyre_in_mesa_envelope/make/makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_GYRE) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/test_suite/gyre_in_mesa_envelope/mk b/star/test_suite/gyre_in_mesa_envelope/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/gyre_in_mesa_envelope/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/gyre_in_mesa_envelope/re b/star/test_suite/gyre_in_mesa_envelope/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/gyre_in_mesa_envelope/re
+++ b/star/test_suite/gyre_in_mesa_envelope/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_envelope/rn1 b/star/test_suite/gyre_in_mesa_envelope/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/gyre_in_mesa_envelope/rn1
+++ b/star/test_suite/gyre_in_mesa_envelope/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_envelope/src/run_star_extras.f90 b/star/test_suite/gyre_in_mesa_envelope/src/run_star_extras.f90
index 0631fa689..074631af0 100644
--- a/star/test_suite/gyre_in_mesa_envelope/src/run_star_extras.f90
+++ b/star/test_suite/gyre_in_mesa_envelope/src/run_star_extras.f90
@@ -91,7 +91,7 @@ subroutine extras_startup(id, restart, ierr)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/test_suite/gyre_in_mesa_ms/Makefile b/star/test_suite/gyre_in_mesa_ms/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/test_suite/gyre_in_mesa_ms/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/gyre_in_mesa_ms/clean b/star/test_suite/gyre_in_mesa_ms/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/gyre_in_mesa_ms/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/gyre_in_mesa_ms/make/makefile b/star/test_suite/gyre_in_mesa_ms/make/makefile
deleted file mode 100644
index da1cf8efd..000000000
--- a/star/test_suite/gyre_in_mesa_ms/make/makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_GYRE) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/test_suite/gyre_in_mesa_ms/mk b/star/test_suite/gyre_in_mesa_ms/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/gyre_in_mesa_ms/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/gyre_in_mesa_ms/re b/star/test_suite/gyre_in_mesa_ms/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/gyre_in_mesa_ms/re
+++ b/star/test_suite/gyre_in_mesa_ms/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_ms/rn1 b/star/test_suite/gyre_in_mesa_ms/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/gyre_in_mesa_ms/rn1
+++ b/star/test_suite/gyre_in_mesa_ms/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_ms/src/run_star_extras.f90 b/star/test_suite/gyre_in_mesa_ms/src/run_star_extras.f90
index 0631fa689..074631af0 100644
--- a/star/test_suite/gyre_in_mesa_ms/src/run_star_extras.f90
+++ b/star/test_suite/gyre_in_mesa_ms/src/run_star_extras.f90
@@ -91,7 +91,7 @@ subroutine extras_startup(id, restart, ierr)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/test_suite/gyre_in_mesa_rsg/Makefile b/star/test_suite/gyre_in_mesa_rsg/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/test_suite/gyre_in_mesa_rsg/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/gyre_in_mesa_rsg/clean b/star/test_suite/gyre_in_mesa_rsg/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/gyre_in_mesa_rsg/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/gyre_in_mesa_rsg/make/makefile b/star/test_suite/gyre_in_mesa_rsg/make/makefile
deleted file mode 100644
index da1cf8efd..000000000
--- a/star/test_suite/gyre_in_mesa_rsg/make/makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_GYRE) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/test_suite/gyre_in_mesa_rsg/mk b/star/test_suite/gyre_in_mesa_rsg/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/gyre_in_mesa_rsg/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/gyre_in_mesa_rsg/re b/star/test_suite/gyre_in_mesa_rsg/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/gyre_in_mesa_rsg/re
+++ b/star/test_suite/gyre_in_mesa_rsg/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_rsg/rn1 b/star/test_suite/gyre_in_mesa_rsg/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/gyre_in_mesa_rsg/rn1
+++ b/star/test_suite/gyre_in_mesa_rsg/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_rsg/src/run_star_extras.f90 b/star/test_suite/gyre_in_mesa_rsg/src/run_star_extras.f90
index 0631fa689..074631af0 100644
--- a/star/test_suite/gyre_in_mesa_rsg/src/run_star_extras.f90
+++ b/star/test_suite/gyre_in_mesa_rsg/src/run_star_extras.f90
@@ -91,7 +91,7 @@ subroutine extras_startup(id, restart, ierr)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/test_suite/gyre_in_mesa_spb/Makefile b/star/test_suite/gyre_in_mesa_spb/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/test_suite/gyre_in_mesa_spb/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/gyre_in_mesa_spb/clean b/star/test_suite/gyre_in_mesa_spb/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/gyre_in_mesa_spb/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/gyre_in_mesa_spb/make/makefile b/star/test_suite/gyre_in_mesa_spb/make/makefile
deleted file mode 100644
index da1cf8efd..000000000
--- a/star/test_suite/gyre_in_mesa_spb/make/makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_GYRE) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/test_suite/gyre_in_mesa_spb/mk b/star/test_suite/gyre_in_mesa_spb/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/gyre_in_mesa_spb/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/gyre_in_mesa_spb/re b/star/test_suite/gyre_in_mesa_spb/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/gyre_in_mesa_spb/re
+++ b/star/test_suite/gyre_in_mesa_spb/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_spb/rn1 b/star/test_suite/gyre_in_mesa_spb/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/gyre_in_mesa_spb/rn1
+++ b/star/test_suite/gyre_in_mesa_spb/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_spb/src/run_star_extras.f90 b/star/test_suite/gyre_in_mesa_spb/src/run_star_extras.f90
index 0631fa689..074631af0 100644
--- a/star/test_suite/gyre_in_mesa_spb/src/run_star_extras.f90
+++ b/star/test_suite/gyre_in_mesa_spb/src/run_star_extras.f90
@@ -91,7 +91,7 @@ subroutine extras_startup(id, restart, ierr)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/test_suite/gyre_in_mesa_wd/Makefile b/star/test_suite/gyre_in_mesa_wd/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/test_suite/gyre_in_mesa_wd/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/gyre_in_mesa_wd/clean b/star/test_suite/gyre_in_mesa_wd/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/gyre_in_mesa_wd/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/gyre_in_mesa_wd/make/makefile b/star/test_suite/gyre_in_mesa_wd/make/makefile
deleted file mode 100644
index da1cf8efd..000000000
--- a/star/test_suite/gyre_in_mesa_wd/make/makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_GYRE) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/test_suite/gyre_in_mesa_wd/mk b/star/test_suite/gyre_in_mesa_wd/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/gyre_in_mesa_wd/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/gyre_in_mesa_wd/re b/star/test_suite/gyre_in_mesa_wd/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/gyre_in_mesa_wd/re
+++ b/star/test_suite/gyre_in_mesa_wd/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_wd/rn1 b/star/test_suite/gyre_in_mesa_wd/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/gyre_in_mesa_wd/rn1
+++ b/star/test_suite/gyre_in_mesa_wd/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/gyre_in_mesa_wd/src/run_star_extras.f90 b/star/test_suite/gyre_in_mesa_wd/src/run_star_extras.f90
index 0631fa689..074631af0 100644
--- a/star/test_suite/gyre_in_mesa_wd/src/run_star_extras.f90
+++ b/star/test_suite/gyre_in_mesa_wd/src/run_star_extras.f90
@@ -91,7 +91,7 @@ subroutine extras_startup(id, restart, ierr)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
end subroutine extras_startup
diff --git a/star/test_suite/hb_2M/Makefile b/star/test_suite/hb_2M/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/hb_2M/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/hb_2M/clean b/star/test_suite/hb_2M/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/hb_2M/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/hb_2M/make/makefile b/star/test_suite/hb_2M/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/hb_2M/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/hb_2M/mk b/star/test_suite/hb_2M/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/hb_2M/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/hb_2M/re b/star/test_suite/hb_2M/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/hb_2M/re
+++ b/star/test_suite/hb_2M/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/hb_2M/rn1 b/star/test_suite/hb_2M/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/hb_2M/rn1
+++ b/star/test_suite/hb_2M/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/high_mass/Makefile b/star/test_suite/high_mass/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/high_mass/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/high_mass/clean b/star/test_suite/high_mass/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/high_mass/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/high_mass/make/makefile b/star/test_suite/high_mass/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/high_mass/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/high_mass/mk b/star/test_suite/high_mass/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/high_mass/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/high_mass/re b/star/test_suite/high_mass/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/high_mass/re
+++ b/star/test_suite/high_mass/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/high_mass/rn1 b/star/test_suite/high_mass/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/high_mass/rn1
+++ b/star/test_suite/high_mass/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/high_rot_darkening/Makefile b/star/test_suite/high_rot_darkening/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/high_rot_darkening/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/high_rot_darkening/clean b/star/test_suite/high_rot_darkening/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/high_rot_darkening/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/high_rot_darkening/make/makefile b/star/test_suite/high_rot_darkening/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/high_rot_darkening/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/high_rot_darkening/mk b/star/test_suite/high_rot_darkening/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/high_rot_darkening/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/high_rot_darkening/re b/star/test_suite/high_rot_darkening/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/high_rot_darkening/re
+++ b/star/test_suite/high_rot_darkening/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/high_rot_darkening/rn1 b/star/test_suite/high_rot_darkening/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/high_rot_darkening/rn1
+++ b/star/test_suite/high_rot_darkening/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/high_z/Makefile b/star/test_suite/high_z/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/high_z/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/high_z/clean b/star/test_suite/high_z/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/high_z/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/high_z/make/makefile b/star/test_suite/high_z/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/high_z/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/high_z/mk b/star/test_suite/high_z/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/high_z/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/high_z/re b/star/test_suite/high_z/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/high_z/re
+++ b/star/test_suite/high_z/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/high_z/rn1 b/star/test_suite/high_z/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/high_z/rn1
+++ b/star/test_suite/high_z/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/hot_cool_wind/Makefile b/star/test_suite/hot_cool_wind/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/hot_cool_wind/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/hot_cool_wind/clean b/star/test_suite/hot_cool_wind/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/hot_cool_wind/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/hot_cool_wind/make/makefile b/star/test_suite/hot_cool_wind/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/hot_cool_wind/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/hot_cool_wind/mk b/star/test_suite/hot_cool_wind/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/hot_cool_wind/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/hot_cool_wind/re b/star/test_suite/hot_cool_wind/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/hot_cool_wind/re
+++ b/star/test_suite/hot_cool_wind/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/hot_cool_wind/rn1 b/star/test_suite/hot_cool_wind/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/hot_cool_wind/rn1
+++ b/star/test_suite/hot_cool_wind/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/hse_riemann/Makefile b/star/test_suite/hse_riemann/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/hse_riemann/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/hse_riemann/clean b/star/test_suite/hse_riemann/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/hse_riemann/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/hse_riemann/make/makefile b/star/test_suite/hse_riemann/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/hse_riemann/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/hse_riemann/mk b/star/test_suite/hse_riemann/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/hse_riemann/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/hse_riemann/re b/star/test_suite/hse_riemann/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/hse_riemann/re
+++ b/star/test_suite/hse_riemann/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/hse_riemann/rn1 b/star/test_suite/hse_riemann/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/hse_riemann/rn1
+++ b/star/test_suite/hse_riemann/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/irradiated_planet/Makefile b/star/test_suite/irradiated_planet/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/irradiated_planet/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/irradiated_planet/clean b/star/test_suite/irradiated_planet/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/irradiated_planet/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/irradiated_planet/make/makefile b/star/test_suite/irradiated_planet/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/irradiated_planet/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/irradiated_planet/mk b/star/test_suite/irradiated_planet/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/irradiated_planet/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/irradiated_planet/re b/star/test_suite/irradiated_planet/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/irradiated_planet/re
+++ b/star/test_suite/irradiated_planet/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/irradiated_planet/rn1 b/star/test_suite/irradiated_planet/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/irradiated_planet/rn1
+++ b/star/test_suite/irradiated_planet/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/low_z/Makefile b/star/test_suite/low_z/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/low_z/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/low_z/clean b/star/test_suite/low_z/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/low_z/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/low_z/make/makefile b/star/test_suite/low_z/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/low_z/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/low_z/mk b/star/test_suite/low_z/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/low_z/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/low_z/re b/star/test_suite/low_z/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/low_z/re
+++ b/star/test_suite/low_z/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/low_z/rn1 b/star/test_suite/low_z/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/low_z/rn1
+++ b/star/test_suite/low_z/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/magnetic_braking/Makefile b/star/test_suite/magnetic_braking/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/magnetic_braking/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/magnetic_braking/clean b/star/test_suite/magnetic_braking/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/magnetic_braking/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/magnetic_braking/make/makefile b/star/test_suite/magnetic_braking/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/magnetic_braking/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/magnetic_braking/mk b/star/test_suite/magnetic_braking/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/magnetic_braking/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/magnetic_braking/re b/star/test_suite/magnetic_braking/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/magnetic_braking/re
+++ b/star/test_suite/magnetic_braking/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/magnetic_braking/rn1 b/star/test_suite/magnetic_braking/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/magnetic_braking/rn1
+++ b/star/test_suite/magnetic_braking/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_brown_dwarf/Makefile b/star/test_suite/make_brown_dwarf/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_brown_dwarf/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_brown_dwarf/clean b/star/test_suite/make_brown_dwarf/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_brown_dwarf/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_brown_dwarf/make/makefile b/star/test_suite/make_brown_dwarf/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_brown_dwarf/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_brown_dwarf/mk b/star/test_suite/make_brown_dwarf/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_brown_dwarf/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_brown_dwarf/re b/star/test_suite/make_brown_dwarf/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_brown_dwarf/re
+++ b/star/test_suite/make_brown_dwarf/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_brown_dwarf/rn1 b/star/test_suite/make_brown_dwarf/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_brown_dwarf/rn1
+++ b/star/test_suite/make_brown_dwarf/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_co_wd/Makefile b/star/test_suite/make_co_wd/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_co_wd/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_co_wd/clean b/star/test_suite/make_co_wd/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_co_wd/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_co_wd/make/makefile b/star/test_suite/make_co_wd/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_co_wd/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_co_wd/mk b/star/test_suite/make_co_wd/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_co_wd/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_co_wd/re b/star/test_suite/make_co_wd/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_co_wd/re
+++ b/star/test_suite/make_co_wd/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_co_wd/rn1 b/star/test_suite/make_co_wd/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_co_wd/rn1
+++ b/star/test_suite/make_co_wd/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_env/Makefile b/star/test_suite/make_env/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_env/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_env/clean b/star/test_suite/make_env/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_env/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_env/make/makefile b/star/test_suite/make_env/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_env/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_env/mk b/star/test_suite/make_env/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_env/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_env/re b/star/test_suite/make_env/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_env/re
+++ b/star/test_suite/make_env/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_env/rn1 b/star/test_suite/make_env/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_env/rn1
+++ b/star/test_suite/make_env/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_he_wd/Makefile b/star/test_suite/make_he_wd/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_he_wd/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_he_wd/clean b/star/test_suite/make_he_wd/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_he_wd/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_he_wd/make/makefile b/star/test_suite/make_he_wd/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_he_wd/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_he_wd/mk b/star/test_suite/make_he_wd/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_he_wd/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_he_wd/re b/star/test_suite/make_he_wd/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_he_wd/re
+++ b/star/test_suite/make_he_wd/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_he_wd/rn1 b/star/test_suite/make_he_wd/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_he_wd/rn1
+++ b/star/test_suite/make_he_wd/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_metals/Makefile b/star/test_suite/make_metals/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_metals/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_metals/clean b/star/test_suite/make_metals/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_metals/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_metals/make/makefile b/star/test_suite/make_metals/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_metals/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_metals/mk b/star/test_suite/make_metals/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_metals/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_metals/re b/star/test_suite/make_metals/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_metals/re
+++ b/star/test_suite/make_metals/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_metals/rn1 b/star/test_suite/make_metals/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_metals/rn1
+++ b/star/test_suite/make_metals/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_o_ne_wd/Makefile b/star/test_suite/make_o_ne_wd/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_o_ne_wd/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_o_ne_wd/clean b/star/test_suite/make_o_ne_wd/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_o_ne_wd/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_o_ne_wd/make/makefile b/star/test_suite/make_o_ne_wd/make/makefile
deleted file mode 100644
index b49e914b2..000000000
--- a/star/test_suite/make_o_ne_wd/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR= star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_o_ne_wd/mk b/star/test_suite/make_o_ne_wd/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_o_ne_wd/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_o_ne_wd/re b/star/test_suite/make_o_ne_wd/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_o_ne_wd/re
+++ b/star/test_suite/make_o_ne_wd/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_o_ne_wd/rn1 b/star/test_suite/make_o_ne_wd/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_o_ne_wd/rn1
+++ b/star/test_suite/make_o_ne_wd/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_o_ne_wd/rn_all b/star/test_suite/make_o_ne_wd/rn_all
deleted file mode 100755
index 2218fb735..000000000
--- a/star/test_suite/make_o_ne_wd/rn_all
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-
-# uncomment the following line to run all parts of the test
-# MESA_RUN_OPTIONAL=t
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-do_one inlist_zams_header zams.mod
-cp zams.mod standard_zams.mod
-do_one inlist_to_agb_header agb.mod
-cp agb.mod standard_agb.mod
-
-do_one inlist_c_burn_header c_burn.mod
-do_one inlist_o_ne_wd_header o_ne_wd.mod
-do_one inlist_settle_envelope_header settled_envelope.mod
-
-# for producing ns test case starting models:
-#do_one inlist_remove_envelope_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished all inlists'
-
diff --git a/star/test_suite/make_planets/Makefile b/star/test_suite/make_planets/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_planets/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_planets/clean b/star/test_suite/make_planets/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_planets/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_planets/make/makefile b/star/test_suite/make_planets/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_planets/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_planets/mk b/star/test_suite/make_planets/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_planets/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_planets/re b/star/test_suite/make_planets/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_planets/re
+++ b/star/test_suite/make_planets/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_planets/rn1 b/star/test_suite/make_planets/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_planets/rn1
+++ b/star/test_suite/make_planets/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_pre_ccsn_13bvn/Makefile b/star/test_suite/make_pre_ccsn_13bvn/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_pre_ccsn_13bvn/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_pre_ccsn_13bvn/clean b/star/test_suite/make_pre_ccsn_13bvn/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/star/test_suite/make_pre_ccsn_13bvn/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/star/test_suite/make_pre_ccsn_13bvn/make/makefile b/star/test_suite/make_pre_ccsn_13bvn/make/makefile
deleted file mode 100644
index 8acc82686..000000000
--- a/star/test_suite/make_pre_ccsn_13bvn/make/makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_pre_ccsn_13bvn/mk b/star/test_suite/make_pre_ccsn_13bvn/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_pre_ccsn_13bvn/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_pre_ccsn_13bvn/re b/star/test_suite/make_pre_ccsn_13bvn/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_pre_ccsn_13bvn/re
+++ b/star/test_suite/make_pre_ccsn_13bvn/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_pre_ccsn_13bvn/rn1 b/star/test_suite/make_pre_ccsn_13bvn/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_pre_ccsn_13bvn/rn1
+++ b/star/test_suite/make_pre_ccsn_13bvn/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_sdb/Makefile b/star/test_suite/make_sdb/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_sdb/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_sdb/clean b/star/test_suite/make_sdb/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_sdb/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_sdb/make/makefile b/star/test_suite/make_sdb/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_sdb/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_sdb/mk b/star/test_suite/make_sdb/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_sdb/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_sdb/re b/star/test_suite/make_sdb/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_sdb/re
+++ b/star/test_suite/make_sdb/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_sdb/rn1 b/star/test_suite/make_sdb/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_sdb/rn1
+++ b/star/test_suite/make_sdb/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_zams/Makefile b/star/test_suite/make_zams/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_zams/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_zams/clean b/star/test_suite/make_zams/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_zams/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_zams/make/makefile b/star/test_suite/make_zams/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_zams/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_zams/mk b/star/test_suite/make_zams/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_zams/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_zams/re b/star/test_suite/make_zams/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_zams/re
+++ b/star/test_suite/make_zams/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_zams/rn1 b/star/test_suite/make_zams/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_zams/rn1
+++ b/star/test_suite/make_zams/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_zams_low_mass/Makefile b/star/test_suite/make_zams_low_mass/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_zams_low_mass/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_zams_low_mass/clean b/star/test_suite/make_zams_low_mass/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_zams_low_mass/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_zams_low_mass/make/makefile b/star/test_suite/make_zams_low_mass/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_zams_low_mass/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_zams_low_mass/mk b/star/test_suite/make_zams_low_mass/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_zams_low_mass/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_zams_low_mass/re b/star/test_suite/make_zams_low_mass/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_zams_low_mass/re
+++ b/star/test_suite/make_zams_low_mass/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_zams_low_mass/rn1 b/star/test_suite/make_zams_low_mass/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_zams_low_mass/rn1
+++ b/star/test_suite/make_zams_low_mass/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_zams_ultra_high_mass/Makefile b/star/test_suite/make_zams_ultra_high_mass/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/make_zams_ultra_high_mass/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/make_zams_ultra_high_mass/clean b/star/test_suite/make_zams_ultra_high_mass/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/make_zams_ultra_high_mass/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/make_zams_ultra_high_mass/make/makefile b/star/test_suite/make_zams_ultra_high_mass/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/make_zams_ultra_high_mass/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/make_zams_ultra_high_mass/mk b/star/test_suite/make_zams_ultra_high_mass/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/make_zams_ultra_high_mass/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/make_zams_ultra_high_mass/re b/star/test_suite/make_zams_ultra_high_mass/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/make_zams_ultra_high_mass/re
+++ b/star/test_suite/make_zams_ultra_high_mass/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/make_zams_ultra_high_mass/rn1 b/star/test_suite/make_zams_ultra_high_mass/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/make_zams_ultra_high_mass/rn1
+++ b/star/test_suite/make_zams_ultra_high_mass/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ns_c/Makefile b/star/test_suite/ns_c/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/ns_c/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/ns_c/clean b/star/test_suite/ns_c/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/ns_c/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/ns_c/make/makefile b/star/test_suite/ns_c/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/ns_c/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/ns_c/mk b/star/test_suite/ns_c/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/ns_c/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/ns_c/re b/star/test_suite/ns_c/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/ns_c/re
+++ b/star/test_suite/ns_c/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ns_c/rn1 b/star/test_suite/ns_c/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/ns_c/rn1
+++ b/star/test_suite/ns_c/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ns_h/Makefile b/star/test_suite/ns_h/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/ns_h/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/ns_h/clean b/star/test_suite/ns_h/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/ns_h/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/ns_h/make/makefile b/star/test_suite/ns_h/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/ns_h/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/ns_h/mk b/star/test_suite/ns_h/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/ns_h/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/ns_h/re b/star/test_suite/ns_h/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/ns_h/re
+++ b/star/test_suite/ns_h/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ns_h/rn1 b/star/test_suite/ns_h/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/ns_h/rn1
+++ b/star/test_suite/ns_h/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ns_he/Makefile b/star/test_suite/ns_he/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/ns_he/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/ns_he/clean b/star/test_suite/ns_he/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/ns_he/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/ns_he/make/makefile b/star/test_suite/ns_he/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/ns_he/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/ns_he/mk b/star/test_suite/ns_he/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/ns_he/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/ns_he/re b/star/test_suite/ns_he/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/ns_he/re
+++ b/star/test_suite/ns_he/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ns_he/rn1 b/star/test_suite/ns_he/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/ns_he/rn1
+++ b/star/test_suite/ns_he/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/other_physics_hooks/Makefile b/star/test_suite/other_physics_hooks/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/other_physics_hooks/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/other_physics_hooks/clean b/star/test_suite/other_physics_hooks/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/other_physics_hooks/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/other_physics_hooks/make/makefile b/star/test_suite/other_physics_hooks/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/other_physics_hooks/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/other_physics_hooks/mk b/star/test_suite/other_physics_hooks/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/other_physics_hooks/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/other_physics_hooks/re b/star/test_suite/other_physics_hooks/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/other_physics_hooks/re
+++ b/star/test_suite/other_physics_hooks/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/other_physics_hooks/rn1 b/star/test_suite/other_physics_hooks/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/other_physics_hooks/rn1
+++ b/star/test_suite/other_physics_hooks/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/pisn/Makefile b/star/test_suite/pisn/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/pisn/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/pisn/clean b/star/test_suite/pisn/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/pisn/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/pisn/make/makefile b/star/test_suite/pisn/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/pisn/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/pisn/mk b/star/test_suite/pisn/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/pisn/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/pisn/re b/star/test_suite/pisn/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/pisn/re
+++ b/star/test_suite/pisn/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/pisn/rn1 b/star/test_suite/pisn/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/pisn/rn1
+++ b/star/test_suite/pisn/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/pisn/rn_all b/star/test_suite/pisn/rn_all
deleted file mode 100755
index 0ac04c424..000000000
--- a/star/test_suite/pisn/rn_all
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-do_one inlist_make_late_pre_zams_header late_pre_zams.mod
-cp late_pre_zams.mod standard_late_pre_zams.mod
-
-do_one inlist_to_zams_header zams.mod
-cp zams.mod standard_zams.mod
-
-do_one inlist_to_end_core_he_burn_header after_core_he_burn.mod
-cp after_core_he_burn.mod standard_after_core_he_burn.mod
-
-do_one inlist_remove_envelope_header removed_envelope.mod
-cp removed_envelope.mod standard_removed_envelope.mod
-
-do_one inlist_to_end_core_c_burn_header after_core_c_burn.mod
-cp after_core_c_burn.mod standard_after_core_c_burn.mod
-
-do_one inlist_convert_header converted.mod
-cp converted.mod standard_converted.mod
-
-do_one inlist_finish_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-echo 'finished'
-
diff --git a/star/test_suite/pisn/rn_standard b/star/test_suite/pisn/rn_standard
deleted file mode 100755
index a314141ae..000000000
--- a/star/test_suite/pisn/rn_standard
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env bash
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_late_pre_zams.mod late_pre_zams.mod
-else
- do_one inlist_make_late_pre_zams_header late_pre_zams.mod
- cp late_pre_zams.mod standard_late_pre_zams.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_zams.mod zams.mod
-else
- do_one inlist_to_zams_header zams.mod
- cp zams.mod standard_zams.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_after_core_he_burn.mod after_core_he_burn.mod
-else
- do_one inlist_to_end_core_he_burn_header after_core_he_burn.mod
- cp after_core_he_burn.mod standard_after_core_he_burn.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_removed_envelope.mod removed_envelope.mod
-else
- do_one inlist_remove_envelope_header removed_envelope.mod
- cp removed_envelope.mod standard_removed_envelope.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_after_core_c_burn.mod after_core_c_burn.mod
-else
- do_one inlist_to_end_core_c_burn_header after_core_c_burn.mod
- cp after_core_c_burn.mod standard_after_core_c_burn.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_converted.mod converted.mod
-else
- do_one inlist_convert_header converted.mod
- cp converted.mod standard_converted.mod
-fi
-
-do_one inlist_finish_header final.mod
-
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-echo 'finished'
-
diff --git a/star/test_suite/ppisn/Makefile b/star/test_suite/ppisn/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/ppisn/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/ppisn/clean b/star/test_suite/ppisn/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/ppisn/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/ppisn/make/makefile b/star/test_suite/ppisn/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/ppisn/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/ppisn/mk b/star/test_suite/ppisn/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/ppisn/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/ppisn/re b/star/test_suite/ppisn/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/ppisn/re
+++ b/star/test_suite/ppisn/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/ppisn/rn1 b/star/test_suite/ppisn/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/ppisn/rn1
+++ b/star/test_suite/ppisn/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/radiative_levitation/Makefile b/star/test_suite/radiative_levitation/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/radiative_levitation/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/radiative_levitation/clean b/star/test_suite/radiative_levitation/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/radiative_levitation/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/radiative_levitation/make/makefile b/star/test_suite/radiative_levitation/make/makefile
deleted file mode 100644
index ad6b3efa2..000000000
--- a/star/test_suite/radiative_levitation/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-STAR = star
-SKIP_NAN_TRAPS = YES
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/radiative_levitation/mk b/star/test_suite/radiative_levitation/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/radiative_levitation/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/radiative_levitation/re b/star/test_suite/radiative_levitation/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/radiative_levitation/re
+++ b/star/test_suite/radiative_levitation/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/radiative_levitation/rn1 b/star/test_suite/radiative_levitation/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/radiative_levitation/rn1
+++ b/star/test_suite/radiative_levitation/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/relax_composition_j_entropy/Makefile b/star/test_suite/relax_composition_j_entropy/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/relax_composition_j_entropy/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/relax_composition_j_entropy/clean b/star/test_suite/relax_composition_j_entropy/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/relax_composition_j_entropy/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/relax_composition_j_entropy/make/makefile b/star/test_suite/relax_composition_j_entropy/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/relax_composition_j_entropy/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/relax_composition_j_entropy/mk b/star/test_suite/relax_composition_j_entropy/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/relax_composition_j_entropy/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/relax_composition_j_entropy/re b/star/test_suite/relax_composition_j_entropy/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/relax_composition_j_entropy/re
+++ b/star/test_suite/relax_composition_j_entropy/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/relax_composition_j_entropy/rn1 b/star/test_suite/relax_composition_j_entropy/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/relax_composition_j_entropy/rn1
+++ b/star/test_suite/relax_composition_j_entropy/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/relax_composition_j_entropy/rn_all b/star/test_suite/relax_composition_j_entropy/rn_all
deleted file mode 100755
index 688ab583c..000000000
--- a/star/test_suite/relax_composition_j_entropy/rn_all
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-# uncomment the following line to run all parts of the test
-# MESA_RUN_OPTIONAL=t
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
- do_one inlist_create_input_header create_input.mod
- cp create_input.mod standard_create_input.mod
- do_one inlist_start_relax_composition_j_entropy_header relaxed.mod
- cp relaxed.mod standard_relaxed.mod
- do_one inlist_relax_composition_j_entropy_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished'
-
diff --git a/star/test_suite/relax_composition_j_entropy/rn_standard b/star/test_suite/relax_composition_j_entropy/rn_standard
deleted file mode 100755
index 8bad11732..000000000
--- a/star/test_suite/relax_composition_j_entropy/rn_standard
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env bash
-
-# uncomment the following line to run all parts of the test
-# MESA_RUN_OPTIONAL=t
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_create_input.mod create_input.mod
-else
- do_one inlist_create_input_header create_input.mod
- cp create_input.mod standard_create_input.mod
-fi
-
-if [ -z "$MESA_RUN_OPTIONAL" ]; then
- cp standard_relaxed.mod relaxed.mod
-else
- do_one inlist_start_relax_composition_j_entropy_header relaxed.mod
- cp relaxed.mod standard_relaxed.mod
-fi
-
-do_one inlist_relax_composition_j_entropy_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished'
-
diff --git a/star/test_suite/rsp_BEP/Makefile b/star/test_suite/rsp_BEP/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_BEP/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_BEP/clean b/star/test_suite/rsp_BEP/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_BEP/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_BEP/history_columns.list b/star/test_suite/rsp_BEP/history_columns.list
index 7ee336e68..9d636ad56 100644
--- a/star/test_suite/rsp_BEP/history_columns.list
+++ b/star/test_suite/rsp_BEP/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_BEP/make/makefile b/star/test_suite/rsp_BEP/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/rsp_BEP/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_BEP/mk b/star/test_suite/rsp_BEP/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_BEP/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_BEP/re b/star/test_suite/rsp_BEP/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_BEP/re
+++ b/star/test_suite/rsp_BEP/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_BEP/rn1 b/star/test_suite/rsp_BEP/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_BEP/rn1
+++ b/star/test_suite/rsp_BEP/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_BLAP/Makefile b/star/test_suite/rsp_BLAP/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_BLAP/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_BLAP/clean b/star/test_suite/rsp_BLAP/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_BLAP/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_BLAP/history_columns.list b/star/test_suite/rsp_BLAP/history_columns.list
index 7ee336e68..9d636ad56 100644
--- a/star/test_suite/rsp_BLAP/history_columns.list
+++ b/star/test_suite/rsp_BLAP/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_BLAP/make/makefile b/star/test_suite/rsp_BLAP/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/rsp_BLAP/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_BLAP/mk b/star/test_suite/rsp_BLAP/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_BLAP/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_BLAP/re b/star/test_suite/rsp_BLAP/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_BLAP/re
+++ b/star/test_suite/rsp_BLAP/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_BLAP/rn1 b/star/test_suite/rsp_BLAP/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_BLAP/rn1
+++ b/star/test_suite/rsp_BLAP/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_Cepheid/Makefile b/star/test_suite/rsp_Cepheid/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_Cepheid/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_Cepheid/clean b/star/test_suite/rsp_Cepheid/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_Cepheid/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_Cepheid/history_columns.list b/star/test_suite/rsp_Cepheid/history_columns.list
index 6ba9df21b..e956810fa 100644
--- a/star/test_suite/rsp_Cepheid/history_columns.list
+++ b/star/test_suite/rsp_Cepheid/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_Cepheid/make/makefile b/star/test_suite/rsp_Cepheid/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/rsp_Cepheid/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_Cepheid/mk b/star/test_suite/rsp_Cepheid/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_Cepheid/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_Cepheid/re b/star/test_suite/rsp_Cepheid/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_Cepheid/re
+++ b/star/test_suite/rsp_Cepheid/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_Cepheid/rn1 b/star/test_suite/rsp_Cepheid/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_Cepheid/rn1
+++ b/star/test_suite/rsp_Cepheid/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_Cepheid_6M/Makefile b/star/test_suite/rsp_Cepheid_6M/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_Cepheid_6M/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_Cepheid_6M/clean b/star/test_suite/rsp_Cepheid_6M/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_Cepheid_6M/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_Cepheid_6M/history_columns.list b/star/test_suite/rsp_Cepheid_6M/history_columns.list
index 6ba9df21b..e956810fa 100644
--- a/star/test_suite/rsp_Cepheid_6M/history_columns.list
+++ b/star/test_suite/rsp_Cepheid_6M/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_Cepheid_6M/make/makefile b/star/test_suite/rsp_Cepheid_6M/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/rsp_Cepheid_6M/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_Cepheid_6M/mk b/star/test_suite/rsp_Cepheid_6M/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_Cepheid_6M/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_Cepheid_6M/re b/star/test_suite/rsp_Cepheid_6M/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_Cepheid_6M/re
+++ b/star/test_suite/rsp_Cepheid_6M/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_Cepheid_6M/rn1 b/star/test_suite/rsp_Cepheid_6M/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_Cepheid_6M/rn1
+++ b/star/test_suite/rsp_Cepheid_6M/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_Delta_Scuti/Makefile b/star/test_suite/rsp_Delta_Scuti/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_Delta_Scuti/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_Delta_Scuti/clean b/star/test_suite/rsp_Delta_Scuti/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_Delta_Scuti/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_Delta_Scuti/history_columns.list b/star/test_suite/rsp_Delta_Scuti/history_columns.list
index 7ee336e68..9d636ad56 100644
--- a/star/test_suite/rsp_Delta_Scuti/history_columns.list
+++ b/star/test_suite/rsp_Delta_Scuti/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_Delta_Scuti/make/makefile b/star/test_suite/rsp_Delta_Scuti/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/rsp_Delta_Scuti/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_Delta_Scuti/mk b/star/test_suite/rsp_Delta_Scuti/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_Delta_Scuti/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_Delta_Scuti/re b/star/test_suite/rsp_Delta_Scuti/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_Delta_Scuti/re
+++ b/star/test_suite/rsp_Delta_Scuti/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_Delta_Scuti/rn1 b/star/test_suite/rsp_Delta_Scuti/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_Delta_Scuti/rn1
+++ b/star/test_suite/rsp_Delta_Scuti/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_RR_Lyrae/Makefile b/star/test_suite/rsp_RR_Lyrae/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_RR_Lyrae/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_RR_Lyrae/clean b/star/test_suite/rsp_RR_Lyrae/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_RR_Lyrae/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_RR_Lyrae/history_columns.list b/star/test_suite/rsp_RR_Lyrae/history_columns.list
index 7ee336e68..9d636ad56 100644
--- a/star/test_suite/rsp_RR_Lyrae/history_columns.list
+++ b/star/test_suite/rsp_RR_Lyrae/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_RR_Lyrae/make/makefile b/star/test_suite/rsp_RR_Lyrae/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/rsp_RR_Lyrae/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_RR_Lyrae/mk b/star/test_suite/rsp_RR_Lyrae/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_RR_Lyrae/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_RR_Lyrae/re b/star/test_suite/rsp_RR_Lyrae/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_RR_Lyrae/re
+++ b/star/test_suite/rsp_RR_Lyrae/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_RR_Lyrae/rn1 b/star/test_suite/rsp_RR_Lyrae/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_RR_Lyrae/rn1
+++ b/star/test_suite/rsp_RR_Lyrae/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_Type_II_Cepheid/Makefile b/star/test_suite/rsp_Type_II_Cepheid/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_Type_II_Cepheid/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_Type_II_Cepheid/clean b/star/test_suite/rsp_Type_II_Cepheid/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_Type_II_Cepheid/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_Type_II_Cepheid/history_columns.list b/star/test_suite/rsp_Type_II_Cepheid/history_columns.list
index 7ee336e68..9d636ad56 100644
--- a/star/test_suite/rsp_Type_II_Cepheid/history_columns.list
+++ b/star/test_suite/rsp_Type_II_Cepheid/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_Type_II_Cepheid/make/makefile b/star/test_suite/rsp_Type_II_Cepheid/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/rsp_Type_II_Cepheid/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_Type_II_Cepheid/mk b/star/test_suite/rsp_Type_II_Cepheid/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_Type_II_Cepheid/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_Type_II_Cepheid/re b/star/test_suite/rsp_Type_II_Cepheid/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_Type_II_Cepheid/re
+++ b/star/test_suite/rsp_Type_II_Cepheid/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_Type_II_Cepheid/rn1 b/star/test_suite/rsp_Type_II_Cepheid/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_Type_II_Cepheid/rn1
+++ b/star/test_suite/rsp_Type_II_Cepheid/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_check_2nd_crossing/Makefile b/star/test_suite/rsp_check_2nd_crossing/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_check_2nd_crossing/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_check_2nd_crossing/clean b/star/test_suite/rsp_check_2nd_crossing/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_check_2nd_crossing/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_check_2nd_crossing/make/makefile b/star/test_suite/rsp_check_2nd_crossing/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/rsp_check_2nd_crossing/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_check_2nd_crossing/mk b/star/test_suite/rsp_check_2nd_crossing/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_check_2nd_crossing/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_check_2nd_crossing/re b/star/test_suite/rsp_check_2nd_crossing/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_check_2nd_crossing/re
+++ b/star/test_suite/rsp_check_2nd_crossing/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_check_2nd_crossing/rn1 b/star/test_suite/rsp_check_2nd_crossing/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_check_2nd_crossing/rn1
+++ b/star/test_suite/rsp_check_2nd_crossing/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_gyre/Makefile b/star/test_suite/rsp_gyre/Makefile
new file mode 100644
index 000000000..44b7de4ef
--- /dev/null
+++ b/star/test_suite/rsp_gyre/Makefile
@@ -0,0 +1,24 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+
+ifeq ($(WITH_GYRE),yes)
+ SRCS += src/run_star_extras.f90
+else
+ SRCS += src/run_star_extras_stub.f90
+endif
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/rsp_gyre/clean b/star/test_suite/rsp_gyre/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_gyre/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_gyre/history_columns.list b/star/test_suite/rsp_gyre/history_columns.list
index a5016795a..0310537db 100644
--- a/star/test_suite/rsp_gyre/history_columns.list
+++ b/star/test_suite/rsp_gyre/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_gyre/make/makefile b/star/test_suite/rsp_gyre/make/makefile
deleted file mode 100644
index da1cf8efd..000000000
--- a/star/test_suite/rsp_gyre/make/makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_GYRE) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(USE_GYRE),YES)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras_stub.f90
- $(WORK_COMPILE) $< -o run_star_extras.o
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
diff --git a/star/test_suite/rsp_gyre/mk b/star/test_suite/rsp_gyre/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_gyre/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_gyre/re b/star/test_suite/rsp_gyre/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_gyre/re
+++ b/star/test_suite/rsp_gyre/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_gyre/rn1 b/star/test_suite/rsp_gyre/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_gyre/rn1
+++ b/star/test_suite/rsp_gyre/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_gyre/src/run_star_extras.f90 b/star/test_suite/rsp_gyre/src/run_star_extras.f90
index 31d0b788e..5992e60e5 100644
--- a/star/test_suite/rsp_gyre/src/run_star_extras.f90
+++ b/star/test_suite/rsp_gyre/src/run_star_extras.f90
@@ -104,7 +104,7 @@ subroutine rsp_set_gyre_linear_analysis(id,restart,ierr)
call set_constant('R_SUN', Rsun)
call set_constant('L_SUN', Lsun)
- call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre')
+ call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src')
mode_l = 0 ! mode l (e.g. 0 for p modes, 1 for g modes)
! should match gyre.in mode l
diff --git a/star/test_suite/rsp_gyre/src/run_star_extras_stub.f90 b/star/test_suite/rsp_gyre/src/run_star_extras_stub.f90
index 06fbf48f5..ff9ebb26f 100644
--- a/star/test_suite/rsp_gyre/src/run_star_extras_stub.f90
+++ b/star/test_suite/rsp_gyre/src/run_star_extras_stub.f90
@@ -22,7 +22,7 @@ module run_star_extras
use star_lib
use star_def
use const_def
- use gyre_lib
+ use gyre_mesa_m
use math_lib
implicit none
diff --git a/star/test_suite/rsp_save_and_load_file/Makefile b/star/test_suite/rsp_save_and_load_file/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/rsp_save_and_load_file/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/rsp_save_and_load_file/clean b/star/test_suite/rsp_save_and_load_file/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/rsp_save_and_load_file/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/rsp_save_and_load_file/history_columns.list b/star/test_suite/rsp_save_and_load_file/history_columns.list
index 30bb650e9..bf68f4b77 100644
--- a/star/test_suite/rsp_save_and_load_file/history_columns.list
+++ b/star/test_suite/rsp_save_and_load_file/history_columns.list
@@ -76,7 +76,7 @@
!## mass change
!star_mdot ! d(star_mass)/dt (in msolar per year)
- log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+ !log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
!## imposed surface conditions
!Tsurf_factor
diff --git a/star/test_suite/rsp_save_and_load_file/make/makefile b/star/test_suite/rsp_save_and_load_file/make/makefile
deleted file mode 100644
index b49e914b2..000000000
--- a/star/test_suite/rsp_save_and_load_file/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR= star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/rsp_save_and_load_file/mk b/star/test_suite/rsp_save_and_load_file/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/rsp_save_and_load_file/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/rsp_save_and_load_file/re b/star/test_suite/rsp_save_and_load_file/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/rsp_save_and_load_file/re
+++ b/star/test_suite/rsp_save_and_load_file/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/rsp_save_and_load_file/rn1 b/star/test_suite/rsp_save_and_load_file/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/rsp_save_and_load_file/rn1
+++ b/star/test_suite/rsp_save_and_load_file/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/semiconvection/Makefile b/star/test_suite/semiconvection/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/semiconvection/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/semiconvection/clean b/star/test_suite/semiconvection/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/semiconvection/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/semiconvection/make/makefile b/star/test_suite/semiconvection/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/semiconvection/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/semiconvection/mk b/star/test_suite/semiconvection/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/semiconvection/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/semiconvection/re b/star/test_suite/semiconvection/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/semiconvection/re
+++ b/star/test_suite/semiconvection/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/semiconvection/rn1 b/star/test_suite/semiconvection/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/semiconvection/rn1
+++ b/star/test_suite/semiconvection/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/simplex_solar_calibration/Makefile b/star/test_suite/simplex_solar_calibration/Makefile
new file mode 100644
index 000000000..e8e2f8e01
--- /dev/null
+++ b/star/test_suite/simplex_solar_calibration/Makefile
@@ -0,0 +1,21 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+ src/run_star_extras.f90 \
+ src/simplex_search_data.f90 \
+ src/simplex_search_run_support.f90
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/simplex_solar_calibration/clean b/star/test_suite/simplex_solar_calibration/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/simplex_solar_calibration/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/simplex_solar_calibration/make/makefile b/star/test_suite/simplex_solar_calibration/make/makefile
deleted file mode 100644
index 6d4981063..000000000
--- a/star/test_suite/simplex_solar_calibration/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-STAR = star
-
-RUN_STAR_EXTRA_OBJS = simplex_search_data.o simplex_search_run_support.o
-
-include $(MESA_DIR)/star/work_standard_makefile
-
diff --git a/star/test_suite/simplex_solar_calibration/mk b/star/test_suite/simplex_solar_calibration/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/simplex_solar_calibration/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/simplex_solar_calibration/re b/star/test_suite/simplex_solar_calibration/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/simplex_solar_calibration/re
+++ b/star/test_suite/simplex_solar_calibration/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/simplex_solar_calibration/rn1 b/star/test_suite/simplex_solar_calibration/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/simplex_solar_calibration/rn1
+++ b/star/test_suite/simplex_solar_calibration/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/split_burn_big_net/Makefile b/star/test_suite/split_burn_big_net/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/split_burn_big_net/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/split_burn_big_net/clean b/star/test_suite/split_burn_big_net/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/split_burn_big_net/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/split_burn_big_net/make/makefile b/star/test_suite/split_burn_big_net/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/split_burn_big_net/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/split_burn_big_net/mk b/star/test_suite/split_burn_big_net/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/split_burn_big_net/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/split_burn_big_net/re b/star/test_suite/split_burn_big_net/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/split_burn_big_net/re
+++ b/star/test_suite/split_burn_big_net/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/split_burn_big_net/rn1 b/star/test_suite/split_burn_big_net/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/split_burn_big_net/rn1
+++ b/star/test_suite/split_burn_big_net/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/starspots/Makefile b/star/test_suite/starspots/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/starspots/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/starspots/clean b/star/test_suite/starspots/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/starspots/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/starspots/make/makefile b/star/test_suite/starspots/make/makefile
deleted file mode 100644
index 936874f5b..000000000
--- a/star/test_suite/starspots/make/makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-
-MESA_DIR = ../../../..
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/starspots/mk b/star/test_suite/starspots/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/starspots/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/starspots/re b/star/test_suite/starspots/re
index e3f36a106..7093783a3 100755
--- a/star/test_suite/starspots/re
+++ b/star/test_suite/starspots/re
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
+shopt -u expand_aliases
+
photo_directory=photos
function most_recent_photo {
- ls -t "$photo_directory" | head -1
+ ls -tp "$photo_directory" | grep -v / | head -1
}
if [ $# -eq 0 ]
@@ -15,17 +17,15 @@ fi
if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
then
- echo "specified photo does not exist"
+ echo "specified photo ($photo) does not exist"
exit 1
fi
echo "restart from $photo"
if ! cp "$photo_directory/$photo" restart_photo
then
- echo "failed to copy photo"
+ echo "failed to copy photo ($photo)"
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/starspots/rn1 b/star/test_suite/starspots/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/starspots/rn1
+++ b/star/test_suite/starspots/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/test_case_template/Makefile b/star/test_suite/test_case_template/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/test_case_template/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/test_case_template/clean b/star/test_suite/test_case_template/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/test_case_template/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/test_case_template/make/makefile b/star/test_suite/test_case_template/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/test_case_template/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/test_case_template/mk b/star/test_suite/test_case_template/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/test_case_template/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/test_case_template/re b/star/test_suite/test_case_template/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/test_case_template/re
+++ b/star/test_suite/test_case_template/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/test_case_template/rn1 b/star/test_suite/test_case_template/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/test_case_template/rn1
+++ b/star/test_suite/test_case_template/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/test_memory/Makefile b/star/test_suite/test_memory/Makefile
new file mode 100644
index 000000000..b75582368
--- /dev/null
+++ b/star/test_suite/test_memory/Makefile
@@ -0,0 +1,18 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := test-memory
+SRCS := \
+ src/test_memory.f90 \
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/test_suite/test_memory/clean b/star/test_suite/test_memory/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/test_memory/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/test_memory/make/makefile b/star/test_suite/test_memory/make/makefile
deleted file mode 100644
index 57224c0f0..000000000
--- a/star/test_suite/test_memory/make/makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-# change this as necessary. see utils/makefile_header for definitions.
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_EXTRAS)
-
-#################################################################
-
-EXEC = test_memory
-OBJS = test_memory.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(EXEC) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(EXEC) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-test_memory.o: $(WORK_SRC_DIR)/test_memory.f90
- $(WORK_COMPILE) $<
-else
-test_memory.o: $(WORK_SRC_DIR)/test_memory.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-%.o: $(STAR_JOB_DIR)/%.f
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod $(WORK_DIR)/$(EXEC)
-
-remk:
- -@rm -f $(OBJS) $(WORK_DIR)/$(EXEC)
-
diff --git a/star/test_suite/test_memory/mk b/star/test_suite/test_memory/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/test_memory/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/test_memory/rn b/star/test_suite/test_memory/rn
index 352677406..9287d6d2d 100755
--- a/star/test_suite/test_memory/rn
+++ b/star/test_suite/test_memory/rn
@@ -1,3 +1,3 @@
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./test_memory
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+#/usr/bin/env bash
+
+make run
diff --git a/star/test_suite/timing/Makefile b/star/test_suite/timing/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/timing/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/timing/clean b/star/test_suite/timing/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/timing/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/timing/make/makefile b/star/test_suite/timing/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/timing/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/timing/mk b/star/test_suite/timing/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/timing/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/timing/re b/star/test_suite/timing/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/timing/re
+++ b/star/test_suite/timing/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/timing/rn1 b/star/test_suite/timing/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/timing/rn1
+++ b/star/test_suite/timing/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/twin_studies/Makefile b/star/test_suite/twin_studies/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/twin_studies/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/twin_studies/clean b/star/test_suite/twin_studies/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/twin_studies/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/twin_studies/make/makefile b/star/test_suite/twin_studies/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/twin_studies/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/twin_studies/mk b/star/test_suite/twin_studies/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/twin_studies/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/twin_studies/re b/star/test_suite/twin_studies/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/twin_studies/re
+++ b/star/test_suite/twin_studies/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/twin_studies/rn1 b/star/test_suite/twin_studies/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/twin_studies/rn1
+++ b/star/test_suite/twin_studies/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/tzo/Makefile b/star/test_suite/tzo/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/tzo/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/tzo/clean b/star/test_suite/tzo/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/star/test_suite/tzo/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/star/test_suite/tzo/make/makefile b/star/test_suite/tzo/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/tzo/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/tzo/mk b/star/test_suite/tzo/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/tzo/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/tzo/re b/star/test_suite/tzo/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/tzo/re
+++ b/star/test_suite/tzo/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/tzo/rn1 b/star/test_suite/tzo/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/tzo/rn1
+++ b/star/test_suite/tzo/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_acc_small_dm/Makefile b/star/test_suite/wd_acc_small_dm/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/wd_acc_small_dm/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/wd_acc_small_dm/clean b/star/test_suite/wd_acc_small_dm/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/wd_acc_small_dm/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/wd_acc_small_dm/make/makefile b/star/test_suite/wd_acc_small_dm/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/wd_acc_small_dm/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/wd_acc_small_dm/mk b/star/test_suite/wd_acc_small_dm/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/wd_acc_small_dm/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/wd_acc_small_dm/re b/star/test_suite/wd_acc_small_dm/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/wd_acc_small_dm/re
+++ b/star/test_suite/wd_acc_small_dm/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_acc_small_dm/rn1 b/star/test_suite/wd_acc_small_dm/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/wd_acc_small_dm/rn1
+++ b/star/test_suite/wd_acc_small_dm/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_aic/Makefile b/star/test_suite/wd_aic/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/wd_aic/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/wd_aic/clean b/star/test_suite/wd_aic/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/wd_aic/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/wd_aic/make/makefile b/star/test_suite/wd_aic/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/wd_aic/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/wd_aic/mk b/star/test_suite/wd_aic/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/wd_aic/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/wd_aic/re b/star/test_suite/wd_aic/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/wd_aic/re
+++ b/star/test_suite/wd_aic/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_aic/rn1 b/star/test_suite/wd_aic/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/wd_aic/rn1
+++ b/star/test_suite/wd_aic/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_c_core_ignition/Makefile b/star/test_suite/wd_c_core_ignition/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/wd_c_core_ignition/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/wd_c_core_ignition/clean b/star/test_suite/wd_c_core_ignition/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/wd_c_core_ignition/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/wd_c_core_ignition/make/makefile b/star/test_suite/wd_c_core_ignition/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/wd_c_core_ignition/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/wd_c_core_ignition/mk b/star/test_suite/wd_c_core_ignition/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/wd_c_core_ignition/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/wd_c_core_ignition/re b/star/test_suite/wd_c_core_ignition/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/wd_c_core_ignition/re
+++ b/star/test_suite/wd_c_core_ignition/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_c_core_ignition/rn1 b/star/test_suite/wd_c_core_ignition/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/wd_c_core_ignition/rn1
+++ b/star/test_suite/wd_c_core_ignition/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_c_core_ignition/rn_all b/star/test_suite/wd_c_core_ignition/rn_all
deleted file mode 100755
index a769b532b..000000000
--- a/star/test_suite/wd_c_core_ignition/rn_all
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-# uncomment the following line to run all parts of the test
-# MESA_RUN_OPTIONAL=t
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-do_one inlist_relax_mass_header wd_c_core_ignition.mod
-do_one inlist_wd_c_core_ignition_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished all inlists for wd_c_core_ignition'
diff --git a/star/test_suite/wd_c_core_ignition/rn_standard b/star/test_suite/wd_c_core_ignition/rn_standard
deleted file mode 100755
index 3994f6ed6..000000000
--- a/star/test_suite/wd_c_core_ignition/rn_standard
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-# uncomment the following line to run all parts of the test
-# MESA_RUN_OPTIONAL=t
-
-# this provides the definition of do_one (run one part of test)
-# do_one [inlist] [output model] [LOGS directory]
-source "${MESA_DIR}/star/test_suite/test_suite_helpers"
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-# set MESA_RUN_OPTIONAL to run all parts of test
-if [ -n "$MESA_RUN_OPTIONAL" ]; then
- do_one inlist_relax_mass_header wd_c_core_ignition.mod
-fi
-
-do_one inlist_wd_c_core_ignition_header final.mod
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-
-echo 'finished all inlists for wd_c_core_ignition'
diff --git a/star/test_suite/wd_cool_0.6M/Makefile b/star/test_suite/wd_cool_0.6M/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/wd_cool_0.6M/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/wd_cool_0.6M/clean b/star/test_suite/wd_cool_0.6M/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/wd_cool_0.6M/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/wd_cool_0.6M/make/makefile b/star/test_suite/wd_cool_0.6M/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/wd_cool_0.6M/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/wd_cool_0.6M/mk b/star/test_suite/wd_cool_0.6M/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/wd_cool_0.6M/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/wd_cool_0.6M/re b/star/test_suite/wd_cool_0.6M/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/wd_cool_0.6M/re
+++ b/star/test_suite/wd_cool_0.6M/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_cool_0.6M/rn1 b/star/test_suite/wd_cool_0.6M/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/wd_cool_0.6M/rn1
+++ b/star/test_suite/wd_cool_0.6M/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_diffusion/Makefile b/star/test_suite/wd_diffusion/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/wd_diffusion/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/wd_diffusion/clean b/star/test_suite/wd_diffusion/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/wd_diffusion/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/wd_diffusion/make/makefile b/star/test_suite/wd_diffusion/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/wd_diffusion/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/wd_diffusion/mk b/star/test_suite/wd_diffusion/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/wd_diffusion/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/wd_diffusion/re b/star/test_suite/wd_diffusion/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/wd_diffusion/re
+++ b/star/test_suite/wd_diffusion/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_diffusion/rn1 b/star/test_suite/wd_diffusion/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/wd_diffusion/rn1
+++ b/star/test_suite/wd_diffusion/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_he_shell_ignition/Makefile b/star/test_suite/wd_he_shell_ignition/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/wd_he_shell_ignition/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/wd_he_shell_ignition/clean b/star/test_suite/wd_he_shell_ignition/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/wd_he_shell_ignition/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/wd_he_shell_ignition/make/makefile b/star/test_suite/wd_he_shell_ignition/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/wd_he_shell_ignition/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/wd_he_shell_ignition/mk b/star/test_suite/wd_he_shell_ignition/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/wd_he_shell_ignition/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/wd_he_shell_ignition/re b/star/test_suite/wd_he_shell_ignition/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/wd_he_shell_ignition/re
+++ b/star/test_suite/wd_he_shell_ignition/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_he_shell_ignition/rn1 b/star/test_suite/wd_he_shell_ignition/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/wd_he_shell_ignition/rn1
+++ b/star/test_suite/wd_he_shell_ignition/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_nova_burst/Makefile b/star/test_suite/wd_nova_burst/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/wd_nova_burst/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/wd_nova_burst/clean b/star/test_suite/wd_nova_burst/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/wd_nova_burst/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/wd_nova_burst/make/makefile b/star/test_suite/wd_nova_burst/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/wd_nova_burst/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/wd_nova_burst/mk b/star/test_suite/wd_nova_burst/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/wd_nova_burst/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/wd_nova_burst/re b/star/test_suite/wd_nova_burst/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/wd_nova_burst/re
+++ b/star/test_suite/wd_nova_burst/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_nova_burst/rn1 b/star/test_suite/wd_nova_burst/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/wd_nova_burst/rn1
+++ b/star/test_suite/wd_nova_burst/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_stable_h_burn/Makefile b/star/test_suite/wd_stable_h_burn/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/wd_stable_h_burn/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/wd_stable_h_burn/clean b/star/test_suite/wd_stable_h_burn/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/wd_stable_h_burn/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/wd_stable_h_burn/make/makefile b/star/test_suite/wd_stable_h_burn/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/wd_stable_h_burn/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/wd_stable_h_burn/mk b/star/test_suite/wd_stable_h_burn/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/wd_stable_h_burn/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/wd_stable_h_burn/re b/star/test_suite/wd_stable_h_burn/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/wd_stable_h_burn/re
+++ b/star/test_suite/wd_stable_h_burn/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/wd_stable_h_burn/rn1 b/star/test_suite/wd_stable_h_burn/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/wd_stable_h_burn/rn1
+++ b/star/test_suite/wd_stable_h_burn/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/zams_to_cc_80/Makefile b/star/test_suite/zams_to_cc_80/Makefile
new file mode 100644
index 000000000..c779b9d6d
--- /dev/null
+++ b/star/test_suite/zams_to_cc_80/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/test_suite/zams_to_cc_80/clean b/star/test_suite/zams_to_cc_80/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/test_suite/zams_to_cc_80/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/test_suite/zams_to_cc_80/make/makefile b/star/test_suite/zams_to_cc_80/make/makefile
deleted file mode 100644
index f2017faed..000000000
--- a/star/test_suite/zams_to_cc_80/make/makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/test_suite/zams_to_cc_80/mk b/star/test_suite/zams_to_cc_80/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/test_suite/zams_to_cc_80/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/test_suite/zams_to_cc_80/re b/star/test_suite/zams_to_cc_80/re
index 7fd60020a..7093783a3 100755
--- a/star/test_suite/zams_to_cc_80/re
+++ b/star/test_suite/zams_to_cc_80/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/zams_to_cc_80/re_nomodfiles b/star/test_suite/zams_to_cc_80/re_nomodfiles
deleted file mode 100755
index d447f6665..000000000
--- a/star/test_suite/zams_to_cc_80/re_nomodfiles
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-
-#echo $#
-#echo $1
-#echo $2
-
-photo_directory=photos
-
-function most_recent_photo {
- ls -t "$photo_directory" | head -1
-}
-
-if [ "$#" -ne 2 ]
-then
- echo "must pass two arguments, photo string and inlist name"
- exit 1
-fi
-
-if [ $1 = "." ]
-then
- photo=$(most_recent_photo)
-else
- photo=$1
-fi
-
-if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
-then
- echo "specified photo does not exist"
- exit 1
-fi
-
-echo "restart from $photo"
-if ! cp "$photo_directory/$photo" restart_photo
-then
- echo "failed to copy photo"
- exit 1
-fi
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star $2
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test_suite/zams_to_cc_80/rn1 b/star/test_suite/zams_to_cc_80/rn1
index 25a1a7b16..f4ce7695f 100755
--- a/star/test_suite/zams_to_cc_80/rn1
+++ b/star/test_suite/zams_to_cc_80/rn1
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/test_suite/zams_to_cc_80/rn_nomodfiles b/star/test_suite/zams_to_cc_80/rn_nomodfiles
deleted file mode 100755
index c898ce52c..000000000
--- a/star/test_suite/zams_to_cc_80/rn_nomodfiles
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-rm -f restart_photo
-echo $1
-
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star $1
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/test_suite/zams_to_cc_80/run_all b/star/test_suite/zams_to_cc_80/run_all
deleted file mode 100755
index e0b9ab8d7..000000000
--- a/star/test_suite/zams_to_cc_80/run_all
+++ /dev/null
@@ -1,6 +0,0 @@
-./rn_nomodfiles inlist_make_late_pre_zams_header
-./re_nomodfiles . inlist_to_zams_header
-./re_nomodfiles . inlist_to_end_core_he_burn_header
-./re_nomodfiles . inlist_to_end_core_c_burn_header
-./re_nomodfiles . inlist_to_lgTmax_header
-./re_nomodfiles . inlist_to_cc_header
diff --git a/star/work/Makefile b/star/work/Makefile
new file mode 100644
index 000000000..a9df6ba96
--- /dev/null
+++ b/star/work/Makefile
@@ -0,0 +1,19 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR enviroment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := star
+SRCS := \
+ src/run.f90 \
+ src/run_star_extras.f90 \
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/work/README.rst b/star/work/README.rst
index cec201c4e..131825515 100644
--- a/star/work/README.rst
+++ b/star/work/README.rst
@@ -12,14 +12,7 @@ These directions assume you have already installed MESA.
Copy this work directory to somewhere outside the mesa directory tree
and name it anything you like.
-Compile by executing the ``mk`` script::
-
- ./mk
-
-This compiles the files in ``src/``, links them against MESA, and
-produces the ``star`` executable file.
-
-By convention, run the program using the ``rn`` script::
+Compile and run the star program using the ``rn`` script::
./rn
@@ -43,6 +36,4 @@ where ``[photo]`` is one of the saved snapshot files in ``photos``.
If no file is specified, MESA restarts from the most recent photo.
You can remove the compiled files and the star program by executing
-the ``clean`` script::
-
- ./clean
+``make clean``.
diff --git a/star/work/clean b/star/work/clean
deleted file mode 100755
index 9dff1275b..000000000
--- a/star/work/clean
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-cd make
-make clean
diff --git a/star/work/make/makefile b/star/work/make/makefile
deleted file mode 100644
index c39362fbb..000000000
--- a/star/work/make/makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-ifeq ($(MESA_DIR),)
-ifeq ($($MESA_DIR_INTENTIONALLY_EMPTY),)
- $(error MESA_DIR environment variable is not set)
-endif
-endif
-
-STAR = star
-
-include $(MESA_DIR)/star/work_standard_makefile
diff --git a/star/work/mk b/star/work/mk
deleted file mode 100755
index 55bde5274..000000000
--- a/star/work/mk
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd make; make; check_okay
diff --git a/star/work/re b/star/work/re
index 7fd60020a..7093783a3 100755
--- a/star/work/re
+++ b/star/work/re
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
-shopt -u expand_aliases
+shopt -u expand_aliases
photo_directory=photos
@@ -28,6 +28,4 @@ then
exit 1
fi
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/work/rn b/star/work/rn
index 25a1a7b16..f4ce7695f 100755
--- a/star/work/rn
+++ b/star/work/rn
@@ -2,6 +2,4 @@
rm -f restart_photo
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
-./star
-date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+make run
diff --git a/star/work_standard_makefile b/star/work_standard_makefile
deleted file mode 100755
index 58b3200bd..000000000
--- a/star/work_standard_makefile
+++ /dev/null
@@ -1,64 +0,0 @@
-# work_standard_makefile
-
-# change this as necessary. see utils/makefile_header for definitions.
-
-include $(MESA_DIR)/utils/makefile_header
-
-LOAD_MESA = $(LOAD_EXTRAS1) $(LOAD_MESA_STAR) $(LOAD_EXTRAS)
-
-#################################################################
-
-ifndef STAR
-STAR = star
-endif
-
-# STAR_WORK_OBJS defined in makefile_header
-OBJS = $(RUN_STAR_EXTRA_OBJS) $(STAR_WORK_OBJS) run.o
-
-WORK_DIR = ..
-WORK_SRC_DIR = $(WORK_DIR)/src
-STAR_JOB_DIR = $(MESA_DIR)/star/job
-
-$(STAR) : $(OBJS)
- $(LOADER) $(FCopenmp) -o $(WORK_DIR)/$(STAR) $(OBJS) $(LOAD_MESA)
-
-#################################################################
-
-# WORK_COMPILE defined in makefile_header
-
-ifeq ($(SKIP_NAN_TRAPS),YES)
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $<
-else
-run.o: $(WORK_SRC_DIR)/run.f90
- $(WORK_COMPILE) $(FCtrapNANs) $<
-endif
-
-ifeq ($(MESA_CONTRIB_DIR),)
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) $<
-else
-run_star_extras.o: $(WORK_SRC_DIR)/run_star_extras.f90
- $(WORK_COMPILE) -I $(MESA_CONTRIB_DIR)/hooks $<
-endif
-
-%.o: $(WORK_SRC_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-%.o: $(STAR_JOB_DIR)/%.f90
- $(WORK_COMPILE) $<
-
-clean:
- -@rm -f *.o *.mod *.smod $(WORK_DIR)/$(STAR)
-
-remk:
- -@rm -f run.o $(WORK_DIR)/$(STAR)
-
-
-
-
-
-
-
-
-
diff --git a/star_data/Makefile b/star_data/Makefile
new file mode 100644
index 000000000..663179171
--- /dev/null
+++ b/star_data/Makefile
@@ -0,0 +1,29 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := star_data
+SRCS := public/star_data_def.f90 \
+ public/star_data_lib.f90 \
+ public/star_pgstar.f90
+
+SRCS_CHECK = test/src/test_star_data.f90
+INTERNAL_DEPENDS_ON := const utils auto_diff chem net kap colors eos neu rates
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := star_data_lib.mod star_data_def.mod star_pgstar.mod
+INSTALL_INCLUDES := private/pgstar_controls.inc \
+ private/star_controls_dev.inc \
+ private/star_controls.inc \
+ private/star_job_controls_dev.inc \
+ private/star_job_controls.inc \
+ private/star_job_controls_params.inc
+
+include $(MAKE_DIR)/Makefile
diff --git a/star_data/build_and_test b/star_data/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/star_data/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/star_data/build_and_test_parallel b/star_data/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/star_data/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/star_data/clean b/star_data/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/star_data/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/star_data/cpv b/star_data/cpv
deleted file mode 100755
index f2ae5b1cf..000000000
--- a/star_data/cpv
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-if [ -d private_$1 ]
-then
- echo private_$1 "already exists, so abort cpv"
-else
- mkdir private_$1
- cp private/* private_$1
- mkdir public_$1
- cp public/* public_$1
- echo star_data $1
-fi
diff --git a/star_data/export b/star_data/export
deleted file mode 100755
index db3250885..000000000
--- a/star_data/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/star_data/i1 b/star_data/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/star_data/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/star_data/i1p b/star_data/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/star_data/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/star_data/make/makefile b/star_data/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/star_data/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/star_data/make/makefile_base b/star_data/make/makefile_base
deleted file mode 100644
index bdca896ea..000000000
--- a/star_data/make/makefile_base
+++ /dev/null
@@ -1,132 +0,0 @@
-# This is the makefile for the mesa star_data package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = \
- star_pgstar.f90 \
- star_data_def.f90 \
- star_data_lib.f90 \
-
-#################################################################
-#
-# TARGETS
-
-LIB = libstar_data.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS)
-else
- $(LIB_TOOL) $(LIB) $(OBJS)
-endif
-
-clean:
- -@rm -f *.o *.mod *.smod *genmod.f90 *.so *.a .depend .order
-
-install:
- @$(CP_IF_NEWER) star_data_lib.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) star_data_def.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) star_pgstar.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) ../private/*.inc $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-# Paths to search for source & include files
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.inc $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-# Automatic dependency generation using makedepf90. If full
-# dependencies are required, set FULLDEPS to the value 'yes';
-# otherwise, order-only dependencies will be generated. Note that
-# the default value given below can be overridden from the command
-# line and/or the shell environment; this provides a simple way
-# to turn off full dependencies without editing this file
-
-FULLDEPS ?= yes
-
-# Turning off FULLDEPS makes Bill happy because eliminates unnecessary extra compiles
-# but beware; here are comments from Rich:
-#
-# Generally speaking, we *DON'T* want to make the order-only checking the default,
-# because then a modification to a module which changes its public interface
-# would not trigger a rebuild of all the modules which depend on it.
-# Bad things would result.
-#
-# However, for when one is playing around with internals, in a way that doesn't
-# affect public interfaces, it can be a time-saving measure to use order-only checking.
-
-ifeq ($(filter clean,$(MAKECMDGOALS)),)
-
- DEPEND_DIRS = .:$(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(DEPEND_DIRS) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(DEPEND_DIRS) $(SRCS) > .depend
- endif
-
- .order : .depend
- @sed -e 's/:/:|/g' .depend > .order
-
- ifeq ($(FULLDEPS),yes)
- -include .depend
- else
- -include .order
- endif
-
-endif
diff --git a/star_data/mk b/star_data/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/star_data/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/star_data/replace_v b/star_data/replace_v
deleted file mode 100755
index 5a9831ae9..000000000
--- a/star_data/replace_v
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-cp private_$1/* private/
-cp public_$1/* public/
-echo star_data $1
diff --git a/star_data/test/ck b/star_data/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/star_data/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/star_data/test/clean b/star_data/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/star_data/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/star_data/test/cleanup b/star_data/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/star_data/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/star_data/test/export b/star_data/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/star_data/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/star_data/test/make/makefile b/star_data/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/star_data/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/star_data/test/make/makefile_base b/star_data/test/make/makefile_base
deleted file mode 100644
index cef45417e..000000000
--- a/star_data/test/make/makefile_base
+++ /dev/null
@@ -1,86 +0,0 @@
-# This is the makefile for testing the mesa star_data package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_star_data.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = star_data
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = net eos kap rates chem $(LIBS_MESA_NUMERICS)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) -lnet -leos -lkap -lrates -lchem $(LOAD_MESA_NUMERICS)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo FC $@
- @$(FC) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(FC) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/star_data/test/mk b/star_data/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/star_data/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/star_data/test/mkx b/star_data/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/star_data/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/star_data/test/rn b/star_data/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/star_data/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/stella/res/Makefile b/stella/res/Makefile
new file mode 100644
index 000000000..f6b17f9ca
--- /dev/null
+++ b/stella/res/Makefile
@@ -0,0 +1,20 @@
+include ../../make/defaults-module.mk
+
+MODULE_NAME := stella-extras
+SRCS := stella_extras.f90
+SRCS_CHECK :=
+INTERNAL_DEPENDS_ON := const math utils colors interp_1d interp_2d
+EXTERNAL_DEPENDS_ON :=
+CHECK_RESULTS_GOLDEN :=
+INCLUDE_DIRS :=
+
+# Install
+
+MODULES :=
+INSTALL_INCLUDES :=
+BINTYPE := executable
+
+include $(MAKE_DIR)/Makefile
+
+run: $(OBJ_OUT)
+ $(OBJ_OUT)
diff --git a/stella/res/makefile b/stella/res/makefile
deleted file mode 100644
index fd08e479f..000000000
--- a/stella/res/makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#################################################################
-
-
-MESA_DIR = ../..
-
-include $(MESA_DIR)/utils/makefile_header
-
-
-#################################################################
-
-PROG = stella_extras
-PROG_OBJS = stella_extras.o
-PROG_DIR = .
-
-
-$(PROG) : $(PROG_OBJS)
- $(LOADER) $(FCopenmp) -o $(PROG_DIR)/$(PROG) $(PROG_OBJS) \
- -L$(MESA_LIB_DIR) $(LOAD_MESA_MACRO)
-
-# for more options, see utils/makefile_header
-
-#################################################################
-
-MY_FC_FLAGS = $(FCfree)
-SRC_DIR = .
-
-COMPILE = $(FC) $(FCbasic) $(FCopenmp) $(FCstatic) $(OTHER_INCLUDES) $(FCwarn) $(FCimpno) $(FCchecks) $(FCopt) $(FCdebug) -c
-
-%.o: $(SRC_DIR)/%.f90
- $(COMPILE) $(MY_FC_FLAGS) $<
-
-clean:
- -@rm -f *.o *.mod $(PROG_DIR)/$(PROG)
diff --git a/stella/res/rn b/stella/res/rn
deleted file mode 100755
index 1fe1eaeca..000000000
--- a/stella/res/rn
+++ /dev/null
@@ -1 +0,0 @@
-./stella_extras
\ No newline at end of file
diff --git a/stella/res/stella_extras.f90 b/stella/res/stella_extras.f90
index fb0837a8c..f326908b1 100644
--- a/stella/res/stella_extras.f90
+++ b/stella/res/stella_extras.f90
@@ -12,13 +12,13 @@ program main
implicit none
- integer :: i, j, k, zone, denjmax, idum, ierr
+ integer :: i, j, k, zone, idum, ierr
real(dp), allocatable, dimension(:, :) :: &
r, v, temp, den, kap, tempr, xm, smooth, tau, lum, n_bar, n_e
real(dp), allocatable, dimension(:) :: &
t, m, dm, h, he, c, n, o, ne, na, mg, al, si, s, ar, ca, fe, ni
- real(dp) :: dum, time, X, sum_tau, tauph, tau_extra, denmax, gdepos
- character(len=132) :: runname, filestr, fname, test_str
+ real(dp) :: dum, time, X, sum_tau, tauph, tau_extra, gdepos
+ character(len=132) :: filestr, fname, test_str
character(len=256) :: line, my_mesa_dir
real(dp), parameter :: &
@@ -30,18 +30,18 @@ program main
real(dp) :: bcxmin(num_logTs), bcxmax(num_logTs), Ts(num_logTs)
real(dp) :: bcymin(num_logRhos), bcymax(num_logRhos)
real(dp) :: time_lbol(max_lbol), logL_lbol(max_lbol), t0, logL_lbol_max
- real(dp), pointer, dimension(:) :: logRhos, logTs, tau_sob_f1, tau_sob_values
+ real(dp), pointer, dimension(:) :: logRhos, logTs, tau_sob_f1
real(dp), pointer :: tau_sob_f(:, :, :)
- real(dp) :: tau_prev, tau_sob_prev, alfa, beta, L_div_Lsun, &
+ real(dp) :: tau_sob_prev, alfa, beta, L_div_Lsun, &
v_sob_hi_tau, m_sob_hi_tau, r_sob_hi_tau, &
v_sob_med_tau, m_sob_med_tau, r_sob_med_tau, &
v_sob_lo_tau, m_sob_lo_tau, r_sob_lo_tau, &
- m_center, r_center, m_edge, r_edge, v_edge, &
+ m_center, r_center, &
star_mass, mass_IB, skip, Lbol, logRho, logT, eta, &
density, temperature, n_Fe, tau_sob, time_sec, fval(6), &
rphot, mphot, log_g, Xsurf, Ysurf, Zsurf, Fe_H, Z_div_X, &
bb_magU, bb_magB, bb_magV, bb_magR, bb_magI
- integer :: nm, num_models, cnt, k_phot, iday
+ integer :: nm, num_models, k_phot, iday
my_mesa_dir = '../..'
call const_init(my_mesa_dir, ierr)
@@ -57,7 +57,7 @@ program main
[n_colors], ierr)
if (ierr /= 0) then
write (*, *) 'colors_init failed during initialization'
- return
+ call mesa_error(__FILE__,__LINE__)
end if
! setup interpolation table for tau sob eta
@@ -125,8 +125,8 @@ program main
tauph = 2d0/3d0
tau_extra = 5d0
- if (iargc() > 0) then
- call GetArg(1, filestr)
+ if (command_argument_count() > 0) then
+ call get_command_argument(1, filestr)
else
filestr = 'mesa'
end if
@@ -198,7 +198,7 @@ program main
! call mesa_error(__FILE__,__LINE__)
!end if
dum = interp_logLbol(time)
- write (24, '(99(1pe18.6,x))') time - t0, dum, log10(gdepos*1d50)
+ write (24, '(99(1pe18.6,1x))') time - t0, dum, log10(gdepos*1d50)
end do
end do
@@ -244,13 +244,13 @@ program main
write (23, '(a)') '# photosphere. bb_mag* are synthetic color magnitudes from mesa/colors.' &
//' see mesa.tt for stella color magnitudes from multiband rad-hydro.'
- write (23, '(a4,99(a18,x))') 'k', 't post max Lbol', 'radius(cm)', 'v(km/s)', 'mass(Msun)', &
+ write (23, '(a4,99(a18,1x))') 'k', 't post max Lbol', 'radius(cm)', 'v(km/s)', 'mass(Msun)', &
'logT', 'rho', 'kap', 'h', 'he', 'o', 'fe', 'tau_IB', 'Lbol', &
'bb_magU', 'bb_magB', 'bb_magV', 'bb_magR', 'bb_magI', 'T_rad'
write (24, '(a,3f8.3)') '# v where tau Sob for FeII 5169 is (low,medium,high) ', &
tau_sob_lo, tau_sob_med, tau_sob_hi
- write (24, '(5x,99(a18,x))') &
+ write (24, '(5x,99(a18,1x))') &
't post max Lbol', 'v_tau_lo', 'v_tau_med', 'v_tau_hi', 'rho', 'T', 'eta', &
'm_tau_lo', 'r_tau_lo', 'm_tau_med', 'r_tau_med', 'm_tau_hi', 'r_tau_hi'
write (27, '(99(a13))') 't-t0', 'tau', 'rho', 'T', 'r', 'v'
@@ -363,7 +363,7 @@ program main
bb_magV = get1_synthetic_color_abs_mag('bb_V')
bb_magR = get1_synthetic_color_abs_mag('bb_R')
bb_magI = get1_synthetic_color_abs_mag('bb_I')
- write (23, '(i5,99(1pe18.6,x))') j, time - t0, &
+ write (23, '(i5,99(1pe18.6,1x))') j, time - t0, &
rphot, (alfa*v(j, nm) + beta*v(j - 1, nm))*1d3, mphot, logT, &
alfa*den(j, nm) + beta*den(j - 1, nm), alfa*kap(j, nm) + beta*kap(j - 1, nm), &
Xsurf, Ysurf, alfa*o(j) + beta*o(j - 1), alfa*fe(j) + beta*fe(j - 1), &
@@ -438,7 +438,7 @@ program main
m_sob_hi_tau = star_mass - (alfa*xm(k, nm) + beta*xm(k + 1, nm))
r_sob_hi_tau = alfa*r(k, nm) + beta*r(k + 1, nm)
if (k > k_phot - 10) &
- write (24, '(i5,99(1pe18.4,x))') k, time - t0, &
+ write (24, '(i5,99(1pe18.4,1x))') k, time - t0, &
v_sob_lo_tau*1d3, v_sob_med_tau*1d3, v_sob_hi_tau*1d3, &
10**logRho, 10**logT, eta, &
m_sob_lo_tau, r_sob_lo_tau, &
@@ -526,7 +526,7 @@ subroutine save_day_post_Lbol_max(day, t0, zone, star_mass, mass_IB, daystr)
integer, parameter :: io = 26, ncol = 36
real(dp) :: tnm, t1, t2, alfa, beta, data1(ncol), data2(ncol)
- integer :: k, i, nm1, nm2
+ integer :: k, nm1, nm2
character(len=132) :: fname
include 'formats'
diff --git a/touch b/touch
index 1588dca88..97854cb90 100755
--- a/touch
+++ b/touch
@@ -1,56 +1,8 @@
#!/usr/bin/env bash
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo "FAILED"
- exit 1
- fi
-}
+set -euo pipefail
-function do_one {
- cd "$1" || exit
- check_okay
- echo "cleaning" "$1"
- ./clean
- check_okay
- cd ..
-}
-
-do_one adipls
-do_one astero
-do_one atm
-do_one auto_diff
-do_one binary
-do_one chem
-do_one colors
-do_one const
-do_one eos
-do_one gyre
-do_one forum
-do_one interp_1d
-do_one interp_2d
-do_one ionization
-do_one kap
-do_one math
-do_one mtx
-do_one net
-do_one neu
-do_one num
-do_one rates
-do_one sample
-do_one star
-do_one star_data
-do_one utils
-do_one turb
-
-echo "cleaning lib directory."
-rm -rf lib
-mkdir lib
-
-echo "cleaning include directory."
-rm -rf include
-mkdir include
+make clean
echo "cleaning rates_data/cache."
rm -rf data/rates_data/cache
diff --git a/turb/Makefile b/turb/Makefile
new file mode 100644
index 000000000..5d21a8899
--- /dev/null
+++ b/turb/Makefile
@@ -0,0 +1,28 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := turb
+SRCS := public/turb.f90 \
+ private/mlt.f90 \
+ private/tdc_support.f90 \
+ private/tdc.f90 \
+ private/thermohaline.f90 \
+ private/semiconvection.f90
+SRCS_CHECK := test/src/test_turb.f90
+INTERNAL_DEPENDS_ON := const utils auto_diff num chem
+# Test dependency
+INTERNAL_DEPENDS_ON += math
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := turb.mod
+INSTALL_INCLUDES :=
+
+include $(MAKE_DIR)/Makefile
diff --git a/turb/build_and_test b/turb/build_and_test
deleted file mode 100755
index 66f75b001..000000000
--- a/turb/build_and_test
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test
diff --git a/turb/build_and_test_parallel b/turb/build_and_test_parallel
deleted file mode 100755
index cd4cfaa35..000000000
--- a/turb/build_and_test_parallel
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-../utils/build_and_test_parallel
diff --git a/turb/clean b/turb/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/turb/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/turb/export b/turb/export
deleted file mode 100755
index db3250885..000000000
--- a/turb/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/turb/i1 b/turb/i1
deleted file mode 100755
index 8c377979b..000000000
--- a/turb/i1
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1
diff --git a/turb/i1p b/turb/i1p
deleted file mode 100755
index 75f0da679..000000000
--- a/turb/i1p
+++ /dev/null
@@ -1 +0,0 @@
-../utils/i1p
diff --git a/turb/make/makefile b/turb/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/turb/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/turb/make/makefile_base b/turb/make/makefile_base
deleted file mode 100644
index 5df10a359..000000000
--- a/turb/make/makefile_base
+++ /dev/null
@@ -1,116 +0,0 @@
-# This is the makefile for the mesa library of turbulence routines
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCE FILES
-
-SRCS = mlt.f90 tdc_support.f90 tdc.f90 thermohaline.f90 semiconvection.f90 turb.f90
-
-#################################################################
-#
-# LIBRARIES
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER = $(LIBS_MATRIX)
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MATRIX)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libturb.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-else
- $(LIB_TOOL) $(LIB) $(OBJS) $(LOAD_OTHER)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) turb.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-ifneq (,$(findstring ifort,$(FC)))
- @$(CP_IF_NEWER) mlt.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) tdc.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) semiconvection.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) thermohaline.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) turb.mod $(MESA_DIR)/include
-endif
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE_LEGACY = $(filter-out -std=f2008, $(COMPILE_TO_DEPLOY))
-
-COMPILE = $(COMPILE_LEGACY) $(FCfixed)
-
-COMPILE_FREE = $(COMPILE_LEGACY) $(FCfree)
-
-#COMPILE_XTRA = $(COMPILE_NO_CHECKS) $(FCfixed) -c
-COMPILE_XTRA = $(COMPILE_BASIC) $(FCopt) $(FCfixed) -c
-
-COMPILE_LEGACY_XTRA = $(filter-out -std=f2008, $(COMPILE_XTRA)) -std=legacy
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_FREE $<
- @$(COMPILE_FREE) $<
-else
- $(COMPILE_FREE) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f $(SRC_PATH)
-vpath %.f90 $(SRC_PATH)
-vpath %.dek $(SRC_PATH)
-vpath %.inc $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/turb/make/mkb b/turb/make/mkb
deleted file mode 100644
index 6990c89e4..000000000
--- a/turb/make/mkb
+++ /dev/null
@@ -1,99 +0,0 @@
-# This is the makefile for the mesa const package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = support_functions.f90 diff_operators_base.f90 $(wildcard ../private/*.f90) auto_diff.f90
-
-ifeq ($(USE_SHARED), YES)
- LIBS_OTHER =
- DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
- LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_STAR_SUPPORT)
-endif
-
-#################################################################
-#
-# TARGETS
-
-LIB = libauto_diff.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS)
-else
- $(LIB_TOOL) $(LIB) $(OBJS)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) auto_diff.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) $(LIB) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-%.o : %.mod
-
-%.o : %.f
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/turb/mk b/turb/mk
deleted file mode 100755
index f2ac277d6..000000000
--- a/turb/mk
+++ /dev/null
@@ -1 +0,0 @@
-cd make; make
\ No newline at end of file
diff --git a/turb/test/ck b/turb/test/ck
deleted file mode 100755
index c429ea480..000000000
--- a/turb/test/ck
+++ /dev/null
@@ -1 +0,0 @@
-./../../utils/test/ck
\ No newline at end of file
diff --git a/turb/test/clean b/turb/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/turb/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/turb/test/cleanup b/turb/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/turb/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/turb/test/export b/turb/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/turb/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/turb/test/make/makefile b/turb/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/turb/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/turb/test/make/makefile_base b/turb/test/make/makefile_base
deleted file mode 100644
index ef45fb6ba..000000000
--- a/turb/test/make/makefile_base
+++ /dev/null
@@ -1,86 +0,0 @@
-# This is the makefile for testing the mesa turb package
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_turb.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = turb
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) -lturb
-
-LIBS_OTHER = $(LIBS_MESA_NUMERICS) $(LIBS_MESA_MICRO)
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(LOAD_MESA_NUMERICS) $(LOAD_MESA_MICRO)
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f90,%.o,$(patsubst %.f90,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -ggdb -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -ggdb -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(TEST_SRC_DIR)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/turb/test/mk b/turb/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/turb/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/turb/test/mkx b/turb/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/turb/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/turb/test/rn b/turb/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/turb/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester
diff --git a/utils/Makefile b/utils/Makefile
new file mode 100644
index 000000000..6e8498385
--- /dev/null
+++ b/utils/Makefile
@@ -0,0 +1,37 @@
+include ../make/defaults-module.mk
+
+# Build
+
+MODULE_NAME := utils
+SRCS := public/utils_def.f90 \
+ public/utils_lib.f90 \
+ private/utils_c_system.c \
+ private/utils_dict.f90 \
+ private/utils_idict.f90 \
+ private/utils_nan_dp.f90 \
+ private/utils_nan.f90 \
+ private/utils_nan_qp.f90 \
+ private/utils_nan_sp.f90 \
+ private/utils_system.f90
+
+ifeq ($(WITH_OPENMP),yes)
+ SRCS += private/utils_openmp.f90
+else
+ SRCS += private/utils_openmp_stub.f90
+endif
+
+SRCS_CHECK = test/src/test_utils.f90
+INTERNAL_DEPENDS_ON := const
+EXTERNAL_DEPENDS_ON :=
+BINTYPE := static-lib
+
+# Testing
+
+CHECK_RESULTS_GOLDEN := test/test_output
+
+# Install
+
+MODULES := utils_def.mod utils_lib.mod
+INSTALL_INCLUDES := formats
+
+include $(MAKE_DIR)/Makefile
diff --git a/utils/build_and_test b/utils/build_and_test
deleted file mode 100755
index 58fb08934..000000000
--- a/utils/build_and_test
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env bash
-
-function error {
- echo
- more diff.txt
- echo
- pwd
- echo "TEST FAILED -- compare test_output to tmp.txt"
- echo
- exit 1
-}
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-function do_build {
- cd make
- make
- check_okay
- cd ../test
- ./mk
- check_okay
- cd ..
-}
-
-function do_test {
- cd test
- if [[ -x test_quietly ]];then
- ./test_quietly >& test_quietly.txt
- check_okay
- fi
- ./ck >& diff.txt
- if [ $? -eq 0 ]
- then
- if [ -s diff.txt ]
- then
- error
- fi
- else
- error
- fi
- cd ..
-}
-
-
-if [ ! -f ../skip_build ]
-then
- if [ ! -f skip_build ]
- then
- do_build
- check_okay
- fi
-fi
-
-if [ ! -f ../skip_test ]
-then
- if [ ! -f skip_test ]
- then
- do_test
- check_okay
- fi
-fi
diff --git a/utils/build_and_test_parallel b/utils/build_and_test_parallel
deleted file mode 100755
index 48a309f76..000000000
--- a/utils/build_and_test_parallel
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/usr/bin/env bash
-
-function error {
- echo
- more diff.txt
- echo
- pwd
- echo "TEST FAILED -- compare test_output to tmp.txt"
- echo
- exit 1
-}
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-function enum_procs {
- if [ -n "$NPROCS" ]; then
- echo $NPROCS
- else
- case `uname -s` in
- Linux)
- if [ -r /proc/cpuinfo ]; then
- grep -c processor /proc/cpuinfo
- else
- echo 1
- fi
- ;;
- Darwin)
- sysctl hw.ncpu | awk '{print $2}'
- ;;
- *)
- echo 1
- ;;
- esac
- fi
-}
-
-function do_build {
- cd make
- make -j$(enum_procs)
- check_okay
- cd ../test
- ./mk
- check_okay
- cd ..
-}
-
-function do_test {
- cd test
- if [[ -x test_quietly ]];then
- ./test_quietly >& test_quietly.txt
- check_okay
- fi
- ./ck >& diff.txt
- if [ $? -eq 0 ]
- then
- if [ -s diff.txt ]
- then
- error
- fi
- else
- error
- fi
- cd ..
-}
-
-
-if [ ! -f ../skip_build ]
-then
- if [ ! -f skip_build ]
- then
- do_build
- check_okay
- fi
-fi
-
-if [ ! -f ../skip_test ]
-then
- if [ ! -f skip_test ]
- then
- do_test
- check_okay
- fi
-fi
diff --git a/utils/clean b/utils/clean
deleted file mode 100755
index 6957bce5c..000000000
--- a/utils/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make; make clean
-cd ../test/make; make clean
\ No newline at end of file
diff --git a/utils/cp_if_newer b/utils/cp_if_newer
deleted file mode 100755
index ef833eb7f..000000000
--- a/utils/cp_if_newer
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copy file(s) if newer than the destination
-
-# Define syntax
-
-SYNTAX='Syntax: cp_if_newer [-v] source_file [source_file...] dest_file|dest_dir'
-
-# Parse options
-
-CP_OPTS=''
-
-while getopts "v" opt; do
- case $opt in
- v)
- CP_OPTS="${CP_OPTS} -v"
- ;;
- \?)
- echo $SYNTAX
- exit 1
- esac
-done
-
-shift $((OPTIND -1))
-
-# Perform the copy
-
-if [[ $# -eq 1 ]]; then
-
- echo $SYNTAX
- exit 1
-
-elif [[ $# -eq 2 ]]; then
-
- src=$1
- dst=$2
-
- if [[ ! -f $src ]]; then
- echo $SYNTAX
- exit 1
- fi
-
- if [[ -d $dst ]]; then
- targ=$dst/${src##*/}
- else
- targ=$dst
- fi
-
- if [[ $src -nt $targ || ! -f $targ ]]; then
- cp ${CP_OPTS} $src $targ
- fi
-
-else
-
- srcs=${@:1:$#-1}
- dst=${@: -1}
-
- if [[ ! -d $dst ]]; then
- echo $SYNTAX
- exit 1
- fi
-
- for src in $srcs; do
-
- if [[ ! -f $src ]]; then
- echo $SYNTAX
- exit 1
- fi
-
- done
-
- for src in $srcs; do
-
- targ=$dst/${src##*/}
-
- if [[ $src -nt $targ || ! -f $targ ]]; then
- cp ${CP_OPTS} $src $targ
- fi
-
- done
-
-fi
diff --git a/utils/e1 b/utils/e1
deleted file mode 100755
index 2153f6aab..000000000
--- a/utils/e1
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "./export FAILED"
- echo
- exit 1
- fi
-}
-
-
-cd make
-make install
-check_okay
-cd ../
-
-
diff --git a/utils/export b/utils/export
deleted file mode 100755
index db3250885..000000000
--- a/utils/export
+++ /dev/null
@@ -1,2 +0,0 @@
-
-../utils/e1
diff --git a/utils/i1 b/utils/i1
deleted file mode 100755
index 426e8c119..000000000
--- a/utils/i1
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "./build_and_test FAILED"
- echo
- exit 1
- fi
-}
-
-./build_and_test
-check_okay
-echo "export"
-./export
-check_okay
-echo "done"
diff --git a/utils/i1p b/utils/i1p
deleted file mode 100755
index b06d76f69..000000000
--- a/utils/i1p
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- pwd
- echo "./build_and_test FAILED"
- echo
- exit 1
- fi
-}
-
-./build_and_test_parallel
-check_okay
-echo "export"
-./export
-check_okay
-echo "done"
diff --git a/utils/install_mesa b/utils/install_mesa
deleted file mode 100755
index 51491796a..000000000
--- a/utils/install_mesa
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./install
diff --git a/utils/make/makefile b/utils/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/utils/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/utils/make/makefile_base b/utils/make/makefile_base
deleted file mode 100644
index 116cd3fc4..000000000
--- a/utils/make/makefile_base
+++ /dev/null
@@ -1,115 +0,0 @@
-# This is the makefile for the mesa utils package
-
-MESA_DIR = ../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-ifeq ($(USE_OPENMP),YES)
- UTILS_OMP = utils_openmp
-else
- UTILS_OMP = utils_openmp_stub
-endif
-
-SRCS = \
- utils_def.f90 \
- utils_dict.f90 \
- utils_idict.f90 \
- utils_lib.f90 \
- utils_nan.f90 \
- utils_nan_sp.f90 \
- utils_nan_dp.f90 \
- utils_nan_qp.f90 \
- utils_c_system.c \
- utils_system.f90 \
- $(UTILS_OMP).f90 \
-
-#################################################################
-#
-# TARGETS
-
-LIB = libutils.$(LIB_SUFFIX)
-
-OBJS = $(patsubst %.f90,%.o,$(patsubst %.c,%.o,$(SRCS)))
-
-$(LIB) : $(OBJS)
-ifneq ($(QUIET),)
- @echo LIB_TOOL $(LIB)
- @$(LIB_TOOL) $(LIB) $(OBJS)
-else
- $(LIB_TOOL) $(LIB) $(OBJS)
-endif
-
-clean:
- -@rm -f *.o *.mod *genmod.f90 *.so *.a .depend *.smod
-
-install:
- @$(CP_IF_NEWER) ../formats $(MESA_DIR)/include
- @$(CP_IF_NEWER) *.mod $(MESA_DIR)/include
- @$(CP_IF_NEWER) libutils.$(LIB_SUFFIX) $(MESA_DIR)/lib
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-COMPILE = $(COMPILE_TO_DEPLOY) $(FCfree)
-
-COMPILE_CMD = $(COMPILE)
-
-utils_c_system.o : $(MOD_PRIVATE_DIR)/utils_c_system.c
-ifneq ($(QUIET),)
- @echo CC $<
- @$(CC) $(SPECIAL_C_FLAGS) $(LIB_FLAGS) -c $(MOD_PRIVATE_DIR)/utils_c_system.c
-else
- $(CC) $(SPECIAL_C_FLAGS) $(LIB_FLAGS) -c $(MOD_PRIVATE_DIR)/utils_c_system.c
-endif
-
-%.o : %.mod
-
-%.o : %.f90
-ifneq ($(QUIET),)
- @echo COMPILE_CMD $<
- @$(COMPILE_CMD) $<
-else
- $(COMPILE_CMD) $<
-endif
-
-%.mod : %.o
- @true
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(MOD_PUBLIC_DIR):$(MOD_PRIVATE_DIR)
-
-vpath %.f90 $(SRC_PATH)
-vpath %.c $(SRC_PATH)
-vpath %.h $(SRC_PATH)
-
-vpath %.mod $(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/utils/makefile_header b/utils/makefile_header
deleted file mode 100644
index 188a3eff6..000000000
--- a/utils/makefile_header
+++ /dev/null
@@ -1,346 +0,0 @@
-# NOTE: this default version of makefile_header
-# assumes you will be using the mesasdk.
-# if you do not want that, you can use the
-# makefile_header_non_mesasdk file as a template.
-
-# NOTE: MESA is no longer supported on 32-bit systems. This isn't by design;
-# we simply haven't been able to get it to work! So if you really-really want
-# to use an antique 32-bit system for mesa, you'll have to try to make it work yourself.
-# But I think you'd be better off switching to a 64-bit machine.
-
-# Step 0) Check if you have set the correct environment variables
-ifndef MESA_DIR
-ifndef MESA_DIR_INTENTIONALLY_EMPTY
-$(error MESA_DIR environment variable is not set)
-endif
-endif
-
-
-ifndef MESASDK_ROOT
-ifndef MESA_DIR_INTENTIONALLY_EMPTY
-$(error MESASDK_ROOT environment variable is not set)
-endif
-endif
-
-#mesasdk_init adds $MESASDK_ROOT to $PATH
-ifeq ($(findstring $(MESASDK_ROOT), $(PATH)),)
-ifndef MESA_DIR_INTENTIONALLY_EMPTY
-$(error The MESASDK has not been initialized)
-endif
-endif
-
-# Check mesasdk version
-ifdef MESASDK_ROOT
-ifndef MESA_DIR_INTENTIONALLY_EMPTY
-# Check for whether the sdk ships crmath
-MINIMUM_VERSION = 20.3.1
-ifneq ($(shell $(MESA_DIR)/utils/check_sdk_version $(MINIMUM_VERSION)),passed)
-$(error Your MESASDK is too old please update to version $(MINIMUM_VERSION) or newer)
-endif
-endif
-endif
-
-# Set optimization level
-ARCH = $(shell uname -m)
-
-ifeq (${ARCH},x86_64)
-OPT_LEVEL = 2
-else ifeq (${ARCH},aarch64)
-OPT_LEVEL = 2
-SPECIAL_FC_FLAGS := ${SPECIAL_FC_FLAGS} -ffp-contract=off
-else
-OPT_LEVEL = 0
-endif
-
-
-# step 1) specify your compilers
-
-# NOTE: recent versions of mesa have required reduced optimization
-# in order to work with ifort; we suggest using gfortran instead of ifort if possible.
-
-FC = gfortran
-CC = gcc
-
-
-# step 2) specify whether to use crmath for math library
-
-USE_CRMATH = YES
-
-ifeq ($(USE_CRMATH),YES)
-LOAD_CRMATH = `mesasdk_crmath_link`
-export MESASDK_MATH_SLOT = crmath
-endif
-
-# step 3) specify which LAPACK and BLAS libraries to use for mesa/mtx
-
-LOAD_LAPACK95 = `mesasdk_lapack95_link`
-LOAD_LAPACK = `mesasdk_lapack_link`
-LOAD_BLAS = `mesasdk_blas_link`
-
-
-# step 4) do you want to use PGPLOT with mesa/star?
-
-USE_PGSTAR = YES
-LOAD_PGPLOT = `mesasdk_pgplot_link` -lz
-
-
-# step 5) do you want to use SE with mesa/star?
-
-# SE is now supported using run_star_extras. contact Falk Herwig for info.
-
-
-# step 6) specify which HDF library to use for mesa/hdf5io
-LOAD_HDF5 = `mesasdk_hdf5_link`
-
-
-# step 7a) do you want to use GYRE?
-
-# if you don't plan to use GYRE and want to skip building it, then
-# USE_GYRE = NO
-# if you want to have GYRE built along with the rest of mesa, then
-USE_GYRE = YES
-
-# step 7b) do you want to use ADIPLS?
-
-# if you don't plan to use ADIPLS and want to skip building it, then
-# USE_ADIPLS = NO
-# if you want to have ADIPLS built along with the rest of mesa, then
-USE_ADIPLS = YES
-
-
-# step 8) now do the mesa install
-
-USE_OPENMP = YES
-
-
-# step 9) Build shared libraries? Needed if you want mesa to be usable in python
-
-USE_SHARED = NO
-
-
-#################################################################
-
-# Unless you are adding a new compiler to the list of options,
-# you shouldn't need to change any of the following stuff.
-# It simply defines things for use by the module makefiles.
-
-SKIP_NAN_TRAPS = YES
-#SKIP_NAN_TRAPS = NO
-# if not SKIP_NAN_TRAPS, then also add $(FCtrapNANs) to FCbasic2
-
-FCbasic = -Wno-uninitialized -fno-range-check -fmax-errors=7 -fdiagnostics-color $(SPECIAL_FC_FLAGS) $(FCbasic2)
-FCbasic2 = -fprotect-parens -fno-sign-zero -fbacktrace -ggdb -finit-real=snan
-
-# For debugging, you may want to try some of these options:
-# -Wall -Wextra -Wimplicit-interface -Wno-unused-function -fPIC -g -fcheck=all,no-array-temps -fbacktrace -ffpe-trap=invalid,zero,overflow -finit-real=snan -finit-integer=-99999999
-
-# Set the fortran standard to compile against, files that can't be compiled to the standard and are
-# unfixable should add a statement like: $(filter-out -std=f2008, $(COMPILE))
-# to filter out the option in their makefile
-FCstandard = -std=f2008 -Wno-error=tabs
-
-# set environment variable GFORTRAN_ERROR_BACKTRACE=1
-# -Warray-temporaries
-
-FCimpno = -fimplicit-none
-FCchecks = -fbounds-check -Wuninitialized -Warray-bounds
-FCwarn = -Wunused-value -W -Wno-compare-reals -Wno-unused-parameter -Wno-function-elimination -Waliasing
-#FCwarn = -Wunused-value -Werror -W -Wno-compare-reals -Wno-unused-parameter
-FCtrapNANs = -ffpe-trap=invalid,overflow,zero
-# -Wno-unused-parameter
-
-# note: -Werror causes warnings to be treated as errors
-FC_fixed_preprocess = -x f77-cpp-input
-FC_free_preprocess = -x f95-cpp-input
-FCfixed = -ffixed-form -ffixed-line-length-none $(FC_fixed_preprocess)
-FCfixed72 = -ffixed-form $(FC_fixed_preprocess)
-FCfree = -ffree-form -ffree-line-length-none $(FC_free_preprocess)
-FCopt = -O${OPT_LEVEL} -ftree-vectorize
-FCdebug = -ggdb
-FCstatic =
-ifeq ($(USE_OPENMP),YES)
-FCopenmp = -fopenmp
-else
-FCopenmp =
-endif
-
-LIB_TOOL_STATIC = ar crs
-LIB_SUFFIX_STATIC = a
-
-# Flags needed for shared libraries
-ifeq ($(USE_SHARED), YES)
- UNAME_S := $(shell uname -s)
-ifeq ($(UNAME_S),Linux)
- MD := $(shell realpath $(MESA_DIR)/lib)
- # Rpaths need to resolve relative to module/test folder plus the final location of the library
- LIB_FLAGS = -fPIC -shared
- LD_FLAGS = -Wl,-rpath=../make:../../lib:$(MD)
- LIB_SUFFIX = so
-endif
-ifeq ($(UNAME_S),Darwin)
-# Macs dont have realpath so cd to dir and get its location manually
-# We check if folder exists first, to stop adipls getting confused
-# when it can't find ../../lib
-ifneq ($(wildcard $(MESA_DIR)/lib/.*),)
- MD := $(shell cd "$(MESA_DIR)/lib"; pwd -P)
-endif
- LIB_FLAGS = -dynamiclib
- LD_FLAGS = -Wl,-rpath,../make,-rpath,../../lib,-rpath,$(MD)
- LIB_SUFFIX = dylib
-endif
- LIB_TOOL = $(FC) $(LIB_FLAGS) $(FCopenmp) $(LD_FLAGS) -o
-else
- # Static library options
- LIB_TOOL = $(LIB_TOOL_STATIC)
- LIB_SUFFIX = $(LIB_SUFFIX_STATIC)
- LIB_FLAGS =
- LIBS =
-endif
-
-# Turn on all FPE options
-ifeq ($(MESA_FPE_CHECKS_ON),1)
- FCbasic += $(FCtrapNANs) -fbounds-check -finit-derived -Wuninitialized -Warray-bounds -fstack-protector-all -D_FORTIFY_SOURCE=2
- FCopt = -O0 -ftree-vectorize
- SKIP_NAN_TRAPS = NO
-endif
-
-
-# some definitions used in the module makefiles
-MODULE_DIR = ..
-MOD_PUBLIC_DIR = $(MODULE_DIR)/public
-MOD_PRIVATE_DIR = $(MODULE_DIR)/private
-MODULE_INCLUDES = -I$(MOD_PUBLIC_DIR) -I$(MOD_PRIVATE_DIR)
-OTHER_INCLUDES = -I$(MESA_DIR)/include
-INCLUDES = $(MODULE_INCLUDES) $(OTHER_INCLUDES)
-
-COMPILE_BASIC_FLAGS = $(FCbasic) $(FCopenmp) $(FCstatic) $(FCstandard) $(LIB_FLAGS) $(INCLUDES)
-COMPILE_BASIC = $(FC) $(COMPILE_BASIC_FLAGS)
-
-COMPILE_TO_TEST = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCchecks) $(FCopt) $(FCdebug) -c
-COMPILE_TO_DEPLOY = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCopt) -c
-
-COMPILE_NO_OPENMP_NO_OPT = \
- $(FC) $(FCbasic) $(INCLUDES) $(FCwarn) $(FCimpno) $(FCchecks) $(FCdebug) -c -O
-COMPILE_ASAP = \
- $(FC) $(FCbasic) $(INCLUDES) $(FCwarn) $(FCimpno) $(FCdebug) -c -O
-
-COMPILE_FAST = $(COMPILE_BASIC) -c
-COMPILE_NO_CHECKS = $(COMPILE_BASIC) $(FCopt) -c
-COMPILE_NO_OPT = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCchecks) $(FCdebug) -c -O
-COMPILE_DEVEL = $(COMPILE_NO_OPT)
-
-
-# some definitions used in the test makefiles and client makefiles
-
-WORK_COMPILE = \
- $(FC) $(FCbasic) $(FCopenmp) $(FCchecks) $(FCdebug) $(FCfree) $(FCstandard) \
- -I$(MESA_INCLUDE_DIR) -I$(WORK_SRC_DIR) -c
-
-ifeq ($(USE_PGPLOT),YES)
- WORK_COMPILE += -DUSE_PGPLOT
-endif
-
-TEST_DIR = ..
-TEST_SRC_DIR = $(TEST_DIR)/src
-PACKAGE_DIR = ../..
-LOCAL_LIB_DIR = $(PACKAGE_DIR)/make
-MESA_LIB_DIR = $(MESA_DIR)/lib
-MESA_INCLUDE_DIR = $(MESA_DIR)/include
-TEST_INCLUDES = -I$(LOCAL_LIB_DIR) -I$(PACKAGE_DIR)/public -I$(MESA_INCLUDE_DIR)
-TEST_COMPILE_FLAGS = $(FCbasic) $(FCopenmp) $(TEST_INCLUDES) $(FCchecks) $(FCdebug) $(LIB_FLAGS) $(FCstandard) $(FCimpno) -c
-TEST_COMPILE = $(FC) $(TEST_COMPILE_FLAGS) $(LD_FLAGS)
-
-# Library lists / linking commands
-
-LIBS_MATRIX = mtx const math utils
-LOAD_MATRIX_INT = $(addprefix -l,$(LIBS_MATRIX))
-LOAD_MATRIX_EXT = $(LOAD_CRMATH) $(LOAD_LAPACK95) $(LOAD_LAPACK) $(LOAD_BLAS)
-LOAD_MATRIX = $(LOAD_MATRIX_INT) $(LOAD_MATRIX_EXT)
-
-LIBS_MESA_NUMERICS = interp_2d interp_1d num auto_diff forum $(LIBS_MATRIX)
-LOAD_MESA_NUMERICS_INT = $(addprefix -l,$(LIBS_MESA_NUMERICS))
-LOAD_MESA_NUMERICS_EXT = $(LOAD_MATRIX_EXT) $(LOAD_HDF5)
-LOAD_MESA_NUMERICS = $(LOAD_MESA_NUMERICS_INT) $(LOAD_MESA_NUMERICS_EXT)
-
-LIBS_MESA_MICRO = net eos kap rates neu chem $(LIBS_MESA_NUMERICS)
-LOAD_MESA_MICRO_INT = $(addprefix -l,$(LIBS_MESA_MICRO))
-LOAD_MESA_MICRO_EXT = $(LOAD_MESA_NUMERICS_EXT)
-LOAD_MESA_MICRO = $(LOAD_MESA_MICRO_INT) $(LOAD_MESA_MICRO_EXT)
-
-LIBS_MESA_MACRO = ionization atm colors turb $(LIBS_MESA_MICRO)
-LOAD_MESA_MACRO_INT = $(addprefix -l,$(LIBS_MESA_MACRO))
-LOAD_MESA_MACRO_EXT = $(LOAD_MESA_MICRO_EXT)
-LOAD_MESA_MACRO = $(LOAD_MESA_MACRO_INT) $(LOAD_MESA_MACRO_EXT)
-
-LIBS_MESA_STAR_SUPPORT = star_data $(LIBS_GYRE) $(LIBS_MESA_MACRO)
-LOAD_MESA_STAR_SUPPORT_INT = $(addprefix -l,$(LIBS_MESA_STAR_SUPPORT))
-LOAD_MESA_STAR_SUPPORT_EXT = $(LOAD_MESA_MACRO_EXT) $(LD_FLAGS)
-LOAD_MESA_STAR_SUPPORT = $(LOAD_MESA_STAR_SUPPORT_INT) $(LOAD_MESA_STAR_SUPPORT_EXT)
-
-LIBS_STAR_MODS = star $(LIBS_MESA_STAR_SUPPORT)
-LOAD_STAR_MODS_INT = $(addprefix -l,$(LIBS_STAR_MODS))
-LOAD_STAR_MODS_EXT = $(LOAD_MESA_STAR_SUPPORT_EXT)
-LOAD_STAR_MODS = $(LOAD_STAR_MODS_INT) $(LOAD_STAR_MODS_EXT)
-
-LIBS_MESA_STAR = $(LIBS_STAR_MODS)
-LOAD_MESA_STAR_INT = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_MESA_STAR))
-ifeq ($(USE_PGSTAR),YES)
- LOAD_MESA_STAR_EXT = $(LOAD_STAR_MODS_EXT) $(LOAD_PGPLOT)
-else
- LOAD_MESA_STAR_EXT = $(LOAD_STAR_MODS_EXT)
-endif
-LOAD_MESA_STAR = $(LOAD_MESA_STAR_INT) $(LOAD_MESA_STAR_EXT)
-
-LIBS_MESA_BINARY = binary $(LIBS_MESA_STAR)
-LOAD_MESA_BINARY_INT = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_MESA_BINARY))
-
-ifeq ($(USE_GYRE),YES)
- LIBS_GYRE = gyre_mesa gyre
-else
- LIBS_GYRE = gyre_mesa
-endif
-LOAD_GYRE = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_GYRE))
-
-ifeq ($(USE_PGSTAR),YES)
- LOAD_MESA_BINARY_EXT = $(LOAD_STAR_MODS_EXT) $(LOAD_PGPLOT)
-else
- LOAD_MESA_BINARY_EXT = $(LOAD_STAR_MODS_EXT)
-endif
-LOAD_MESA_BINARY = $(LOAD_MESA_BINARY_INT) $(LOAD_MESA_BINARY_EXT)
-
-# Due to slow compile with -ggdb and -O2 we add -fno-var-tracking which speeds things up a lot
-# At the expense of slightly worse debug information (but no worse than -ggdb -O0 would be, as that implies -fno-var-tracking)
-SLOW_COMPILE = -fno-var-tracking
-
-# LOADER creates executables
-LOADER = $(FC)
-
-STAR_WORK_OBJS = \
- run_star_extras.o run_star.o
-
-BINARY_WORK_OBJS = \
- run_star_extras.o run_binary_extras.o run_binary.o
-
-#Test if we are on windows
-BUILD_ON_WINDOWS=NO
-ifeq ($(OS),Windows_NT)
- BUILD_ON_WINDOWS=YES
-endif
-
-# Declare phony targets
-.PHONY: all clean install install_lib install_mod
-
-# Path to cp_if_newer script
-CP_IF_NEWER = $(MESA_DIR)/utils/cp_if_newer
-
-# Path to check_sdk_version script
-CHECK_SDK_VERSION = $(MESA_DIR)/utils/check_sdk_version
-
-# makedepf90 invocation (depends on whether we have the SDK2-patched version that
-# supports the -X flag)
-ifneq ($(shell makedepf90 -V | grep sdk2),)
- MAKEDEPF90_IGNORE_MODS = intrinsic omp_lib iso_c_binding iso_fortran_env ieee_arithmetic crmath hdf5
- MAKEDEPF90 = makedepf90 -m %m.mod -X $(addprefix -u,$(MAKEDEPF90_IGNORE_MODS))
-else
- MAKEDEPF90 = makedepf90 -m %m.mod
-endif
diff --git a/utils/makefile_header_non_mesasdk b/utils/makefile_header_non_mesasdk
deleted file mode 100644
index fa287e666..000000000
--- a/utils/makefile_header_non_mesasdk
+++ /dev/null
@@ -1,429 +0,0 @@
-# NOTE: MESA is no longer supported on 32-bit systems. This isn't by design;
-# we simply haven't been able to get it to work! So if you really-really want
-# to use an antique 32-bit system for mesa, you'll have to try to make it work yourself.
-# But I think you'd be better off switching to a 64-bit machine.
-
-# Step 0) Check if you have set the correct environment variables
-ifndef MESA_DIR
-ifndef MESA_DIR_INTENTIONALLY_EMPTY
-$(error MESA_DIR environment variable is not set)
-endif
-endif
-
-# step 1) specify your compilers
-
-# NOTE: recent versions of mesa have required reduced optimization
-# in order to work with ifort; we suggest using gfortran instead of ifort if possible.
-
-CC = gcc
-FC = ifort
-#FC = gfortran
-
-
-# if you need special flags for the compiler, define them here:
-SPECIAL_FC_FLAGS =
-SPECIAL_C_FLAGS =
-
-# step 1.a) [temporary workaround for loader problem on Mac:]
-# go down to select the correct entry for LOAD_MATRIX
-# depending on whether you are on Linux or Mac
-
-# step 2) specify whether to use crmth for math library
-
-USE_CRMATH = YES
-
-ifeq ($(USE_CRMATH),YES)
-LOAD_CRMATH = -lcrmath -lcrlibm
-INCLUDE_CRMATH =
-endif
-
-# step 3) specify which BLAS and LAPACK libraries to use for mesa/mtx
-
-# these are the standard defaults
-LOAD_LAPACK = -lmesalapack
-LOAD_BLAS = -lmesablas
-MKL_INCLUDE =
-
-# step 4) do you want to use PGPLOT with mesa/star?
-# you can have onscreen plots updated at each step,
-# and you can save files for making movies. very cool!
-
-# NOTE: you need to have a PGPLOT built using the same fortran and c compiler as you
-# are using for mesa.
-
-# if you don't already have a compatible pgplot,
-# follow the instructions in pgplot/README
-
-# to access pgplot from mesa/star,
-# set USE_PGSTAR = YES and set LOAD_PGPLOT to load the libraries.
-# in mesa/star, set the control parameter pgstar_flag = .true. in &star_job
-# when you run star it will open a window using X and draw plots using PGSTAR
-# the plots will be updated each time a log entry is made.
-# see star/test/src/pgstar_defaults.dek for details.
-
-# NOTE: if you have libpng, then include '-lpng' in the LOAD_PGPLOT line.
-# the *.png files are excellent for making movies.
-# but if you don't have libpng and can't get it, no problem; it isn't required.
-# just remove '-lpng' from the LOAD_PGPLOT line.
-
-# Similarly, if you don't have X windows and don't want to make onscreen plots,
-# then you can load PGPLOT without it. Just delete the X stuff from LOAD_PGPLOT.
-
-# for users of Red Hat OS: Georgios Magkotsios reports success with these settings:
-#LOAD_PGPLOT = -L${PGPLOT_DIR} -lpgplot -L/usr/lib64 -lX11 -lsvml -lpng
-#FCstatic = -shared-intel #-Bstatic -static-intel
-
-# for Ubuntu, Philip Pinto found these libraries to be necessary:
-#LOAD_PGPLOT = -L${PGPLOT_DIR} -lpgplot -lX11 -lxcb -lXau -lXdmcp -lXext -lpng -lz
-
-# for Fedora 12 (x86_64), Mike Zingale reported that the following worked
-# 1. at the terminal:
-# yum install pgplot pgplot-devel
-# 2. in the mesa/util/makefile_header
-# USE_PGSTAR = YES
-# LOAD_PGPLOT = -lpgplot -L/usr/lib64 -lX11 -lpng
-# 3. it is also important that the following environment variable be set:
-# export PGPLOT_DIR=/usr/share/pgplot/
-
-
-# NOTE: a change in USE_PGSTAR doesn't take effect until you next recompile mesa/star
-
-# for now, GYRE is only available with the mesasdk
-USE_GYRE = NO
-USE_ADIPLS = YES
-
-# See http://www.gnu.org/software/make/manual/make.html#Testing-Flags for findstring
-ifneq (,$(findstring ifort,$(FC)))
-
-USE_PGSTAR = NO
-LOAD_PGPLOT =
-
-#USE_PGSTAR = YES
-#LOAD_PGPLOT = -L/Users/bpaxton/mesa/utils/pgplot -lpgplot -L/usr/X11R6/lib -lX11 -lpng
-#LOAD_PGPLOT = -L/rpod2/opt/pgplot -lpgplot -L/usr/X11R6/lib -lX11 -lpng
-
-else
-ifneq (,$(findstring gfortran,$(FC)))
-
-#USE_PGSTAR = NO
-#LOAD_PGPLOT =
-USE_PGSTAR = YES
-LOAD_PGPLOT = -L/Users/bpaxton/mesa/utils/pgplot_gfortran -lpgplot -L/usr/X11R6/lib -lX11 -lpng
-
-else
-
-USE_PGSTAR = NO
-LOAD_PGPLOT =
-
-endif
-endif
-
-
-
-
-
-# step 5) Load options for HDF5, this must be compiled with the same compiler as mesa
-
-# To install hdf5 in $MESA_DIR/utils with ifort run:
-#export CC=icc
-#export F9X=ifort
-#export CXX=icpc
-#export VERSION=1.8.17
-#cd $MESA_DIR/utils
-#rm -rf hdf5* 2>/dev/null
-#wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${VERSION%.*}/hdf5-"$VERSION"/src/hdf5-"$VERSION".tar.bz2
-#tar xvf hdf5-"$VERSION".tar.bz2
-#cd hdf5-"$VERSION"
-#CCFLAGS=-D_Float128=__float128 FCFLAGS="-D_Float128=__float128" ./configure --enable-fortran --enable-fortran2003
-#make
-#make install
-#cd $MESA_DIR
-
-#
-#
-# and set in this makefile
-# LOAD_HDF5 = -L${MESA_DIR}/utils/hdf5/lib -lhdf5_fortran -lhdf5 -lz
-# INCLUDE_HDF5 = -I${MESA_DIR}/utils/hdf5/include
-#
-# And in your shell
-# export LD_LIBRARY_PATH=$MESA_DIR/utils/hdf5/lib:$LD_LIBRARY_PATH
-
-# These are if you are using the sdk hdf5 implementation
-LOAD_HDF5 = `mesasdk_hdf5_link`
-INCLUDE_HDF5 = -I${MESASDK_ROOT}/include
-
-# Note that the USE_HDF5 flag (which used to default to NO) has been retired; you now need
-# an HDF5 library installed to build mesa
-
-
-# step 6) now do the mesa install
-
-USE_OPENMP = YES
-
-# step 7) Build shared libraries? Needed if you want mesa to be usable in python
-
-USE_SHARED = NO
-
-# do install at the top level mesa directory
-
-# NOTE: do NOT run the install scripts at the subdirectory level
-# those are for use by the top level script
-
-# Unless you are adding a new compiler to the list of options,
-# you shouldn't need to change any of the following stuff.
-# It simply defines things for use by the module makefiles.
-
-
-ifneq (,$(findstring ifort,$(FC)))
-
-#FCbasic = $(SPECIAL_FC_FLAGS) -assume protect-parens -fp-model source -prec-div -prec-sqrt -ftz -traceback -error-limit 6
-FCbasic = $(SPECIAL_FC_FLAGS) -assume protect-parens -fp-model source -prec-div -prec-sqrt -traceback -error-limit 6
-
-# use -vec-report2 to check on vectorization
-
-FCimpno = -implicitnone
-FCchecks = -check uninit -check pointers -check bounds -check all
-FCwarn = -warn all -warn nounused
-FCwarn_unused = -warn unused
-FC_fixed_preprocess = -fpp
-FC_free_preprocess = -fpp
-FCfixed = -fixed -132 $(FC_fixed_preprocess)
-FCfixed72 = -fixed $(FC_fixed_preprocess)
-FCfree = -free $(FC_free_preprocess)
-FCopt = -O1
-FCdebug = -g
-SLOW_COMPILE =
-ifeq ($(USE_OPENMP),YES)
-FCopenmp = -qopenmp -threads
-else
-FCopenmp =
-endif
-FCstatic =
-
-else
-ifneq (,$(findstring gfortran,$(FC)))
-
-FCbasic = -Wno-uninitialized -fno-range-check -fmax-errors=100 $(SPECIAL_FC_FLAGS) $(FCbasic2)
-FCbasic2 = -fprotect-parens -fno-sign-zero -fbacktrace -ggdb -finit-real=snan
-# -Warray-temporaries
-
-FCimpno = -fimplicit-none
-FCchecks = -fbounds-check
-FCwarn = -Wunused-value -W -Wno-compare-reals -Wno-unused-parameter -Wno-function-elimination
-#FCwarn = -Wunused-value -Werror -W -Wno-compare-reals -Wno-unused-parameter
-
-FC_fixed_preprocess = -x f77-cpp-input
-FC_free_preprocess = -x f95-cpp-input
-FCfixed = -ffixed-form -ffixed-line-length-132 $(FC_fixed_preprocess)
-FCfixed72 = -ffixed-form $(FC_fixed_preprocess)
-FCfree = -ffree-form -ffree-line-length-none $(FC_free_preprocess)
-FCopt = -O2 -ftree-vectorize
-FCdebug = -ggdb
-FCstatic =
-SLOW_COMPILE = -fno-var-tracking
-ifeq ($(USE_OPENMP),YES)
-FCopenmp = -fopenmp
-else
-FCopenmp =
-endif
-
-else
-
-FCbasic = UNKNOWN COMPILER
-FCchecks =
-FCwarn =
-FCfixed =
-FCfree =
-FCopt =
-FCdebug =
-FCopenmp =
-SLOW_COMPILE =
-endif
-endif
-
-LIB_TOOL_STATIC = ar crs
-LIB_SUFFIX_STATIC = a
-
-# Flags needed for shared libraries
-ifeq ($(USE_SHARED), YES)
- UNAME_S := $(shell uname -s)
-ifeq ($(UNAME_S),Linux)
- MD := $(shell realpath $(MESA_DIR)/lib)
- # Rpaths need to resolve relative to module/test folder plus the final location of the library
- LIB_FLAGS = -fPIC -shared
- LD_FLAGS = -Wl,-rpath=../make:../../lib:$(MD)
- LIB_SUFFIX = so
-endif
-ifeq ($(UNAME_S),Darwin)
-# Macs dont have realpath so cd to dir and get its location manually
-# We check if folder exists first, to stop adipls getting confused
-# when it can't find ../../lib
-ifneq ($(wildcard $(MESA_DIR)/lib/.*),)
- MD := $(shell cd "$(MESA_DIR)/lib"; pwd -P)
-endif
- LIB_FLAGS = -dynamiclib
- LD_FLAGS = -Wl,-rpath,../make,-rpath,../../lib,-rpath,$(MD)
- LIB_SUFFIX = dylib
-endif
- LIB_TOOL = $(FC) $(LIB_FLAGS) $(FCopenmp) $(LD_FLAGS) -o
-
-else
- # Static library options
- LIB_TOOL = $(LIB_TOOL_STATIC)
- LIB_SUFFIX = $(LIB_SUFFIX_STATIC)
- LIB_FLAGS =
- LIBS =
-endif
-
-
-# some definitions used in the module makefiles
-MODULE_DIR = ..
-MOD_PUBLIC_DIR = $(MODULE_DIR)/public
-MOD_PRIVATE_DIR = $(MODULE_DIR)/private
-MODULE_INCLUDES = -I$(MOD_PUBLIC_DIR) -I$(MOD_PRIVATE_DIR)
-OTHER_INCLUDES = -I$(MESA_DIR)/include
-INCLUDES = $(MODULE_INCLUDES) $(OTHER_INCLUDES)
-
-COMPILE_BASIC_FLAGS = $(FCbasic) $(FCopenmp) $(FCstatic) $(LIB_FLAGS) $(INCLUDES)
-COMPILE_BASIC = $(FC) $(COMPILE_BASIC_FLAGS)
-
-COMPILE_TO_TEST = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCchecks) $(FCopt) $(FCdebug) -c
-COMPILE_TO_DEPLOY = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCopt) -c
-
-COMPILE_NO_OPENMP_NO_OPT = \
- $(FC) $(FCbasic) $(INCLUDES) $(FCwarn) $(FCimpno) $(FCchecks) $(FCdebug) -c -O
-COMPILE_ASAP = \
- $(FC) $(FCbasic) $(INCLUDES) $(FCwarn) $(FCimpno) $(FCdebug) -c -O
-
-COMPILE_FAST = $(COMPILE_BASIC) -c
-COMPILE_NO_CHECKS = $(COMPILE_BASIC) $(FCopt) -c
-COMPILE_NO_OPT = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCchecks) $(FCdebug) -c -O
-COMPILE_DEVEL = $(COMPILE_NO_OPT)
-
-
-# some definitions used in the module makefiles
-MODULE_DIR = ..
-MOD_PUBLIC_DIR = $(MODULE_DIR)/public
-MOD_PRIVATE_DIR = $(MODULE_DIR)/private
-MODULE_INCLUDES = -I$(MOD_PUBLIC_DIR) -I$(MOD_PRIVATE_DIR)
-OTHER_INCLUDES = -I$(MESA_DIR)/include $(INCLUDE_HDF5) $(INCLUDE_CRMATH)
-INCLUDES = $(MODULE_INCLUDES) $(OTHER_INCLUDES)
-
-COMPILE_BASIC_FLAGS = $(FCbasic) $(FCopenmp) $(FCstatic) $(LIB_FLAGS) $(INCLUDES) $(LIB_FLAGS)
-COMPILE_BASIC = $(FC) $(COMPILE_BASIC_FLAGS)
-
-COMPILE_TO_TEST = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCchecks) $(FCopt) $(FCdebug) -c
-COMPILE_TO_DEPLOY = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCopt) -c
-
-COMPILE_NO_OPENMP_NO_OPT = \
- $(FC) $(FCbasic) $(INCLUDES) $(FCwarn) $(FCimpno) $(FCchecks) $(FCdebug) -c -O
-COMPILE_ASAP = \
- $(FC) $(FCbasic) $(INCLUDES) $(FCwarn) $(FCimpno) $(FCdebug) -c -O
-
-COMPILE_FAST = $(COMPILE_BASIC) -c
-COMPILE_NO_CHECKS = $(COMPILE_BASIC) $(FCopt) -c
-COMPILE_NO_OPT = $(COMPILE_BASIC) $(FCwarn) $(FCimpno) $(FCchecks) $(FCdebug) -c -O
-COMPILE_DEVEL = $(COMPILE_NO_OPT)
-
-# some definitions used in the test makefiles and client makefiles
-
-WORK_COMPILE = \
- $(FC) $(FCbasic) $(FCopenmp) -O0 $(FCchecks) $(FCdebug) $(FCfree) \
- $(FC_free_preprocess) -I$(MESA_INCLUDE_DIR) $(INCLUDE_HDF5) -c
-
-ifeq ($(USE_PGPLOT),YES)
- WORK_COMPILE += -DUSE_PGPLOT
-endif
-
-TEST_DIR = ..
-TEST_SRC_DIR = $(TEST_DIR)/src
-PACKAGE_DIR = ../..
-LOCAL_LIB_DIR = $(PACKAGE_DIR)/make
-MESA_LIB_DIR = $(MESA_DIR)/lib
-
-MESA_INCLUDE_DIR = $(MESA_DIR)/include
-TEST_INCLUDES = -I$(LOCAL_LIB_DIR) -I$(PACKAGE_DIR)/public -I$(MESA_INCLUDE_DIR)
-TEST_COMPILE_FLAGS = $(FCbasic) $(FCopenmp) $(TEST_INCLUDES) $(FCchecks) $(FCdebug) $(LIB_FLAGS) -c
-TEST_COMPILE = $(FC) $(TEST_COMPILE_FLAGS) $(LD_FLAGS)
-
-# Library lists / linking commands
-
-LIBS_MATRIX = mtx const math utils
-LOAD_MATRIX_INT = $(addprefix -l,$(LIBS_MATRIX))
-LOAD_MATRIX_EXT = $(LOAD_CRMATH) $(LOAD_LAPACK) $(LOAD_BLAS)
-LOAD_MATRIX = $(LOAD_MATRIX_INT) $(LOAD_MATRIX_EXT)
-
-LIBS_MESA_NUMERICS = interp_2d interp_1d num auto_diff hdf5io $(LIBS_MATRIX)
-LOAD_MESA_NUMERICS_INT = $(addprefix -l,$(LIBS_MESA_NUMERICS))
-LOAD_MESA_NUMERICS_EXT = $(LOAD_MATRIX_EXT) $(LOAD_HDF5)
-LOAD_MESA_NUMERICS = $(LOAD_MESA_NUMERICS_INT) $(LOAD_MESA_NUMERICS_EXT)
-
-LIBS_MESA_MICRO = net eos kap rates neu chem $(LIBS_MESA_NUMERICS)
-LOAD_MESA_MICRO_INT = $(addprefix -l,$(LIBS_MESA_MICRO))
-LOAD_MESA_MICRO_EXT = $(LOAD_MESA_NUMERICS_EXT)
-LOAD_MESA_MICRO = $(LOAD_MESA_MICRO_INT) $(LOAD_MESA_MICRO_EXT)
-
-LIBS_MESA_MACRO = ionization atm colors turb $(LIBS_MESA_MICRO)
-LOAD_MESA_MACRO_INT = $(addprefix -l,$(LIBS_MESA_MACRO))
-LOAD_MESA_MACRO_EXT = $(LOAD_MESA_MICRO_EXT)
-LOAD_MESA_MACRO = $(LOAD_MESA_MACRO_INT) $(LOAD_MESA_MACRO_EXT)
-
-LIBS_MESA_STAR_SUPPORT = star_data gyre $(LIBS_MESA_MACRO)
-LOAD_MESA_STAR_SUPPORT_INT = $(addprefix -l,$(LIBS_MESA_STAR_SUPPORT))
-LOAD_MESA_STAR_SUPPORT_EXT = $(LOAD_MESA_MACRO_EXT) $(LD_FLAGS)
-LOAD_MESA_STAR_SUPPORT = $(LOAD_MESA_STAR_SUPPORT_INT) $(LOAD_MESA_STAR_SUPPORT_EXT)
-
-LIBS_STAR_MODS = star $(LIBS_MESA_STAR_SUPPORT)
-LOAD_STAR_MODS_INT = $(addprefix -l,$(LIBS_STAR_MODS))
-LOAD_STAR_MODS_EXT = $(LOAD_MESA_STAR_SUPPORT_EXT)
-LOAD_STAR_MODS = $(LOAD_STAR_MODS_INT) $(LOAD_STAR_MODS_EXT)
-
-LIBS_MESA_STAR = $(LIBS_STAR_MODS)
-LOAD_MESA_STAR_INT = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_MESA_STAR))
-ifeq ($(USE_PGSTAR),YES)
- LOAD_MESA_STAR_EXT = $(LOAD_STAR_MODS_EXT) $(LOAD_PGPLOT)
-else
- LOAD_MESA_STAR_EXT = $(LOAD_STAR_MODS_EXT)
-endif
-LOAD_MESA_STAR = $(LOAD_MESA_STAR_INT) $(LOAD_MESA_STAR_EXT)
-
-LIBS_MESA_BINARY = binary $(LIBS_MESA_STAR)
-LOAD_MESA_BINARY_INT = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_MESA_BINARY))
-
-ifeq ($(USE_PGSTAR),YES)
- LOAD_MESA_BINARY_EXT = $(LOAD_STAR_MODS_EXT) $(LOAD_PGPLOT)
-else
- LOAD_MESA_BINARY_EXT = $(LOAD_STAR_MODS_EXT)
-endif
-LOAD_MESA_BINARY = $(LOAD_MESA_BINARY_INT) $(LOAD_MESA_BINARY_EXT)
-
-# LOADER creates executables
-LOADER = $(FC)
-
-STAR_WORK_OBJS = \
- run_star_extras.o run_star.o
-
-BINARY_WORK_OBJS = \
- run_star_extras.o run_binary_extras.o run_binary.o
-
-#Test if we are on windows
-BUILD_ON_WINDOWS=NO
-ifeq ($(OS),Windows_NT)
- BUILD_ON_WINDOWS=YES
-endif
-
-# Declare phony targets
-.PHONY: all clean install install_lib install_mod
-
-# Path to cp_if_newer script
-CP_IF_NEWER = $(MESA_DIR)/utils/cp_if_newer
-
-# makedepf90 invocation (depends on whether we have the SDK2-patched version that
-# supports the -X flag)
-ifneq ($(shell makedepf90 -V | grep sdk2),)
- MAKEDEPF90_IGNORE_MODS = intrinsic omp_lib iso_c_binding iso_fortran_env ieee_arithmetic crmath hdf5
- MAKEDEPF90 = makedepf90 -m %m.mod -X $(addprefix -u,$(MAKEDEPF90_IGNORE_MODS))
-else
- MAKEDEPF90 = makedepf90 -m %m.mod
-endif
-
diff --git a/utils/test/ck b/utils/test/ck
deleted file mode 100755
index 9bb942485..000000000
--- a/utils/test/ck
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-if ./rn >& tmp.txt; then
- diff -b tmp.txt test_output
-else
- echo
- echo "FAILED"
- echo
- exit 1
-fi
diff --git a/utils/test/clean b/utils/test/clean
deleted file mode 100755
index fe8d63c0c..000000000
--- a/utils/test/clean
+++ /dev/null
@@ -1,2 +0,0 @@
-cd make
-make clean
diff --git a/utils/test/cleanup b/utils/test/cleanup
deleted file mode 100755
index e383ea3f7..000000000
--- a/utils/test/cleanup
+++ /dev/null
@@ -1,4 +0,0 @@
-cd make
-make clean
-cd ../../make
-make clean
diff --git a/utils/test/export b/utils/test/export
deleted file mode 100755
index 0f6ebc965..000000000
--- a/utils/test/export
+++ /dev/null
@@ -1,2 +0,0 @@
-cd ..
-./export
diff --git a/utils/test/make/makefile b/utils/test/make/makefile
deleted file mode 100644
index 2a4718cad..000000000
--- a/utils/test/make/makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# QUIET makes the output from the compilation process much less verbose -- basically,
-# show which files are being compiled with which generic compilation command. The
-# goal of QUIET is to make it easier to spot warnings and/or circular dependency
-# errors.
-
-QUIET = yes
-
-include makefile_base
diff --git a/utils/test/make/makefile_base b/utils/test/make/makefile_base
deleted file mode 100644
index 7569fe090..000000000
--- a/utils/test/make/makefile_base
+++ /dev/null
@@ -1,86 +0,0 @@
-# This is the makefile for testing the mesa utils library
-
-MESA_DIR = ../../..
-
-#################################################################
-#
-# PREAMBLE
-
-include $(MESA_DIR)/utils/makefile_header
-
-#################################################################
-#
-# SOURCES
-
-SRCS = test_utils.f90
-
-#################################################################
-#
-# LIBRARIES
-
-LIBS_LOCAL = utils
-DEPS_LOCAL = $(patsubst %,$(LOCAL_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_LOCAL))
-LOAD_LOCAL = -L$(LOCAL_LIB_DIR) $(addprefix -l,$(LIBS_LOCAL))
-
-LIBS_OTHER = const
-DEPS_OTHER = $(patsubst %,$(MESA_LIB_DIR)/lib%.$(LIB_SUFFIX),$(LIBS_OTHER))
-LOAD_OTHER = -L$(MESA_LIB_DIR) $(addprefix -l,$(LIBS_OTHER))
-
-#################################################################
-#
-# TARGETS
-
-TEST = $(TEST_DIR)/tester
-
-OBJS = $(patsubst %.f90,%.o,$(patsubst %.c,%.o,$(SRCS)))
-
-$(TEST) : $(OBJS) $(DEPS_LOCAL) $(DEPS_OTHER)
-ifneq ($(QUIET),)
- @echo LOADER $@
- @$(LOADER) $(FCopenmp) -o $@ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-else
- $(LOADER) $(FCopenmp) -o @ $(OBJS) $(LOAD_LOCAL) $(LOAD_OTHER) $(LD_FLAGS)
-endif
-
-clean:
- -@rm -f *.o *.mod .depend $(TEST)
-
-nodeps : $(.DEFAULT_GOAL)
-
-#################################################################
-#
-# COMPILATION RULES
-
-%.o: %.f90
-ifneq ($(QUIET),)
- @echo TEST_COMPILE $<
- @$(TEST_COMPILE) $(FCfree) $<
-else
- $(TEST_COMPILE) $(FCfree) $<
-endif
-
-#################################################################
-#
-# DEPENDENCIES
-
-SRC_PATH = $(TEST_SRC_DIR)
-
-vpath %.f90 $(SRC_PATH)
-
-vpath %.mod $(LOCAL_LIB_DIR):$(MESA_DIR)/include
-
-NODEPS = $(or $(filter nodeps,$(MAKECMDGOALS)),$(filter clean,$(MAKECMDGOALS)))
-
-ifeq ($(NODEPS),)
-
- .depend :
- ifneq ($(QUIET),)
- @echo MAKEDEPF90
- @$(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- else
- $(MAKEDEPF90) -I$(SRC_PATH) $(SRCS) > .depend
- endif
-
- -include .depend
-
-endif
diff --git a/utils/test/mk b/utils/test/mk
deleted file mode 100755
index bc805ccaa..000000000
--- a/utils/test/mk
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-function check_okay {
- if [ $? -ne 0 ]
- then
- echo
- echo "FAILED"
- echo
- exit 1
- fi
-}
-
-cd ../make; make; check_okay
-cd ../test/make; make
diff --git a/utils/test/mkx b/utils/test/mkx
deleted file mode 100755
index 25826f7f3..000000000
--- a/utils/test/mkx
+++ /dev/null
@@ -1 +0,0 @@
-./mk; ./export
diff --git a/utils/test/rn b/utils/test/rn
deleted file mode 100755
index 0daf60b9e..000000000
--- a/utils/test/rn
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-./tester