diff --git a/.github/actions/install-mesa/action.yml b/.github/actions/install-mesa/action.yml index 77691ecdf..7a9d43a76 100644 --- a/.github/actions/install-mesa/action.yml +++ b/.github/actions/install-mesa/action.yml @@ -114,7 +114,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/.gitignore b/.gitignore index c4cbda92c..17572edf4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ data/version_number ## Compilation +build/ build.log .depend .order 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..15746bd71 --- /dev/null +++ b/adipls/Makefile @@ -0,0 +1,114 @@ +include ../make/defaults-module.mk + +# 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/user_adi.c.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 \ + +SRCS_CHECK := +INTERNAL_DEPENDS_ON := const +EXTERNAL_DEPENDS_ON := +BINTYPE = static-lib +INCLUDE_DIRS := -Iadipack.c/adipls + +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/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 d968d862c..5d6148c55 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..ce95edb1f 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_lib, 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 00112cf00..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 isnt 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 e38ecaad7..616c37cdf 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 7acba9885..cf7c2b11d 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 b5bc03d1a..65085bc89 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 d5f20a233..000000000 --- a/adipls/build_and_test +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/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 14fba1b97..000000000 --- a/adipls/build_and_test_parallel +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/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 d3e3c20c3..000000000 --- a/adipls/i1 +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/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/test/ck b/adipls/test/ck deleted file mode 100755 index 997c7b092..000000000 --- a/adipls/test/ck +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/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..2711ff8d2 --- /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 := utils 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 private/adipls_support_procs.f90 +INTERNAL_DEPENDS_ON += adipls +else +SRCS += private/adipls_support_stub.f90 private/adipls_support_procs_stub.f90 +endif + +SRCS_CHECK = test/src/test_astero.f +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 e02a156fe..000000000 --- a/astero/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/astero/build_and_test_parallel b/astero/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/astero/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test_parallel diff --git a/astero/clean b/astero/clean deleted file mode 100755 index 80174414b..000000000 --- a/astero/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make; make clean -cd ../test/make; make clean diff --git a/astero/cpv b/astero/cpv deleted file mode 100755 index 05ce569aa..000000000 --- a/astero/cpv +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/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 3b1b3cf38..000000000 --- a/astero/make/makefile_base +++ /dev/null @@ -1,165 +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 - -pgstar_astero_plots.o: %.o : %.f90 -ifneq ($(QUIET),) - @echo COMPILE_LEGACY $< - @$(COMPILE_LEGACY) $(SLOW_COMPILE) $< -else - $(COMPILE_LEGACY) $(SLOW_COMPILE) $< -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):$(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 5f0ebf703..000000000 --- a/astero/mk +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -cd make; make diff --git a/astero/private/astero_support.f90 b/astero/private/astero_support.f90 index d7ba6a53d..974892bee 100644 --- a/astero/private/astero_support.f90 +++ b/astero/private/astero_support.f90 @@ -86,7 +86,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 @@ -106,7 +106,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 31cbae1f7..22e58596a 100644 --- a/astero/private/gyre_support.f90 +++ b/astero/private/gyre_support.f90 @@ -79,7 +79,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/private/pgstar_astero_plots.f90 b/astero/private/pgstar_astero_plots.f90 index 9d897ca48..d319f6bf6 100644 --- a/astero/private/pgstar_astero_plots.f90 +++ b/astero/private/pgstar_astero_plots.f90 @@ -147,7 +147,7 @@ subroutine do_echelle_plot( & if (ierr /= 0) return plot_delta_nu = echelle_delta_nu - if (plot_delta_nu <= 0) plot_delta_nu = delta_nu + if (plot_delta_nu <= 0) plot_delta_nu = real(delta_nu, kind=sp) if (plot_delta_nu <= 0) then write(*,*) 'must supply value for echelle_delta_nu' ierr = -1 @@ -161,10 +161,10 @@ subroutine do_echelle_plot( & do l = 0, 3 if (nl(l) > 0) then - ymin = min(ymin,minval(freq_target(l,1:nl(l)))) - ymax = max(ymax,maxval(freq_target(l,1:nl(l)))) - xpt_min = min(xpt_min,minval(mod(freq_target(l,1:nl(l)),plot_delta_nu))) - xpt_max = max(xpt_max,maxval(mod(freq_target(l,1:nl(l)),plot_delta_nu))) + ymin = min(real(ymin, kind=dp), minval(freq_target(l,1:nl(l)))) + ymax = max(real(ymax, kind=dp), maxval(freq_target(l,1:nl(l)))) + xpt_min = min(real(xpt_min, kind=dp), minval(mod(freq_target(l,1:nl(l)), real(plot_delta_nu, kind=dp)))) + xpt_max = max(real(xpt_max, kind=dp), maxval(mod(freq_target(l,1:nl(l)), real(plot_delta_nu, kind=dp)))) end if end do @@ -314,7 +314,7 @@ subroutine show_obs(freq, color, shape) real(dp), intent(in) :: freq integer, intent(in) :: color, shape y_obs = freq - x_obs = mod(freq,plot_delta_nu) + x_obs = mod(freq, real(plot_delta_nu, kind=dp)) call pgsci(color) call pgpt1(x_obs, y_obs, shape) call pgpt1(x_obs + plot_delta_nu, y_obs, shape) @@ -333,7 +333,7 @@ subroutine show_model( & y_model_alt_shift = echelle_model_alt_y_shift call pgsci(color) y_model = freq - x_obs = mod(freq_obs, plot_delta_nu) + x_obs = mod(freq_obs, real(plot_delta_nu, kind=dp)) x_model = (freq - freq_obs) + x_obs call pgpt1(x_model, y_model, model_shape) call pgmove(x_obs, y_obs) diff --git a/astero/replace_v b/astero/replace_v deleted file mode 100755 index dbd7deeab..000000000 --- a/astero/replace_v +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/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 47ce00177..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.f - -################################################################# -# -# 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: %.f -ifneq ($(QUIET),) - @echo TEST_COMPILE $< - @$(TEST_COMPILE) $(FCfixed) $< -else - $(TEST_COMPILE) $(FCfixed) $< -endif - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(TEST_SRC_DIR) - -vpath %.f $(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 78c91b0e9..000000000 --- a/astero/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/astero/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/astero/test_suite/astero_adipls/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/astero/test_suite/astero_adipls/re +++ b/astero/test_suite/astero_adipls/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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_adipls/rn1 b/astero/test_suite/astero_adipls/rn1 index 25590040a..f4ce7695f 100755 --- a/astero/test_suite/astero_adipls/rn1 +++ b/astero/test_suite/astero_adipls/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +make run 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 aec7a5195..000000000 --- a/astero/test_suite/astero_gyre/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/astero/test_suite/astero_gyre/re +++ b/astero/test_suite/astero_gyre/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/astero/test_suite/astero_gyre/rn1 +++ b/astero/test_suite/astero_gyre/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +make run diff --git a/astero/test_suite/each_test_compile b/astero/test_suite/each_test_compile index 1424b5224..af9bc57f3 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 aec7a5195..000000000 --- a/astero/test_suite/example_astero/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/astero/test_suite/example_astero/re +++ b/astero/test_suite/example_astero/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/astero/test_suite/example_astero/rn1 +++ b/astero/test_suite/example_astero/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 aec7a5195..000000000 --- a/astero/test_suite/fast_from_file/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..7093783a3 100755 --- a/astero/test_suite/fast_from_file/re +++ b/astero/test_suite/fast_from_file/re @@ -1,9 +1,11 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/astero/test_suite/fast_from_file/rn1 +++ b/astero/test_suite/fast_from_file/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 aec7a5195..000000000 --- a/astero/test_suite/fast_newuoa/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..7093783a3 100755 --- a/astero/test_suite/fast_newuoa/re +++ b/astero/test_suite/fast_newuoa/re @@ -1,9 +1,11 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/astero/test_suite/fast_newuoa/rn1 +++ b/astero/test_suite/fast_newuoa/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 aec7a5195..000000000 --- a/astero/test_suite/fast_scan_grid/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..7093783a3 100755 --- a/astero/test_suite/fast_scan_grid/re +++ b/astero/test_suite/fast_scan_grid/re @@ -1,9 +1,11 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/astero/test_suite/fast_scan_grid/rn1 +++ b/astero/test_suite/fast_scan_grid/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 aec7a5195..000000000 --- a/astero/test_suite/fast_simplex/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..7093783a3 100755 --- a/astero/test_suite/fast_simplex/re +++ b/astero/test_suite/fast_simplex/re @@ -1,9 +1,11 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/astero/test_suite/fast_simplex/rn1 +++ b/astero/test_suite/fast_simplex/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 aec7a5195..000000000 --- a/astero/test_suite/surface_effects/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/astero/test_suite/surface_effects/re +++ b/astero/test_suite/surface_effects/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/astero/test_suite/surface_effects/rn1 +++ b/astero/test_suite/surface_effects/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 b4380a9bb..000000000 --- a/astero/work/make/makefile +++ /dev/null @@ -1,7 +0,0 @@ -ifeq ($(MESA_DIR),) -ifeq ($($MESA_DIR_INTENTIONALLY_EMPTY),) - $(error MESA_DIR enviroment 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 aec7a5195..000000000 --- a/astero/work/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/astero/work/re +++ b/astero/work/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/astero/work/rn +++ b/astero/work/rn @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 e02a156fe..000000000 --- a/atm/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/atm/build_and_test_parallel b/atm/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/atm/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 6968ee8c9..000000000 --- a/atm/build_data_and_export +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/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 0585718af..000000000 --- a/atm/export_data +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/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 93fb94dec..000000000 --- a/atm/i1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -../utils/i1 && \ -./i1_preprocessor diff --git a/atm/i1_preprocessor b/atm/i1_preprocessor deleted file mode 100755 index 64d5e0d1c..000000000 --- a/atm/i1_preprocessor +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/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 867f281fd..000000000 --- a/atm/i1p +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 43d5dcdf6..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..d710fa50e --- /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.f +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 3b1031b8d..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.f - -CREATE_TAU100_SRCS = create_tau100.f $(DEPS_LOCAL) $(DEPS_OTHER) - -MAKE_BT_SRCS = create_BT_Settl.f - -MAKE_WD_SRCS = create_wd_tau25.f - -PLOT_SRCS = plot.f - -CKREAD_SRCS = ckread.f - -MERGE_SRCS = table_merge.f - -################################################################# -# -# 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 %.f,%.o,$(patsubst %.f90,%.o,$(CREATE_TABLE_SRCS))) -CREATE_TAU100_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(CREATE_TAU100_SRCS))) -MAKE_BT_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(MAKE_BT_SRCS))) -MAKE_WD_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(MAKE_WD_SRCS))) -PLOT_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(PLOT_SRCS))) -CKREAD_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(CKREAD_SRCS))) -MERGE_OBJS = $(patsubst %.f,%.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: %.f -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 %.f $(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_BT_Settl.f b/atm/preprocessor/src/create_BT_Settl.f90 similarity index 100% rename from atm/preprocessor/src/create_BT_Settl.f rename to atm/preprocessor/src/create_BT_Settl.f90 diff --git a/atm/preprocessor/src/create_table_atm.f b/atm/preprocessor/src/create_table_atm.f deleted file mode 100644 index e61a30e2d..000000000 --- a/atm/preprocessor/src/create_table_atm.f +++ /dev/null @@ -1,302 +0,0 @@ -! *********************************************************************** -! -! Copyright (C) 2010-2019 Aaron Dotter & The MESA Team -! -! This file is part of MESA. -! -! MESA is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Library Public License as published -! by the Free Software Foundation; either version 2 of the License, or -! (at your option) any later version. -! -! MESA 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 Library General Public License for more details. -! -! You should have received a copy of the GNU Library General Public License -! along with this software; if not, write to the Free Software -! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -! -! *********************************************************************** - -! this program creates a base layer of atmosphere boundary conditions -! this can be combined with tables created from model atmosphere -! structures. the main purposes of the files generated from this -! program is to provide a smooth base that covers all values of Teff -! and log(g). the model atmosphere grids have limited range of log(g) -! at fixed Teff and may also have holes. - -program create_table_atm - - use atm_def - use atm_lib - use chem_def - use chem_lib, only: chem_init, basic_composition_info - use const_def - use const_lib - use eos_def - use eos_lib - use kap_lib - use utils_lib - use math_lib - - implicit none - - logical, parameter :: debug = .false. - - integer :: eos_handle, kap_handle, io_out - integer, parameter :: num_isos = 7, num_logg = 15, num_Teff = 85 - - integer, pointer :: chem_id(:), net_iso(:) - real(dp), pointer :: xa(:) - - 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) :: 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) - real(dp) :: Pgas(num_logg, num_Teff), T(num_logg, num_Teff) - integer, parameter :: max_iters = 100 - real(dp), parameter :: errtol = 1d-6 - integer :: iters - - !process command line args - if( COMMAND_ARGUMENT_COUNT() /= 3 ) then - stop 'usage: ./create_table_atm [logZ/Zsolar] [output file] [tau_base]' - endif - - call GET_COMMAND_ARGUMENT(1,clogZ) - read(clogZ,*) logZ - - call GET_COMMAND_ARGUMENT(2,output_file) - - !mesa initialization - ierr = 0 - Pextra_factor = 1 - - call mesa_init() - - call set_table_composition() - - call GET_COMMAND_ARGUMENT(3,ctau_base) - read(ctau_base,*) tau_base - - if ( tau_base <= 0 ) stop ' tau > 0 ' - - !for table creation: - M = Msun - - logg_array(:) = (/ -1d0, -0.5d0, 0d0, 0.5d0, 1d0, 1.5d0, 2d0, 2.5d0, 3d0, 3.5d0, 4d0, 4.5d0, 5d0, 5.5d0, 6d0 /) - - Teff_array(1) = 2.0d3 - do i_Teff = 2, num_Teff - if( Teff_array(i_Teff-1) < 1.3d4) Teff_array(i_Teff) = Teff_array(i_Teff-1) + 2.5d2 - if( Teff_array(i_Teff-1) >=1.3d4) Teff_array(i_Teff) = Teff_array(i_Teff-1) + 1d3 - if( Teff_array(i_Teff-1) >=5d4) Teff_array(i_Teff) = Teff_array(i_Teff-1) + 5d4 - enddo - - if(debug) write(*,*) trim(output_file) - - do i_Teff = 1, num_Teff - do i_logg = 1, num_logg - R = sqrt ( standard_cgrav*M / 10d0**logg_array(i_logg) ) - L = pi*crad*clight * R**2 * Teff_array(i_Teff)**4 - 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, & - lnT, dlnT_dL, dlnT_dlnR, dlnT_dlnM, dlnT_dlnkap, & - lnP, dlnP_dL, dlnP_dlnR, dlnP_dlnM, dlnP_dlnkap, & - ierr) - if (ierr /= 0) then - Pgas(i_logg, i_Teff) = -1 - T(i_logg, i_Teff) = -1 - write(*,*) 'failed in atm_get_gray_and_kap', logg_array(i_logg), Teff_array(i_Teff) - else - T(i_logg, i_Teff) = exp(lnT) - Pgas(i_logg, i_Teff) = max( 0d0, exp(lnP) - Radiation_Pressure(T(i_logg, i_Teff)) ) - end if - enddo - enddo - - - open(newunit=io_out, file=output_file) - !write Pgas - write(io_out,'("#Teff(K)| Pgas@",15(" log g =",f5.2,1x))') logg_array(1:num_logg) - do i_Teff = 1, num_Teff - write(io_out,'(1p,99e15.7)') Teff_array(i_Teff), Pgas(1:num_logg, i_Teff) - enddo - !write T - write(io_out,'("#Teff(K)| T@",15(" log g =",f5.2,1x))') logg_array(1:num_logg) - do i_Teff = 1, num_Teff - write(io_out,'(1p,99e15.7)') Teff_array(i_Teff), T(1:num_logg, i_Teff) - enddo - close (io_out) - - call mesa_shutdown - -contains - - subroutine mesa_init - - call const_init(' ',ierr) - if(ierr/=0) call mesa_error(__FILE__,__LINE__) - - call chem_init('isotopes.data',ierr) - if(ierr/=0) call mesa_error(__FILE__,__LINE__) - - call eos_init(' ', use_cache, ierr) - if(ierr/=0) call mesa_error(__FILE__,__LINE__) - - eos_handle = alloc_eos_handle(ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - - call kap_init(use_cache, ' ', ierr) - if(ierr/=0) call mesa_error(__FILE__,__LINE__) - - kap_handle = alloc_kap_handle(ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - - call atm_init(.false., ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - - end subroutine mesa_init - - !**** - - subroutine mesa_shutdown - call eos_shutdown - call free_eos_handle(eos_handle) - call kap_shutdown - call free_kap_handle(kap_handle) - call atm_shutdown - end subroutine mesa_shutdown - - !**** - - subroutine set_table_composition() - - integer :: i - real(dp) :: ye, mass_correction, sumx - - Xbbn = 0.75d0 - Ybbn = 0.25d0 - - Xsun = 7.348d-1 - Ysun = 2.348d-1 - Zsun = 1.685d-2 - - Z = exp10(logZ)*Zsun - Y = 1.5d0*Z + Ybbn - X = 1d0 - (Y+Z) - - if(debug)then - write(*,*) 'X = ', X - write(*,*) 'Y = ', Y - write(*,*) 'Z = ', Z - endif - - XC = 0.1718d0*Z - XN = 0.0503d0*Z - XO = 0.4674d0*Z - XNe = 0.1048d0*Z - XMg = 0.2057d0*Z ! 1-(XC+XN+XO+XNe) - - allocate(xa(num_isos), chem_id(num_isos), net_iso(num_chem_isos)) - - chem_id(:) = (/ ih1, ihe4, ic12, in14, io16, ine20, img24 /) - net_iso(:) = 0 - do i=1,num_isos - net_iso(chem_id(i)) = i - end do - xa(:) = (/ X, Y, xc, xn, xo, xne, xmg /) - - call basic_composition_info( & - num_isos, chem_id, xa, X, Y, Z, & - abar, zbar, z2bar, z53bar, ye, mass_correction, sumx) - - if(debug)then - write(*,*) ' xa = ', xa - write(*,*) ' sum(xa) = ', sum(xa) - endif - - end subroutine set_table_composition - - !**** - - subroutine eos_proc( & - lnP, lnT, & - lnRho, res, dres_dlnRho, dres_dlnT, & - ierr) - - use eos_def, only: num_eos_basic_results, num_eos_d_dxa_results - use eos_lib, only: eosPT_get, radiation_pressure - - real(dp), intent(in) :: lnP - real(dp), intent(in) :: lnT - real(dp), intent(out) :: lnRho - real(dp), intent(out) :: res(:) - real(dp), intent(out) :: dres_dlnRho(:) - real(dp), intent(out) :: dres_dlnT(:) - integer, intent(out) :: ierr - - real(dp) :: T, P, Prad, Pgas, logPgas, rho - real(dp) :: logRho, dlnRho_dlnPgas, dlnRho_dlnT - real(dp), dimension(num_eos_d_dxa_results, num_isos) :: & - dres_dxa - - T = exp(lnT) - P = exp(lnP) - - Prad = radiation_pressure(T) - Pgas = max(1E-99_dp, P - Prad) - logPgas = log10(Pgas) - - call eosPT_get( & - eos_handle, & - num_isos, chem_id, net_iso, xa, & - Pgas, logPgas, T, lnT/ln10, & - Rho, logRho, dlnRho_dlnPgas, dlnRho_dlnT, & - res, dres_dlnRho, dres_dlnT, dres_dxa, ierr) - - lnRho = logRho*ln10 - - end subroutine eos_proc - - !**** - - subroutine kap_proc( & - lnRho, lnT, res, dres_dlnRho, dres_dlnT, & - kap, dlnkap_dlnRho, dlnkap_dlnT, & - ierr) - - use kap_def, only: num_kap_fracs - use kap_lib, only: kap_get - use eos_def, only: i_lnfree_e, i_eta - - real(dp), intent(in) :: lnRho - real(dp), intent(in) :: lnT - real(dp), intent(in) :: res(:) - real(dp), intent(in) :: dres_dlnRho(:) - real(dp), intent(in) :: dres_dlnT(:) - real(dp), intent(out) :: kap - real(dp), intent(out) :: dlnkap_dlnRho - real(dp), intent(out) :: dlnkap_dlnT - integer, intent(out) :: ierr - - real(dp) :: kap_fracs(num_kap_fracs), dlnkap_dxa(num_isos) - - call kap_get( & - kap_handle, num_isos, chem_id, net_iso, xa, & - lnRho/ln10, lnT/ln10, res(i_lnfree_e), dres_dlnRho(i_lnfree_e), dres_dlnT(i_lnfree_e), & - res(i_eta), dres_dlnRho(i_eta), dres_dlnT(i_eta), & - kap_fracs, kap, dlnkap_dlnRho, dlnkap_dlnT, dlnkap_dxa, ierr) - - end subroutine kap_proc - -end program create_table_atm diff --git a/atm/preprocessor/src/create_table_atm.f90 b/atm/preprocessor/src/create_table_atm.f90 new file mode 100644 index 000000000..92e26fc11 --- /dev/null +++ b/atm/preprocessor/src/create_table_atm.f90 @@ -0,0 +1,303 @@ +! *********************************************************************** +! +! Copyright (C) 2010-2019 Aaron Dotter & The MESA Team +! +! This file is part of MESA. +! +! MESA is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Library Public License as published +! by the Free Software Foundation; either version 2 of the License, or +! (at your option) any later version. +! +! MESA 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 Library General Public License for more details. +! +! You should have received a copy of the GNU Library General Public License +! along with this software; if not, write to the Free Software +! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +! +! *********************************************************************** + +! this program creates a base layer of atmosphere boundary conditions +! this can be combined with tables created from model atmosphere +! structures. the main purposes of the files generated from this +! program is to provide a smooth base that covers all values of Teff +! and log(g). the model atmosphere grids have limited range of log(g) +! at fixed Teff and may also have holes. + +program create_table_atm + + use atm_def + use atm_lib + use chem_def + use chem_lib, only: chem_init, basic_composition_info + use const_def + use const_lib + use eos_def + use eos_lib + use kap_lib + use utils_lib + use math_lib + + implicit none + + logical, parameter :: debug = .false. + + integer :: eos_handle, kap_handle, io_out + integer, parameter :: num_isos = 7, num_logg = 15, num_Teff = 85 + + integer, pointer :: chem_id(:), net_iso(:) + real(dp), pointer :: xa(:) + + 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 + 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) + real(dp) :: Pgas(num_logg, num_Teff), T(num_logg, num_Teff) + integer, parameter :: max_iters = 100 + real(dp), parameter :: errtol = 1d-6 + + !process command line args + if( COMMAND_ARGUMENT_COUNT() /= 3 ) then + stop 'usage: ./create_table_atm [logZ/Zsolar] [output file] [tau_base]' + endif + + call GET_COMMAND_ARGUMENT(1,clogZ) + read(clogZ,*) logZ + + call GET_COMMAND_ARGUMENT(2,output_file) + + !mesa initialization + ierr = 0 + Pextra_factor = 1 + + call mesa_init() + + call set_table_composition() + + call GET_COMMAND_ARGUMENT(3,ctau_base) + read(ctau_base,*) tau_base + + if ( tau_base <= 0 ) stop ' tau > 0 ' + + !for table creation: + M = Msun + + logg_array(:) = (/ -1d0, -0.5d0, 0d0, 0.5d0, 1d0, 1.5d0, 2d0, 2.5d0, 3d0, 3.5d0, 4d0, 4.5d0, 5d0, 5.5d0, 6d0 /) + + Teff_array(1) = 2.0d3 + do i_Teff = 2, num_Teff + if( Teff_array(i_Teff-1) < 1.3d4) Teff_array(i_Teff) = Teff_array(i_Teff-1) + 2.5d2 + if( Teff_array(i_Teff-1) >=1.3d4) Teff_array(i_Teff) = Teff_array(i_Teff-1) + 1d3 + if( Teff_array(i_Teff-1) >=5d4) Teff_array(i_Teff) = Teff_array(i_Teff-1) + 5d4 + enddo + + if(debug) write(*,*) trim(output_file) + + do i_Teff = 1, num_Teff + do i_logg = 1, num_logg + R = sqrt ( standard_cgrav*M / 10d0**logg_array(i_logg) ) + L = pi*crad*clight * R**2 * Teff_array(i_Teff)**4 + 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_array(i_Teff), kap, & + lnT, dlnT_dL, dlnT_dlnR, dlnT_dlnM, dlnT_dlnkap, & + lnP, dlnP_dL, dlnP_dlnR, dlnP_dlnM, dlnP_dlnkap, & + ierr) + if (ierr /= 0) then + Pgas(i_logg, i_Teff) = -1 + T(i_logg, i_Teff) = -1 + write(*,*) 'failed in atm_get_gray_and_kap', logg_array(i_logg), Teff_array(i_Teff) + else + T(i_logg, i_Teff) = exp(lnT) + Pgas(i_logg, i_Teff) = max( 0d0, exp(lnP) - Radiation_Pressure(T(i_logg, i_Teff)) ) + end if + enddo + enddo + + + open(newunit=io_out, file=output_file) + !write Pgas + write(io_out,'("#Teff(K)| Pgas@",15(" log g =",f5.2,1x))') logg_array(1:num_logg) + do i_Teff = 1, num_Teff + write(io_out,'(1p,99e15.7)') Teff_array(i_Teff), Pgas(1:num_logg, i_Teff) + enddo + !write T + write(io_out,'("#Teff(K)| T@",15(" log g =",f5.2,1x))') logg_array(1:num_logg) + do i_Teff = 1, num_Teff + write(io_out,'(1p,99e15.7)') Teff_array(i_Teff), T(1:num_logg, i_Teff) + enddo + close (io_out) + + call mesa_shutdown + +contains + + 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__) + + call eos_init(' ', use_cache, ierr) + if(ierr/=0) call mesa_error(__FILE__,__LINE__) + + eos_handle = alloc_eos_handle(ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + + call kap_init(use_cache, ' ', ierr) + if(ierr/=0) call mesa_error(__FILE__,__LINE__) + + kap_handle = alloc_kap_handle(ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + + call atm_init(.false., ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + + end subroutine mesa_init + + !**** + + subroutine mesa_shutdown + call eos_shutdown + call free_eos_handle(eos_handle) + call kap_shutdown + call free_kap_handle(kap_handle) + call atm_shutdown + end subroutine mesa_shutdown + + !**** + + subroutine set_table_composition() + + integer :: i + real(dp) :: ye, mass_correction, sumx + + Xbbn = 0.75d0 + Ybbn = 0.25d0 + + Xsun = 7.348d-1 + Ysun = 2.348d-1 + Zsun = 1.685d-2 + + Z = exp10(logZ)*Zsun + Y = 1.5d0*Z + Ybbn + X = 1d0 - (Y+Z) + + if(debug)then + write(*,*) 'X = ', X + write(*,*) 'Y = ', Y + write(*,*) 'Z = ', Z + endif + + XC = 0.1718d0*Z + XN = 0.0503d0*Z + XO = 0.4674d0*Z + XNe = 0.1048d0*Z + XMg = 0.2057d0*Z ! 1-(XC+XN+XO+XNe) + + allocate(xa(num_isos), chem_id(num_isos), net_iso(num_chem_isos)) + + chem_id(:) = (/ ih1, ihe4, ic12, in14, io16, ine20, img24 /) + net_iso(:) = 0 + do i=1,num_isos + net_iso(chem_id(i)) = i + end do + xa(:) = (/ X, Y, xc, xn, xo, xne, xmg /) + + call basic_composition_info( & + num_isos, chem_id, xa, X, Y, Z, & + abar, zbar, z2bar, z53bar, ye, mass_correction, sumx) + + if(debug)then + write(*,*) ' xa = ', xa + write(*,*) ' sum(xa) = ', sum(xa) + endif + + end subroutine set_table_composition + + !**** + + subroutine eos_proc( & + lnP, lnT, & + lnRho, res, dres_dlnRho, dres_dlnT, & + ierr) + + use eos_def, only: num_eos_basic_results, num_eos_d_dxa_results + use eos_lib, only: eosPT_get, radiation_pressure + + real(dp), intent(in) :: lnP + real(dp), intent(in) :: lnT + real(dp), intent(out) :: lnRho + real(dp), intent(out) :: res(:) + real(dp), intent(out) :: dres_dlnRho(:) + real(dp), intent(out) :: dres_dlnT(:) + integer, intent(out) :: ierr + + real(dp) :: T, P, Prad, Pgas, logPgas, rho + real(dp) :: logRho, dlnRho_dlnPgas, dlnRho_dlnT + real(dp), dimension(num_eos_d_dxa_results, num_isos) :: & + dres_dxa + + T = exp(lnT) + P = exp(lnP) + + Prad = radiation_pressure(T) + Pgas = max(1E-99_dp, P - Prad) + logPgas = log10(Pgas) + + call eosPT_get( & + eos_handle, & + num_isos, chem_id, net_iso, xa, & + Pgas, logPgas, T, lnT/ln10, & + Rho, logRho, dlnRho_dlnPgas, dlnRho_dlnT, & + res, dres_dlnRho, dres_dlnT, dres_dxa, ierr) + + lnRho = logRho*ln10 + + end subroutine eos_proc + + !**** + + subroutine kap_proc( & + lnRho, lnT, res, dres_dlnRho, dres_dlnT, & + kap, dlnkap_dlnRho, dlnkap_dlnT, & + ierr) + + use kap_def, only: num_kap_fracs + use kap_lib, only: kap_get + use eos_def, only: i_lnfree_e, i_eta + + real(dp), intent(in) :: lnRho + real(dp), intent(in) :: lnT + real(dp), intent(in) :: res(:) + real(dp), intent(in) :: dres_dlnRho(:) + real(dp), intent(in) :: dres_dlnT(:) + real(dp), intent(out) :: kap + real(dp), intent(out) :: dlnkap_dlnRho + real(dp), intent(out) :: dlnkap_dlnT + integer, intent(out) :: ierr + + real(dp) :: kap_fracs(num_kap_fracs), dlnkap_dxa(num_isos) + + call kap_get( & + kap_handle, num_isos, chem_id, net_iso, xa, & + lnRho/ln10, lnT/ln10, res(i_lnfree_e), dres_dlnRho(i_lnfree_e), dres_dlnT(i_lnfree_e), & + res(i_eta), dres_dlnRho(i_eta), dres_dlnT(i_eta), & + kap_fracs, kap, dlnkap_dlnRho, dlnkap_dlnT, dlnkap_dxa, ierr) + + end subroutine kap_proc + +end program create_table_atm diff --git a/atm/preprocessor/src/create_tau100.f b/atm/preprocessor/src/create_tau100.f deleted file mode 100644 index 94c0c7eb5..000000000 --- a/atm/preprocessor/src/create_tau100.f +++ /dev/null @@ -1,716 +0,0 @@ -! *********************************************************************** -! -! Copyright (C) 2010-2019 Aaron Dotter, Bill Paxton & The MESA Team -! -! This file is part of MESA. -! -! MESA is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Library Public License as published -! by the Free Software Foundation; either version 2 of the License, or -! (at your option) any later version. -! -! MESA 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 Library General Public License for more details. -! -! You should have received a copy of the GNU Library General Public License -! along with this software; if not, write to the Free Software -! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -! -! *********************************************************************** - -module mod_tau100 - - use atm_def - use atm_lib - use chem_def - use chem_lib, only: chem_init, basic_composition_info - use const_def - use const_lib - use eos_def - use eos_lib - use kap_lib - use utils_lib - use math_lib - use interp_2d_lib_db - - implicit none - - logical, parameter :: write_plot_files = .true. - - real(dp) :: tau_base ! tau at base of atm (1, 10, or 100) - integer :: which_cond_layer, which_ck_layer - character(len=256) :: my_mesa_dir, output_file1, output_file2 - - integer, parameter :: & - cond_layer_tau1m2 = 26, cond_layer_tau1m1 = 32, cond_layer_tau1 = 38, & - cond_layer_tau10 = 44, cond_layer_tau100 = 50 - integer, parameter :: & - ck_layer_tau1m2 = 40, ck_layer_tau1m1 = 48, ck_layer_tau1 = 56, & - ck_layer_tau10 = 64, ck_layer_tau100 = 72 - - - integer :: eos_handle, kap_handle - -contains - - subroutine build_tau_tables - - integer, parameter :: num_isos = 7, nmet = 5 - 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 - 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) :: 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 - integer :: ng_for_CK_Teff(nt_for_CK) - - include 'formats' - - write(*,1) 'tau_base', tau_base - - ng_for_CK_Teff(1:11) = 11 - ng_for_CK_Teff(12:17)= 10 - ng_for_CK_Teff(18:20)= 9 - ng_for_CK_Teff(21:23)= 8 - ng_for_CK_Teff(24:34)= 7 - ng_for_CK_Teff(35:39)= 6 - ng_for_CK_Teff(40) = 7 - ng_for_CK_Teff(41:45)= 6 - ng_for_CK_Teff(46:52)= 5 - ng_for_CK_Teff(53:57)= 4 - ng_for_CK_Teff(58:65)= 3 - ng_for_CK_Teff(66:75)= 2 - ng_for_CK_Teff(76) = 1 - - ierr = 0 - io = 33 ! for reading - - ! setup for T(tau) calculations - call set_table_composition - - loggs(1:ng) = (/ & - 0d0, 0.5d0, 1d0, 1.5d0, 2d0, 2.5d0, 3d0, 3.5d0, 4d0, 4.5d0, 5d0, 5.5d0, 6d0 /) - Teffs(1:nT) = tau100_Ts(1:nT) - - Pgas = -1 - T = -1 - - call read_COND - call read_CK - - ! set logg = 0.0 to 2.0 for Teff = 100 to 3400 using T(tau) - write(*,*) 'do T(tau)' - do i = 1, ng - logg = loggs(i) - if (logg < 0d0) cycle - if (logg > 2.01d0) exit - do j = 1, nT - Teff = Teffs(j) - if (Teff < 99) cycle - if (Teff > 3401) exit - !write(*,*) 'logg Teff', logg, Teff - call eval1_Ttau(logg, Teff, Pgas(i,j), T(i,j), ierr) - if (ierr /= 0) then - write(*,*) 'failed in eval1_Ttau', logg, Teff, i, j - call mesa_error(__FILE__,__LINE__) - end if - end do - !do j = 1, 4 - ! write(*,*) - !end do - end do - - write(*,*) 'smooth transitions' - - ! extrapolate logg = 5.5 and 6.0 for Teff = 3500 to 50000 using logg = 4.50 and 5.0 - do i = 1, ng - logg = loggs(i) - if (logg < 5.49d0) cycle - if (logg > 5.51d0) exit - do j = 1, nT - Teff = Teffs(j) - if (Teff < 3499) cycle - if (Teff > 50001) exit - Pgas(i,j) = (3*Pgas(i-1,j) - Pgas(i-2,j))/2 - T(i,j) = (3*T(i-1,j) - T(i-2,j))/2 - Pgas(i+1,j) = Pgas(i,j) - T(i+1,j) = T(i,j) - end do - end do - - ! smooth the T(tau) region - call smooth(0d0, 2.01d0, 99d0, 3401d0, 10) - - call fill_and_smooth_CK_corner() - - ! set Teff = 3400 and 3500 for logg 0.0 to 6.0 to linear interpolation of 3300 and 3600 - do i = 1, ng - logg = loggs(i) - do j = 1, nT - Teff = Teffs(j) - if (Teff < 3399) cycle - Pgas(i,j) = (2*Pgas(i,j-1) + Pgas(i,j+2))/3 - T(i,j) = (2*T(i,j-1) + T(i,j+2))/3 - Pgas(i,j+1) = (Pgas(i,j-1) + 2*Pgas(i,j+2))/3 - T(i,j+1) = (T(i,j-1) + 2*T(i,j+2))/3 - exit - end do - end do - - call write_output() - - if (write_plot_files) call write_plots() - - contains - - subroutine fill_and_smooth_CK_corner() - integer :: ibound(ng), j, i, jj, ii, j1 - real(dp) :: d0, d1, Pinterp, Tinterp - real(dp), parameter :: Pfill = 10 - real(dp), parameter :: Tfill = 1d5 - include 'formats' - - do i=1,ng - j=1 - do while (Teffs(j) < 4000) - j=j+1 - end do - do while(Pgas(i,j) > 0 .and. j < nT) - j=j+1 - enddo - ibound(i)=j - !write(*,3) 'ibound(i) = j', i, j, loggs(i), Teffs(j) - enddo - - Pgas(1,nT) = Pfill - T(1,nT) = Tfill - do i = 1, ng - j1 = max(1,ibound(i)-1) - do j = j1, nT - d0 = sqrt(dble((j-nT)**2 + (i-1)**2)) - jj = j - do ii = i, ng - if (ibound(ii)-1 > jj) then - d1 = sqrt(dble((j-jj)**2 + (i-ii)**2)) - Pinterp = Pfill*d1/(d0+d1) + Pgas(ii,jj)*d0/(d0+d1) - Pgas(i,j) = Pinterp - Tinterp = Tfill*d1/(d0+d1) + T(ii,jj)*d0/(d0+d1) - T(i,j) = Tinterp - !if (j == j1) then - ! write(*,3) 'T(i,j)', i, j, T(i,j), loggs(i), Teffs(j) - !end if - exit - end if - jj = max(1,jj-1) - end do - end do - end do - do i=1,20 - do ii=1,ng - if (ibound(ii) == nT) cycle - do jj=ibound(ii)-1,nT - Pgas(ii,jj) = ( & - Pgas(ii,max(1,jj-1)) + & - Pgas(ii,min(nT,jj+1)) + & - Pgas(ii,jj) + & - Pgas(max(1,ii-1),jj) + & - Pgas(min(ng,ii+1),jj)) / 5 - T(ii,jj) = ( & - T(ii,max(1,jj-1)) + & - T(ii,min(nT,jj+1)) + & - T(ii,jj) + & - T(max(1,ii-1),jj) + & - T(min(ng,ii+1),jj)) / 5 - end do - end do - end do - end subroutine fill_and_smooth_CK_corner - - !**** - - subroutine smooth(logg_lo, logg_hi, Teff_lo, Teff_hi, n) - real(dp), intent(in) :: logg_lo, logg_hi, Teff_lo, Teff_hi - integer, intent(in) :: n - real(dp) :: logg, Teff - integer :: k, ii, jj - include 'formats' - do k = 1, n - do ii = 1, ng - logg = loggs(ii) - if (logg < logg_lo) cycle - if (logg > logg_hi) exit - do jj = 1, nT - Teff = Teffs(jj) - if (Teff < Teff_lo) cycle - if (Teff > Teff_hi) exit - Pgas(ii,jj) = ( & - Pgas(ii,max(1,jj-1)) + & - Pgas(ii,min(nT,jj+1)) + & - Pgas(ii,jj) + & - Pgas(max(1,ii-1),jj) + & - Pgas(min(ng,ii+1),jj)) / 5 - T(ii,jj) = ( & - T(ii,max(1,jj-1)) + & - T(ii,min(nT,jj+1)) + & - T(ii,jj) + & - T(max(1,ii-1),jj) + & - T(min(ng,ii+1),jj)) / 5 - !write(*,3) 'smooth', ii, jj, logg, Teff, Pgas(ii,jj), T(ii,jj) - end do - end do - end do - end subroutine smooth - - !**** - - subroutine write_plots() - - integer :: i, j, ii, jj - - ! rearrange for plotting - do i=1,ng - ii = ng-i+1 - do j=1,nT - jj = nT-j+1 - logT_plot(j,i) = safe_log10(T(i,j)) - logPgas_plot(j,i) = safe_log10(Pgas(i,j)) - end do - end do - - open(io,file='plot_tau100/logT.data',action='write') - write(io,'(e20.10)') logT_plot(:,:) - close(io) - - open(io,file='plot_tau100/logPgas.data',action='write') - write(io,'(e20.10)') logPgas_plot(:,:) - close(io) - - open(io,file='plot_tau100/Teff.data',action='write') - do j=1,nT - write(io,'(e20.10)') Teffs(j) - end do - close(io) - - open(io,file='plot_tau100/logg.data',action='write') - do i=1,ng - write(io,'(e20.10)') loggs(i) - end do - close(io) - - end subroutine write_plots - - !**** - - subroutine write_output - write(*,*) trim(output_file1) - io_out1 = 33 - open(io_out1, file=output_file1) - write(*,*) trim(output_file2) - io_out2 = 34 - open(io_out2, file=output_file2) - write(io_out1,'(a15)',advance='no') "#Teff(K)| Pgas@" - write(io_out2,'(a15)',advance='no') "#Teff(K)| T@" - do i = 1, ng - write(io_out1,fmt='(" log g =",f5.2," ")',advance='no') loggs(i) - write(io_out2,fmt='(" log g =",f5.2," ")',advance='no') loggs(i) - end do - write(io_out1,*) - write(io_out2,*) - do j = 1, nT - write(io_out1,fmt='(e15.7)',advance='no') Teffs(j) - write(io_out2,fmt='(e15.7)',advance='no') Teffs(j) - do i = 1, ng - write(io_out1,fmt='(e15.7)',advance='no') Pgas(i,j) - write(io_out2,fmt='(e15.7)',advance='no') T(i,j) - end do - write(io_out1,*) - write(io_out2,*) - end do - close(io_out1) - close(io_out2) - end subroutine write_output - - !**** - - subroutine read_COND() - ! read COND; store logg = 2.5 to 6.0, Teff = 100 to 3600 - write(*,*) 'read COND' - call read_phx(2.49d0, 6.01d0, 99d0, 3601d0, & - 'atm_input_data/cond/lte', '-0.0.AMES-Cond-2000.20') - end subroutine read_COND - - !**** - - subroutine read_phx(logg_lo, logg_hi, Teff_lo, Teff_hi, prefix, suffix) - real(dp), intent(in) :: logg_lo, logg_hi, Teff_lo, Teff_hi - character (len=*), intent(in) :: prefix, suffix - integer :: T2 - do i = 1, ng - logg = loggs(i) - if (logg < logg_lo) cycle - if (logg > logg_hi) exit - do j = 1, nT - Teff = Teffs(j) - if (Teff < Teff_lo) cycle - if (Teff > Teff_hi) exit - T2 = floor(tau100_Ts(j))/100 - if (T2 > 99) then - write(filename,'(a,i3,a,f3.1,a)') & - trim(prefix), T2, '-', loggs(i), trim(suffix) - else if (T2 > 9) then - write(filename,'(a,i2,a,f3.1,a)') & - trim(prefix), T2, '-', loggs(i), trim(suffix) - else - write(filename,'(a,i1,a,f3.1,a)') & - trim(prefix) // '0', T2, '-', loggs(i), trim(suffix) - end if - !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_file(i,j) - close(io) - end do - !write(*,*) - end do - end subroutine read_phx - - !**** - - subroutine read_file(i,j) - integer, intent(in) :: i, j - integer :: layers - real(dp) :: Pg, Pe - read(io,*) - read(io,'(i5)') layers - if (layers /= num_layers) 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(num_layers) - 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 - Pg = vals(which_cond_layer) - call read_vals(.true.) ! pe - Pe = vals(which_cond_layer) - Pgas(i,j) = Pg + Pe - end subroutine read_file - - !**** - - subroutine read_vals(skip) - logical, intent(in) :: skip - integer :: k - 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 - - !**** - - subroutine read_CK - ! read C&K; Teff = 3500 to 50000 - integer :: i, j1, j, k, npi - write(*,*) 'read C&K' - filename = 'atm_input_data/ck03/ck03_structures/ap00k2odfnew.dat' - 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 - do i=1,nt_for_CK - j1 = max_ng_for_CK - ng_for_CK_Teff(i) + 1 - do j = j1, max_ng_for_CK - read(io,'(4x,f8.0,9x,f8.5)') Teff, logg - call locate(Teff, logg, ii, jj) - do k=1,21 - read(io,*) - enddo - read(io,'(10x,i3)') npi - ! 72 plane parallel layers from logtau = -6.875 to logtau = 2.0 by 0.125 - ! tau = 100 in line 72 - ! tau = 10 in line 64 - ! tau = 1 in line 56 - ! tau = 0.1 in line 48 - ! tau = 0.01 in line 40 - if (npi /= 72) then - write(*,*) 'unexpected value for npi', npi, i, j - call mesa_error(__FILE__,__LINE__) - end if - do k=1,which_ck_layer-1 - read(io,*) - enddo - read(io,'(15x,f9.1,e10.3)') T(ii,jj), Pgas(ii,jj) - do k=which_ck_layer+1,npi - read(io,*) - enddo - read(io,*) - read(io,*) - enddo - enddo - close(io) - end subroutine read_CK - - !**** - - subroutine locate(Teff, logg, i, j) - real(dp), intent(in) :: Teff, logg - integer, intent(out) :: i, j - real(dp), parameter :: eps = 1d-6 - do i = 1, ng - if (loggs(i) < logg-eps) cycle - do j = 1, nT - if (Teffs(j) < Teff-eps) cycle - return - end do - end do - write(*,*) 'failed in locate' - call mesa_error(__FILE__,__LINE__) - end subroutine locate - - !**** - - subroutine eval1_Ttau(logg, Teff, Pgas, T, ierr) - real(dp), intent(in) :: logg, Teff - real(dp), intent(out) :: Pgas, T - integer, intent(out) :: ierr - - integer :: iters - real(dp) :: M, R, L, Teff_out, kap, err, Pextra_factor - real(dp) :: lnT, dlnT_dL, dlnT_dlnR, dlnT_dlnM, dlnT_dlnkap - real(dp) :: lnP, dlnP_dL, dlnP_dlnR, dlnP_dlnm, dlnP_dlnkap - - logical, parameter :: skip_partials = .true. - integer, parameter :: max_iters = 100 - real(dp), parameter :: errtol = 1d-6 - M = Msun - R = sqrt ( standard_cgrav*M / 10d0**logg ) - L = pi*crad*clight * R**2 * Teff**4 - ierr = 0 - Pextra_factor = 1 - 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, skip_partials, & - Teff_out, kap, & - lnT, dlnT_dL, dlnT_dlnR, dlnT_dlnM, dlnT_dlnkap, & - lnP, dlnP_dL, dlnP_dlnR, dlnP_dlnM, dlnP_dlnkap, & - ierr) - if (ierr /= 0 .or. abs(Teff-Teff_out) > 1d-2) then - Pgas = -1 - T = -1 - write(*,*) 'failed in atm_get_grey_and_kap', logg, Teff - else - T = exp(lnT) - Pgas = max(1d-99, exp(lnP) - Radiation_Pressure(T)) - end if - 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), parameter :: & - Xbbn = 0.75d0, & - Ybbn = 0.25d0, & - Xsun = 7.348d-1, & - Ysun = 2.348d-1, & - Zsun = 1.685d-2 - - Z = Zsun - Y = 1.5d0*Z + Ybbn - X = 1d0 - (Y+Z) - - XC = 0.1721d0*Z - XN = 0.0504d0*Z - XO = 0.4680d0*Z - XNe = 0.1050d0*Z - XMg = 0.2450d0*Z - - allocate(xa(num_isos), chem_id(num_isos), net_iso(num_chem_isos)) - - chem_id(:) = (/ ih1, ihe4, ic12, in14, io16, ine20, img24 /) - net_iso(:) = 0 - do i=1,num_isos - net_iso(chem_id(i)) = i - end do - - xa(:) = (/ X, Y, xc, xn, xo, xne, xmg /) - xa(num_isos) = 1 - sum(xa(:)) - call basic_composition_info( & - num_isos, chem_id, xa, xh, xhe, xz, abar, zbar, z2bar, z53bar, ye, & - mass_correction, sumx) - - end subroutine set_table_composition - - !**** - - subroutine eos_proc( & - lnP, lnT, & - lnRho, res, dres_dlnRho, dres_dlnT, & - ierr) - - use eos_def, only: num_eos_basic_results, num_eos_d_dxa_results - use eos_lib, only: eosPT_get, radiation_pressure - - real(dp), intent(in) :: lnP - real(dp), intent(in) :: lnT - real(dp), intent(out) :: lnRho - real(dp), intent(out) :: res(:) - real(dp), intent(out) :: dres_dlnRho(:) - real(dp), intent(out) :: dres_dlnT(:) - integer, intent(out) :: ierr - - real(dp) :: T, P, Prad, Pgas, logPgas, rho - real(dp) :: logRho, dlnRho_dlnPgas, dlnRho_dlnT - real(dp), dimension(num_eos_d_dxa_results, num_isos) :: & - dres_dxa - - T = exp(lnT) - P = exp(lnP) - - Prad = radiation_pressure(T) - Pgas = max(1E-99_dp, P - Prad) - logPgas = log10(Pgas) - - call eosPT_get( & - eos_handle, & - num_isos, chem_id, net_iso, xa, & - Pgas, logPgas, T, lnT/ln10, & - Rho, logRho, dlnRho_dlnPgas, dlnRho_dlnT, & - res, dres_dlnRho, dres_dlnT, dres_dxa, ierr) - - lnRho = logRho*ln10 - - end subroutine eos_proc - - !**** - - subroutine kap_proc( & - lnRho, lnT, res, dres_dlnRho, dres_dlnT, & - kap, dlnkap_dlnRho, dlnkap_dlnT, & - ierr) - - use kap_def, only: num_kap_fracs - use kap_lib, only: kap_get - use eos_def, only: i_lnfree_e, i_eta - - real(dp), intent(in) :: lnRho - real(dp), intent(in) :: lnT - real(dp), intent(in) :: res(:) - real(dp), intent(in) :: dres_dlnRho(:) - real(dp), intent(in) :: dres_dlnT(:) - real(dp), intent(out) :: kap - real(dp), intent(out) :: dlnkap_dlnRho - real(dp), intent(out) :: dlnkap_dlnT - integer, intent(out) :: ierr - - real(dp) :: kap_fracs(num_kap_fracs), dlnkap_dxa(num_isos) - - call kap_get( & - kap_handle, num_isos, chem_id, net_iso, xa, & - lnRho/ln10, lnT/ln10, res(i_lnfree_e), dres_dlnRho(i_lnfree_e), dres_dlnT(i_lnfree_e), & - res(i_eta), dres_dlnRho(i_eta), dres_dlnT(i_eta), & - kap_fracs, kap, dlnkap_dlnRho, dlnkap_dlnT, dlnkap_dxa, ierr) - - end subroutine kap_proc - - end subroutine build_tau_tables - - !**** - - subroutine mesa_init(ierr) - integer, intent(out) :: ierr - logical, parameter :: use_cache = .true. - call const_init(my_mesa_dir, 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__) - call eos_init(' ', use_cache, ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - eos_handle = alloc_eos_handle(ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - call kap_init(use_cache, ' ', ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - kap_handle = alloc_kap_handle(ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - call atm_init(.false., ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - end subroutine mesa_init - - - subroutine mesa_shutdown - call eos_shutdown - call free_eos_handle(eos_handle) - call kap_shutdown - call free_kap_handle(kap_handle) - call atm_shutdown - end subroutine mesa_shutdown - -end module mod_tau100 - - -program create_tau100 - - use mod_tau100 - - integer :: ierr - ierr = 0 - - my_mesa_dir = '../..' - call mesa_init(ierr) - if (ierr /= 0) call mesa_error(__FILE__,__LINE__) - - tau_base = 0.1d0 - which_cond_layer = cond_layer_tau1m1 - which_ck_layer = ck_layer_tau1m1 - output_file1 = 'atm_data/tau1m1_Pgas.data' - output_file2 = 'atm_data/tau1m1_T.data' - call build_tau_tables - - tau_base = 1d0 - which_cond_layer = cond_layer_tau1 - which_ck_layer = ck_layer_tau1 - output_file1 = 'atm_data/tau1_Pgas.data' - output_file2 = 'atm_data/tau1_T.data' - call build_tau_tables - - tau_base = 10d0 - which_cond_layer = cond_layer_tau10 - which_ck_layer = ck_layer_tau10 - output_file1 = 'atm_data/tau10_Pgas.data' - output_file2 = 'atm_data/tau10_T.data' - call build_tau_tables - - tau_base = 100d0 - which_cond_layer = cond_layer_tau100 - which_ck_layer = ck_layer_tau100 - output_file1 = 'atm_data/tau100_Pgas.data' - output_file2 = 'atm_data/tau100_T.data' - call build_tau_tables - - call mesa_shutdown - -end program create_tau100 diff --git a/atm/preprocessor/src/create_tau100.f90 b/atm/preprocessor/src/create_tau100.f90 new file mode 100644 index 000000000..ec0c0b027 --- /dev/null +++ b/atm/preprocessor/src/create_tau100.f90 @@ -0,0 +1,714 @@ +! *********************************************************************** +! +! Copyright (C) 2010-2019 Aaron Dotter, Bill Paxton & The MESA Team +! +! This file is part of MESA. +! +! MESA is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Library Public License as published +! by the Free Software Foundation; either version 2 of the License, or +! (at your option) any later version. +! +! MESA 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 Library General Public License for more details. +! +! You should have received a copy of the GNU Library General Public License +! along with this software; if not, write to the Free Software +! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +! +! *********************************************************************** + +module mod_tau100 + + use atm_def + use atm_lib + use chem_def + use chem_lib, only: chem_init, basic_composition_info + use const_def + use const_lib + use eos_def + use eos_lib + use kap_lib + use utils_lib + use math_lib + use interp_2d_lib_db + + implicit none + + logical, parameter :: write_plot_files = .true. + + real(dp) :: tau_base ! tau at base of atm (1, 10, or 100) + integer :: which_cond_layer, which_ck_layer + character(len=256) :: my_mesa_dir, output_file1, output_file2 + + integer, parameter :: & + cond_layer_tau1m2 = 26, cond_layer_tau1m1 = 32, cond_layer_tau1 = 38, & + cond_layer_tau10 = 44, cond_layer_tau100 = 50 + integer, parameter :: & + ck_layer_tau1m2 = 40, ck_layer_tau1m1 = 48, ck_layer_tau1 = 56, & + ck_layer_tau10 = 64, ck_layer_tau100 = 72 + + + integer :: eos_handle, kap_handle + +contains + + subroutine build_tau_tables + + integer, parameter :: num_isos = 7, nmet = 5 + integer, pointer :: chem_id(:), net_iso(:) + real(dp), pointer :: xa(:) + + 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) + 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 + integer :: ng_for_CK_Teff(nt_for_CK) + + include 'formats' + + write(*,1) 'tau_base', tau_base + + ng_for_CK_Teff(1:11) = 11 + ng_for_CK_Teff(12:17)= 10 + ng_for_CK_Teff(18:20)= 9 + ng_for_CK_Teff(21:23)= 8 + ng_for_CK_Teff(24:34)= 7 + ng_for_CK_Teff(35:39)= 6 + ng_for_CK_Teff(40) = 7 + ng_for_CK_Teff(41:45)= 6 + ng_for_CK_Teff(46:52)= 5 + ng_for_CK_Teff(53:57)= 4 + ng_for_CK_Teff(58:65)= 3 + ng_for_CK_Teff(66:75)= 2 + ng_for_CK_Teff(76) = 1 + + ierr = 0 + io = 33 ! for reading + + ! setup for T(tau) calculations + call set_table_composition + + loggs(1:ng) = (/ & + 0d0, 0.5d0, 1d0, 1.5d0, 2d0, 2.5d0, 3d0, 3.5d0, 4d0, 4.5d0, 5d0, 5.5d0, 6d0 /) + Teffs(1:nT) = tau100_Ts(1:nT) + + Pgas = -1 + T = -1 + + call read_COND + call read_CK + + ! set logg = 0.0 to 2.0 for Teff = 100 to 3400 using T(tau) + write(*,*) 'do T(tau)' + do i = 1, ng + logg = loggs(i) + if (logg < 0d0) cycle + if (logg > 2.01d0) exit + do j = 1, nT + Teff = Teffs(j) + if (Teff < 99) cycle + if (Teff > 3401) exit + !write(*,*) 'logg Teff', logg, Teff + call eval1_Ttau(logg, Teff, Pgas(i,j), T(i,j), ierr) + if (ierr /= 0) then + write(*,*) 'failed in eval1_Ttau', logg, Teff, i, j + call mesa_error(__FILE__,__LINE__) + end if + end do + !do j = 1, 4 + ! write(*,*) + !end do + end do + + write(*,*) 'smooth transitions' + + ! extrapolate logg = 5.5 and 6.0 for Teff = 3500 to 50000 using logg = 4.50 and 5.0 + do i = 1, ng + logg = loggs(i) + if (logg < 5.49d0) cycle + if (logg > 5.51d0) exit + do j = 1, nT + Teff = Teffs(j) + if (Teff < 3499) cycle + if (Teff > 50001) exit + Pgas(i,j) = (3*Pgas(i-1,j) - Pgas(i-2,j))/2 + T(i,j) = (3*T(i-1,j) - T(i-2,j))/2 + Pgas(i+1,j) = Pgas(i,j) + T(i+1,j) = T(i,j) + end do + end do + + ! smooth the T(tau) region + call smooth(0d0, 2.01d0, 99d0, 3401d0, 10) + + call fill_and_smooth_CK_corner() + + ! set Teff = 3400 and 3500 for logg 0.0 to 6.0 to linear interpolation of 3300 and 3600 + do i = 1, ng + logg = loggs(i) + do j = 1, nT + Teff = Teffs(j) + if (Teff < 3399) cycle + Pgas(i,j) = (2*Pgas(i,j-1) + Pgas(i,j+2))/3 + T(i,j) = (2*T(i,j-1) + T(i,j+2))/3 + Pgas(i,j+1) = (Pgas(i,j-1) + 2*Pgas(i,j+2))/3 + T(i,j+1) = (T(i,j-1) + 2*T(i,j+2))/3 + exit + end do + end do + + call write_output() + + if (write_plot_files) call write_plots() + + contains + + subroutine fill_and_smooth_CK_corner() + integer :: ibound(ng), j, i, jj, ii, j1 + real(dp) :: d0, d1, Pinterp, Tinterp + real(dp), parameter :: Pfill = 10 + real(dp), parameter :: Tfill = 1d5 + include 'formats' + + do i=1,ng + j=1 + do while (Teffs(j) < 4000) + j=j+1 + end do + do while(Pgas(i,j) > 0 .and. j < nT) + j=j+1 + enddo + ibound(i)=j + !write(*,3) 'ibound(i) = j', i, j, loggs(i), Teffs(j) + enddo + + Pgas(1,nT) = Pfill + T(1,nT) = Tfill + do i = 1, ng + j1 = max(1,ibound(i)-1) + do j = j1, nT + d0 = sqrt(dble((j-nT)**2 + (i-1)**2)) + jj = j + do ii = i, ng + if (ibound(ii)-1 > jj) then + d1 = sqrt(dble((j-jj)**2 + (i-ii)**2)) + Pinterp = Pfill*d1/(d0+d1) + Pgas(ii,jj)*d0/(d0+d1) + Pgas(i,j) = Pinterp + Tinterp = Tfill*d1/(d0+d1) + T(ii,jj)*d0/(d0+d1) + T(i,j) = Tinterp + !if (j == j1) then + ! write(*,3) 'T(i,j)', i, j, T(i,j), loggs(i), Teffs(j) + !end if + exit + end if + jj = max(1,jj-1) + end do + end do + end do + do i=1,20 + do ii=1,ng + if (ibound(ii) == nT) cycle + do jj=ibound(ii)-1,nT + Pgas(ii,jj) = ( & + Pgas(ii,max(1,jj-1)) + & + Pgas(ii,min(nT,jj+1)) + & + Pgas(ii,jj) + & + Pgas(max(1,ii-1),jj) + & + Pgas(min(ng,ii+1),jj)) / 5 + T(ii,jj) = ( & + T(ii,max(1,jj-1)) + & + T(ii,min(nT,jj+1)) + & + T(ii,jj) + & + T(max(1,ii-1),jj) + & + T(min(ng,ii+1),jj)) / 5 + end do + end do + end do + end subroutine fill_and_smooth_CK_corner + + !**** + + subroutine smooth(logg_lo, logg_hi, Teff_lo, Teff_hi, n) + real(dp), intent(in) :: logg_lo, logg_hi, Teff_lo, Teff_hi + integer, intent(in) :: n + real(dp) :: logg, Teff + integer :: k, ii, jj + include 'formats' + do k = 1, n + do ii = 1, ng + logg = loggs(ii) + if (logg < logg_lo) cycle + if (logg > logg_hi) exit + do jj = 1, nT + Teff = Teffs(jj) + if (Teff < Teff_lo) cycle + if (Teff > Teff_hi) exit + Pgas(ii,jj) = ( & + Pgas(ii,max(1,jj-1)) + & + Pgas(ii,min(nT,jj+1)) + & + Pgas(ii,jj) + & + Pgas(max(1,ii-1),jj) + & + Pgas(min(ng,ii+1),jj)) / 5 + T(ii,jj) = ( & + T(ii,max(1,jj-1)) + & + T(ii,min(nT,jj+1)) + & + T(ii,jj) + & + T(max(1,ii-1),jj) + & + T(min(ng,ii+1),jj)) / 5 + !write(*,3) 'smooth', ii, jj, logg, Teff, Pgas(ii,jj), T(ii,jj) + end do + end do + end do + end subroutine smooth + + !**** + + subroutine write_plots() + + integer :: i, j, ii, jj + + ! rearrange for plotting + do i=1,ng + ii = ng-i+1 + do j=1,nT + jj = nT-j+1 + logT_plot(j,i) = safe_log10(T(i,j)) + logPgas_plot(j,i) = safe_log10(Pgas(i,j)) + end do + end do + + open(io,file='plot_tau100/logT.data',action='write') + write(io,'(e20.10)') logT_plot(:,:) + close(io) + + open(io,file='plot_tau100/logPgas.data',action='write') + write(io,'(e20.10)') logPgas_plot(:,:) + close(io) + + open(io,file='plot_tau100/Teff.data',action='write') + do j=1,nT + write(io,'(e20.10)') Teffs(j) + end do + close(io) + + open(io,file='plot_tau100/logg.data',action='write') + do i=1,ng + write(io,'(e20.10)') loggs(i) + end do + close(io) + + end subroutine write_plots + + !**** + + subroutine write_output + write(*,*) trim(output_file1) + io_out1 = 33 + open(io_out1, file=output_file1) + write(*,*) trim(output_file2) + io_out2 = 34 + open(io_out2, file=output_file2) + write(io_out1,'(a15)',advance='no') "#Teff(K)| Pgas@" + write(io_out2,'(a15)',advance='no') "#Teff(K)| T@" + do i = 1, ng + write(io_out1,fmt='(" log g =",f5.2," ")',advance='no') loggs(i) + write(io_out2,fmt='(" log g =",f5.2," ")',advance='no') loggs(i) + end do + write(io_out1,*) + write(io_out2,*) + do j = 1, nT + write(io_out1,fmt='(e15.7)',advance='no') Teffs(j) + write(io_out2,fmt='(e15.7)',advance='no') Teffs(j) + do i = 1, ng + write(io_out1,fmt='(e15.7)',advance='no') Pgas(i,j) + write(io_out2,fmt='(e15.7)',advance='no') T(i,j) + end do + write(io_out1,*) + write(io_out2,*) + end do + close(io_out1) + close(io_out2) + end subroutine write_output + + !**** + + subroutine read_COND() + ! read COND; store logg = 2.5 to 6.0, Teff = 100 to 3600 + write(*,*) 'read COND' + call read_phx(2.49d0, 6.01d0, 99d0, 3601d0, & + 'atm_input_data/cond/lte', '-0.0.AMES-Cond-2000.20') + end subroutine read_COND + + !**** + + subroutine read_phx(logg_lo, logg_hi, Teff_lo, Teff_hi, prefix, suffix) + real(dp), intent(in) :: logg_lo, logg_hi, Teff_lo, Teff_hi + character (len=*), intent(in) :: prefix, suffix + integer :: T2 + do i = 1, ng + logg = loggs(i) + if (logg < logg_lo) cycle + if (logg > logg_hi) exit + do j = 1, nT + Teff = Teffs(j) + if (Teff < Teff_lo) cycle + if (Teff > Teff_hi) exit + T2 = floor(tau100_Ts(j))/100 + if (T2 > 99) then + write(filename,'(a,i3,a,f3.1,a)') & + trim(prefix), T2, '-', loggs(i), trim(suffix) + else if (T2 > 9) then + write(filename,'(a,i2,a,f3.1,a)') & + trim(prefix), T2, '-', loggs(i), trim(suffix) + else + write(filename,'(a,i1,a,f3.1,a)') & + trim(prefix) // '0', T2, '-', loggs(i), trim(suffix) + end if + !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_file(i,j) + close(io) + end do + !write(*,*) + end do + end subroutine read_phx + + !**** + + subroutine read_file(i,j) + integer, intent(in) :: i, j + integer :: layers + real(dp) :: Pg, Pe + read(io,*) + read(io,'(i5)') layers + if (layers /= num_layers) 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(num_layers) + 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 + Pg = vals(which_cond_layer) + call read_vals(.true.) ! pe + Pe = vals(which_cond_layer) + Pgas(i,j) = Pg + Pe + end subroutine read_file + + !**** + + subroutine read_vals(skip) + logical, intent(in) :: skip + integer :: k + 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 + + !**** + + subroutine read_CK + ! read C&K; Teff = 3500 to 50000 + integer :: i, j1, j, k, npi + write(*,*) 'read C&K' + filename = 'atm_input_data/ck03/ck03_structures/ap00k2odfnew.dat' + 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 + do i=1,nt_for_CK + j1 = max_ng_for_CK - ng_for_CK_Teff(i) + 1 + do j = j1, max_ng_for_CK + read(io,'(4x,f8.0,9x,f8.5)') Teff, logg + call locate(Teff, logg, ii, jj) + do k=1,21 + read(io,*) + enddo + read(io,'(10x,i3)') npi + ! 72 plane parallel layers from logtau = -6.875 to logtau = 2.0 by 0.125 + ! tau = 100 in line 72 + ! tau = 10 in line 64 + ! tau = 1 in line 56 + ! tau = 0.1 in line 48 + ! tau = 0.01 in line 40 + if (npi /= 72) then + write(*,*) 'unexpected value for npi', npi, i, j + call mesa_error(__FILE__,__LINE__) + end if + do k=1,which_ck_layer-1 + read(io,*) + enddo + read(io,'(15x,f9.1,e10.3)') T(ii,jj), Pgas(ii,jj) + do k=which_ck_layer+1,npi + read(io,*) + enddo + read(io,*) + read(io,*) + enddo + enddo + close(io) + end subroutine read_CK + + !**** + + subroutine locate(Teff, logg, i, j) + real(dp), intent(in) :: Teff, logg + integer, intent(out) :: i, j + real(dp), parameter :: eps = 1d-6 + do i = 1, ng + if (loggs(i) < logg-eps) cycle + do j = 1, nT + if (Teffs(j) < Teff-eps) cycle + return + end do + end do + write(*,*) 'failed in locate' + call mesa_error(__FILE__,__LINE__) + end subroutine locate + + !**** + + subroutine eval1_Ttau(logg, Teff, Pgas, T, ierr) + real(dp), intent(in) :: logg, Teff + real(dp), intent(out) :: Pgas, T + integer, intent(out) :: ierr + + 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 + + logical, parameter :: skip_partials = .true. + integer, parameter :: max_iters = 100 + real(dp), parameter :: errtol = 1d-6 + M = Msun + R = sqrt ( standard_cgrav*M / 10d0**logg ) + L = pi*crad*clight * R**2 * Teff**4 + ierr = 0 + Pextra_factor = 1 + 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, skip_partials, & + Teff_out, kap, & + lnT, dlnT_dL, dlnT_dlnR, dlnT_dlnM, dlnT_dlnkap, & + lnP, dlnP_dL, dlnP_dlnR, dlnP_dlnM, dlnP_dlnkap, & + ierr) + if (ierr /= 0 .or. abs(Teff-Teff_out) > 1d-2) then + Pgas = -1 + T = -1 + write(*,*) 'failed in atm_get_grey_and_kap', logg, Teff + else + T = exp(lnT) + Pgas = max(1d-99, exp(lnP) - Radiation_Pressure(T)) + end if + end subroutine eval1_Ttau + + !**** + + subroutine set_table_composition() + integer :: i + real(dp) :: ye, sumx, & + xh, xhe, xz, mass_correction + real(dp), parameter :: & + Xbbn = 0.75d0, & + Ybbn = 0.25d0, & + Xsun = 7.348d-1, & + Ysun = 2.348d-1, & + Zsun = 1.685d-2 + + Z = Zsun + Y = 1.5d0*Z + Ybbn + X = 1d0 - (Y+Z) + + XC = 0.1721d0*Z + XN = 0.0504d0*Z + XO = 0.4680d0*Z + XNe = 0.1050d0*Z + XMg = 0.2450d0*Z + + allocate(xa(num_isos), chem_id(num_isos), net_iso(num_chem_isos)) + + chem_id(:) = (/ ih1, ihe4, ic12, in14, io16, ine20, img24 /) + net_iso(:) = 0 + do i=1,num_isos + net_iso(chem_id(i)) = i + end do + + xa(:) = (/ X, Y, xc, xn, xo, xne, xmg /) + xa(num_isos) = 1 - sum(xa(:)) + call basic_composition_info( & + num_isos, chem_id, xa, xh, xhe, xz, abar, zbar, z2bar, z53bar, ye, & + mass_correction, sumx) + + end subroutine set_table_composition + + !**** + + subroutine eos_proc( & + lnP, lnT, & + lnRho, res, dres_dlnRho, dres_dlnT, & + ierr) + + use eos_def, only: num_eos_basic_results, num_eos_d_dxa_results + use eos_lib, only: eosPT_get, radiation_pressure + + real(dp), intent(in) :: lnP + real(dp), intent(in) :: lnT + real(dp), intent(out) :: lnRho + real(dp), intent(out) :: res(:) + real(dp), intent(out) :: dres_dlnRho(:) + real(dp), intent(out) :: dres_dlnT(:) + integer, intent(out) :: ierr + + real(dp) :: T, P, Prad, Pgas, logPgas, rho + real(dp) :: logRho, dlnRho_dlnPgas, dlnRho_dlnT + real(dp), dimension(num_eos_d_dxa_results, num_isos) :: & + dres_dxa + + T = exp(lnT) + P = exp(lnP) + + Prad = radiation_pressure(T) + Pgas = max(1E-99_dp, P - Prad) + logPgas = log10(Pgas) + + call eosPT_get( & + eos_handle, & + num_isos, chem_id, net_iso, xa, & + Pgas, logPgas, T, lnT/ln10, & + Rho, logRho, dlnRho_dlnPgas, dlnRho_dlnT, & + res, dres_dlnRho, dres_dlnT, dres_dxa, ierr) + + lnRho = logRho*ln10 + + end subroutine eos_proc + + !**** + + subroutine kap_proc( & + lnRho, lnT, res, dres_dlnRho, dres_dlnT, & + kap, dlnkap_dlnRho, dlnkap_dlnT, & + ierr) + + use kap_def, only: num_kap_fracs + use kap_lib, only: kap_get + use eos_def, only: i_lnfree_e, i_eta + + real(dp), intent(in) :: lnRho + real(dp), intent(in) :: lnT + real(dp), intent(in) :: res(:) + real(dp), intent(in) :: dres_dlnRho(:) + real(dp), intent(in) :: dres_dlnT(:) + real(dp), intent(out) :: kap + real(dp), intent(out) :: dlnkap_dlnRho + real(dp), intent(out) :: dlnkap_dlnT + integer, intent(out) :: ierr + + real(dp) :: kap_fracs(num_kap_fracs), dlnkap_dxa(num_isos) + + call kap_get( & + kap_handle, num_isos, chem_id, net_iso, xa, & + lnRho/ln10, lnT/ln10, res(i_lnfree_e), dres_dlnRho(i_lnfree_e), dres_dlnT(i_lnfree_e), & + res(i_eta), dres_dlnRho(i_eta), dres_dlnT(i_eta), & + kap_fracs, kap, dlnkap_dlnRho, dlnkap_dlnT, dlnkap_dxa, ierr) + + end subroutine kap_proc + + end subroutine build_tau_tables + + !**** + + subroutine mesa_init(ierr) + integer, intent(out) :: ierr + logical, parameter :: use_cache = .true. + call const_init(my_mesa_dir, 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__) + call eos_init(' ', use_cache, ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + eos_handle = alloc_eos_handle(ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + call kap_init(use_cache, ' ', ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + kap_handle = alloc_kap_handle(ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + call atm_init(.false., ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + end subroutine mesa_init + + + subroutine mesa_shutdown + call eos_shutdown + call free_eos_handle(eos_handle) + call kap_shutdown + call free_kap_handle(kap_handle) + call atm_shutdown + end subroutine mesa_shutdown + +end module mod_tau100 + + +program create_tau100 + + use mod_tau100 + + integer :: ierr + ierr = 0 + + my_mesa_dir = '../..' + call mesa_init(ierr) + if (ierr /= 0) call mesa_error(__FILE__,__LINE__) + + tau_base = 0.1d0 + which_cond_layer = cond_layer_tau1m1 + which_ck_layer = ck_layer_tau1m1 + output_file1 = 'atm_data/tau1m1_Pgas.data' + output_file2 = 'atm_data/tau1m1_T.data' + call build_tau_tables + + tau_base = 1d0 + which_cond_layer = cond_layer_tau1 + which_ck_layer = ck_layer_tau1 + output_file1 = 'atm_data/tau1_Pgas.data' + output_file2 = 'atm_data/tau1_T.data' + call build_tau_tables + + tau_base = 10d0 + which_cond_layer = cond_layer_tau10 + which_ck_layer = ck_layer_tau10 + output_file1 = 'atm_data/tau10_Pgas.data' + output_file2 = 'atm_data/tau10_T.data' + call build_tau_tables + + tau_base = 100d0 + which_cond_layer = cond_layer_tau100 + which_ck_layer = ck_layer_tau100 + output_file1 = 'atm_data/tau100_Pgas.data' + output_file2 = 'atm_data/tau100_T.data' + call build_tau_tables + + call mesa_shutdown + +end program create_tau100 diff --git a/atm/preprocessor/src/create_wd_tau25.f b/atm/preprocessor/src/create_wd_tau25.f90 similarity index 100% rename from atm/preprocessor/src/create_wd_tau25.f rename to atm/preprocessor/src/create_wd_tau25.f90 diff --git a/atm/preprocessor/src/nextgen.f b/atm/preprocessor/src/nextgen.f deleted file mode 100644 index 73a3bd782..000000000 --- a/atm/preprocessor/src/nextgen.f +++ /dev/null @@ -1,201 +0,0 @@ - -! *********************************************************************** -! -! Copyright (C) 2010 Bill Paxton -! -! This file is part of MESA. -! -! MESA is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Library Public License as published -! by the Free Software Foundation; either version 2 of the License, or -! (at your option) any later version. -! -! MESA 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 Library General Public License for more details. -! -! You should have received a copy of the GNU Library General Public License -! along with this software; if not, write to the Free Software -! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -! -! *********************************************************************** - 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) - enddo - 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) - enddo - 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 - call make_nextgen - end program nextgen diff --git a/atm/preprocessor/src/plot.f b/atm/preprocessor/src/plot.f deleted file mode 100644 index 08d8416b4..000000000 --- a/atm/preprocessor/src/plot.f +++ /dev/null @@ -1,155 +0,0 @@ - -! *********************************************************************** -! -! Copyright (C) 2010 Bill Paxton -! -! This file is part of MESA. -! -! MESA is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Library Public License as published -! by the Free Software Foundation; either version 2 of the License, or -! (at your option) any later version. -! -! MESA 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 Library General Public License for more details. -! -! You should have received a copy of the GNU Library General Public License -! along with this software; if not, write to the Free Software -! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -! -! *********************************************************************** - module plot_support - use const_def, only: dp - - implicit none - - contains - - subroutine make_plot_files - - character (len=256) :: filename - integer, parameter :: nZ=8, ng=13, nT=82 - integer :: table_atm_version = 1 - character(len=40) :: table_atm_files(nZ) - character(len=8):: atm_mix(nZ) !not used currently -- nor is alphaFe - - 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, & - tmp_version(nZ), ibound(ng,nZ), iZ, text_file_version - - real(dp), parameter :: Pfill = 1d2 !used for interpolation in filling missing values - real(dp) :: d0, d1, Pinterp_max, Pinterp - integer :: i_max, j_max - - logical, parameter :: dbg = .false. - - include 'formats' - - iounit = 33 - - filename = 'atm_data/table_summary.txt' - open(iounit,file=trim(filename),action='read',status='old',iostat=ierr) - if(ierr/=0) then - write(*,*) 'table_atm_init: missing atm data' - write(*,*) filename - error stop 1 - endif - - !read first line and (nZ, nT, ng) - read(iounit,*) !first line is text, skip it - read(iounit,*) nZ_tmp, nT_tmp, ng_tmp - if(nZ_tmp /= nZ .or. nT_tmp /= nT .or. ng_tmp /= ng) then - write(*,*) 'table_atm_init: problem with table dimensions' - error stop 2 - endif - - !read filenames and headers - read(iounit,*) !text - do i=1,nZ - read(iounit,'(a)') table_atm_files(i) - read(iounit,'(14x,i4)') tmp_version(i) - read(iounit,'(13x,f5.2,8x,f4.1,1x,a8,1x,15x,13i4)') & - logZ(i), alphaFe(i), atm_mix(i), ibound(:,i) - enddo - - !read Teff_array - read(iounit,*) !text - read(iounit,'(13f7.0)') Teff_array(:) - - !read logg_array - read(iounit,*) !text - read(iounit,'(13f7.2)') logg_array(:) - - close(iounit) - - !determine table boundaries - do i=1,ng ! -- for each logg, smallest Teff at which Pgas->0 - Teff_bound(i) = Teff_array(ibound(i,1)) - do j=2,nZ - Teff_bound(i) = min( Teff_bound(i) , Teff_array(ibound(i,j)) ) - enddo - enddo - - do iZ=1,nZ - filename = 'atm_data/' // trim(table_atm_files(iZ)) - open(iounit,file=trim(filename),action='read',status='old',iostat=ierr) - if (ierr /= 0) then - write(*,*) 'load_atm_table: missing atm data:' - write(*,*) filename - error stop 1 - end if - read(iounit,'(14x,i4)') text_file_version - if(text_file_version /= table_atm_version) then - write(*,*) 'load_atm_table: mismatch in table versions' - write(*,*) - error stop 1 - endif - - read(iounit,'(13x,f5.2,8x,f4.1,1x,a8,1x,15x,13i4)') & - logZ(iZ), alphaFe(iZ), atm_mix(iZ), ibound_tmp(:) - read(iounit,'(15x,13(9x,f5.2,1x))') logg_tmp(:) - do j=1,nT - read(iounit,'(14e15.7)') Teff_tmp(j), Pgas(:,j,iZ) - enddo - close(iounit) - end do - - do iZ=1, nZ - filename = 'plot_data/' // trim(table_atm_files(iZ)) // '.data' - write(*,*) 'write ' // trim(filename) - open(iounit,file=trim(filename),action='write',iostat=ierr) - if (ierr /= 0) then - write(*,*) 'failed to open:' - write(*,*) filename - error stop 1 - end if - write(iounit,'(e20.10)') log10(max(1d-99,Pgas(:,:,iZ))) - close(iounit) - end do - - filename = 'plot_data/logg.data' - write(*,*) 'write ' // trim(filename) - open(iounit,file=trim(filename),action='write',iostat=ierr) - write(iounit,'(e20.10)') logg_array(:) - close(iounit) - - filename = 'plot_data/Teff.data' - write(*,*) 'write ' // trim(filename) - open(iounit,file=trim(filename),action='write',iostat=ierr) - write(iounit,'(e20.10)') Teff_array(:) - close(iounit) - - end subroutine make_plot_files - - - end module plot_support - - - program plot - use plot_support - call make_plot_files - end program plot diff --git a/atm/preprocessor/src/plot.f90 b/atm/preprocessor/src/plot.f90 new file mode 100644 index 000000000..7e004e468 --- /dev/null +++ b/atm/preprocessor/src/plot.f90 @@ -0,0 +1,153 @@ + +! *********************************************************************** +! +! Copyright (C) 2010 Bill Paxton +! +! This file is part of MESA. +! +! MESA is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Library Public License as published +! by the Free Software Foundation; either version 2 of the License, or +! (at your option) any later version. +! +! MESA 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 Library General Public License for more details. +! +! You should have received a copy of the GNU Library General Public License +! along with this software; if not, write to the Free Software +! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +! +! *********************************************************************** + module plot_support + use const_def, only: dp + + implicit none + + contains + + subroutine make_plot_files + + character (len=256) :: filename + integer, parameter :: nZ=8, ng=13, nT=82 + integer :: table_atm_version = 1 + character(len=40) :: table_atm_files(nZ) + character(len=8):: atm_mix(nZ) !not used currently -- nor is alphaFe + + 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, 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 + + logical, parameter :: dbg = .false. + + include 'formats' + + iounit = 33 + + filename = 'atm_data/table_summary.txt' + open(iounit,file=trim(filename),action='read',status='old',iostat=ierr) + if(ierr/=0) then + write(*,*) 'table_atm_init: missing atm data' + write(*,*) filename + error stop 1 + endif + + !read first line and (nZ, nT, ng) + read(iounit,*) !first line is text, skip it + read(iounit,*) nZ_tmp, nT_tmp, ng_tmp + if(nZ_tmp /= nZ .or. nT_tmp /= nT .or. ng_tmp /= ng) then + write(*,*) 'table_atm_init: problem with table dimensions' + error stop 2 + endif + + !read filenames and headers + read(iounit,*) !text + do i=1,nZ + read(iounit,'(a)') table_atm_files(i) + read(iounit,'(14x,i4)') tmp_version(i) + read(iounit,'(13x,f5.2,8x,f4.1,1x,a8,1x,15x,13i4)') & + logZ(i), alphaFe(i), atm_mix(i), ibound(:,i) + enddo + + !read Teff_array + read(iounit,*) !text + read(iounit,'(13f7.0)') Teff_array(:) + + !read logg_array + read(iounit,*) !text + read(iounit,'(13f7.2)') logg_array(:) + + close(iounit) + + !determine table boundaries + do i=1,ng ! -- for each logg, smallest Teff at which Pgas->0 + Teff_bound(i) = Teff_array(ibound(i,1)) + do j=2,nZ + Teff_bound(i) = min( Teff_bound(i) , Teff_array(ibound(i,j)) ) + enddo + enddo + + do iZ=1,nZ + filename = 'atm_data/' // trim(table_atm_files(iZ)) + open(iounit,file=trim(filename),action='read',status='old',iostat=ierr) + if (ierr /= 0) then + write(*,*) 'load_atm_table: missing atm data:' + write(*,*) filename + error stop 1 + end if + read(iounit,'(14x,i4)') text_file_version + if(text_file_version /= table_atm_version) then + write(*,*) 'load_atm_table: mismatch in table versions' + write(*,*) + error stop 1 + endif + + read(iounit,'(13x,f5.2,8x,f4.1,1x,a8,1x,15x,13i4)') & + logZ(iZ), alphaFe(iZ), atm_mix(iZ), ibound_tmp(:) + read(iounit,'(15x,13(9x,f5.2,1x))') logg_tmp(:) + do j=1,nT + read(iounit,'(14e15.7)') Teff_tmp(j), Pgas(:,j,iZ) + enddo + close(iounit) + end do + + do iZ=1, nZ + filename = 'plot_data/' // trim(table_atm_files(iZ)) // '.data' + write(*,*) 'write ' // trim(filename) + open(iounit,file=trim(filename),action='write',iostat=ierr) + if (ierr /= 0) then + write(*,*) 'failed to open:' + write(*,*) filename + error stop 1 + end if + write(iounit,'(e20.10)') log10(max(1d-99,Pgas(:,:,iZ))) + close(iounit) + end do + + filename = 'plot_data/logg.data' + write(*,*) 'write ' // trim(filename) + open(iounit,file=trim(filename),action='write',iostat=ierr) + write(iounit,'(e20.10)') logg_array(:) + close(iounit) + + filename = 'plot_data/Teff.data' + write(*,*) 'write ' // trim(filename) + open(iounit,file=trim(filename),action='write',iostat=ierr) + write(iounit,'(e20.10)') Teff_array(:) + close(iounit) + + end subroutine make_plot_files + + + end module plot_support + + + program plot + use plot_support + call make_plot_files + end program plot diff --git a/atm/preprocessor/src/table_merge.f b/atm/preprocessor/src/table_merge.f90 similarity index 100% rename from atm/preprocessor/src/table_merge.f rename to atm/preprocessor/src/table_merge.f90 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 6c5040629..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.f test_atm_setup.f - -TEST_SRCS = $(COMMON_SRCS) test_atm.f - -TESTQ_SRCS = $(COMMON_SRCS) test_atm_quietly.f - -################################################################# -# -# 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: %.f -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 %.f $(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 cdea86892..000000000 --- a/atm/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/atm/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/atm/test/src/test_atm.f b/atm/test/src/test_atm.f90 similarity index 100% rename from atm/test/src/test_atm.f rename to atm/test/src/test_atm.f90 diff --git a/atm/test/src/test_atm_quietly.f b/atm/test/src/test_atm_quietly.f deleted file mode 100644 index 9efc71523..000000000 --- a/atm/test/src/test_atm_quietly.f +++ /dev/null @@ -1,17 +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 - - call setup - test_verbosely = .false. - - call do_test_atm( & - test_verbosely, cgrav, eos_handle, kap_handle) - - end program - - - - diff --git a/atm/test/src/test_atm_setup.f b/atm/test/src/test_atm_setup.f90 similarity index 100% rename from atm/test/src/test_atm_setup.f rename to atm/test/src/test_atm_setup.f90 diff --git a/atm/test/src/test_atm_support.f b/atm/test/src/test_atm_support.f90 similarity index 100% rename from atm/test/src/test_atm_support.f rename to atm/test/src/test_atm_support.f90 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 e02a156fe..000000000 --- a/auto_diff/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 2b3599335..000000000 --- a/auto_diff/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 3bc7c6282..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 78c91b0e9..000000000 --- a/auto_diff/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/auto_diff/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/binary/Makefile b/binary/Makefile new file mode 100644 index 000000000..81862cb09 --- /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 := utils 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 e02a156fe..000000000 --- a/binary/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/binary/build_and_test_parallel b/binary/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/binary/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test_parallel diff --git a/binary/clean b/binary/clean deleted file mode 100755 index 80174414b..000000000 --- a/binary/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 4a0907e3f..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 5f0ebf703..000000000 --- a/binary/mk +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 57198d8aa..79b9e817f 100644 --- a/binary/other/mod_other_accreted_material_j.f90 +++ b/binary/other/mod_other_accreted_material_j.f90 @@ -47,7 +47,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 9560b9a5e..a00db468b 100644 --- a/binary/other/mod_other_adjust_mdots.f90 +++ b/binary/other/mod_other_adjust_mdots.f90 @@ -47,7 +47,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 36b6b5175..a8e99f748 100644 --- a/binary/other/mod_other_binary_ce.f90 +++ b/binary/other/mod_other_binary_ce.f90 @@ -47,7 +47,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 db96ca12f..2ea3faa40 100644 --- a/binary/other/mod_other_binary_edot.f90 +++ b/binary/other/mod_other_binary_edot.f90 @@ -51,7 +51,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 7a42152fc..f865dabda 100644 --- a/binary/other/mod_other_binary_jdot.f90 +++ b/binary/other/mod_other_binary_jdot.f90 @@ -51,7 +51,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 cc4c750ee..e4bf92ad4 100644 --- a/binary/other/mod_other_binary_wind_transfer.f90 +++ b/binary/other/mod_other_binary_wind_transfer.f90 @@ -47,7 +47,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 ecd77193f..805397a6a 100644 --- a/binary/other/mod_other_implicit_rlo.f90 +++ b/binary/other/mod_other_implicit_rlo.f90 @@ -48,7 +48,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 735def5e6..a05e1a66e 100644 --- a/binary/other/mod_other_mdot_edd.f90 +++ b/binary/other/mod_other_mdot_edd.f90 @@ -47,7 +47,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 df04786c1..4a28139f2 100644 --- a/binary/other/mod_other_rlo_mdot.f90 +++ b/binary/other/mod_other_rlo_mdot.f90 @@ -47,7 +47,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 3ccdbe385..fafaa702b 100644 --- a/binary/other/mod_other_sync_spin_to_orbit.f90 +++ b/binary/other/mod_other_sync_spin_to_orbit.f90 @@ -47,7 +47,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 e147d6574..b82b4416d 100644 --- a/binary/other/mod_other_tsync.f90 +++ b/binary/other/mod_other_tsync.f90 @@ -47,7 +47,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 95545a5c1..000000000 --- a/binary/test/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 78c91b0e9..000000000 --- a/binary/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/binary/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/binary/test/src/test_binary.f90 b/binary/test/src/test_binary.f90 index 7cb77ce05..37609ad24 100644 --- a/binary/test/src/test_binary.f90 +++ b/binary/test/src/test_binary.f90 @@ -46,6 +46,9 @@ subroutine do_test b% fj = -1d0 b% fm = -1d0 b% fdm = -1d0 + b% mtransfer_rate = 0d0 + b% s_donor% center_h1 = 0.75 + b% varcontrol_ms = 0d0 ! test for rl b% rl_relative_gap_old(b% d_i) = -0.102d0 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 95545a5c1..000000000 --- a/binary/test_suite/double_bh/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/binary/test_suite/double_bh/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 100755 --- a/binary/test_suite/double_bh/re +++ b/binary/test_suite/double_bh/re @@ -1,6 +1,6 @@ #!/bin/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 d44e1178a..cc6b383d4 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 1424b5224..af9bc57f3 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 95545a5c1..000000000 --- a/binary/test_suite/evolve_both_stars/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/binary/test_suite/evolve_both_stars/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 100755 --- a/binary/test_suite/evolve_both_stars/re +++ b/binary/test_suite/evolve_both_stars/re @@ -1,6 +1,6 @@ #!/bin/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 d44e1178a..cc6b383d4 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 95545a5c1..000000000 --- a/binary/test_suite/jdot_gr_check/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/binary/test_suite/jdot_gr_check/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 100755 --- a/binary/test_suite/jdot_gr_check/re +++ b/binary/test_suite/jdot_gr_check/re @@ -1,6 +1,6 @@ #!/bin/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 d44e1178a..cc6b383d4 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 95545a5c1..000000000 --- a/binary/test_suite/jdot_ls_check/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/binary/test_suite/jdot_ls_check/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 100755 --- a/binary/test_suite/jdot_ls_check/re +++ b/binary/test_suite/jdot_ls_check/re @@ -1,6 +1,6 @@ #!/bin/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 d44e1178a..cc6b383d4 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 95545a5c1..000000000 --- a/binary/test_suite/jdot_ml_check/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/binary/test_suite/jdot_ml_check/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 100755 --- a/binary/test_suite/jdot_ml_check/re +++ b/binary/test_suite/jdot_ml_check/re @@ -1,6 +1,6 @@ #!/bin/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 d44e1178a..cc6b383d4 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 95545a5c1..000000000 --- a/binary/test_suite/star_plus_point_mass/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/binary/test_suite/star_plus_point_mass/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 100755 --- a/binary/test_suite/star_plus_point_mass/re +++ b/binary/test_suite/star_plus_point_mass/re @@ -1,6 +1,6 @@ #!/bin/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 d44e1178a..cc6b383d4 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 95545a5c1..000000000 --- a/binary/test_suite/star_plus_point_mass_explicit_mdot/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/binary/test_suite/star_plus_point_mass_explicit_mdot/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 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 @@ #!/bin/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 d44e1178a..cc6b383d4 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 95545a5c1..000000000 --- a/binary/test_suite/wind_fed_bhhmxb/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/binary/test_suite/wind_fed_bhhmxb/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 100755 --- a/binary/test_suite/wind_fed_bhhmxb/re +++ b/binary/test_suite/wind_fed_bhhmxb/re @@ -1,6 +1,6 @@ #!/bin/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 d44e1178a..cc6b383d4 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 95545a5c1..000000000 --- a/binary/work/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean diff --git a/binary/work/make/makefile b/binary/work/make/makefile deleted file mode 100644 index 060275f12..000000000 --- a/binary/work/make/makefile +++ /dev/null @@ -1,7 +0,0 @@ -ifeq ($(MESA_DIR),) -ifeq ($($MESA_DIR_INTENTIONALLY_EMPTY),) - $(error MESA_DIR enviroment 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 aec7a5195..000000000 --- a/binary/work/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 5a728b4eb..e7ad047e6 100755 --- a/binary/work/re +++ b/binary/work/re @@ -1,6 +1,6 @@ #!/bin/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 d44e1178a..cc6b383d4 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..5cec9bbae --- /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.f +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 e02a156fe..000000000 --- a/chem/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/chem/build_and_test_parallel b/chem/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/chem/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 e2746982b..000000000 --- a/chem/build_data_and_export +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/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 ac322a049..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 3c2ad4c8d..000000000 --- a/chem/preprocessor/build_for_export +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/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 186b0d96f..000000000 --- a/chem/preprocessor/clean +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/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 29ff54874..000000000 --- a/chem/preprocessor/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 10a8db8db..000000000 --- a/chem/preprocessor/rebuild_all +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/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 5f7bfe25c..000000000 --- a/chem/preprocessor/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 36d97a907..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.f - -################################################################# -# -# 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: %.f -ifneq ($(QUIET),) - @echo TEST_COMPILE $< - @$(TEST_COMPILE) $(FCfixed) $< -else - $(TEST_COMPILE) $(FCfixed) $< -endif - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(TEST_SRC_DIR) - -vpath %.f $(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 78c91b0e9..000000000 --- a/chem/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/chem/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 e02a156fe..000000000 --- a/colors/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/colors/build_and_test_parallel b/colors/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/colors/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 b8f88026e..000000000 --- a/colors/build_data_and_export +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/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 80ae1cdc5..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 78c91b0e9..000000000 --- a/colors/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/colors/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 e02a156fe..000000000 --- a/const/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/const/build_and_test_parallel b/const/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/const/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 6de1d1358..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 78c91b0e9..000000000 --- a/const/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/const/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/data/star_data/zams_models/create_z2m2_y28/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/data/star_data/zams_models/create_z2m2_y28/rn +++ b/data/star_data/zams_models/create_z2m2_y28/rn @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +make run diff --git a/docs/source/developing.rst b/docs/source/developing.rst index bdd633ed8..d4be6dc32 100644 --- a/docs/source/developing.rst +++ b/docs/source/developing.rst @@ -22,4 +22,5 @@ Developing MESA developing/profiling 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..337308de3 --- /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 ``yes`` (any other value will disable the checks). Is it recommended to keep this set to ``yes`` at all times, as crashes would indicate bugs in either MESA or user provided code through ``run_star_extras.f90``. This option is available for compatibility with older versions of MESA. + +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): + +.. 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 aff3032cf..7efd03241 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 @@ -554,9 +553,9 @@ analytic derivative. 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. @@ -802,40 +801,6 @@ run to get plot data mesh_plan.rb shows input data that was used to form the plan mesh.rb shows new mesh (with some old values interpolated to the new mesh for comparison) - - -.. _fpe: - -Floating point exceptions -------------------------- - -Floating point exceptions (fpe) occur when the code attempts to perform an illegal math operation, for instance x/0, sqrt(-1), or log(0). In these cases any number that uses the result of one of these expressions is also undefined. - -To test MESA for floating point exceptions we can turn on the compiler checks that will flag when an issue occurs: - -Set the environment variable - -.. code-block:: sh - - MESA_FPE_CHECKS_ON=1 - -Then run ./clean and ./install in MESA_DIR. - -This setting adds the following options in ``utils/makefile_header`` - -.. literalinclude:: ../../../utils/makefile_header - :language: makefile - :start-after: ifeq ($(MESA_FPE_CHECKS_ON),1) - :end-before: endif - -and acts as if you set the controls inlist option - -.. code-block:: fortran - - fill_arrays_with_nans = .true. - -to make sure you catch any uninitialized array accesses. - Step -1: Introduce a bug (again) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -851,7 +816,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 05f303b8b..2480031c2 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 b6e976702..5d0c4d25f 100644 --- a/docs/source/faq.rst +++ b/docs/source/faq.rst @@ -633,8 +633,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: @@ -655,7 +655,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. @@ -744,9 +744,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 0d4b72cff..8ee9f41d6 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 ec08877f5..2579bf54e 100644 --- a/docs/source/reference/env_vars.rst +++ b/docs/source/reference/env_vars.rst @@ -16,9 +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``. @@ -102,10 +101,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 +128,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 +148,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 531207f12..d8954246d 100644 --- a/docs/source/test_suite.rst +++ b/docs/source/test_suite.rst @@ -35,7 +35,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 7ad63c90c..17a0cbc0f 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 1c5cefd2f..2c3ad06c2 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 a18b29163..26754e5e6 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 d35878496..4e2219756 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 e02a156fe..000000000 --- a/eos/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/eos/build_and_test_parallel b/eos/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/eos/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 07d272c14..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.f helm_alloc.f90 \ - helm_polynomials.f90 helm.f90 \ - eos5_xtrin_h-he.f opal_core.f scvh_core.f \ - opal_scvh_driver.f helm_opal_scvh_driver.f \ - create_eos_files.f - -################################################################# -# -# 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 c3dfc15ce..000000000 --- a/eos/i1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -../utils/i1 && \ -./i1_preprocessors diff --git a/eos/i1_preprocessors b/eos/i1_preprocessors deleted file mode 100755 index 23953c617..000000000 --- a/eos/i1_preprocessors +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/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 023e54764..000000000 --- a/eos/i1p +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 1cdb5772c..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 8d4023a1f..49490dfe6 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,22 +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 78c91b0e9..000000000 --- a/eos/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/eos/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/forum/Makefile b/forum/Makefile new file mode 100644 index 000000000..2150b323e --- /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.3.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 39902ed56..000000000 --- a/forum/build_and_test +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -rm -rf forum -tar xf forum-1.0.3.tar.gz -mv forum-1.0.3 forum - -../utils/build_and_test diff --git a/forum/build_and_test_parallel b/forum/build_and_test_parallel deleted file mode 100755 index 44a4bd7f5..000000000 --- a/forum/build_and_test_parallel +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -rm -rf forum -tar xf forum-1.0.3.tar.gz -mv forum-1.0.3 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 c83e1ff57..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 818a9d425..000000000 --- a/forum/test/rn +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -../forum/bin/test_order - diff --git a/gyre/Makefile b/gyre/Makefile new file mode 100644 index 000000000..c5b2ce940 --- /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-7.2.1.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 7b88598b4..000000000 --- a/gyre/build_and_test +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -rm -rf gyre -tar xf gyre-7.2.1.tar.gz -mv gyre-7.2.1 gyre - -../utils/build_and_test diff --git a/gyre/build_and_test_parallel b/gyre/build_and_test_parallel deleted file mode 100755 index 78586c092..000000000 --- a/gyre/build_and_test_parallel +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -rm -rf gyre -tar xf gyre-7.2.1.tar.gz -mv gyre-7.2.1 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 d5d9bea4d..482291d7c 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 252227cd5..000000000 --- a/gyre/test/ck +++ /dev/null @@ -1,17 +0,0 @@ -#./../../utils/test/ck - -#!/bin/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 9cdf14ce7..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.f -else - SRCS = test_gyre_stub.f -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: %.f -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 %.f $(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 78c91b0e9..000000000 --- a/gyre/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/gyre/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/gyre/test/src/test_gyre.f b/gyre/test/src/test_gyre.f deleted file mode 100644 index f9fb6c471..000000000 --- a/gyre/test/src/test_gyre.f +++ /dev/null @@ -1,132 +0,0 @@ -module test_gyre_mod - - use const_def, only : dp, mesa_dir - use gyre_mesa_m - - implicit none - -contains - - subroutine do_test () - - real(dp), allocatable :: global_data(:) - real(dp), allocatable :: point_data(:,:) - integer :: version - - integer :: ipar(1) - real(dp) :: rpar(1) - - ! Initialize - - call init('gyre.in') - - call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/gyre/gyre') - - ! Read a model from file - - call read_model('model.dat') - - ! Find modes - - call get_modes(0, user_sub, ipar, rpar) - call get_modes(1, user_sub, ipar, rpar) - - write(*,*) 'done file model' - - ! Load a model into memory - - call load_model('model.dat', global_data, point_data, version) - - call set_model(global_data, point_data, version) - - ! Find modes - - call get_modes(0, user_sub, ipar, rpar) - call get_modes(1, user_sub, ipar, rpar) - - write(*,*) 'done memory model' - - end subroutine do_test - - !**** - - subroutine user_sub (md, ipar, rpar, retcode) - - type(mode_t), intent(in) :: md - integer, intent(inout) :: ipar(:) - real(dp), intent(inout) :: rpar(:) - integer, intent(out) :: retcode - - ! Print out mode info - - write(*,*) md%md_p%l, md%n_p, md%n_g, md%n_pg, REAL(md%freq('UHZ')), md%E_norm() - - ! Finish - - retcode = 0 - - return - - end subroutine user_sub - - !**** - - subroutine load_model (file, global_data, point_data, version) - - character(LEN=*), intent(in) :: file - real(dp), allocatable, intent(out) :: global_data(:) - real(dp), allocatable, intent(out) :: point_data(:,:) - integer, intent(out) :: version - - integer :: unit - integer :: n - integer :: k - integer :: k_chk - - ! Read a model from the MESA-format file - - open(NEWUNIT=unit, FILE=file, STATUS='OLD') - - ! Read the header - - allocate(global_data(3)) - - read(unit, *) n, global_data, version - - select case (version) - case (1) - backspace(unit) - case (19) - case (100) - case default - stop 'Unrecognized MESA file version' - end select - - ! Read the data - - allocate(point_data(18,n)) - - read_loop : do k = 1, n - read(unit, *) k_chk, point_data(:,k) - if(k /= k_chk) stop 'Index mismatch' - end do read_loop - - close(unit) - - ! Finish - - return - - end subroutine load_model - -end module test_gyre_mod - -program test_gyre - - use test_gyre_mod - - implicit none - - call do_test() - -end program test_gyre diff --git a/gyre/test/src/test_gyre.f90 b/gyre/test/src/test_gyre.f90 new file mode 100644 index 000000000..170e06809 --- /dev/null +++ b/gyre/test/src/test_gyre.f90 @@ -0,0 +1,132 @@ +module test_gyre_mod + + use const_def, only : dp, mesa_dir + use gyre_mesa_m + + implicit none + +contains + + subroutine do_test () + + real(dp), allocatable :: global_data(:) + real(dp), allocatable :: point_data(:,:) + integer :: version + + integer :: ipar(1) + real(dp) :: rpar(1) + + ! Initialize + + call init('gyre.in') + + call set_constant('GYRE_DIR', TRIM(mesa_dir)//'/build/gyre/src') + + ! Read a model from file + + call read_model('model.dat') + + ! Find modes + + call get_modes(0, user_sub, ipar, rpar) + call get_modes(1, user_sub, ipar, rpar) + + write(*,*) 'done file model' + + ! Load a model into memory + + call load_model('model.dat', global_data, point_data, version) + + call set_model(global_data, point_data, version) + + ! Find modes + + call get_modes(0, user_sub, ipar, rpar) + call get_modes(1, user_sub, ipar, rpar) + + write(*,*) 'done memory model' + + end subroutine do_test + + !**** + + subroutine user_sub (md, ipar, rpar, retcode) + + type(mode_t), intent(in) :: md + integer, intent(inout) :: ipar(:) + real(dp), intent(inout) :: rpar(:) + integer, intent(out) :: retcode + + ! Print out mode info + + write(*,*) md%md_p%l, md%n_p, md%n_g, md%n_pg, REAL(md%freq('UHZ')), md%E_norm() + + ! Finish + + retcode = 0 + + return + + end subroutine user_sub + + !**** + + subroutine load_model (file, global_data, point_data, version) + + character(LEN=*), intent(in) :: file + real(dp), allocatable, intent(out) :: global_data(:) + real(dp), allocatable, intent(out) :: point_data(:,:) + integer, intent(out) :: version + + integer :: unit + integer :: n + integer :: k + integer :: k_chk + + ! Read a model from the MESA-format file + + open(NEWUNIT=unit, FILE=file, STATUS='OLD') + + ! Read the header + + allocate(global_data(3)) + + read(unit, *) n, global_data, version + + select case (version) + case (1) + backspace(unit) + case (19) + case (100) + case default + stop 'Unrecognized MESA file version' + end select + + ! Read the data + + allocate(point_data(18,n)) + + read_loop : do k = 1, n + read(unit, *) k_chk, point_data(:,k) + if(k /= k_chk) stop 'Index mismatch' + end do read_loop + + close(unit) + + ! Finish + + return + + end subroutine load_model + +end module test_gyre_mod + +program test_gyre + + use test_gyre_mod + + implicit none + + call do_test() + +end program test_gyre diff --git a/gyre/test/src/test_gyre_stub.f b/gyre/test/src/test_gyre_stub.f deleted file mode 100644 index 12a929b1d..000000000 --- a/gyre/test/src/test_gyre_stub.f +++ /dev/null @@ -1,29 +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 diff --git a/install b/install index 8c2a264db..33dd606f0 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,63 +17,6 @@ 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 - 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 - 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 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 ]; @@ -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,51 @@ 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 - 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 .. +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 -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 ] -then - do_input_data ionization +make -w -Oline -j$(enum_procs) +if [[ $? -ne 0 ]] then + 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 +236,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..c88f02e48 --- /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.f \ + test/src/interp_1d_support_sg.f \ + test/src/test_interp_1d.f +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 e02a156fe..000000000 --- a/interp_1d/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 2b3599335..000000000 --- a/interp_1d/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 cc06ef4ac..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 c1a84cb77..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.f interp_1d_support_sg.f test_interp_1d.f - -################################################################# -# -# 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: %.f -ifneq ($(QUIET),) - @echo TEST_COMPILE $< - @$(TEST_COMPILE) $(FCfixed) $< -else - $(TEST_COMPILE) $(FCfixed) $< -endif - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(TEST_SRC_DIR) - -vpath %.f $(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 78c91b0e9..000000000 --- a/interp_1d/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/interp_1d/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/interp_2d/Makefile b/interp_2d/Makefile new file mode 100644 index 000000000..5ebfb93f8 --- /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.f \ + private/bipm_sg.f \ + private/renka790_db.f \ + private/renka790_sg.f +SRCS_CHECK = test/src/interp_2d_support.f \ + test/src/test_akima_db.f \ + test/src/test_akima_sg.f \ + test/src/test_interp_2d.f \ + 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 e02a156fe..000000000 --- a/interp_2d/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 2b3599335..000000000 --- a/interp_2d/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 9438467e6..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.f \ - bipm_sg.f \ - 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_db1.o bicub_db.o bicub_db2.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 a13c90dd0..000000000 --- a/interp_2d/test/make/makefile_base +++ /dev/null @@ -1,97 +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.f test_interp_2d.f - -################################################################# -# -# 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 - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(TEST_SRC_DIR) - -vpath %.f $(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 78c91b0e9..000000000 --- a/interp_2d/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/interp_2d/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 e02a156fe..000000000 --- a/ionization/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/ionization/build_and_test_parallel b/ionization/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/ionization/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 26aff0429..000000000 --- a/ionization/build_data_and_export +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/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 2ee91e027..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/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 87e0a9e01..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.f test_ionization.f - -TESTQ_SRCS = test_ionization_support.f test_ionization_quietly.f - -################################################################# -# -# 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: %.f -ifneq ($(QUIET),) - @echo TEST_COMPILE - @$(TEST_COMPILE) $(FCfree) $< -else - $(TEST_COMPILE) $(FCfree) $< -endif - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(TEST_SRC_DIR) - -vpath %.f $(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 78c91b0e9..000000000 --- a/ionization/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/ionization/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/ionization/test/src/test_ionization.f b/ionization/test/src/test_ionization.f90 similarity index 100% rename from ionization/test/src/test_ionization.f rename to ionization/test/src/test_ionization.f90 diff --git a/ionization/test/src/test_ionization_quietly.f b/ionization/test/src/test_ionization_quietly.f deleted file mode 100644 index 4920650cb..000000000 --- a/ionization/test/src/test_ionization_quietly.f +++ /dev/null @@ -1,8 +0,0 @@ - program test_ionization_quietly - use test_ionization_support - call do_test(.true.) - end program - - - - diff --git a/ionization/test/src/test_ionization_support.f b/ionization/test/src/test_ionization_support.f90 similarity index 100% rename from ionization/test/src/test_ionization_support.f rename to ionization/test/src/test_ionization_support.f90 diff --git a/kap/Makefile b/kap/Makefile new file mode 100644 index 000000000..68d286395 --- /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.f \ + private/op_common.f \ + private/op_ev.f \ + private/op_osc.f \ + private/op_radacc.f \ + private/op_eval.f \ + 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 chem 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 e02a156fe..000000000 --- a/kap/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/kap/build_and_test_parallel b/kap/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/kap/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 fe9192ff1..000000000 --- a/kap/build_data_and_export +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/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 c3dfc15ce..000000000 --- a/kap/i1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -../utils/i1 && \ -./i1_preprocessors diff --git a/kap/i1_preprocessors b/kap/i1_preprocessors deleted file mode 100755 index e94f640f4..000000000 --- a/kap/i1_preprocessors +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/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 023e54764..000000000 --- a/kap/i1p +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 834a638f2..000000000 --- a/kap/make/makefile_base +++ /dev/null @@ -1,167 +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.f \ - op_common.f \ - op_ev.f \ - op_osc.f \ - op_radacc.f \ - op_eval.f \ - 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_eval.o : op_eval.f -ifneq ($(QUIET),) - @echo COMPILE_NO_CHECKS $< - @$(COMPILE_NO_CHECKS) $(FCfixed) $< -else - $(COMPILE_NO_CHECKS) $(FCfixed) $< -endif - -conduction.o : conduction.f -ifneq ($(QUIET),) - @echo COMPILE_NO_CHECKS $< - @$(COMPILE_NO_CHECKS) $(FCfree) $< -else - $(COMPILE_NO_CHECKS) $(FCfree) $< -endif - -op_load.o op_common.o op_ev.o op_osc.o op_radacc.o op_load_master.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 0f7df8250..569ef08ae 100644 --- a/kap/plotter/README.rst +++ b/kap/plotter/README.rst @@ -1,35 +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 - -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). - - - - - - + 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). 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/plotter.py b/kap/plotter/plotter.py index 2ef1dafc8..f2fcb8184 100755 --- a/kap/plotter/plotter.py +++ b/kap/plotter/plotter.py @@ -2,9 +2,7 @@ import copy import numpy as np -import matplotlib as mpl import matplotlib.pyplot as plt -import matplotlib.colors as colors def parse(fname): nY, nX = np.loadtxt(fname, max_rows=1, skiprows=3, unpack=True, dtype=int) @@ -32,7 +30,7 @@ def parse(fname): ax.set_ylim(Yran.min(), Yran.max()) # set up color map -cmap = copy.copy(mpl.cm.get_cmap("coolwarm")) +cmap = copy.copy(plt.get_cmap("coolwarm")) cmap.set_over('tab:red') cmap.set_under('black') 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/plotter/src/kap_plotter.f90 b/kap/plotter/src/kap_plotter.f90 index 0126d7d9b..8c3b41812 100644 --- a/kap/plotter/src/kap_plotter.f90 +++ b/kap/plotter/src/kap_plotter.f90 @@ -328,10 +328,14 @@ program kap_plotter res1 = dlnkap_dlnT end if else - res1 = log(kap) + if (is_nan(kap) .OR. kap <= 0) then + call set_nan(res1) + else + res1 = log(kap) + end if end if - if (doing_dfridr) then + if (doing_dfridr .and. is_nan(kap)) then var = log(kap) if (doing_d_dlnd) then dvardx_0 = dlnkap_dlnRho @@ -347,7 +351,11 @@ program kap_plotter end if - write(iounit,*) kval, jval, res1 + if (is_nan(kap)) then + write(iounit,*) kval, jval, "NaN" + else + write(iounit,*) kval, jval, res1 + end if end do end do diff --git a/kap/preprocessor/AESOPUS/aesopus.py b/kap/preprocessor/AESOPUS/aesopus.py index 360b7ca19..4a12783ff 100755 --- a/kap/preprocessor/AESOPUS/aesopus.py +++ b/kap/preprocessor/AESOPUS/aesopus.py @@ -61,8 +61,7 @@ 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 79fe638a5..000000000 --- a/kap/preprocessor/AESOPUS/preprocess +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/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.yaml 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 eec5505de..000000000 --- a/kap/preprocessor/make/makefile_base +++ /dev/null @@ -1,116 +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.f freedman.f \ - opal_type1.f opal_type2.f \ - kap_support.f fixed_metal.f co_enhanced.f - -CKAP_SRCS = $(COMMON_SRCS) create_tables.f - -PLOT_SRCS = $(COMMON_SRCS) plot.f - -################################################################# -# -# 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 - -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 %.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 790c7f4c6..000000000 --- a/kap/preprocessor/rebuild_all +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/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 cdf95286c..000000000 --- a/kap/preprocessor/rn_co_enhanced +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/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 e3e6a697c..000000000 --- a/kap/preprocessor/rn_fixed_metal +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/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 746dc9992..000000000 --- a/kap/preprocessor/rn_freedman +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/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 4f59d1c91..000000000 --- a/kap/preprocessor/rn_oplib +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/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 19140cc1c..000000000 --- a/kap/preprocessor/rn_test +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/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..3d5200251 --- /dev/null +++ b/kap/preprocessor/spline_OPLIB_tables.py @@ -0,0 +1,78 @@ +"""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)""" + +"""lasted updated by EbF 12-2023""" + +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/co_enhanced.f b/kap/preprocessor/src/co_enhanced.f90 similarity index 100% rename from kap/preprocessor/src/co_enhanced.f rename to kap/preprocessor/src/co_enhanced.f90 diff --git a/kap/preprocessor/src/create_tables.f b/kap/preprocessor/src/create_tables.f deleted file mode 100644 index 7a01488f8..000000000 --- a/kap/preprocessor/src/create_tables.f +++ /dev/null @@ -1,102 +0,0 @@ -! *********************************************************************** -! -! Copyright (C) 2009-2019 Bill Paxton & The MESA Team -! -! This file is part of MESA. -! -! MESA is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Library Public License as published -! by the Free Software Foundation; either version 2 of the License, or -! (at your option) any later version. -! -! MESA 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 Library General Public License for more details. -! -! You should have received a copy of the GNU Library General Public License -! along with this software; if not, write to the Free Software -! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -! -! *********************************************************************** - - program create_tables - - use create_fixed_metal_tables - use create_co_enhanced_tables - use kap_support - use math_lib - use utils_lib, only: mesa_error - - implicit none - - logical :: do_kappa_test = .false. - !logical :: do_kappa_test = .true. - - double precision :: which_z, which_x - integer :: io_unit, ios, ilgT, cnt, len, status - character (len=64) :: inlist_fname, whichz_str, whichx_str - - status = 0 - call get_command_argument(1, inlist_fname, len, status) - if (status /= 0) then - write(*,*) 'failed to get inlist_fname from command line' - call mesa_error(__FILE__,__LINE__) - end if - - call get_command_argument(2, whichz_str, len, status) - if (status /= 0) then - write(*,*) 'failed to get whichz from command line' - call mesa_error(__FILE__,__LINE__) - end if - read(whichz_str,*,iostat=status) which_z - if (status /= 0) then - write(*,*) 'failed to convert whichz from command line to number' - call mesa_error(__FILE__,__LINE__) - end if - - call get_command_argument(3, whichx_str, len, status) - if (status /= 0) then - write(*,*) 'failed to get whichx from command line' - call mesa_error(__FILE__,__LINE__) - end if - read(whichx_str,*,iostat=status) which_x - if (status /= 0) then - write(*,*) 'failed to convert whichx from command line to number' - call mesa_error(__FILE__,__LINE__) - end if - - !write(*,*) 'inlist_fname', trim(inlist_fname) - !write(*,*) 'which_z', which_z - !write(*,*) 'which_x', which_x - - call read_namelist(inlist_fname) - - call init_preprocessor - call read_output_logTs - - if (do_kappa_test) then ! testing mode - - call Do_Test(data_dir, type1_table) - call Do_CO_Test(data_dir, type1_table) - - else ! production mode - - which_z = min(1d0, max(0d0, which_z)) - - if (CO_flag) then ! C/O enhanced - call Write_CO_Files( & - which_z, which_x, output_dir, data_dir, type1_table, & - header_info, table_prefix, table_version) - else - call Write_Files( & - which_z, which_x, output_dir, data_dir, type1_table, & - header_info, table_prefix, table_version) - end if - - end if - - - - end program create_tables - diff --git a/kap/preprocessor/src/create_tables.f90 b/kap/preprocessor/src/create_tables.f90 new file mode 100644 index 000000000..b7da0d6c8 --- /dev/null +++ b/kap/preprocessor/src/create_tables.f90 @@ -0,0 +1,102 @@ +! *********************************************************************** +! +! Copyright (C) 2009-2019 Bill Paxton & The MESA Team +! +! This file is part of MESA. +! +! MESA is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Library Public License as published +! by the Free Software Foundation; either version 2 of the License, or +! (at your option) any later version. +! +! MESA 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 Library General Public License for more details. +! +! You should have received a copy of the GNU Library General Public License +! along with this software; if not, write to the Free Software +! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +! +! *********************************************************************** + + program create_tables + + use create_fixed_metal_tables + use create_co_enhanced_tables + use kap_support + use math_lib + use utils_lib, only: mesa_error + + implicit none + + logical :: do_kappa_test = .false. + !logical :: do_kappa_test = .true. + + double precision :: which_z, which_x + integer :: io_unit, ios, ilgT, cnt, len, status + character (len=512) :: inlist_fname, whichz_str, whichx_str + + status = 0 + call get_command_argument(1, inlist_fname, len, status) + if (status /= 0) then + write(*,*) 'failed to get inlist_fname from command line' + call mesa_error(__FILE__,__LINE__) + end if + + call get_command_argument(2, whichz_str, len, status) + if (status /= 0) then + write(*,*) 'failed to get whichz from command line' + call mesa_error(__FILE__,__LINE__) + end if + read(whichz_str,*,iostat=status) which_z + if (status /= 0) then + write(*,*) 'failed to convert whichz from command line to number' + call mesa_error(__FILE__,__LINE__) + end if + + call get_command_argument(3, whichx_str, len, status) + if (status /= 0) then + write(*,*) 'failed to get whichx from command line' + call mesa_error(__FILE__,__LINE__) + end if + read(whichx_str,*,iostat=status) which_x + if (status /= 0) then + write(*,*) 'failed to convert whichx from command line to number' + call mesa_error(__FILE__,__LINE__) + end if + + !write(*,*) 'inlist_fname', trim(inlist_fname) + !write(*,*) 'which_z', which_z + !write(*,*) 'which_x', which_x + + call read_namelist(inlist_fname) + + call init_preprocessor + call read_output_logTs + + if (do_kappa_test) then ! testing mode + + call Do_Test(data_dir, type1_table) + call Do_CO_Test(data_dir, type1_table) + + else ! production mode + + which_z = min(1d0, max(0d0, which_z)) + + if (CO_flag) then ! C/O enhanced + call Write_CO_Files( & + which_z, which_x, output_dir, data_dir, type1_table, & + header_info, table_prefix, table_version) + else + call Write_Files( & + which_z, which_x, output_dir, data_dir, type1_table, & + header_info, table_prefix, table_version) + end if + + end if + + + + end program create_tables + diff --git a/kap/preprocessor/src/ferg_logP.f b/kap/preprocessor/src/ferg_logP.f deleted file mode 100644 index d452a1eca..000000000 --- a/kap/preprocessor/src/ferg_logP.f +++ /dev/null @@ -1,343 +0,0 @@ -! *********************************************************************** -! -! Copyright (C) 2009-2019 Bill Paxton, Frank Timmes & The MESA Team -! -! This file is part of MESA. -! -! MESA is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Library Public License as published -! by the Free Software Foundation; either version 2 of the License, or -! (at your option) any later version. -! -! MESA 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 Library General Public License for more details. -! -! You should have received a copy of the GNU Library General Public License -! along with this software; if not, write to the Free Software -! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -! -! *********************************************************************** - - module ferg_logP - use interp_2D_lib_sg - use math_lib - use utils_lib, only: mesa_error - - implicit none - - ! range of (logR,logT) in logP data file - real, parameter :: logP_logT_min = 2.70 - real, parameter :: logP_logT_max = 4.00 - real, parameter :: logP_dlogT = 0.05 - integer, parameter :: logP_num_logTs = 27 - - real, parameter :: logP_logR_min =-6.00 - real, parameter :: logP_logR_max = 7.00 - real, parameter :: logP_dlogR = 1.00 - integer, parameter :: logP_num_logRs = 14 - - real :: logP_logTs(logP_num_logTs) - real :: logP_logRs(logP_num_logRs) - real :: logPs(4, logP_num_logRs, logP_num_logTs) - - ! range of (logP,logT) in logK data file - real, parameter :: logK_logT_min = 2.70 - real, parameter :: logK_logT_max = 4.00 - real, parameter :: logK_dlogT = 0.05 - integer, parameter :: logK_num_logTs = 27 - - real, parameter :: logK_logP_min =-9.00 - real, parameter :: logK_logP_max = 10.00 - real, parameter :: logK_dlogP = 1.00 - integer, parameter :: logK_num_logPs = 20 - - real :: logK_logTs(logK_num_logTs) - real :: logK_logPs(logK_num_logPs) - real :: logKs(4, logK_num_logPs, logK_num_logTs) - - contains - - - - subroutine Init_ferg_logP(Z, X, dir, logP_dir) - double precision, intent(IN) :: Z, X - character (len=256), intent(IN) :: dir, logP_dir - character (len=256) :: fname - ! read the table of logP values for the given Z and X - call Read_logPs(Z, X, logP_dir) - call Get_logK_filename(Z, X, dir, fname) - call Read_logKs(fname) - end subroutine Init_ferg_logP - - - - subroutine Get_logK_filename(Z, X, dir, fname) - save - double precision, intent(IN) :: Z, X - character (len=*), intent(IN) :: dir - character (len=*), intent(OUT) :: fname - character (len=256) :: zstr, xstr - integer :: iz, ix - - iz = int(z * 1d3 + 0.5d0) - ix = int(x * 1d2 + 0.5d0) - zstr = '' - if (iz == 0) zstr = '0' - if (iz == 1) zstr = '001' - if (iz == 4) zstr = '004' - if (iz == 10) zstr = '01' - if (iz == 20) zstr = '02' - if (iz == 30) zstr = '03' - if (iz == 50) zstr = '05' - if (iz == 100) zstr = '1' - xstr = '' - if (ix == 0) xstr = '0' - if (ix == 3) xstr = '03' - if (ix == 10) xstr = '1' - if (ix == 35) xstr = '35' - if (ix == 70) xstr = '7' - - write(fname,'(6A)') trim(dir), '/gs98.hd.', trim(xstr), '.', trim(zstr), '.tron' - - end subroutine Get_logK_filename - - - subroutine Read_logKs(fname) - character (len=*), intent(IN) :: fname - - integer :: io_logK, i, ios - real :: logT, lKs(logK_num_logPs) - - integer :: ibcxmin ! bc flag for x=xmin - real :: bcxmin(logK_num_logTs) ! bc data vs. y at x=xmin - integer :: ibcxmax ! bc flag for x=xmax - real :: bcxmax(logK_num_logTs) ! bc data vs. y at x=xmax - integer :: ibcymin ! bc flag for y=ymin - real :: bcymin(logK_num_logPs) ! bc data vs. x at y=ymin - integer :: ibcymax ! bc flag for y=ymax - real :: bcymax(logK_num_logPs) ! bc data vs. x at y=ymax - integer :: ili_logPs - integer :: ili_logTs - integer :: ier ! =0 on exit if there is no error. - - io_logK = 40 - open(unit=io_logK, file=trim(fname), action='read', status='old', iostat=ios) - if (ios /= 0) then - write(*,*) 'failed to open', trim(fname) - call mesa_error(__FILE__,__LINE__) - end if - - do i = 1, 3 - read(io_logK, *) - end do - - read(io_logK, '(6x,99(f7.3))') logK_logPs(1:logK_num_logPs) - - i = logK_num_logTs - logT = logK_logT_max - do - read(io_logK,'(f5.3,1x,99f7.3)') logK_logTs(i), lKs(1:logK_num_logPs) - logKs(1, 1:logK_num_logPs, i) = lKs(1:logK_num_logPs) - if (abs(logT - logK_logTs(i)) < 0.01) then - logT = logK_logT_max - (logK_num_logTs-i+1)*logK_dlogT - i = i - 1 - if (i < 1) exit - end if - end do - - close(io_logK) - - ! just use "not a knot" bc's at edges of tables - ibcxmin = 0; bcxmin(1:logK_num_logTs) = 0 - ibcxmax = 0; bcxmax(1:logK_num_logTs) = 0 - 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, & - ibcxmin,bcxmin,ibcxmax,bcxmax, & - ibcymin,bcymin,ibcymax,bcymax, & - ili_logPs,ili_logTs,ier) - if (ier /= 0) then - write(*,*) 'interp_mkbicub_sg error happened for logKs' - call mesa_error(__FILE__,__LINE__) - end if - - end subroutine Read_logKs - - - real function Find_logP(logR, logT) - real, intent(IN) :: logR, logT - real :: fval(6) - integer :: ict(6), ier - - 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) - Find_logP = fval(1) - - end function Find_logP - - - real function Eval_lowTemp_logK(logP, logT) - real, intent(IN) :: logP, logT - real :: fval(6) - integer :: ict(6), ier - - 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) - Eval_lowTemp_logK = fval(1) - - end function Eval_lowTemp_logK - - - subroutine Read_logPs(Z, X, dir) - double precision, intent(IN) :: Z, X - character (len=256), intent(IN) :: dir - - integer :: ix, iz, io_logP, i, j - character (len=256) :: fname, xstr, zstr - - integer :: first_logR(logP_num_logTs), last_logR(logP_num_logTs) - real :: logP, dlogP, lPs(logP_num_logRs) - - integer :: ibcxmin ! bc flag for x=xmin - real :: bcxmin(logP_num_logTs) ! bc data vs. y at x=xmin - integer :: ibcxmax ! bc flag for x=xmax - real :: bcxmax(logP_num_logTs) ! bc data vs. y at x=xmax - integer :: ibcymin ! bc flag for y=ymin - real :: bcymin(logP_num_logRs) ! bc data vs. x at y=ymin - integer :: ibcymax ! bc flag for y=ymax - real :: bcymax(logP_num_logRs) ! bc data vs. x at y=ymax - 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. - - iz = int(Z * 1d3 + 0.1d0) - ix = int(X * 1d2 + 0.1d0) - zstr = '' - if (iz == 0) zstr = '000' - if (iz == 1) zstr = '001' - if (iz == 4) zstr = '004' - if (iz == 10) zstr = '010' - if (iz == 20) zstr = '020' - if (iz == 30) zstr = '030' - if (iz == 50) zstr = '050' - if (iz == 100) zstr = '100' - xstr = '' - if (ix == 0) xstr = '00' - if (ix == 3) xstr = '03' - if (ix == 10) xstr = '10' - if (ix == 35) xstr = '35' - if (ix == 70) xstr = '70' - - write(fname,'(6A)') trim(dir), '/logP_z', trim(zstr), '_x', trim(xstr), '.data' - - io_logP = 40 - open(unit=io_logP,file=trim(fname)) - - read(io_logP, *) - read(io_logP, *) - read(io_logP, *) logP_logRs(1:logP_num_logRs) - read(io_logP, *) - - do i = 1, logP_num_logTs - read(io_logP,*) logP_logTs(i), lPs(1:logP_num_logRs) - logPs(1, 1:logP_num_logRs, i) = lPs(1:logP_num_logRs) - end do - - close(io_logP) - - ! replace fillers by extrapolation - do j = 1, logP_num_logTs - first_logR(j) = 0 - do i = 1, logP_num_logRs - if (logPs(1, i, j) > -9.0) then - if (first_logR(j) == 0) first_logR(j) = i - last_logR(j) = i - end if - end do - - if (first_logR(j) > 1) then ! extrapolate down - i = first_logR(j) - logP = logPs(1, i, j) - dlogP = logPs(1, i+1, j) - logP - do i = first_logR(j)-1, 1, -1 - logP = logP - dlogP - logPs(1, i, j) = logP - end do - end if - - if (last_logR(j) < logP_num_logRs) then ! extrapolate up - i = last_logR(j) - logP = logPs(1, i, j) - dlogP = logP - logPs(1, i-1, j) - do i = last_logR(j)+1, logP_num_logRs - logP = logP + dlogP - logPs(1, i, j) = logP - end do - end if - end do - - if (.false.) then - write(*,'(7x,99(F7.3))') logP_logRs(1:logP_num_logRs) - do i = 1, logP_num_logTs - write(*,'(99(F7.3))') logP_logTs(i), logPs(1, 1:logP_num_logRs, i) - end do - end if - - ! just use "not a knot" bc's at edges of tables - ibcxmin = 0; bcxmin(1:logP_num_logTs) = 0 - ibcxmax = 0; bcxmax(1:logP_num_logTs) = 0 - 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, & - ibcxmin,bcxmin,ibcxmax,bcxmax, & - ibcymin,bcymin,ibcymax,bcymax, & - ili_logRs,ili_logTs,ier) - if (ier /= 0) then - write(*,*) 'interp_mkbicub_sg error happened for logPs' - call mesa_error(__FILE__,__LINE__) - end if - - end subroutine Read_logPs - - - subroutine eval_ferg_logP (z_in,xh_in,xxc_in,xxo_in,t6_in,r_in,logKap) - double precision z_in,xh_in,xxc_in,xxo_in,t6_in,r_in,logKap - real z,xh,xxc,xxo,t6,r - real logT, logR, logP - - z = real(z_in); xh = real(xh_in); xxc = real(xxc_in) - xxo = real(xxo_in); t6 = real(t6_in); r = real(r_in) - - xxc = xxc; xxo = xxo; xh = xh; z=z ! for now, we are ignoring these - - logT = log10(t6*1e6); - if (logT > logP_logT_max) then - logT = logK_logT_max - end if - if (logT < logP_logT_min) then - logT = logK_logT_min - end if - - logR = log10(R) - if (logR > logP_logR_max) then - logR = logP_logR_max - end if - if (logR < logP_logR_min) then - logR = logP_logR_min - end if - - logP = Find_logP(logR,logT) - if (logP > logK_logP_max) logP = logK_logP_max - - logKap = Eval_lowTemp_logK(logP, logT) - - end subroutine eval_ferg_logP - - - end module ferg_logP diff --git a/kap/preprocessor/src/ferg_logP.f90 b/kap/preprocessor/src/ferg_logP.f90 new file mode 100644 index 000000000..c9c40a4f0 --- /dev/null +++ b/kap/preprocessor/src/ferg_logP.f90 @@ -0,0 +1,354 @@ +! *********************************************************************** +! +! Copyright (C) 2009-2019 Bill Paxton, Frank Timmes & The MESA Team +! +! This file is part of MESA. +! +! MESA is free software; you can redistribute it and/or modify +! it under the terms of the GNU General Library Public License as published +! by the Free Software Foundation; either version 2 of the License, or +! (at your option) any later version. +! +! MESA 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 Library General Public License for more details. +! +! You should have received a copy of the GNU Library General Public License +! along with this software; if not, write to the Free Software +! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +! +! *********************************************************************** + + module ferg_logP + use interp_2D_lib_sg + use math_lib + use utils_lib, only: mesa_error + + implicit none + + ! range of (logR,logT) in logP data file + real, parameter :: logP_logT_min = 2.70 + real, parameter :: logP_logT_max = 4.00 + real, parameter :: logP_dlogT = 0.05 + integer, parameter :: logP_num_logTs = 27 + + real, parameter :: logP_logR_min =-6.00 + real, parameter :: logP_logR_max = 7.00 + real, parameter :: logP_dlogR = 1.00 + integer, parameter :: logP_num_logRs = 14 + + real :: logP_logTs(logP_num_logTs) + real :: logP_logRs(logP_num_logRs) + 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 + real, parameter :: logK_logT_max = 4.00 + real, parameter :: logK_dlogT = 0.05 + integer, parameter :: logK_num_logTs = 27 + + real, parameter :: logK_logP_min =-9.00 + real, parameter :: logK_logP_max = 10.00 + real, parameter :: logK_dlogP = 1.00 + integer, parameter :: logK_num_logPs = 20 + + real :: logK_logTs(logK_num_logTs) + real :: logK_logPs(logK_num_logPs) + real, target :: logKs(4, logK_num_logPs, logK_num_logTs) + + contains + + + + subroutine Init_ferg_logP(Z, X, dir, logP_dir) + double precision, intent(IN) :: Z, X + character (len=256), intent(IN) :: dir, logP_dir + character (len=256) :: fname + ! read the table of logP values for the given Z and X + + call Read_logPs(Z, X, logP_dir) + call Get_logK_filename(Z, X, dir, fname) + call Read_logKs(fname) + end subroutine Init_ferg_logP + + + + subroutine Get_logK_filename(Z, X, dir, fname) + save + double precision, intent(IN) :: Z, X + character (len=*), intent(IN) :: dir + character (len=*), intent(OUT) :: fname + character (len=256) :: zstr, xstr + integer :: iz, ix + + iz = int(z * 1d3 + 0.5d0) + ix = int(x * 1d2 + 0.5d0) + zstr = '' + if (iz == 0) zstr = '0' + if (iz == 1) zstr = '001' + if (iz == 4) zstr = '004' + if (iz == 10) zstr = '01' + if (iz == 20) zstr = '02' + if (iz == 30) zstr = '03' + if (iz == 50) zstr = '05' + if (iz == 100) zstr = '1' + xstr = '' + if (ix == 0) xstr = '0' + if (ix == 3) xstr = '03' + if (ix == 10) xstr = '1' + if (ix == 35) xstr = '35' + if (ix == 70) xstr = '7' + + write(fname,'(6A)') trim(dir), '/gs98.hd.', trim(xstr), '.', trim(zstr), '.tron' + + end subroutine Get_logK_filename + + + subroutine Read_logKs(fname) + character (len=*), intent(IN) :: fname + + integer :: io_logK, i, ios + real :: logT, lKs(logK_num_logPs) + + integer :: ibcxmin ! bc flag for x=xmin + real :: bcxmin(logK_num_logTs) ! bc data vs. y at x=xmin + integer :: ibcxmax ! bc flag for x=xmax + real :: bcxmax(logK_num_logTs) ! bc data vs. y at x=xmax + integer :: ibcymin ! bc flag for y=ymin + real :: bcymin(logK_num_logPs) ! bc data vs. x at y=ymin + integer :: ibcymax ! bc flag for y=ymax + real :: bcymax(logK_num_logPs) ! bc data vs. x at y=ymax + 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) + if (ios /= 0) then + write(*,*) 'failed to open', trim(fname) + call mesa_error(__FILE__,__LINE__) + end if + + do i = 1, 3 + read(io_logK, *) + end do + + read(io_logK, '(6x,99(f7.3))') logK_logPs(1:logK_num_logPs) + + i = logK_num_logTs + logT = logK_logT_max + do + read(io_logK,'(f5.3,1x,99f7.3)') logK_logTs(i), lKs(1:logK_num_logPs) + logKs(1, 1:logK_num_logPs, i) = lKs(1:logK_num_logPs) + if (abs(logT - logK_logTs(i)) < 0.01) then + logT = logK_logT_max - (logK_num_logTs-i+1)*logK_dlogT + i = i - 1 + if (i < 1) exit + end if + end do + + close(io_logK) + + ! just use "not a knot" bc's at edges of tables + ibcxmin = 0; bcxmin(1:logK_num_logTs) = 0 + ibcxmax = 0; bcxmax(1:logK_num_logTs) = 0 + ibcymin = 0; bcymin(1:logK_num_logPs) = 0 + ibcymax = 0; bcymax(1:logK_num_logPs) = 0 + + 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) + if (ier /= 0) then + write(*,*) 'interp_mkbicub_sg error happened for logKs' + call mesa_error(__FILE__,__LINE__) + end if + + end subroutine Read_logKs + + + 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 + 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 + + + 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 + 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 + + + subroutine Read_logPs(Z, X, dir) + double precision, intent(IN) :: Z, X + character (len=256), intent(IN) :: dir + + integer :: ix, iz, io_logP, i, j + character (len=256) :: fname, xstr, zstr + + integer :: first_logR(logP_num_logTs), last_logR(logP_num_logTs) + real :: logP, dlogP, lPs(logP_num_logRs) + + integer :: ibcxmin ! bc flag for x=xmin + real :: bcxmin(logP_num_logTs) ! bc data vs. y at x=xmin + integer :: ibcxmax ! bc flag for x=xmax + real :: bcxmax(logP_num_logTs) ! bc data vs. y at x=xmax + integer :: ibcymin ! bc flag for y=ymin + real :: bcymin(logP_num_logRs) ! bc data vs. x at y=ymin + integer :: ibcymax ! bc flag for y=ymax + real :: bcymax(logP_num_logRs) ! bc data vs. x at y=ymax + 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) + zstr = '' + if (iz == 0) zstr = '000' + if (iz == 1) zstr = '001' + if (iz == 4) zstr = '004' + if (iz == 10) zstr = '010' + if (iz == 20) zstr = '020' + if (iz == 30) zstr = '030' + if (iz == 50) zstr = '050' + if (iz == 100) zstr = '100' + xstr = '' + if (ix == 0) xstr = '00' + if (ix == 3) xstr = '03' + if (ix == 10) xstr = '10' + if (ix == 35) xstr = '35' + if (ix == 70) xstr = '70' + + write(fname,'(6A)') trim(dir), '/logP_z', trim(zstr), '_x', trim(xstr), '.data' + + io_logP = 40 + open(unit=io_logP,file=trim(fname)) + + read(io_logP, *) + read(io_logP, *) + read(io_logP, *) logP_logRs(1:logP_num_logRs) + read(io_logP, *) + + do i = 1, logP_num_logTs + read(io_logP,*) logP_logTs(i), lPs(1:logP_num_logRs) + logPs(1, 1:logP_num_logRs, i) = lPs(1:logP_num_logRs) + end do + + close(io_logP) + + ! replace fillers by extrapolation + do j = 1, logP_num_logTs + first_logR(j) = 0 + do i = 1, logP_num_logRs + if (logPs(1, i, j) > -9.0) then + if (first_logR(j) == 0) first_logR(j) = i + last_logR(j) = i + end if + end do + + if (first_logR(j) > 1) then ! extrapolate down + i = first_logR(j) + logP = logPs(1, i, j) + dlogP = logPs(1, i+1, j) - logP + do i = first_logR(j)-1, 1, -1 + logP = logP - dlogP + logPs(1, i, j) = logP + end do + end if + + if (last_logR(j) < logP_num_logRs) then ! extrapolate up + i = last_logR(j) + logP = logPs(1, i, j) + dlogP = logP - logPs(1, i-1, j) + do i = last_logR(j)+1, logP_num_logRs + logP = logP + dlogP + logPs(1, i, j) = logP + end do + end if + end do + + if (.false.) then + write(*,'(7x,99(F7.3))') logP_logRs(1:logP_num_logRs) + do i = 1, logP_num_logTs + write(*,'(99(F7.3))') logP_logTs(i), logPs(1, 1:logP_num_logRs, i) + end do + end if + + ! just use "not a knot" bc's at edges of tables + ibcxmin = 0; bcxmin(1:logP_num_logTs) = 0 + ibcxmax = 0; bcxmax(1:logP_num_logTs) = 0 + ibcymin = 0; bcymin(1:logP_num_logRs) = 0 + ibcymax = 0; bcymax(1:logP_num_logRs) = 0 + + 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) + if (ier /= 0) then + write(*,*) 'interp_mkbicub_sg error happened for logPs' + call mesa_error(__FILE__,__LINE__) + end if + + end subroutine Read_logPs + + + subroutine eval_ferg_logP (z_in,xh_in,xxc_in,xxo_in,t6_in,r_in,logKap) + double precision z_in,xh_in,xxc_in,xxo_in,t6_in,r_in,logKap + real z,xh,xxc,xxo,t6,r + real logT, logR, logP + + z = real(z_in); xh = real(xh_in); xxc = real(xxc_in) + xxo = real(xxo_in); t6 = real(t6_in); r = real(r_in) + + xxc = xxc; xxo = xxo; xh = xh; z=z ! for now, we are ignoring these + + logT = log10(t6*1e6); + if (logT > logP_logT_max) then + logT = logK_logT_max + end if + if (logT < logP_logT_min) then + logT = logK_logT_min + end if + + logR = log10(R) + if (logR > logP_logR_max) then + logR = logP_logR_max + end if + if (logR < logP_logR_min) then + logR = logP_logR_min + end if + + logP = Find_logP(logR,logT) + if (logP > logK_logP_max) logP = logK_logP_max + + logKap = Eval_lowTemp_logK(logP, logT) + + end subroutine eval_ferg_logP + + + end module ferg_logP diff --git a/kap/preprocessor/src/ferguson.f b/kap/preprocessor/src/ferguson.f90 similarity index 100% rename from kap/preprocessor/src/ferguson.f rename to kap/preprocessor/src/ferguson.f90 diff --git a/kap/preprocessor/src/fixed_metal.f b/kap/preprocessor/src/fixed_metal.f90 similarity index 100% rename from kap/preprocessor/src/fixed_metal.f rename to kap/preprocessor/src/fixed_metal.f90 diff --git a/kap/preprocessor/src/freedman.f b/kap/preprocessor/src/freedman.f90 similarity index 100% rename from kap/preprocessor/src/freedman.f rename to kap/preprocessor/src/freedman.f90 diff --git a/kap/preprocessor/src/kap_support.f b/kap/preprocessor/src/kap_support.f90 similarity index 100% rename from kap/preprocessor/src/kap_support.f rename to kap/preprocessor/src/kap_support.f90 diff --git a/kap/preprocessor/src/opal_type1.f b/kap/preprocessor/src/opal_type1.f index 1c26f1ed9..b9d60487d 100644 --- a/kap/preprocessor/src/opal_type1.f +++ b/kap/preprocessor/src/opal_type1.f @@ -39,11 +39,11 @@ subroutine eval_opal_type1 (z_in,xh_in,t6_in,r_in,logKap,fname,OP_file,dbg_in) real :: z, xh, t6, r, logT6 integer :: i logical :: dbg - + include 'formats' dbg = dbg_in -! dbg = (abs(Z_in - 0.01d0) < 1d-6 .and. abs(xh_in - 0.7d0) < 1d-6 .and. +! dbg = (abs(Z_in - 0.01d0) < 1d-6 .and. abs(xh_in - 0.7d0) < 1d-6 .and. ! > abs(t6_in - 1d0) < 1d-6 .and. abs(r_in - 1d-6) < 1d-12) @@ -51,14 +51,14 @@ subroutine eval_opal_type1 (z_in,xh_in,t6_in,r_in,logKap,fname,OP_file,dbg_in) xh = real(xh_in) t6 = real(t6_in) r = real(r_in) - + if (.false.) then ! DEBUG z = 0.01d0 xh = 0.70d0 t6 = (10d0**5.5d0)*1d-6 r = 1d-4 end if - + do i=1,10 !if (dbg) write(*,2) 'z', i, dble(z) call opacgn93 (z,xh,t6,r,fname,OP_file,logKap) @@ -69,15 +69,15 @@ subroutine eval_opal_type1 (z_in,xh_in,t6_in,r_in,logKap,fname,OP_file,dbg_in) t6 = 10**logT6 !if (dbg) write(*,2) 'retry with larger T', i, logT6 end do - + if (dbg) then !!!!!! this write statement is to "fix" an uninitialized variable bug. !!!!!! disgusting, but I won't dig into the opacgn93 disaster to find the problem. write(*,1) 'eval_opal_type1 logKap', logKap end if - + return - + end subroutine instruct @@ -85,7 +85,7 @@ subroutine instruct c----------------------------------------------------------------------- c This subroutine contains instructions for using the subroutine -c OPACGN93( z, xh, t6, R ) and OPAC(izi,mzin,xh,t6,r). +c OPACGN93( z, xh, t6, R ) and OPAC(izi,mzin,xh,t6,r). c The purpose of these subroutines is to perform 3 or 4 variable c interpolation on log10(kappa). The opacity tables to be interpolated c are known to have somewhat random numerical errors of a few percent. @@ -116,13 +116,13 @@ subroutine instruct c the table indices to be recalculated. A value other than 0 c causes the previous indices to be used. -c mzin The integer value of i of the Z value to use. The +c mzin The integer value of i of the Z value to use. The c choices are: c 1=0.0 2=0.0001 3=0.0003 4=0.001 5=0.002 6=0.004 7=0.01 -c 8=0.02 9=0.03 10=0.04 11=0.06 12=0.08 13=0.1 +c 8=0.02 9=0.03 10=0.04 11=0.06 12=0.08 13=0.1 c c -c An interpolation between overlapping quadratics is used to obtain +c An interpolation between overlapping quadratics is used to obtain c smoothed results. A 4x4 grid in logT6 and logR is used to interpolate c in four different 3x3 sub-grids. Linear interpolation between quadratic c fits in these different sub-grids gives smoothed results in both log T6 @@ -156,21 +156,21 @@ subroutine instruct c ***CAUTION*** c As a result of the mixing procedure used to calculate the data a few c X=0.0, low T-small R, table values fell outside the range of T and R accessible -c from the X=0.35 data directly calculated for this purpose. These T-R +c from the X=0.35 data directly calculated for this purpose. These T-R c locations are filled in with 9.99 (or for diagnostic purposes in some cases c larger values. At the same locations the derivatives are set to 99.9. When -c T-R falls in this region a message is issued by the interpolation code to +c T-R falls in this region a message is issued by the interpolation code to c inform the user of this situation. Presumable very few users will have c applications that take them into this region. -c +c c Your routine that performs the call to OPAC should include the c statement: c c common/e/ opact,dopact,dopacr,dopactd c c These variables have the following meanings: -c -c OPACT Is the Log of the Rosseland mean opacity: Log(kappa) +c +c OPACT Is the Log of the Rosseland mean opacity: Log(kappa) c DOPACT Is Dlog(kappa)/Dlog(T6) at constant R c DOPACR Is Dlog(kappa)/Dlog(R) at constant T c DOPACTD Is Dlog(kappa)/Dlog(T6) at constant Rho @@ -190,7 +190,7 @@ subroutine opacgn93 (z,xh,t6,r,filename,OP_file,logK) logical :: OP_file 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), + 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) @@ -199,7 +199,7 @@ subroutine opacgn93 (z,xh,t6,r,filename,OP_file,logK) c interpolation along log T6. Results smoothed bt mixing c overlapping quadratics. c DOPACT- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics -c at fixed R +c at fixed R c DOPACR- is Dlog(k)/Dlog(R) smoothed by mixing quadratics. c DOPACTD- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics c at fixed rho @@ -233,11 +233,11 @@ subroutine opacgn93 (z,xh,t6,r,filename,OP_file,logK) ilo=2 ihi=mz 8 if(ihi-ilo .gt. 1) then - imd=(ihi+ilo)/2 - if(z .le. za(imd)+1.e-7) then - ihi=imd - else - ilo=imd + imd=(ihi+ilo)/2 + if(z .le. za(imd)+1.e-7) then + ihi=imd + else + ilo=imd endif go to 8 endif @@ -247,23 +247,24 @@ subroutine opacgn93 (z,xh,t6,r,filename,OP_file,logK) m3=i m4=i+1 mfm=m4 -c check whether Z is near a table limit +c check whether Z is near a table limit if((z .le. za(2)+1.e-7) .or. (z .ge. za(mz-1))) mfm=m3 -c Check if Z+X interpolation sums exceed unity at needed indices. -c If so, backup to lower Z indices to perform interpolation. -c This should work OK, due to density of Z-grid points and the -c slow Z variation(except at very small Z) - if(xh+za(mfm) .gt. 1.) mfm=m3 - if(xh+za(mfm) .gt. 1.) then - if(m1 .le. 1) then - write(*,'("special case: X,Z location not covered by" - x ," logic")') - call mesa_error(__FILE__,__LINE__) - endif - m1=m1-1 - m2=m2-1 - m3=m3-1 - endif + +c Check if Z+X interpolation sums exceed unity at needed indices. +c If so, backup to lower Z indices to perform interpolation. +c This should work OK, due to density of Z-grid points and the +c slow Z variation(except at very small Z) + if(xh+za(mfm) .gt. 1.) mfm=m3 + if(xh+za(mfm) .gt. 1.) then + if(m1 .le. 1) then + write(*,'("special case: X,Z location not covered by" + x ," logic")') + call mesa_error(__FILE__,__LINE__) + endif + m1=m1-1 + m2=m2-1 + m3=m3-1 + endif c izi=0 do iz=m1,mfm @@ -276,6 +277,7 @@ subroutine opacgn93 (z,xh,t6,r,filename,OP_file,logK) dkapdtr(iz)=dopact dkapdrt(iz)=dopacr enddo + is=0 iw=1 kapz1=quad(is,iw,zzl,kapz(m1),kapz(m2),kapz(m3) @@ -286,6 +288,11 @@ subroutine opacgn93 (z,xh,t6,r,filename,OP_file,logK) dkapz3=quad(is,iw,zzl,dkapdrt(m1),dkapdrt(m2),dkapdrt(m3) x ,zza(m1),zza(m2),zza(m3)) if (mfm .eq. m3) then + if (kapz1 .le. 0) then + write(*,*) kapz1, kapz(m1),kapz(m2),kapz(m3) + x ,zza(m1),zza(m2),zza(m3), z, zza(mz) + call mesa_error(__FILE__,__LINE__) + endif opact=log10(kapz1) ! converts K to logK dopact=dkapz1 dopacr=dkapz3 @@ -311,7 +318,7 @@ subroutine opacgn93 (z,xh,t6,r,filename,OP_file,logK) dopactd=-3.*dopacr+dopact is=0 logK = opact - return + return end c*********************************************************************** c @@ -334,7 +341,7 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) 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), + 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) @@ -348,7 +355,7 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) c interpolation along log T6. Results smoothed bt mixing c overlapping quadratics. c DOPACT- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics -c at fixed R +c at fixed R c DOPACR- is Dlog(k)/Dlog(R) smoothed by mixing quadratics. c DOPACTD- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics c at fixed rho @@ -380,16 +387,16 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) c this is the first time through. Calculate the decadic c log of the perimeter points shifted by Z. m refers to c xa(m); the hydrogen table value. - + c read the data files call readco(filename,OP_file) xamx1=xa(mx-1) xxmx1=xx(mx-1) dfsxmx1=dfsx(mx-1) endif - - - + + + mxend=mx xa(mx)=1.-z xa(mx-1)=xamx1 @@ -403,7 +410,7 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) xx(mxend)=log10 (0.005+xa(mxend)) c Added 03/03/2016 rjfarmer to fix fpe error dfsx(mxend)=0.d0 - if(xx(mxend).ne.xx(mxend-1))then + if(xx(mxend).ne.xx(mxend-1))then dfsx(mxend)=1./(xx(mxend)-xx(mxend-1)) end if endif @@ -495,12 +502,12 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) if (iadvance .eq. 0) then iadvance=iadvance+1 - mf=mf+1 + mf=mf+1 mg=mg+1 mh=mh+1 mi=mi+1 mf2=mf2+1 - + if((zz(mg,mzin) .ne. zz(mf,mzin)) .or. (zz(mh,mzin) .ne. zz(mf,mzin))) then end if @@ -537,7 +544,7 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) k4=k3+1 k3s=k3+ntb-1 endif - + if (.false.) then ! don't need this because did extrapolate during read do i=14,18 ! allows jagged edge at high T,rho if((l3s .gt. i) .and. (k3s .gt. nta(i+1))) then @@ -552,13 +559,13 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) end if enddo end if - - + + if((zz(mg,mzin) .ne. zz(mf,mzin)) .or. (zz(mh,mzin) .ne. zz(mf,mzin))) then ! the following crap is an attempt to work around a bug ! the standard routine gets confused for gn93, z = 6e-2, x = 0.94 ! don't have the usual number of z tables for that x - ! + ! do i=1,mx if (abs(xh - xa(i)) < 1d-6) then mf = i @@ -569,13 +576,13 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) ip=3 iq=3 ntlimit=nta(l3s) - if((k3. eq. ntlimit) .or. (iop .eq. 0)) then + if((k3. eq. ntlimit) .or. (iop .eq. 0)) then ip=2 iq=2 endif if(t6 .le. t6list(2)+1.e-7) ip=2 - if((l3 .eq. nre) .or. (iop .eq. 0)) then + if((l3 .eq. nre) .or. (iop .eq. 0)) then iq=2 ip=2 endif @@ -585,7 +592,7 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) end if if(slr .le. alr(2)+1.e-7) iq=2 is=0 - + if (ip > ntm-k1) ip = ntm-k1 do ir=l1,l1+iq @@ -629,18 +636,18 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) call mesa_error(__FILE__,__LINE__) end if end if - + do m=mf,max(mf,mf2) ip=3 iq=3 ntlimit=nta(l3s) - if((k3. eq. ntlimit) .or. (iop .eq. 0)) then + if((k3. eq. ntlimit) .or. (iop .eq. 0)) then ip=2 iq=2 endif if(t6 .le. t6list(2)+1.e-7) ip=2 - if((l3 .eq. nre) .or. (iop .eq. 0)) then + if((l3 .eq. nre) .or. (iop .eq. 0)) then iq=2 ip=2 endif @@ -650,7 +657,7 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) end if if(slr .le. alr(2)+1.e-7) iq=2 is=0 - + if (ip > ntm-k1) ip = ntm-k1 do ir=l1,l1+iq @@ -659,11 +666,11 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) is=1 enddo enddo - + enddo - + if((zz(mg,mzin) .ne. zz(mf,mzin)) .or. (zz(mh,mzin) .ne. zz(mf,mzin))) then - write(*,'("Z does not match Z in the file you are using")') + write(*,'("Z does not match Z in the file you are using")') write(*,*) 'l1', l1 write(*,*) 'l1+iq', l1+iq write(*,*) 'k1', k1 @@ -681,10 +688,10 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) write(*,*) 'zz(mh,mzin)', mh, zz(mh,mzin) write(*,*) 'zz(mi,mzin)', mi, zz(mi,mzin) write(*,*) - call mesa_error(__FILE__,__LINE__) + call mesa_error(__FILE__,__LINE__) endif - - + + if(z .ne. zz(mf,mzin)) go to 66 c with return is=0 @@ -736,7 +743,7 @@ subroutine opac (izi,mzin,xh,t6,r,filename,OP_file) c write(*,'("slt,alt(1),alt(nt),slr,alr(1),alr(nre),l3s,i,k3s, c x nta(i+1)",6e12.5,4i5)') slt,alt(1),alt(nt),slr,alr(1), c x alr(nre),l3s,i,k3s,nta(i+1) -c with a return +c with a return call mesa_error(__FILE__,__LINE__) 64 return write(*,'(" X not equal to zero: To run this case it @@ -760,7 +767,7 @@ subroutine t6rinterp(slr,slt) . ,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), + 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) @@ -805,7 +812,7 @@ subroutine t6rinterp(slr,slt) opact=opact*dix+opact2*(1.-dix) endif if(iq .eq. 3) then - + c k and Dlog(k)/Dlog(T6) in upper-right 3x3. !write(*,*) 'k2', k2 !write(*,*) 'k3', k3 @@ -865,7 +872,7 @@ subroutine t6rinterp(slr,slt) dopactd=dopact-3.*dopacr if (opact .gt. 1.e+15) then write(*,'("Interpolation indices out of range", - x ";please report conditions.")') + x ";please report conditions.")') call mesa_error(__FILE__,__LINE__) endif if (opact .gt. 9.) then @@ -889,7 +896,7 @@ subroutine readco(filename,OP_file) character(len=250) dumarra character (len=*) :: filename common/aa/ q(4),h(4),xxh - common/a/ mzz, xz(mx,mz,nt,nr), + 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) @@ -897,7 +904,7 @@ subroutine readco(filename,OP_file) . 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/alink/ NTEMP,NSM,nrlow,nrhigh,RLE,t6arr(100),xzff(100,nr) COMMON/CST/NRL,RLS,nset,tmax ! modified @@ -905,7 +912,7 @@ subroutine readco(filename,OP_file) if (itimeco .ne. 12345678) then do i=1,mx !write(*,*) 'n(i)', i, n(i), xa(i) - do j=1,mz + do j=1,mz do k=1,nt do l=1,nr xz(i,j,k,l)=1.e+35 @@ -939,7 +946,7 @@ subroutine readco(filename,OP_file) read(2,*) read(2,*) read(2,*) - ! this needed to be changed to match OP data that has an extra space before the R's. + ! this needed to be changed to match OP data that has an extra space before the R's. read(2,'(6x)',advance='no') read(2,*) (alrf(kk),kk=1,nrm) !do k=1,nrm @@ -976,12 +983,12 @@ subroutine readco(filename,OP_file) exit end if end do - if (ierr == 0) read(2,*) + if (ierr == 0) read(2,*) alt(k)=alt(k)-6. if (isett6 .ne. 1234567) then t6listf(k)=10.**alt(k) t6arr(k)=t6listf(k) - endif + endif do ll=1,nrm ! modified xzff(k,ll)=xzf(k,ll) enddo @@ -992,7 +999,7 @@ subroutine readco(filename,OP_file) tmax=10. ! modified nset=65 RLS=-8. - nsm=1 + nsm=1 RLE=1. nrlow=1 nrhigh=2*(RLE-RLS)+1 @@ -1023,7 +1030,7 @@ subroutine readco(filename,OP_file) 2 continue 3 continue - + do 12 i=2,nt 12 dfs(i)=1./(alt(i)-alt(i-1)) do 13 i=2,nr @@ -1073,7 +1080,7 @@ function quad(ic,i,x,y1,y2,y3,x1,x2,x3) 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), + 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) @@ -1096,7 +1103,7 @@ subroutine opaltab C C OPAL DATA. C ASSUMES FIRST T6=0.006, LAST T6=10.OR 0.04). Depending on position -C in the table. +C in the table. C USES RECTANGULAR ARRAY FOR VARIABLES T6 AND LOG10(R) C C (1) NSM=NUMBER OF PASSES THROUGH SMOOTHING FILTER. @@ -1130,7 +1137,7 @@ subroutine opaltab COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR) CHARACTER(len=100) HEAD COMMON/CST/NRL,RLS,nset,tmax ! modified - common/alink/ N,NSM,nrlow,nrhigh,RLE,t6arr(100),xzff(100,nr) + common/alink/ N,NSM,nrlow,nrhigh,RLE,t6arr(100),xzff(100,nr) LOGICAL IERR C @@ -1575,7 +1582,7 @@ SUBROUTINE SMOOTH + 0.0277551020,-0.0416326531,-0.0069387755/ C C - DO 20 I=3,nset-2 + DO 20 I=3,nset-2 C J=1 FXY(I,J)= diff --git a/kap/preprocessor/src/plot.f b/kap/preprocessor/src/plot.f deleted file mode 100644 index b7a37a3fd..000000000 --- a/kap/preprocessor/src/plot.f +++ /dev/null @@ -1,169 +0,0 @@ - program plot_kap_builder - - use kap_support - - implicit none - - call Build_Plots - - - contains - - - subroutine Build_Plots - - !logical, parameter :: co_enhanced = .true. - 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 - - enddo - - enddo - - 01 format(E30.22) - - - - ! write out the results - do j=1,logT_points - write(io_tmp,01) logT_min + dlogT*(j-1) - end do - close(io_tmp) - - do i=1,logR_points - write(ioR,01) logR_min + dlogR*(i-1) - enddo - 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 - 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 89032d3cd..000000000 --- a/kap/preprocessor/xcotrin21.f +++ /dev/null @@ -1,1733 +0,0 @@ - subroutine instruct -c-----VERSION of November 20, 1995----------------------------------------- -c----------------------------------------------------------------------- -c -c This subroutine contains instructions for using the subroutine -c OPAC( z, xh, xxc, xxo, t6, r ). -c The purpose of the subroutine OPAC is to perform 4 or 5 variable -c interpolation on log10(kappa). The opacity tables to be interpolated -c are known to have somewhat random numerical errors of a few percent. -c Consequently, adjusting the data prior to performing the interpolation -c is justified at this level. The code first reads the original(unsmoothed) -c tabular data, this data is then passed through a smoothing filter; using -c a set of routines developed by Mike Seaton (see M.J. Seaton,MNRAS 265, -c L25,1993). It is the adjusted data that is actually used in carrying out the -c interpolations in OPAC. Steps are taken, as described below to insure -c that the interpolated data is also smooth. The initial adjustment step -c helps improve the smoothness of the OPAC output,particularly at the -c smallest values of R. The medium to large R output is only slightly -c effected by this step. It takes only a few seconds to carryout the initial -c data smoothing step. This step can be skipped by setting the parameter -c ismdata=1 in subroutine readco. - -c The interpolation variables are : - -c xh The hydrogen mass fraction, X -c xxc The enhanced carbon mass fraction, delta Xc. -c The total C mass fraction, Xc, is the sum of the initial -c amount included in the metal mass fraction, Z, and -c delta Xc -c xxo The enhanced oxygen mass fraction, delta Xo -c t6 The temperature in millions of degrees Kelvin, T6 -c r =rho(gm/cc)/T6**3, R -c -c Additional input to OPAC is: -c -c z The metallicity, Z -c -c An interpolation between overlapping quadratics is used to obtain -c smoothed results. A 4x4 grid in logT6 and logR is used to interpolate -c in four different 3x3 sub-grids. Linear interpolation between quadratic -c fits in these different sub-grids gives smoothed results in both log T6 -c and Log R directions. This procedure produces results that are similar -c to bicubic spline interpolation, but require storage of only local -c information. -c Each of the individual tables in a file Gx**x**z covers 70 temperatures -c in the range logT=3.75[T6=0.0056341325]( referred to as temperature 1) to -c logT=8.7[T6=501.187] and 19 values of log R in the range -8 (referred to as 1) -c to +1; at half-integer steps. (NOTE: earlier tables were explicitly in -c terms of T6. For convenience the present tables tabulate log Kappa vs logT. The -c interpolation however still uses T6 for the temperature variable) -c For specialized problems, if storage space is a problem, a reduced set of -c data can be input . This requires a recompilation with altered parameter -c values. In order to limit the range of R, set the parameter nrb= index of -c lowest value of log R to use(count from log R=-8). Then set the parameter -c nre to the index of the largest value of log R to use. (NOTE: nre-nrb must -c be at least 5). To ignore the first ntb-1 values of T6 (starting from -c temperature 1) set the parameter ntb to desired value. No other parameters -c should be modified. -c A five variable interpolation is done when X is greater than 0. In this -c case it is assumed that variable values of X are also needed. We have provided -c sets of tables for X=0, 0.03, 0.1, 0.35 and 0.7, for each of the metallicities -c 0.0,0.001, 0.004,0.01,0.02,0.03,05 and .1. The five sets of tables associated with -c a particular value of Z (eg. Gx0z01, Gx03x01,Gx10z01, Gx35z01, -c Gx70z01) should be placed in files named codataa, codatab, codatac, codatad, -c and codatae, respectively. To create storage for this data the routines must -c be recompiled with the parameter mx=5. Again if storage is a problem the T6 -c and log R ranges can be restricted. This version of the interpolation routine -c does not interpolate in Z. Values of Z not in the table can be obtained by -c interpolating the existing tables to produce similar tables for the Z of interest. -c Interpolation in xh,xxo,xxc,t6, and r can be obtained as just described -c A 4 variable interpolation in xxc, xxo, t6 and r is performed in the special -c case X=0. The set of 60 data tables in (xxc,xxo) for a given Z that have -c been provided for X=0 should be placed in a file called 'codataa'. This file -c will be read from unit 2 in the subroutine readco. In this special case the -c set of routines provided should be compiled with the parameter mx=1 (there are -c 4 occurrences). (NOTE: The version of the code described above, intended -c for X> 0, also handles this case, but takes more storage space since mx=5). -c If you want to work with a single value of X which is not zero, i.e., -c X=0.03, 0.1, 0.35, or 0.70, then compile the code with mx=1 but change the statement -c -c data (xa(i), i=1,5 )/0.0, 0.03, 0.1, 0.35, 0.7/ -c -c If for example you want to use only the table for X=.70, then -c -c data (xa(i), i=1,5 )/0.70, 0.03, 0.1, 0.35, 0.0/ -c -c You also need to place the tables for X=0.7 into a file named -c codataa. -c ***CAUTION*** -c As a result of the mixing procedure used to calculate the data a few -c X=0.0, low T-small R, table values fell outside the range of T and R accessible -c from the X=0.35 data directly calculated for this purpose. These T-R -c locations are filled in with 9.99 (or for diagnostic purposes in some cases -c larger values. At the same locations the derivatives are set to 99.9. When -c T-R falls in this region a message is issued by the interpolation code to -c inform the user of this situation. Presumable very few users will have -c applications that take them into this region. -c -c Your routine that performs the call to OPAC should include the -c statement: -c -c common/e/ opact,dopact,dopacr,dopactd -c -c These variables have the following meanings: -c -c OPACT Is the Log of the Rosseland mean opacity: Log(kappa) -c DOPACT Is Dlog(kappa)/Dlog(T6) ! at constant R -c DOPACTD Is Dlog(kappa)/Dlog(T6) ! at constant density -c DOPACR Is Dlog(kappa)/Dlog(R), ! at constant T6 -c - dum=0.0 - return - end -c -c*********************************************************************** - subroutine opac (z,xh,xxc,xxo,t6,r) -c..... The purpose of this subroutine is to interpolate log kappa -c and obtain smooth derivatives. -c in C/O abundance and in T6, R,i.e. (xc,xo,T6,R) -c xxc=Xc=carbon mass fraction -c xxo=Xo=oxygen mass abundance -c t6=T6=temperature in millions of degrees kelvin -c r=R=density(g/cm**3)/T6**3 -c..... to use opac insert common/e/ in the calling routine. -c This common contains interpolated values for kappa and its -c first derivities. -c - 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 -c..... OPACT- opacity obtained from a quadraric interpolation at -c fixed log T6 at three values of log R; followed by quadratic -c interpolation along log T6. Results smoothed by mixing -c overlapping quadratics. -c..... DOPACT- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics. -c..... DOPACR- is Dlog(k)/Dlog(R) smoothed by mixing quadratics. - common/e/ opact,dopact,dopacr,dopactd - common/recoin/ itimeco,mxzero -c -c..... INDEX refers to the index,i, of xc(i) or xo(i); xc(i) and xo(i) -c are the abundance grid points. - iop=1 ! provides smoothed interpolations; iop=0 gives no smoothing - if(nr .lt. 6) go to 65 - if((xh .gt. 1.e-6) .and. (mx .lt.4)) go to 64 -c -c..... set-up C/O axis points - xxco=xxc+xxo - if(z+xh+xxco-1.e-6 .gt. 1 ) go to 61 - zzz=z+0.001 - xxh=xh - xxci=xxc - xxoi=xxo - xxi=xh - t6i=t6 - ri=r -c -c..... 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) - -c..... set X indices - ilo=2 - ihi=mx - 8 if(ihi-ilo .gt. 1) then - imd=(ihi+ilo)/2 - if(xh .le. xa(imd)+1.e-7) then - ihi=imd - else - ilo=imd - endif - go to 8 - endif - i=ihi - mf=i-2 - mg=i-1 - mh=i - mi=i+1 - mf2=mi - istep1=1 - if (mx .gt. 1) then - istep1=mx-1 - if((xh .le. xa(2)+1.e-7) .or. (xh .ge. xa(istep1)-1.e-7)) mf2=mh - endif -c - if ((mx .eq. 1) .or. (xh .lt. 1.e-6)) then - mf=1 - mg=1 - mh=1 - mi=2 - mf2=1 - endif - - if (itime(1) .ne. 12345678) then - alr(1)=-8.+(nrb-1)*0.5 - do i=2,nr - alr(i)=alr(i-1)+0.5 - enddo - alt(1)=-2.25+(ntb-1)*0.05 - do i=ntb+1,46 - alt(i)=alt(i-1)+.05 - enddo - ntd=47 - if ((ntb +1) .gt. 47) ntd=ntb+1 - do i=ntd,68 - alt(i)=alt(i-1)+.1 - enddo - do i=68,70 - alt(i)=alt(i-1)+.2 - enddo - do i=1,nt - t6list(i)=10.**alt(i) - enddo - endif - ilo=2 - ihi=nr - 12 if(ihi-ilo .gt. 1) then - imd=(ihi+ilo)/2 - if(slr .le. alr(imd)+1.e-7) then - ihi=imd - else - ilo=imd - endif - go to 12 - endif - i=ihi - l1=i-2 - l2=i-1 - l3=i - l4=l3+1 -c - ilo=2 - ihi=nt - 11 if(ihi-ilo .gt. 1) then - imd=(ihi+ilo)/2 - if(t6 .le. t6list(imd)+1.e-7) then - ihi=imd - else - ilo=imd - endif - go to 11 - endif - i=ihi - k1=i-2 - k2=i-1 - k3=i - k4=k3+1 - k3s=k3+ntb-1 - l3s=l3+nrb-1 - -c-----set-up indices to skip when low T&R data missing for X=0. - kmin=0 - k1in=k1 - iadvance=0 - mfin=mf - if ((mfin .eq. 1) .and. (co(1,1,1,k1,l1) .gt. 9.)) then! data missing - do i=1,6 - if (co(1,1,1,i,l1) .gt. 9.) then - if (xh .lt. .1) then - kmin=i+1 - else - - if (iadvance .eq. 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 - endif - endif - endif - enddo - if ((iadvance .eq. 0) .and. (k1 .le. kmin) .and. - x (slt .le. alt(kmin))) then - k1=kmin - if ((co(1,1,1,kmin,l1+1) .lt. 9.) .and. - x ((slr+.01) .gt. alr(l1+1))) then - l1=l1+1 - kmin=0 - k1=k1in - do i=1,6 - if (co(1,1,1,i,l1) .gt. 9.) kmin=i+1 - enddo - if ((kmin .ne. 0) .and. (k1in .lt. kmin)) k1=kmin - endif - endif - if ((slt+.001) .lt. alt(k1)) then - write (*,'("OPAL data not available for X=", f7.5," logT6=", f7.3, - x " logR=",f7.3)') xh,slt,slr - opact=30. - dopact=99. - dopacr=99. - dopactd=99. - return - endif - 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 - endif -c-----end of check for missing data - do 123 m=mf,mf2 - if(mx .ge. 4) then -c..... C and O fractions determined by the ray through the origin that -c also passes through the point (Xc,Xo). Specific interpolation -c values determined by tabulated X values;i.e. xa(m). Inter- -c polation along the ray gives log (kappa(Xc,Xo)). (Advantage -c of method: keeps indices within table boundaries) -c Subtract Z to prevent out-of-range C+O values for small X - if(1.-xh-z.gt.1.e-6)then - cmod=(1.-xa(m)-z)/(1.-xh-z) - else - cmod=0. - endif - xxc=cmod*xxci - xxo=cmod*xxoi - cxx=log10(zzz+xxc) - oxx=log10(zzz+xxo) - endif -c 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) -c if(xcs(i) .ge. xhe-1.e-6) then - if(xcs(i) .gt. xhe) then - xc(i)=xhe - xo(i)=xhe - go to 3 - endif - enddo - 3 continue -c - if(itime(m) .ne. 12345678) then - itime(m)=12345678 - mxzero=0 - do i=1,mx - xx(i)=log10(0.005+xa(i)) - if(xa(i) .eq. 0.0) mxzero=i - enddo -c..... this is the first time through this m. Calculate the decadic -c log of the perimeter points shifted by Z+0.001(to avoid divergence -c at origin); m refers to xa(m); the hydrogen table value. -c -c 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)) - enddo -c -c 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) - enddo -c -c.....read the data files - call readco - endif -c - 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) - enddo -c -c..... Determine log R and log T6 grid points to use in the -c interpolation. - if((slt .lt. alt(1)).or.(slt .gt. alt(nt))) go to 62 - if((slr .lt. alr (1)).or.(slr .gt. alr(nr))) go to 62 -c - if (m .eq. mf) then ! calculate table indices -c - if((mf2 .ne. mxzero) .and. (k3s .gt. ntm)) go to 62 - do i=14,18 - if((l3s .gt. i) .and. (k3s .gt. nta(i+1))) go to 62 - enddo - ip=3 - iq=3 - ntlimit=nta(l3s) - if((k3s .eq. ntlimit) .or. (iop .eq. 0)) then - ip=2 - iq=2 - endif - if(t6 .le. t6list(2)+1.e-7 .or. iop .eq. 0) ip=2 - - if((l3 .eq. nr) .or. (iop .eq. 0)) then ! right edge of full table - iq=2 - ip=2 - endif - if(slr .le. alr(2)+1.e-7 .or. iop .eq. 0) iq=2 - endif -c - xodp=max(-xxc+xc(nc),0.) - xcdp=max(-xxo+xo(no),0.) - is=0 -c - call cointerp(xxc,xxo) - 123 continue - - if((zz(mg,1) .ne. zz(mf,1)) .or. (zz(mh,1) .ne. zz(mf,1))) then - write(*,'("Z does not match Z in codata* files you are" - x ," using")') - stop - endif - if(z .ne. zz(mf,1)) go to 66 - xxc=xxci ! restores input value; necessary if stop replaced -c with return - xxo=xxoi ! restores input value - is=0 - iw=1 - do 45 ir=l1,l1+iq - do 46 it=k1,k1+ip - if((mx .eq. 1) .or. (mf2 .eq. 1)) then - opk(it,ir)=opl(mf,it,ir) - go to 46 - endif - opk(it,ir)=quad(is,iw,xxx,opl(mf,it,ir),opl(mg,it,ir) - x ,opl(mh,it,ir),xx(mf),xx(mg),xx(mh)) - is=1 - 46 continue - 45 continue - - if (mi .eq. mf2) then ! interpolate between quadratics - is=0 - iw=1 - dixr=(xx(mh)-xxx)*dfsx(mh) - do 47 ir=l1,l1+iq - do it=k1,k1+ip - opk2(it,ir)=quad(is,iw,xxx,opl(mg,it,ir),opl(mh,it,ir) - x ,opl(mi,it,ir),xx(mg),xx(mh),xx(mi)) - opk(it,ir)=opk(it,ir)*dixr+opk2(it,ir)*(1.-dixr) - is=1 - enddo - 47 continue -c interpolate X between two overlapping quadratics - endif - is=0 -c -c..... completed H,C,O interpolation. Now interpolate T6 and log R on a -c 4x4 grid. (log(T6(i)),i=i1,i1+3),log(R(j)),j=j1,j1+3)).Procedure -c mixes overlapping quadratics to obtain smoothed derivatives. -c - call t6rinterp(slr,slt) - return -c - 61 write(*,'(" Mass fractions exceed unity")') - xxc=xxci ! restores input value; required if stop replaced -c 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 -c 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 - -c************************************************************************ - subroutine cointerp(xxc,xxo) -c The purpose of this subroutine is to interpolate in C and O abund- -c 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 .lt. 1.e-6) then - do ir=l1,l1+iq - do it=k1,k1+ip - opl(m,it,ir)=co(m,1,1,it,ir) - enddo - enddo - is=1 - go to 123 - endif -c include boundaries that could later cause division by 0! - if(xxc .gt. xcd(3)-1.e-6) then -c__________ - oxdp=log10(zzz+xodp) -c handle possibility that xodp=0 - fac=max(min((oxx-ox(1))/max(oxdp-ox(1),1.e-6),1.),0.) - do 40 ir=l1,l1+iq - do 41 it=k1,k1+ip -c -c interpolation in region c1 -c -c include boundaries that could later cause division by 0! - if(xxc .gt. 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) - enddo -c handle possibility that xodp=0 - opl(m,it,ir)=b(1)+(b(2)-b(1))*fac - is=1 - go to 41 - endif -c interpolation in region c2 -c - 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) - enddo - iw=iw+1 - opl(m,it,ir)=quad(is,iw,oxx,b(1),b(2),b(3),ox(1),ox(2),oxdp) - is=1 - 41 continue - 40 continue - if(is .eq. 1) go to 123 -c__________ - endif -c -c interpolation in region c3 to c6 - is=0 -c - if(nc .ge. 5) then -c__________ - do 44 i=4,nc-1 -c do not go beyond middle (where c3-c6 overlaps o3-o6), and - if((xxc .gt. xcd(i)-1.e-6) .and. (xxo .gt. xo(i-1)-1.e-6) .and. - $ (xcd(i-1) .gt. xc(i-1))) then - do 42 ir=l1,l1+iq - do 43 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 - x ,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 - x ,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), - x diag(m,i,it,ir),cxd(m2),cxd(m1),cxd(i)) - do w=1,3 - b(w)=a(w,m) - enddo - 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 - 43 continue - 42 continue - if (is .eq. 1) go to 123 - endif - 44 continue -c__________ - endif -c - if (is .eq. 1) go to 123 -c -c include boundaries that could later cause division by 0! - if(xxo .gt. xod(3)-1.e-6) then -c__________ - cxdp=log10(zzz+xcdp) -c handle possibility that xcdp=0 - fac=max(min((cxx-cx(1))/max(cxdp-cx(1),1.e-6),1.),0.) - do 140 ir=l1,l1+iq - do 141 it=k1,k1+ip -c -c interpolation in region o1 -c -c include boundaries that could later cause division by 0! - if(xxo .gt. 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) - enddo -c handle possibility that xcdp=0 - opl(m,it,ir)=b(1)+(b(2)-b(1))*fac - is=1 - go to 141 - endif -c interpolation in region o2 -c - 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) - enddo - iw=iw+1 - opl(m,it,ir)=quad(is,iw,cxx,b(1),b(2),b(3),cx(1),cx(2),cxdp) - is=1 - 141 continue - 140 continue - if(is .eq. 1) go to 123 -c__________ - endif -c -c interpolation in region o3 to o6 - is=0 - if(no .ge. 5) then -c__________ - do 144 i=4,no-1 -c do not go beyond middle (where o3-o6 overlaps c3-c6), and - if((xxo .gt. xod(i)-1.e-6) .and. (xxc .gt. xc(i-1)-1.e-6) .and. - $ (xod(i-1) .gt. xo(i-1)-1.e-6)) then - do 142 ir=l1,l1+iq - do 143 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) - enddo - iw=iw+1 - opl(m,it,ir)=quad(is,iw,cxx,b(1),b(2),b(3),cx(m2),cx(m1),cxdp) - is=1 - 143 continue - 142 continue - if (is .eq. 1) go to 123 - endif - 144 continue -c__________ - endif -c - if (is .eq. 1) go to 123 -c -c.....find index of C grid. - 52 ie=100*xxc+1 - iei=index(ie)+1 -c must also allow index = nc, to avoid extrapolation - if (iei .gt. nc) iei=nc -c - if(iei .gt. 3) then - i1=iei-2 - i2=iei-1 - i3=iei - else - i1=1 - i2=2 - i3=3 - endif -c -c.....find index of O grid - ie=100*xxo+1 - iej=index(ie)+1 -c must also allow index = no, to avoid extrapolation - if (iej .gt. no) iej=no -c - if(iej .gt. 3) then - j1=iej-2 - j2=iej-1 - j3=iej - else - j1=1 - j2=2 - j3=3 - endif -c -c lower-O part of grid: interpolate C before O - if(j3.lt.no .and. i3.le.n(m,j3) .and. - $ (xxc.lt.xcd(j3)+1.e-6 .or. xxc.ge.xxo))then - do 20 ir=l1,l1+iq - do 21 it=k1,k1+ip - iw=0 - do jx=j1,j1+2 - iw=iw+1 -c 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), - x co(m,i3,jx,it,ir),cx(i1),cx(i2),min(cx(i3),cxd(jx))) - enddo - do w=1,3 - b(w)=a(w,m) - enddo - 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 - 21 continue - 20 continue -c 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.lt.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)) - endif - enddo - do w=1,3 - b(w)=a(w,m) - enddo - 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 - enddo - enddo - endif - 123 continue - return - end - -c*********************************************************************** - subroutine t6rinterp(slr,slt) -c 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 -c - 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), - x 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), - x alr(l2),alr(l3),alr(l4)) - endif - is=1 - enddo -c - is=0 - iw=1 -c..... 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 -c..... 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 - endif - if(ip .eq. 3) then -c..... 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 -c..... 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 .eq. 3) then - -c..... 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) - endif - endif -c - 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), - x alt(k1),alt(k2),alt(k3)) - if(ip .eq. 3) then - iw=2 - q(iu)=quad(is,iw,slt,opk(k2,lx),opk(k3,lx),opk(k4,lx), - x alt(k2),alt(k3),alt(k4)) - endif - is=1 - enddo -c - is=0 - iw=1 -c..... 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 .eq. 3) then - opacrq=quad(is,iw,slr,q(1),q(2),q(3),alr(l1),alr(l2),alr(l3)) -c..... k and Dlog(k)/Dlog(R) in upper-left 3x3. - dopacrq=dkap - endif - if(iq .eq. 3) then -c..... 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) -c..... 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) - endif - if(ip .eq. 3) then - if(iq .eq. 3) then -c..... 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)) -c..... Dlog(k)/Dlog(R) smoothed in both log(T6) and Log(R). - dopacrq=dopacrq*dix2+dkap*(1.-dix2) - endif - dopacr=dopacr*dix+dopacrq*(1.-dix) - endif - dopactd=dopact-3.*dopacr - if (opact .gt. 1.e+15) then - write(*,'("Interpolation indices out of range", - x ";please report conditions.")') - stop - endif - if (opact .gt. 9) then - opact=30. - dopact=99. - dopactr=99. - dopactd=99. - endif - return - end - -c************************************************************************ - subroutine readco -c..... 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*1 dumarra(250) - common/recoin/ itimeco,mxzero -c - if (itimeco .ne. 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 - enddo - enddo - enddo - enddo - enddo - 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 - enddo - enddo - enddo - enddo - itimeco=12345678 - endif - do 20 j=1,nc-1 - do 21 i=1,nc - if(xcd(j) .ge. xc(i)) then - n(m,j)=i+1 - if(xcd(j) .lt. xc(i)+1.e-6) n(m,j)=i - endif - 21 continue - 20 continue - n(m,nc)=0 -c - close (2) -c..... read X=0.0 tables - if(m .eq. 1) open(2, FILE='codataa') -c..... read X=0.03 tables - if(m .eq. 2) open(2, FILE='codatab') -c..... read X=0.10 tables - if(m .eq. 3) open(2, FILE='codatac') -c..... read X=0.35 tables - if(m .eq. 4) open(2, FILE='codatad') -c.....read X=0.70 tables - if(m .eq. 5) open(2, FILE='codatae') -c -c read header - read(2,'(a)') (dumarra(i),i=1,240) -c - int=0 - do 1 j=1,no-1 - do 2 i=1,n(m,j) - int=int+1 -c - read(2,'(f10.5)') dum - read (2,'(7x,i3,26x,f6.4,3x,f6.4,3x,f6.4,5x,f6.4,5x,f6.4)') - x 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) - enddo - enddo - if (isett6 .ne. 1234567) then - do k=1,ntm - t6arr(k)=t6list(k) - enddo - endif - isett6=1234567 - - if (ismdata .eq. 0) then - if ((nrm .ne. nr) .or. (ntm .ne. nt)) then - write (*,'("Not set up to smooth data with reduced ", - x "T-Rho grid")') - stop - endif - 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 - endif - - ll=1 - do 110 kk=nrb,nre - alr(ll)=alrf(kk) - do k=1,nt - if (ismdata .eq. 0) then - if ((m .eq. 1) .and. (k .le. 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) - endif - else - co(m,i,j,k,ll)=coff(k+ntb-1,kk) - endif - enddo - 110 ll=ll+1 - 2 continue - 1 continue - if(x(m,1) .ne. xa(m)) then - write(*,'(" X in the codata? file does not match xa(m)")') - stop - endif -c - 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) - enddo - enddo - enddo -c - do 6 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)') - x 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) -c set up to smooth final "diago" opacity tables - do l=1,nrm - coff(k,l)=cof(k,l) - enddo - enddo -c smooth final "diago" opacity tables too! - if (ismdata .eq. 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 -c Following skip required because, due to missing data, -c the X=0 low T data cannot be smoothed - if ((m .eq. 1) .and. (k .le. 9)) then - cof(k,ll)=cof(k,ll) - else - cof(k,ll)=coff(k,ll) - endif - - enddo - enddo - ll=1 - do kk=nrb,nre - do k=1,nt - diago(m,j,k,ll)=cof(k+ntb-1,kk) - enddo - ll=ll+1 - enddo - endif - 6 continue - - do i=2,nt - dfs(i)=1./(alt(i)-alt(i-1)) - enddo - do i=2,nr - dfsr(i)=1./(alr(i)-alr(i-1)) - enddo - istep=-1 - if (mx .gt. 1 ) then - istep=1 - do i=2,mx,istep - dfsx(i)=1./(xx(i)-xx(i-1)) - enddo - endif - return - end -c -c************************************************************************ - function quad(ic,i,x,y1,y2,y3,x1,x2,x3) -c..... 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 .eq. 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) - endif - 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) - return - end -c -c************************************************************************ - 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/,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 - -C********************************************************************* - SUBROUTINE SPLINE(X,Y,N,Y2) - PARAMETER (NMAX=100) - DIMENSION X(N),Y(N),Y2(N),U(NMAX) -C -C 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))) -C - Y2(1)=-0.5 - U(1)=(3./(X(2)-X(1)))*((Y(2)-Y(1))/(X(2)-X(1))-YP1) - DO 11 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 -11 CONTINUE - 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 12 K=N-1,1,-1 - Y2(K)=Y2(K)*Y2(K+1)+U(K) -12 CONTINUE - RETURN - END -C********************************************************************* - SUBROUTINE SPLINT(XA,YA,N,Y2A,X,Y,YP) - DIMENSION XA(N),YA(N),Y2A(N) - KLO=1 - KHI=N -1 IF (KHI-KLO.GT.1) THEN - K=(KHI+KLO)/2 - IF(XA(K).GT.X)THEN - KHI=K - ELSE - KLO=K - ENDIF - GOTO 1 - ENDIF - H=XA(KHI)-XA(KLO) - IF (H.EQ.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 -C********************************************************************* - SUBROUTINE FITY -C -C THIS ROUTINE MAKES SPLINE FITS FOR F AND FX, AND OBTAINS -C FY AND FXY -C -C - COMMON/CST/NRL,RLS,nset,tmax ! modified -C - 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) -C - DO 30 I=1,nset ! modified - DO 10 J=1,NRL - A(J)=F(I,J) - B(J)=FX(I,J) - 10 CONTINUE -C - CALL GETD(A,NRL,AD,AP1,APN) - CALL GETD(B,NRL,BD,BP1,BPN) -C - FY(I,1)=AP1 - FY(I,NRL)=APN - FXY(I,1)=BP1 - FXY(I,NRL)=BPN - DO 20 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) - 20 CONTINUE - 30 CONTINUE -C - RETURN - END -C********************************************************************* - SUBROUTINE FITX -C -C THIS ROUTINE IS USED ONLY AFTER SMOOTHING. -C ITS FUNCTION IS TO RECOMPUTE FX USING SMOOTHED F. -C -C - PARAMETER(IPR=20) - DIMENSION A(85),D(85) -C - COMMON/CST/NRL,RLS,nset,tmax ! modified - COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR) -C - DO 30 J=1,NRL - DO 10 I=1,nset ! modified - A(I)=F(I,J) - 10 CONTINUE - CALL GETD(A,nset,D,AP1,APN) ! modified - FX(1,J)=AP1 - FX(nset,J)=APN ! modified - DO 20 I=2,nset-1 ! modified - FX(I,J)=-A(I)+A(I+1)-2.*D(I)-D(I+1) - 20 CONTINUE - 30 CONTINUE -C - RETURN - END -C -C************************************************************************ - SUBROUTINE GETD(F,N,D,FP1,FPN) -C -C SIMPLIFIED CODE FOR SPLINE COEFFICIENTS, FOR CASE OF INTERVALS -C OF UNITY. -C -C - DIMENSION F(N),D(N),T(85) -C - 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. -C - D(1)=-.5 - T(1)=.5*(-F(1)+F(2)-FP1) -C - DO 10 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)) - 10 CONTINUE -C - D(N)=(FPN+F(N-1)-F(N)-T(N-1))/(2.+D(N-1)) -C - DO 20 J=N-1,1,-1 - D(J)=D(J)*D(J+1)+T(J) - 20 CONTINUE -C - RETURN - END -C -C********************************************************************* - SUBROUTINE INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR) -C -C GIVEN F,FX,FY AND FXY ON THE GRID POINTS, THIS ROUTINE -C DOES BI-CUBIC INTERPOLATIONS USING METHODS DESCRIBED IN -C Numerical Recipes, PP. 118 TO 120 -C -C - PARAMETER(IPR=20) - COMMON/CF/ F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR) - DIMENSION B(16) - LOGICAL IERR -C - COMMON/CST/NRL,RLS,nset,tmax ! modified -C -C EXTREME LIMITS ALLOWED ARE:- -C (3.800-0.0125) TO (8.000+0.0125) FOR LOG10(T) -C (RLS-0.125) TO (RLE+0.1254) FOR LOG10(R) -C (ALLOWING FOR SMALL EXTRAPOLATIONS BEYOND TABULAR VALUES) -C -C FUNCTION DEFINITIONS FOR CUBIC EXPANSION -C - 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))) ))) -C - 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)))) )) -C - 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)))) )) -C - 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)) )) -C -C - IERR=.FALSE. -C - X=20.*(FLT-3.800)+1 - FLR=FLRHO+18.-3.*FLT - Y=2*( FLR - RLS )+1 -C - IF(X.LT.2.)THEN - IF(X.LT.0.75)THEN - IERR=.TRUE. - ELSE - I=1 - ENDIF - ELSEIF(X.GT.84)THEN - IF(X.GT.85.25)THEN - IERR=.TRUE. - ELSE - I=84 - ENDIF - ELSE - I=X - ENDIF - U=X-I -C - IF(Y.LT.2.)THEN - IF(Y.LT.0.75)THEN - IERR=.TRUE. - ELSE - J=1 - ENDIF - ELSEIF(Y.GT.NRL-1)THEN - IF(Y.GT.NRL+.25)THEN - IERR=.TRUE. - ELSE - J=NRL-1 - ENDIF - ELSE - J=Y - ENDIF - V=Y-J -C - IF(IERR)THEN - G=9.999 - DGDT=9.999 - DGDRHO=9.999 - RETURN - ENDIF -C -C -C 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) -C - 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) -C - 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) -C - 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) -C -C GET G=LOG10(ROSS), DGDT=d LOG10(ROSS)/d LOG10(T), -C 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) -C -C - RETURN - END - -C********************************************************************* - SUBROUTINE SMOOTH -C -C THIS SUBROUTINE USES A 2-DIMENSIONAL GENERALISATION OF THE SMOOTHING -C TECHNIQUES DESCRIBED ON PP. 644 TO 649 OF Numerical Recipes. -C -C CONSIDER THE 25 POINTS DEFINED BY -C I+n, n=-2,-1,0,1,2 AND J+m, m=-2,-1,0,1,2. -C THE FUNCTION TO BE SMOOTHED IS FITTED TO A BI-CUBIC, INVOLVING -C 16 COEFFICIENTS, USING TECHNIQUES OF LEAST-SQUARES. THE SMOOTHED -C FUNCTION (TEMPORARILY STORED IN FXY) IS GIVEN BY THE FITTED VALUE -C AT THE POINT I AND J. -C -C THE FITTING IS SHIFTED FOR POINTS CLOSE TO BOUNDARIES. -C -C - PARAMETER(IPR=20) -C - COMMON/CST/NRL,RLS,nset,tmax ! modified - COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR) -C - 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/ -C -C - DO 20 I=3,nset-2 -C - 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) -C - 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) -C - DO 10 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 ) - 10 CONTINUE -C - 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) -C - 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) -C - 20 CONTINUE -C - DO 40 I=3,nset-2 ! modified - DO 30 J=1,NRL - F(I,J)=FXY(I,J) - 30 CONTINUE - 40 CONTINUE -C - RETURN - END -C -C********************************************************************* - subroutine opaltab -C -C CODE FOR FITTING AND SMOOTHING OPAL DATA. ADAPTED FROM A CODE -C WRITTEN BY MIKE SEATON(obtained june 1993) -C -C OPAL DATA. -C ASSUMES FIRST T6=0.006, LAST T6=10.OR 0.04). Depending on position -C in the table. -C USES RECTANGULAR ARRAY FOR VARIABLES T6 AND LOG10(R) -C -C (1) NSM=NUMBER OF PASSES THROUGH SMOOTHING FILTER. -C USE OF NSM=1 OR 2 IS RECOMMENDED. -C NO SMOOTHING WITH NSM=0 -C (2) RANGE FOR LOG10(R), -C RLS=FIRST VALUE, RLE=LAST VALE -C (RLS MUST BE FIRST VALUYE IN TABLE) -C -C SUBROUTINE INTERP -C AFTER PROCESSING, DATA ARE IN A FORM FOR USE OF -C SUBROUTINE INTERP -C WHICH GIVES LOG(ROSS) AND TWO FIRST DERIVATIVES FOR ANY -C VALUES OF LOG(T) AND LOG(RHO). SEE BELOW FOR FURTHER -C EXPLANATION. -C -C OUTPUT FOR THE CASE OF NSM.GT.0. -C INTERP IS USED TO OBTAIN SMOOTHED DATA INTERPOLATED -C BACK TO THE ORIGINAL OPAL MESH. TWO FILES ARE WRITTEN. -C -C -C THE SUBROUTINES SPLINE AND SPLINT ARE ADAPTED FROM THOSE GIVE BY -C W.H. Press, S.A. Teulolsky, W.T. Vettering and B.P. Flannery, -C "Numerical Recipes in FORTRAN", 2nd edn., 1992, C.U.P. -C OTHER REFERENCES ARE MADE TO METHODS DESCRIBED IN THAT BOOK. -C - 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*1 HEAD(100) - COMMON/CST/NRL,RLS,nset,tmax ! modified - common/alink/ N,NSM,nrlow,nrhigh,RLE,t6arr(100),coff(100,nr) - LOGICAL IERR - -C - NRL=2*(RLE-RLS)+1 -C -C STORE LOG10(T) IN U AND LOG10(ROSS) IN ROSSL -C CHECK FIRST VALUE OF T6 - T6=t6arr(1) - do j=1,NRL - ROSSL(1,j)=coff(1,j) - enddo - - if( abs(T6 -.0056341325) .lt. 1.e-8) then - U(1)=6.+LOG10(T6) - ENDIF -C 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) - enddo - U(I)=6+LOG10(T6) - IF(T6.LT.tmax)GOTO 5 - N=I - IF(N.GT.IP)THEN - PRINT*,' REQUIRE PARAMETER IP OF AT LEAST ',N - STOP - ENDIF -C -C -C DEFINE VARIABLES -C X=20.0*(LOG10(T)-3.80)+1 -C Y=2.0*(LOG10(R)-RLS)+1 -C USE INDICES I=1 TO nset AND J=1 TO NRL -C X AND Y ARE SUCH THAT, ON MESH-POINT (I,J), X=I AND Y=J -C OBTAIN:- -C F(I,J)=LOG10(ROSS) -C FX(I,J)=dF/dX -C FY(I,J)=dF/dY -C FXY(I,J)=ddF/dXdY -C -C -C FIRST GET F AND FX, INTERPOLATING FROM OPAL T6 TO -C INTERVAL OF 0.05 IN LOG10(T). - DO 40 J=1,NRL -C FOR EACH LOG10(R), STORE LOG10(ROSS) IN V(I) - DO 20 I=1,N - V(I)=ROSSL(I,J) - 20 CONTINUE -C -C GET FIRST DERIVATIVES AT END POINTS -C -C GET SECOND DERIVATIVES FOR SPLINE FIT - CALL SPLINE(U,V,N,V2) -C -C INTERPOLATE TO LOG10(T)=FLT, FLT=3.8(0.05)8.0 - DO 30 I=1,nset ! modified - FLT=3.75+0.05*I - CALL SPLINT(U,V,N,V2,FLT,F(I,J),FX(I,J)) - 30 CONTINUE -C - 40 CONTINUE -C -C -C OPTION FOR SMOOTHING - IF(NSM.GT.0)THEN - DO 35 NS=1,NSM - CALL SMOOTH - 35 CONTINUE - CALL FITX - ENDIF -C -C -C GET FY AND FXY - CALL FITY -C -C THE ARRAYS F, FX, FY AND FXY ARE NOW STORED -C -C CAN NOW DO INTERPOLATIONS USING -C CALL INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR) -C INPUT IS FLT=LOG10(T), FLRHO=LOG10(RHO) -C OUTPUT IS G=LOG10(ROSS) -C DGDT=dG/d(LOG10(T)) -C DGDRHO=dG/d(LOG10(RHO)) -C IERR=.TRUE. IF INPUT FLT, FLRHO ARE OUT-OF-RANGE, -C ELSE IERR=.FALSE. -C -C INTERPOLATE BACK TO OPAL POINTS - IF(NSM.GT.0)THEN - do l=1,NRL - coff(1,l)=ROSSL(1,l) - enddo - - DO 70 K=2,N - FLT=U(K) - DO 50 L=nrlow,nrhigh - FLR=RLS+.5*(L-1) - FLRHO=FLR-18.+3.*FLT - CALL INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR) - IF(IERR)THEN - ENDIF - V(L)=G - 50 CONTINUE - T6=t6arr(K) - do l=nrlow,nrhigh - coff(K,l)=V(l) - - enddo - - 70 CONTINUE - ENDIF - return -C - 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) -C - END - diff --git a/kap/preprocessor/xztrin21.f b/kap/preprocessor/xztrin21.f deleted file mode 100644 index 751aa43d6..000000000 --- a/kap/preprocessor/xztrin21.f +++ /dev/null @@ -1,1377 +0,0 @@ - subroutine instruct -c-----VERSION of October 5, 1995----------------------------------------- -c----------------------------------------------------------------------- - -c This subroutine contains instructions for using the subroutine -c OPACGN93( z, xh, t6, R ) and OPAC(izi,mzin,xh,t6,r). -c The purpose of these subroutines is to perform 3 or 4 variable -c interpolation on log10(kappa). The opacity tables to be interpolated -c are known to have somewhat random numerical errors of a few percent. -c Consequently, adjusting the data prior to performing the interpolation is -c justified at this level. These codes are set-up to read the original -c (unsmoothed) tabular data, this data is then passed through a smoothing -c filter; using a set of routines developed by Mike Seaton (see M. J. Seaton -c MNRAS 265,L25(1993)). It is the adjusted data that is actually used in -c carrying out the interpolations in OPACGN93 and OPAC. The interpolation -c method, described below, also produces smooth values for logK and its -c first derivatives. The initial adjustment step helps improve the smoothness -c of the OPACGn93 and OPAC output,particularly at the smallest values of R. -c The medium to large R output is only slightly effected by this step. It -c takes only a few seconds to carryout the initial data smoothing step. This -c step can be skipped by setting the parameter ismdata in subroutine -c readco =1. - -c The interpolation variables are : -c -c z The metallicity, Z -c xh The hydrogen mass fraction, X -c t6 The temperature in millions of degrees Kelvin, T6 -c r =rho(gm/cc)/T6**3, R -c -c Additional input to OPAC is: - -c izi Keeps or recalculates table indices. The value 0 causes -c the table indices to be recalculated. A value other than 0 -c causes the previous indices to be used. - -c mzin The integer value of i of the Z value to use. The -c choices are: -c 1=0.0 2=0.0001 3=0.0003 4=0.001 5=0.002 6=0.004 7=0.01 -c 8=0.02 9=0.03 10=0.04 11=0.06 12=0.08 13=0.1 -c -c -c An interpolation between overlapping quadratics is used to obtain -c smoothed results. A 4x4 grid in logT6 and logR is used to interpolate -c in four different 3x3 sub-grids. Linear interpolation between quadratic -c fits in these different sub-grids gives smoothed results in both log T6 -c and Log R directions. Compared to earlier versions of this code, the -c interpolation in Z is in Kappa vs. Z; not log Kappa vs. Z. -c The overlapping quadratic procedure produces results that are smooth, -c similar to bicubic spline interpolation, but require storage of only local -c information. -c -c The code OPACGN93 performs interpolation in Z, X, T6, and R. It calls -c the subroutine OPAC at each Z. If you are working with a fixed Z, as -c listed above, it is more efficient to call OPAC directly. In this case use -c izi=0 and the appropriate value of mzin. The opacity data will be read -c from unit 2 in the subroutine readco. you will need to have the file -c GN93hz available on disk. -c Each of the individual tables in the GN93hz file cover 70 temperatures -c in the range logT=3.75[T6=0.0056341325]( referred to as temperature 1) to -c logT=8.7[T6=500]. and 19 values of log R in the range -8 (referred to as 1) -c to +1; at half-integer steps. (NOTE: earlier tables were explicitly in -c terms of T6. For convenience the present tables tabulate log Kappa vs logT. The -c interpolation however still uses T6 for the temperature variable) -c For specialized problems, if storage space is a problem, a reduced set of -c data can be input . This requires a recompilation with altered parameter -c values. In order to limit the range of R, set the parameter nrb= index of -c lowest value of log R to use(count from log R=-8). Then set the parameter -c nre to the index of the largest value of log R to use. (NOTE: nre-nrb must -c be at least 5). To ignore the first ntb-1 values of T6 (starting from -c temperature 1) set the parameter ntb to desired value. No other parameters -c should be modified. - -c ***CAUTION*** -c As a result of the mixing procedure used to calculate the data a few -c X=0.0, low T-small R, table values fell outside the range of T and R accessible -c from the X=0.35 data directly calculated for this purpose. These T-R -c locations are filled in with 9.99 (or for diagnostic purposes in some cases -c larger values. At the same locations the derivatives are set to 99.9. When -c T-R falls in this region a message is issued by the interpolation code to -c inform the user of this situation. Presumable very few users will have -c applications that take them into this region. -c -c Your routine that performs the call to OPAC should include the -c statement: -c -c common/e/ opact,dopact,dopacr,dopactd -c -c These variables have the following meanings: -c -c OPACT Is the Log of the Rosseland mean opacity: Log(kappa) -c DOPACT Is Dlog(kappa)/Dlog(T6) at constant R -c DOPACR Is Dlog(kappa)/Dlog(R) at constant T -c DOPACTD Is Dlog(kappa)/Dlog(T6) at constant Rho -c - dum=0.0 - return - end - -C********************************************************************* - subroutine opacgn93 (z,xh,t6,r,filename) -c.....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) -c..... OPACT- opacity obtained from a quadraric interpolation at -c fixed log T6 at three values of log R; followed by quadratic -c interpolation along log T6. Results smoothed bt mixing -c overlapping quadratics. -c..... DOPACT- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics -c at fixed R -c..... DOPACR- is Dlog(k)/Dlog(R) smoothed by mixing quadratics. -c..... DOPACTD- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics -c 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 .ne. 12345678) then - do i=1,mz - zza(i)=za(i) ! use zza=log10(0.0001+za(i)) for log interpolation - enddo - endif - if(itime .ne. 12345678) then - itime=12345678 - endif - - do i=1,mz - if(abs(z-za(i)) .lt. 1.e-7 ) then - izz=i - call opac (0,izz,xh,t6,r,filename) - if (opact .gt. 9.0) write (*,'(" logK > 9.0, X=",f7.5," Z=", - x f7.5," T6=",f10.5," R=",e12.4)') xh,z,t6,r - return - endif - enddo - - ilo=2 - ihi=mz - 8 if(ihi-ilo .gt. 1) then - imd=(ihi+ilo)/2 - if(z .le. za(imd)+1.e-7) then - ihi=imd - else - ilo=imd - endif - go to 8 - endif - i=ihi - m1=i-2 - m2=i-1 - m3=i - m4=i+1 - mfm=m4 -c.....check whether Z is near a table limit - if((z .le. za(2)+1.e-7) .or. (z .ge. za(mz-1))) mfm=m3 -c..... Check if Z+X interpolation sums exceed unity at needed indices. -c If so, backup to lower Z indices to perform interpolation. -c This should work OK, due to density of Z-grid points and the -c slow Z variation(except at very small Z) - if(xh+za(mfm) .gt. 1.) mfm=m3 - if(xh+za(mfm) .gt. 1.) then - if(m1 .le. 1) then - write(*,'("special case: X,Z location not covered by" - x ," logic")') - stop - endif - m1=m1-1 - m2=m2-1 - m3=m3-1 - endif -c - izi=0 - do iz=m1,mfm - izz=iz - call opac(izi,izz,xh,t6,r,filename) - if (opact .gt. 9.0) write (*,'(" logK > 9.0, X=",f7.5," Z=", - x 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 - enddo - is=0 - iw=1 - kapz1=quad(is,iw,zzl,kapz(m1),kapz(m2),kapz(m3) - x ,zza(m1),zza(m2),zza(m3)) - is=1 - dkapz1=quad(is,iw,zzl,dkapdtr(m1),dkapdtr(m2),dkapdtr(m3) - x ,zza(m1),zza(m2),zza(m3)) - dkapz3=quad(is,iw,zzl,dkapdrt(m1),dkapdrt(m2),dkapdrt(m3) - x ,zza(m1),zza(m2),zza(m3)) - if (mfm .eq. m3) then - opact=log10(kapz1) ! converts K to logK - dopact=dkapz1 - dopacr=dkapz3 - dopactd=-3.*dopacr+dopact - is=0 - - return - - endif - is=0 - iw=2 - kapz2=quad(is,iw,zzl,kapz(m2),kapz(m3),kapz(m4) - x ,zza(m2),zza(m3),zza(m4)) - is=1 - dkapz2=quad(is,iw,zzl,dkapdtr(m2),dkapdtr(m3),dkapdtr(m4) - x ,zza(m2),zza(m3),zza(m4)) - dkapz4=quad(is,iw,zzl,dkapdrt(m2),dkapdrt(m3),dkapdrt(m4) - x ,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 - return - end -c*********************************************************************** -c - subroutine opac (izi,mzin,xh,t6,r,filename) -c..... The purpose of this subroutine is to interpolate log kappa -c in in X, T6, R -c izi=0 recalculate table indices to use; =1 keep previous -c mzin=index of za(i) in block data. za(i) are metallicities -c t6=T6=temperature in millions of degrees kelvin -c r=R=density(g/cm**3)/T6**3 -c..... to use opac insert common/e/ in the calling routine. -c This common contains interpolated values for kappa and its -c first derivities. -c - 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 -c..... OPACT- opacity obtained from a quadraric interpolation at -c fixed log T6 at three values of log R; followed by quadratic -c interpolation along log T6. Results smoothed bt mixing -c overlapping quadratics. -c..... DOPACT- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics -c at fixed R -c..... DOPACR- is Dlog(k)/Dlog(R) smoothed by mixing quadratics. -c..... DOPACTD- is Dlog(k)/Dlog(T6) smoothed by mixing quadratics -c at fixed rho - common/e/ opact,dopact,dopacr,dopactd -c - iop=1 ! provides smoothed interpolations; iop=0 gives no smoothing - mzz=mzin - z=za(mzz) - - if(nre .lt. 6) go to 65 -c - if((izi .eq. 0) .and. (z+xh-1.e-6 .gt. 1 )) go to 61 - if((izi .ne. 0) .and. (zval+xh-1.e-6 .gt. 1 )) go to 61 - xxh=xh - xxi=xh - t6i=t6 - ri=r -c - xxx=log10(.005+xh) - slt=log10(t6) - slr=log10(r) -c - if(itime .ne. 12345678) then - itime=12345678 - do i=1,mx - xx(i)=log10(.005+xa(i)) - enddo -c..... this is the first time through. Calculate the decadic -c log of the perimeter points shifted by Z. m refers to -c xa(m); the hydrogen table value. - -c..... read the data files - call readco(filename) - xamx1=xa(mx-1) - xxmx1=xx(mx-1) - dfsxmx1=dfsx(mx-1) - endif - mxend=mx - xa(mx)=1.-z - xa(mx-1)=xamx1 - xx(mx-1)=xxmx1 - dfsx(mx-1)=dfsxmx1 - if (xa(mx) .lt. xa(mx-1)) then - mxend=mx-1 - xa(mxend)=xa(mx) - endif - if (xh .ge. 0.8 ) then - xx(mxend)=log10 (0.005+xa(mxend)) - dfsx(mxend)=1./(xx(mxend)-xx(mxend-1)) - endif -c -c -c..... Determine log R and log T6 grid points to use in the -c interpolation. - if((slt .lt. alt(1)).or.(slt .gt. alt(nt))) go to 62 - if((slr .lt. alr (1)).or.(slr .gt. alr(nre))) go to 62 -c -c -c - if (izi .eq. 0) then ! freeze table indices - ilo=2 - ihi=mx - 8 if(ihi-ilo .gt. 1) then - imd=(ihi+ilo)/2 - if(xh .le. xa(imd)+1.e-7) then - ihi=imd - else - ilo=imd - endif - go to 8 - endif - i=ihi - mf=i-2 - mg=i-1 - mh=i - mi=i+1 - mf2=mi - if (xh .lt. 1.e-6) then - mh=1 - mg=1 - mi=2 - mf2=1 - endif - if((xh .le. xa(2)+1.e-7) .or. (xh .ge. xa(mx-2)-1.e-7)) mf2=mh -c - ilo=2 - ihi=nre - 12 if(ihi-ilo .gt. 1) then - imd=(ihi+ilo)/2 - if(slr .le. alr(imd)+1.e-7) then - ihi=imd - else - ilo=imd - endif - go to 12 - endif - i=ihi - l1=i-2 - l2=i-1 - l3=i - l4=l3+1 -c - ilo=2 - ihi=nt - 11 if(ihi-ilo .gt. 1) then - imd=(ihi+ilo)/2 - if(t6 .le. t6list(imd)+1.e-7) then - ihi=imd - else - ilo=imd - endif - go to 11 - endif - i=ihi - k1=i-2 - k2=i-1 - k3=i - k4=k3+1 - l3s=l3+nrb-1 - k3s=k3+ntb-1 - endif - - kmin=0 - k1in=k1 - iadvance=0 - mfin=mf - if ((mfin .eq. 1) .and. (xz(1,mzz,k1,l1) .gt. 9.)) then ! no data - do i=1,6 - if (xz(1,mzz,i,l1) .gt. 9.) then - if (xh .lt. .1) then - kmin=i+1 - else - - if (iadvance .eq. 0) then - iadvance=iadvance+1 - mf=mf+1 - mg=mg+1 - mh=mh+1 - mi=mi+1 - mf2=mf2+1 - endif - endif - endif - enddo - if ((iadvance .eq. 0) .and. (k1 .le. kmin) .and. - x (slt .le. alt(kmin))) then - k1=kmin - if ((xz(1,mzz,kmin,l1+1) .lt. 9.) .and. - x ((slr+.01) .gt. alr(l1+1))) then - l1=l1+1 - kmin=0 - k1=k1in - do i=1,6 - if (xz(1,mzz,i,l1) .gt. 9.) kmin=i+1 - enddo - if ((kmin .ne. 0) .and. (k1in .lt. kmin)) k1=kmin - endif - endif - if ((slt+.001) .lt. alt(k1)) then - opact=30. - dopact=99. - dopacr=99. - return - endif - 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 - endif - do i=14,18 ! allows jagged edge at high T,rho - if((l3s .gt. i) .and. (k3s .gt. nta(i+1))) go to 62 - enddo - do 123 m=mf,mf2 - ip=3 - iq=3 - ntlimit=nta(l3s) - if((k3. eq. ntlimit) .or. (iop .eq. 0)) then - ip=2 - iq=2 - endif - if(t6 .le. t6list(2)+1.e-7) ip=2 - - if((l3 .eq. nre) .or. (iop .eq. 0)) then - iq=2 - ip=2 - endif - if ((l4 .le.nr) .and. (xz(m,mzz,k3,l4) .eq. .0)) iq=2 - if(slr .le. alr(2)+1.e-7) iq=2 -c - is=0 -c -c__________ - do ir=l1,l1+iq - do it=k1,k1+ip - opl(m,it,ir)=xz(m,mzz,it,ir) - is=1 - enddo - enddo - 123 continue - if((zz(mg,mzin) .ne. zz(mf,mzin)) .or. - x (zz(mh,mzin) .ne. zz(mf,mzin))) then - write(*,'("Z does not match Z in GN93hz files you are" - x ," using")') - stop - endif - if(z .ne. zz(mf,mzin)) go to 66 -c with return - is=0 - iw=1 - do 45 ir=l1,l1+iq - do it=k1,k1+ip - if (mf2 .eq. 1) then - opk(it,ir)=opl(mf,it,ir) - go to 46 - endif - opk(it,ir)=quad(is,iw,xxx,opl(mf,it,ir),opl(mg,it,ir) - x ,opl(mh,it,ir),xx(mf),xx(mg),xx(mh)) - is=1 - 46 continue - enddo - 45 continue - - if (mi .eq. mf2) then ! interpolate between quadratics - is=0 - iw=1 - dixr=(xx(mh)-xxx)*dfsx(mh) - do 47 ir=l1,l1+iq - do it=k1,k1+ip - opk2(it,ir)=quad(is,iw,xxx,opl(mg,it,ir),opl(mh,it,ir) - x ,opl(mi,it,ir),xx(mg),xx(mh),xx(mi)) - opk(it,ir)=opk(it,ir)*dixr+opk2(it,ir)*(1.-dixr) - is=1 - enddo - 47 continue -c interpolate X between two overlapping quadratics - endif - - is=0 -c -c..... completed H,Z interpolation. Now interpolate T6 and log R on a -c 4x4 grid. (log(T6(i)),i=i1,i1+3),log(R(j)),j=j1,j1+3)).Procedure -c mixes overlapping quadratics to obtain smoothed derivatives. -c -c - call t6rinterp(slr,slt) - return - - 61 write(*,'(" Mass fractions exceed unity")') -c with a return - stop - 62 write(*,'(" T6/LogR outside of table range")') -c write(*,'("slt,alt(1),alt(nt),slr,alr(1),alr(nre),l3s,i,k3s, -c x nta(i+1)",6e12.5,4i5)') slt,alt(1),alt(nt),slr,alr(1), -c x alr(nre),l3s,i,k3s,nta(i+1) -c 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 - -c*********************************************************************** - subroutine t6rinterp(slr,slt) -c 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 -c - 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), - x 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), - x alr(l2),alr(l3),alr(l4)) - endif - is=1 - enddo -c - is=0 - iw=1 -c..... 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 -c..... 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 - endif - if(ip .eq. 3) then -c..... 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 -c..... 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) - endif - if(iq .eq. 3) then - -c..... 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) - endif -c - 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), - x alt(k1),alt(k2),alt(k3)) - if(ip .eq. 3) then - iw=2 - q(iu)=quad(is,iw,slt,opk(k2,lx),opk(k3,lx),opk(k4,lx), - x alt(k2),alt(k3),alt(k4)) - endif - is=1 - enddo -c - is=0 - iw=1 -c..... 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 .eq. 3) then - opacrq=quad(is,iw,slr,q(1),q(2),q(3),alr(l1),alr(l2),alr(l3)) -c..... k and Dlog(k)/Dlog(R) in upper-left 3x3. - dkapq3=dkap - endif - if(iq .eq. 3) then -c..... 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 .eq. 3) then -c..... 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) - endif - endif - if(ip .eq. 3) then -c..... 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 .eq. 3) then -c..... Dlog(k)/Dlog(R) smoothed in both log(T6) and Log(R). - dopacrq=dkapq3*dix2+dkap*(1.-dix2) - dopacr=dopacr*dix+dopacrq*(1.-dix) - endif - endif - dopactd=dopact-3.*dopacr - if (opact .gt. 1.e+15) then - write(*,'("Interpolation indices out of range", - x ";please report conditions.")') - stop - endif - if (opact .gt. 9.) then - dopact=99. - dopacr=99. - dopactd=99. - endif - return - end - -c -c********************************************************************** - subroutine readco(filename) -c..... 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*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 .ne. 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 - enddo - enddo - enddo - enddo - itimeco=12345678 - endif -c - close (2) -c..... read tables - open(2, FILE=trim(filename)) -c -c read header - do i=1,240 - read (2,'(a)') dumarra(i) - enddo -c - do 3 m=1,mx - do 2 i=1,n(m) -c - 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 .ne. 1234567) then - t6listf(k)=10.**alt(k) - t6arr(k)=t6listf(k) - endif - do ll=1,nrm ! modified - xzff(k,ll)=xzf(k,ll) - enddo - enddo - isett6=1234567 - - if (ismdata .eq. 0) then - tmax=10. ! modified - nset=65 - RLS=-8. - nsm=1 - RLE=1. - nrlow=1 - nrhigh=2*(RLE-RLS)+1 - - call opaltab !modified - endif - - 1010 continue - - ll=1 - do 110 kk=1,nre - alr(ll)=alrf(kk) - do k=1,nt - t6list(k)=t6listf(k+ntb-1) - if(ismdata .eq. 0) then -c Following skip required because, due to missing data, -c the X=0 low T data cannot be smoothed - if ((m .eq. 1) .and. (k .le. 9)) then - xz(m,i,k,ll)=xzf(k+ntb-1,kk) - else - xz(m,i,k,ll)=xzff(k+ntb-1,kk) - endif - else - xz(m,i,k,ll)=xzf(k+ntb-1,kk) - endif - enddo - 110 ll=ll+1 - - 2 continue - 3 continue - - do 12 i=2,nt - 12 dfs(i)=1./(alt(i)-alt(i-1)) - do 13 i=2,nr - 13 dfsr(i)=1./(alr(i)-alr(i-1)) - do i=2,mx-1 - dfsx(i)=1./(xx(i)-xx(i-1)) - enddo - do i=2,mz - dfsz(i)=1./(zza(i)-zza(i-1)) - enddo - return - end -c -c*********************************************************************** - function quad(ic,i,x,y1,y2,y3,x1,x2,x3) -c..... 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 .eq. 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) - endif - 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) - return - end -c -c*********************************************************************** - 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, - x .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 -c -c*********************************************************************** - subroutine opaltab -C -C CODE FOR FITTING AND SMOOTHING OPAL DATA. ADAPTED FROM A CODE -C WRITTEN BY MIKE SEATON(obtained june 1993) -C -C OPAL DATA. -C ASSUMES FIRST T6=0.006, LAST T6=10.OR 0.04). Depending on position -C in the table. -C USES RECTANGULAR ARRAY FOR VARIABLES T6 AND LOG10(R) -C -C (1) NSM=NUMBER OF PASSES THROUGH SMOOTHING FILTER. -C USE OF NSM=1 OR 2 IS RECOMMENDED. -C NO SMOOTHING WITH NSM=0 -C (2) RANGE FOR LOG10(R), -C RLS=FIRST VALUE, RLE=LAST VALE -C (RLS MUST BE FIRST VALUYE IN TABLE) -C -C SUBROUTINE INTERP -C AFTER PROCESSING, DATA ARE IN A FORM FOR USE OF -C SUBROUTINE INTERP -C WHICH GIVES LOG(ROSS) AND TWO FIRST DERIVATIVES FOR ANY -C VALUES OF LOG(T) AND LOG(RHO). SEE BELOW FOR FURTHER -C EXPLANATION. -C -C OUTPUT FOR THE CASE OF NSM.GT.0. -C INTERP IS USED TO OBTAIN SMOOTHED DATA INTERPOLATED -C BACK TO THE ORIGINAL OPAL MESH. TWO FILES ARE WRITTEN. -C -C -C THE SUBROUTINES SPLINE AND SPLINT ARE ADAPTED FROM THOSE GIVE BY -C W.H. Press, S.A. Teulolsky, W.T. Vettering and B.P. Flannery, -C "Numerical Recipes in FORTRAN", 2nd edn., 1992, C.U.P. -C OTHER REFERENCES ARE MADE TO METHODS DESCRIBED IN THAT BOOK. -C - 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*1 HEAD(100) - COMMON/CST/NRL,RLS,nset,tmax ! modified - common/alink/ N,NSM,nrlow,nrhigh,RLE,t6arr(100),xzff(100,nr) - LOGICAL IERR - -C - NRL=2*(RLE-RLS)+1 -C -C STORE LOG10(T) IN U AND LOG10(ROSS) IN ROSSL -C CHECK FIRST VALUE OF T6 - T6=t6arr(1) - do j=1,NRL - ROSSL(1,j)=xzff(1,j) - enddo - - if (abs(T6-.0056341325) .lt. 1.e-8) then - U(1)=6.+LOG10(T6) - ENDIF -C 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) - enddo - U(I)=6+LOG10(T6) - IF(T6.LT.tmax)GOTO 5 - N=I - IF(N.GT.IP)THEN - PRINT*,' REQUIRE PARAMETER IP OF AT LEAST ',N - STOP - ENDIF -C -C -C DEFINE VARIABLES -C X=20.0*(LOG10(T)-3.80)+1 -C Y=2.0*(LOG10(R)-RLS)+1 -C USE INDICES I=1 TO nset AND J=1 TO NRL -C X AND Y ARE SUCH THAT, ON MESH-POINT (I,J), X=I AND Y=J -C OBTAIN:- -C F(I,J)=LOG10(ROSS) -C FX(I,J)=dF/dX -C FY(I,J)=dF/dY -C FXY(I,J)=ddF/dXdY -C -C -C FIRST GET F AND FX, INTERPOLATING FROM OPAL T6 TO -C INTERVAL OF 0.05 IN LOG10(T). - DO 40 J=1,NRL -C FOR EACH LOG10(R), STORE LOG10(ROSS) IN V(I) - DO 20 I=1,N - V(I)=ROSSL(I,J) - 20 CONTINUE -C -C GET FIRST DERIVATIVES AT END POINTS -C -C GET SECOND DERIVATIVES FOR SPLINE FIT - CALL SPLINE(U,V,N,V2) -C -C INTERPOLATE TO LOG10(T)=FLT, FLT=3.8(0.05)8.0 - DO 30 I=1,nset ! modified - FLT=3.75+0.05*I - CALL SPLINT(U,V,N,V2,FLT,F(I,J),FX(I,J)) - 30 CONTINUE -C - 40 CONTINUE -C -C -C OPTION FOR SMOOTHING - IF(NSM.GT.0)THEN - DO 35 NS=1,NSM - CALL SMOOTH - 35 CONTINUE - CALL FITX - ENDIF -C -C -C GET FY AND FXY - CALL FITY -C -C THE ARRAYS F, FX, FY AND FXY ARE NOW STORED -C -C CAN NOW DO INTERPOLATIONS USING -C CALL INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR) -C INPUT IS FLT=LOG10(T), FLRHO=LOG10(RHO) -C OUTPUT IS G=LOG10(ROSS) -C DGDT=dG/d(LOG10(T)) -C DGDRHO=dG/d(LOG10(RHO)) -C IERR=.TRUE. IF INPUT FLT, FLRHO ARE OUT-OF-RANGE, -C ELSE IERR=.FALSE. -C -C INTERPOLATE BACK TO OPAL POINTS - IF(NSM.GT.0)THEN - do l=1,NRL - xzff(1,l)=ROSSL(1,l) - enddo - - DO 70 K=2,N - FLT=U(K) - DO 50 L=nrlow,nrhigh - FLR=RLS+.5*(L-1) - FLRHO=FLR-18.+3.*FLT - CALL INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR) - IF(IERR)THEN - ENDIF - V(L)=G - 50 CONTINUE - T6=t6arr(K) - do l=nrlow,nrhigh - xzff(K,l)=V(l) - - enddo - - 70 CONTINUE - ENDIF -C -C - 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) -C - END -C -C********************************************************************* - SUBROUTINE SPLINE(X,Y,N,Y2) - PARAMETER (NMAX=100) - DIMENSION X(N),Y(N),Y2(N),U(NMAX) -C -C 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))) -C - Y2(1)=-0.5 - U(1)=(3./(X(2)-X(1)))*((Y(2)-Y(1))/(X(2)-X(1))-YP1) - DO 11 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 -11 CONTINUE - 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 12 K=N-1,1,-1 - Y2(K)=Y2(K)*Y2(K+1)+U(K) -12 CONTINUE - RETURN - END -C********************************************************************* - SUBROUTINE SPLINT(XA,YA,N,Y2A,X,Y,YP) - DIMENSION XA(N),YA(N),Y2A(N) - KLO=1 - KHI=N -1 IF (KHI-KLO.GT.1) THEN - K=(KHI+KLO)/2 - IF(XA(K).GT.X)THEN - KHI=K - ELSE - KLO=K - ENDIF - GOTO 1 - ENDIF - H=XA(KHI)-XA(KLO) - IF (H.EQ.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 -C********************************************************************* - SUBROUTINE FITY -C -C THIS ROUTINE MAKES SPLINE FITS FOR F AND FX, AND OBTAINS -C FY AND FXY -C -C - COMMON/CST/NRL,RLS,nset,tmax ! modified -C - 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) -C - DO 30 I=1,nset ! modified - DO 10 J=1,NRL - A(J)=F(I,J) - B(J)=FX(I,J) - 10 CONTINUE -C - CALL GETD(A,NRL,AD,AP1,APN) - CALL GETD(B,NRL,BD,BP1,BPN) -C - FY(I,1)=AP1 - FY(I,NRL)=APN - FXY(I,1)=BP1 - FXY(I,NRL)=BPN - DO 20 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) - 20 CONTINUE - 30 CONTINUE -C - RETURN - END -C********************************************************************* - SUBROUTINE FITX -C -C THIS ROUTINE IS USED ONLY AFTER SMOOTHING. -C ITS FUNCTION IS TO RECOMPUTE FX USING SMOOTHED F. -C -C - PARAMETER(IPR=20) - DIMENSION A(85),D(85) -C - COMMON/CST/NRL,RLS,nset,tmax ! modified - COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR) -C - DO 30 J=1,NRL - DO 10 I=1,nset ! modified - A(I)=F(I,J) - 10 CONTINUE - CALL GETD(A,nset,D,AP1,APN) ! modified - FX(1,J)=AP1 - FX(nset,J)=APN ! modified - DO 20 I=2,nset-1 ! modified - FX(I,J)=-A(I)+A(I+1)-2.*D(I)-D(I+1) - 20 CONTINUE - 30 CONTINUE -C - RETURN - END -C -C************************************************************************ - SUBROUTINE GETD(F,N,D,FP1,FPN) -C -C SIMPLIFIED CODE FOR SPLINE COEFFICIENTS, FOR CASE OF INTERVALS -C OF UNITY. -C -C - DIMENSION F(N),D(N),T(85) -C - 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. -C - D(1)=-.5 - T(1)=.5*(-F(1)+F(2)-FP1) -C - DO 10 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)) - 10 CONTINUE -C - D(N)=(FPN+F(N-1)-F(N)-T(N-1))/(2.+D(N-1)) -C - DO 20 J=N-1,1,-1 - D(J)=D(J)*D(J+1)+T(J) - 20 CONTINUE -C - RETURN - END -C -C********************************************************************* - SUBROUTINE INTERP(FLT,FLRHO,G,DGDT,DGDRHO,IERR) -C -C GIVEN F,FX,FY AND FXY ON THE GRID POINTS, THIS ROUTINE -C DOES BI-CUBIC INTERPOLATIONS USING METHODS DESCRIBED IN -C Numerical Recipes, PP. 118 TO 120 -C -C - PARAMETER(IPR=20) - COMMON/CF/ F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR) - DIMENSION B(16) - LOGICAL IERR -C - COMMON/CST/NRL,RLS,nset,tmax ! modified -C -C EXTREME LIMITS ALLOWED ARE:- -C (3.800-0.0125) TO (8.000+0.0125) FOR LOG10(T) -C (RLS-0.125) TO (RLE+0.1254) FOR LOG10(R) -C (ALLOWING FOR SMALL EXTRAPOLATIONS BEYOND TABULAR VALUES) -C -C FUNCTION DEFINITIONS FOR CUBIC EXPANSION -C - 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))) ))) -C - 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)))) )) -C - 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)))) )) -C - 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)) )) -C -C - IERR=.FALSE. -C - X=20.*(FLT-3.800)+1 - FLR=FLRHO+18.-3.*FLT - Y=2*( FLR - RLS )+1 -C - IF(X.LT.2.)THEN - IF(X.LT.0.75)THEN - IERR=.TRUE. - ELSE - I=1 - ENDIF - ELSEIF(X.GT.84)THEN - IF(X.GT.85.25)THEN - IERR=.TRUE. - ELSE - I=84 - ENDIF - ELSE - I=X - ENDIF - U=X-I -C - IF(Y.LT.2.)THEN - IF(Y.LT.0.75)THEN - IERR=.TRUE. - ELSE - J=1 - ENDIF - ELSEIF(Y.GT.NRL-1)THEN - IF(Y.GT.NRL+.25)THEN - IERR=.TRUE. - ELSE - J=NRL-1 - ENDIF - ELSE - J=Y - ENDIF - V=Y-J -C - IF(IERR)THEN - G=9.999 - DGDT=9.999 - DGDRHO=9.999 - RETURN - ENDIF -C -C -C 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) -C - 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) -C - 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) -C - 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) -C -C GET G=LOG10(ROSS), DGDT=d LOG10(ROSS)/d LOG10(T), -C 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) -C -C - RETURN - END - -C********************************************************************* - SUBROUTINE SMOOTH -C -C THIS SUBROUTINE USES A 2-DIMENSIONAL GENERALISATION OF THE SMOOTHING -C TECHNIQUES DESCRIBED ON PP. 644 TO 649 OF Numerical Recipes. -C -C CONSIDER THE 25 POINTS DEFINED BY -C I+n, n=-2,-1,0,1,2 AND J+m, m=-2,-1,0,1,2. -C THE FUNCTION TO BE SMOOTHED IS FITTED TO A BI-CUBIC, INVOLVING -C 16 COEFFICIENTS, USING TECHNIQUES OF LEAST-SQUARES. THE SMOOTHED -C FUNCTION (TEMPORARILY STORED IN FXY) IS GIVEN BY THE FITTED VALUE -C AT THE POINT I AND J. -C -C THE FITTING IS SHIFTED FOR POINTS CLOSE TO BOUNDARIES. -C -C - PARAMETER(IPR=20) -C - COMMON/CST/NRL,RLS,nset,tmax ! modified - COMMON/CF/F(85,IPR),FX(85,IPR),FY(85,IPR),FXY(85,IPR) -C - 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/ -C -C - DO 20 I=3,nset-2 -C - 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) -C - 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) -C - DO 10 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 ) - 10 CONTINUE -C - 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) -C - 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) -C - 20 CONTINUE -C - DO 40 I=3,nset-2 ! modified - DO 30 J=1,NRL - F(I,J)=FXY(I,J) - 30 CONTINUE - 40 CONTINUE -C - RETURN - END -C 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 78c91b0e9..000000000 --- a/kap/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/kap/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 ef00295d8..000000000 --- a/kap/test/src/test_kap_quietly.f90 +++ /dev/null @@ -1,9 +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..7c6d839e6 --- /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,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..77c90bb8f --- /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-real=snan -finit-derived +ifeq ($(WITH_FPE_CHECKS),yes) +FFLAGS_FP_SANITY += -ffpe-trap=invalid,overflow,zero +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,$(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,$(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..028f89fd2 --- /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 $(INCLUDE_DIRS) $(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..4bacd5a55 --- /dev/null +++ b/make/defaults-module.mk @@ -0,0 +1,19 @@ +# A bit of sed fun to ensure MAKE_DIR does not end with a '/' +# This is not a problem, but it makes the output nicer +MAKE_DIR := $(shell echo $(dir $(lastword $(MAKEFILE_LIST))) | sed "s|/$$||") + +ifneq ($(.SHELLSTATUS),0) + $(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_TRAPS ?= yes +PREFIX ?= $(MAKE_DIR)/.. diff --git a/make/gen-compile-tree b/make/gen-compile-tree new file mode 100755 index 000000000..5e74a1c9e --- /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("$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..b903e6c7e --- /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..14ee0c0b2 --- /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..352091d53 --- /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) -o $(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..fc3d11234 --- /dev/null +++ b/make/pkg-config.mk @@ -0,0 +1,17 @@ +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: $(DEPENDS_ON) +Description: MESA $(MODULE_NAME) module +Cflags: -I$${prefix}/include +Libs: -L$${prefix}/lib $(addprefix -l,$(LIB_NAMES)) +endef + +$(PKG_CONFIG): | $(BUILD_DIR_MODULE)/lib/pkgconfig/ $(BUILD_DIR_MODULE)/include/ + $(file > $@,$(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..77f06f15e --- /dev/null +++ b/make/pkgconfig/pgplot.pc @@ -0,0 +1,4 @@ +Name: pgplot +Version: 5.2 +Description: pgplot +Libs: -L${MESASDK_ROOT}/pgplot -lpgplot diff --git a/make/setup-builddir.mk b/make/setup-builddir.mk new file mode 100644 index 000000000..988c6ef26 --- /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..d92e127e1 --- /dev/null +++ b/make/setup-depends.mk @@ -0,0 +1,37 @@ +DEPENDS_ON := $(EXTERNAL_DEPENDS_ON) + +ifneq ($(INTERNAL_DEPENDS_ON),) + DEPENDS_ON += $(addprefix mesa-,$(INTERNAL_DEPENDS_ON)) +endif + +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 + else + PKG_CONFIG_FLAGS += --define-variable=MATH_SLOT=default + endif +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)) + ifneq ($$(.SHELLSTATUS),0) + $$(warning PKG_CONFIG_PATH is $$(PKG_CONFIG_PATH)) + $$(error pkg-config failed to find some of $(2), check PKG_CONFIG_PATH is correct) + endif +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 e02a156fe..000000000 --- a/math/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/math/build_and_test_parallel b/math/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/math/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 e9fc07875..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 1e723b76d..000000000 --- a/math/test/ck +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/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 78c91b0e9..000000000 --- a/math/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/math/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/mtx/Makefile b/mtx/Makefile new file mode 100644 index 000000000..458c4359b --- /dev/null +++ b/mtx/Makefile @@ -0,0 +1,45 @@ +include ../make/defaults-module.mk + +# Build + +MODULE_NAME := mtx +SRCS := public/mtx_def.f \ + 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 e02a156fe..000000000 --- a/mtx/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/mtx/build_and_test_parallel b/mtx/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/mtx/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 f852abef4..000000000 --- a/mtx/make/makefile_base +++ /dev/null @@ -1,118 +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.f \ - 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 %.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 cd223cfe3..c106acaa2 100644 --- a/mtx/public/mtx_lib.f90 +++ b/mtx/public/mtx_lib.f90 @@ -36,7 +36,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 78c91b0e9..000000000 --- a/mtx/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/mtx/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 e02a156fe..000000000 --- a/net/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/net/build_and_test_parallel b/net/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/net/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 5eff56ffe..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/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 78c91b0e9..000000000 --- a/net/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/net/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 e02a156fe..000000000 --- a/neu/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/neu/build_and_test_parallel b/neu/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/neu/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 2940763bb..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 310aeb715..a67ba73b1 100644 --- a/neu/plotter/src/neu_plotter.f90 +++ b/neu/plotter/src/neu_plotter.f90 @@ -5,6 +5,7 @@ program neu_plotter use const_lib 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 78c91b0e9..000000000 --- a/neu/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/neu/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/num/Makefile b/num/Makefile new file mode 100644 index 000000000..8998e1ea0 --- /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.f \ + public/num_lib.f \ + 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.f \ + private/mod_rosenbrock.f \ + private/mod_simplex.f90 \ + private/mod_solout_root.f \ + private/mod_bobyqa.f \ + private/mod_brent.f90 \ + private/mod_newton.f \ + private/mod_newuoa.f +SRCS_CHECK := test/src/bari_beam.f \ + test/src/bari_chemakzo.f \ + test/src/bari_medakzo.f \ + test/src/bari_vdpol.f \ + 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 e02a156fe..000000000 --- a/num/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/num/build_and_test_parallel b/num/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/num/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 32b1569c3..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.f \ - mod_dop853.f mod_dopri5.f mod_dc_decsol.f \ - mod_rosenbrock.f mod_brent.f90 mod_qsort.f90 mod_root.f mod_solout_root.f \ - mod_random.f90 mod_newton.f mod_bobyqa.f mod_newuoa.f \ - accurate_sum_auto_diff_star_order1.f90 \ - accurate_sum.f90 mod_simplex.f90 mod_integrate.f90 num_lib.f \ - -################################################################# -# -# 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 5ab88af39..000000000 --- a/num/test/make/makefile_base +++ /dev/null @@ -1,121 +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.o test_int_support.o \ - bari_beam.o test_beam.o \ - bari_chemakzo.o test_chemakzo.o \ - bari_medakzo.o test_medakzo.o \ - bari_vdpol.o test_vdpol.o \ - test_diffusion.o test_brent.o test_bobyqa.o test_newuoa.o \ - test_simplex.o test_newton.o test_integrate.f - -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 %.f,%.o,$(patsubst %.f90,%.o,$(TEST_SRCS))) -TEST_MPI_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.o,$(TEST_MPI_SRCS))) -SAMPLE_OBJS = $(patsubst %.f,%.o,$(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 - -%.o : %.f -ifneq ($(QUIET),) - @echo TEST_COMPILE fixed $< - @$(TEST_COMPILE) $(FCfixed) -fimplicit-none $< -else - $(TEST_COMPILE) $(FCfixed)-fimplicit-none $< -endif - -%.o: %.f90 -ifneq ($(QUIET),) - @echo TEST_COMPILE free $< - @$(TEST_COMPILE) $(FCfree) -fimplicit-none $< -else - $(TEST_COMPILE) $(FCfree) -fimplicit-none $< -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/num/test/mk b/num/test/mk deleted file mode 100755 index 78c91b0e9..000000000 --- a/num/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/num/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 e02a156fe..000000000 --- a/package_template/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 9762d173b..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 78c91b0e9..000000000 --- a/package_template/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/package_template/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester diff --git a/package_template_make_copy b/package_template_make_copy deleted file mode 100755 index 4b0e487b5..000000000 --- a/package_template_make_copy +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/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 -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 -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..773d20dbf --- /dev/null +++ b/rates/Makefile @@ -0,0 +1,46 @@ +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 +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 e02a156fe..000000000 --- a/rates/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/rates/build_and_test_parallel b/rates/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/rates/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 2802566db..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 3e7bb15f0..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 %.f,%.o,$(patsubst %.f90,%.o,$(TEST_SRCS))) -SHOW_RATES_OBJS = $(patsubst %.f,%.o,$(patsubst %.f90,%.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 78c91b0e9..000000000 --- a/rates/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/rates/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 2b213ddbd..000000000 --- a/sample/build_and_test +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/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 b97f8e05d..000000000 --- a/sample/ck +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/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 3d8def7ad..000000000 --- a/sample/src/eos_correction.f90 +++ /dev/null @@ -1,248 +0,0 @@ - ! *********************************************************************** - ! - ! Copyright (C) 2011-2019 The MESA Team - ! - ! This file is part of MESA. - ! - ! MESA is free software; you can redistribute it and/or modify - ! it under the terms of the GNU General Library Public License as published - ! by the Free Software Foundation; either version 2 of the License, or - ! (at your option) any later version. - ! - ! MESA 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 Library General Public License for more details. - ! - ! You should have received a copy of the GNU Library General Public License - ! along with this software; if not, write to the Free Software - ! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ! - ! *********************************************************************** - - program eos_correction - use eos_def - use eos_lib - use chem_def - use chem_lib - use const_lib - 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) - implicit none - 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 e08b6f7b1..000000000 --- a/sample/src/sample.f90 +++ /dev/null @@ -1,219 +0,0 @@ -! *********************************************************************** -! -! Copyright (C) 2011-2019 The MESA Team -! -! This file is part of MESA. -! -! MESA is free software; you can redistribute it and/or modify -! it under the terms of the GNU General Library Public License as published -! by the Free Software Foundation; either version 2 of the License, or -! (at your option) any later version. -! -! MESA 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 Library General Public License for more details. -! -! You should have received a copy of the GNU Library General Public License -! along with this software; if not, write to the Free Software -! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -! -! *********************************************************************** - -program sample_eos - use eos_def - use eos_lib - use chem_def - use chem_lib - use const_lib - 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.f - 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.f - 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 111fee80c..d203e5f84 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 85be05a62..68f9ac58f 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..6e4dd3059 --- /dev/null +++ b/star/Makefile @@ -0,0 +1,276 @@ +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_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 star_data ionization atm turb auto_diff +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 \ + pulse.mod \ + pgstar_abundance.mod \ + pgstar_color_magnitude.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.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 + +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 e02a156fe..000000000 --- a/star/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/star/build_and_test_parallel b/star/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/star/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test_parallel diff --git a/star/clean b/star/clean deleted file mode 100755 index 8fba6b2d9..000000000 --- a/star/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 6604101c6..000000000 --- a/star/cpv +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/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 b4073591e..ea2440444 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 95545a5c1..000000000 --- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP2_TDC/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_RSP2/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_compare_pulses/dev_compare_Cepheid_RSP_TDC/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_BEP/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_BEP/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_BEP/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_BEP/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_BLAP/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_BLAP/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_BLAP/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_BLAP/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_BW_Vul/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_BW_Vul/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 2808e90f9..e6d88e37d 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 @@ -174,7 +174,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 @@ -222,8 +222,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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_Cepheid/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 d9a0b1b93..23fca3437 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 @@ -197,7 +197,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 @@ -551,8 +551,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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_Cepheid_6M/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_Cepheid_9M/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_Delta_Scuti/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Mira/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Mira/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_Mira/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_Mira/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_RR_Lyrae/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_RSG/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_RSG/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_RSG/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_RSG/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_Type_II_Cepheid/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/rn1 +++ b/star/dev_cases_star_to_RSP2/dev_beta_Cepheid/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_BEP/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_BEP/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_test_RSP2/dev_rsp2_BEP/rn1 +++ b/star/dev_cases_test_RSP2/dev_rsp2_BEP/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_test_RSP2/dev_rsp2_BLAP/rn1 +++ b/star/dev_cases_test_RSP2/dev_rsp2_BLAP/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/rn1 +++ b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/rn1 +++ b/star/dev_cases_test_RSP2/dev_rsp2_Cepheid_6M/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/rn1 +++ b/star/dev_cases_test_RSP2/dev_rsp2_Delta_Scuti/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/rn1 +++ b/star/dev_cases_test_RSP2/dev_rsp2_RR_Lyrae/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_RSP2/dev_rsp2_Type_II_Cepheid/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_he_core_flash/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/dev_cases_test_TDC/dev_TDC_through_ppisn/rn1 +++ b/star/dev_cases_test_TDC/dev_TDC_through_ppisn/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_to_cc_12/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 2fda3f937..7637a42a5 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 @@ -26,7 +26,7 @@ module run_star_extras use star_def use const_def use math_lib - use gyre_lib + use gyre_mesa_m implicit none @@ -134,8 +134,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 95545a5c1..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_to_cc_80/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 2fda3f937..7637a42a5 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 @@ -26,7 +26,7 @@ module run_star_extras use star_def use const_def use math_lib - use gyre_lib + use gyre_mesa_m implicit none @@ -134,8 +134,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 95545a5c1..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_to_pisn_200/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 2fda3f937..7637a42a5 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 @@ -26,7 +26,7 @@ module run_star_extras use star_def use const_def use math_lib - use gyre_lib + use gyre_mesa_m implicit none @@ -134,8 +134,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 95545a5c1..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_to_ppisn_100/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 2fda3f937..7637a42a5 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 @@ -26,7 +26,7 @@ module run_star_extras use star_def use const_def use math_lib - use gyre_lib + use gyre_mesa_m implicit none @@ -134,8 +134,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 95545a5c1..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/dev_cases_test_TDC/dev_TDC_wd_nova_burst/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..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 @@ -#!/bin/bash +#!/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 25590040a..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 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 0e7b4f45a..a3ce1459a 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 ac59d2b64..223adacb4 100644 --- a/star/job/other_extras.f90 +++ b/star/job/other_extras.f90 @@ -197,7 +197,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 4afdafa85..000000000 --- a/star/make/makefile_base +++ /dev/null @@ -1,432 +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_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 - -pgstar_ctrls_io.o: %.o : %.f90 -ifneq ($(QUIET),) - @echo COMPILE_LEGACY $< - @$(COMPILE_LEGACY) $(SLOW_COMPILE) $< -else - $(COMPILE_LEGACY) $(SLOW_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 5f0ebf703..000000000 --- a/star/mk +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -cd make; make diff --git a/star/other/README b/star/other/README index c0f5772f5..a6df1752b 100644 --- a/star/other/README +++ b/star/other/README @@ -6,7 +6,7 @@ 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. +In your work directory, do ./rn to check that it is okay. Don't 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/pgstar_support.f90 b/star/private/pgstar_support.f90 index 3da1c7341..f74023cf3 100644 --- a/star/private/pgstar_support.f90 +++ b/star/private/pgstar_support.f90 @@ -156,7 +156,11 @@ subroutine check_window(s, p, ierr) else if (p% win_flag .and. (.not. p% do_win)) then if (p% id_win == 0) & call open_device(s, p, .false., '/xwin', p% id_win, ierr) - if (ierr == 0 .and. p% id_win > 0) p% do_win = .true. + if (ierr == 0 .and. p% id_win > 0) then + p% do_win = .true. + else + ierr = 0 + end if end if if (p% do_win .and. p% id_win > 0 .and. & (p% win_width /= p% prev_win_width .or. & @@ -260,7 +264,10 @@ subroutine open_device(s, p, is_file, dev, id, ierr) ierr = 0 id = -1 id = pgopen(trim(dev)) - if (id <= 0) return + if (id <= 0) then + ierr = -1 + return + end if !write(*,*) 'open device <' // trim(dev) // '> ' // trim(p% name), id if (is_file) then @@ -575,125 +582,16 @@ integer function set_c(index, clr_i, r, g, b) end function set_c - integer function setcolour(i, name, ierr) - integer :: i + integer function setcolour(index, name, ierr) + integer :: index character (len = *) :: name integer, intent(out) :: ierr - call Set_Pgplot_Colour(i, name, ierr) - setcolour = i + 1 + call pgscrn(index, name, ierr) + setcolour = index + 1 end function setcolour end subroutine Set_Colours - - subroutine Set_Pgplot_Colour(index, name, ierr) - use utils_lib - - integer :: index - character (len = *) :: name - integer, intent(out) :: ierr - - logical, save :: have_colour_list = .false. - real, allocatable, dimension(:), save :: red, green, blue - character (len = 64), allocatable, dimension(:), save :: colournames - integer, save :: nrgbcolours, low, hi - integer :: i - - ierr = 0 - if (.not.have_colour_list) then - call loadRGBtxt(ierr) - if (ierr /= 0) return - have_colour_list = .true. - call pgqcol(low, hi) - end if - - if (.not. (low<=index .and. index<=hi)) then - write(*, '(a,i4,a,i3,a,i3)') "Set_Pgplot_Colour: requested index of ", index, & - " not in ", low, " to ", hi - return - endif - - do i = 1, nrgbcolours - if (colournames(i) == name) exit - end do - if (i>nrgbcolours) then - write(*, *) "Set_Pgplot_Colour: colour ", trim(name), " not found" - ierr = -1 - return - end if - call pgscr(index, red(i), green(i), blue(i)) - - - contains - - - subroutine loadRGBtxt(ierr) - integer, intent(out) :: ierr - - logical :: fexist - integer :: iounit, i, j, r, g, b, len - character (len = 1024) :: msg, fname, pgplotdir, line - ierr = 0 - - call GET_ENVIRONMENT_VARIABLE("PGPLOT_DIR", pgplotdir) - if (len_trim(pgplotdir)==0) then - write(*, *) "PGPLOT_DIR is not set in your shell" - ierr = -1 - return - end if - - fname = trim(pgplotdir) // "/rgb.txt" - inquire(file = trim(fname), exist = fexist) - if (.not.fexist) then - write(*, *) 'loadRGBtxt: pgplot ', trim(fname), " does not exist" - write(*, *) 'loadRGBtxt: pgplot rgb.txt file does not exist' - ierr = -1 - return - end if - - open(newunit = iounit, file = trim(fname), status = "old", iostat = ierr, iomsg = msg) - - if (ierr/=0) then - write(*, *) trim(msg) - write(*, *) 'loadRGBtxt: cannot open the pgplot rgb.txt file' - ierr = -1 - return - end if - - ! count colours - len = 0 - do while(.true.) - read(iounit, *, iostat = ierr) i - if (ierr/=0) exit - len = len + 1 - end do - nrgbcolours = len - close(iounit) - - allocate(red(nrgbcolours), green(nrgbcolours), blue(nrgbcolours)) - allocate(colournames(nrgbcolours)) - open(newunit = iounit, file = trim(fname), status = "old", iostat = ierr, iomsg = msg) - do i = 1, nrgbcolours - read(iounit, '(a)') line - read(line, *) r, g, b - j = 1 - do while(line(j:j)==char(32) .or. & - (line(j:j)>=char(48) .and. line(j:j)<=char(57))) - j = j + 1 - end do - read(line(j:), '(a)') colournames(i) - red(i) = r / 255.0 - green(i) = g / 255.0 - blue(i) = b / 255.0 - end do - close(iounit) - - end subroutine loadRGBtxt - - - end subroutine Set_Pgplot_Colour - - subroutine read_TRho_data(fname, logTs, logRhos, ierr) use utils_lib use const_def, only : mesa_data_dir diff --git a/star/replace_v b/star/replace_v deleted file mode 100755 index e27cbd79f..000000000 --- a/star/replace_v +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/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 e3155f6ff..eb53b604b 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 cd912e5d9..000000000 --- a/star/test/ck +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 99e2f53d4..000000000 --- a/star/test/make/makefile_base +++ /dev/null @@ -1,84 +0,0 @@ -# This is the makefile for running mesa/star - -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 38187a5c6..000000000 --- a/star/test/mk +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/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 fcdebe0ad..000000000 --- a/star/test/mkx +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/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 c38f4ad91..000000000 --- a/star/test/re +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/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 25590040a..000000000 --- a/star/test/rn +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/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 28e21377c..6e6bd970a 100644 --- a/star/test/src/run_star_extras.f90 +++ b/star/test/src/run_star_extras.f90 @@ -32,6 +32,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 95545a5c1..000000000 --- a/star/test_suite/1.3M_ms_high_Z/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/1.3M_ms_high_Z/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/1.3M_ms_high_Z/rn1 +++ b/star/test_suite/1.3M_ms_high_Z/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/1.4M_ms_op_mono/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/1.4M_ms_op_mono/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/1.4M_ms_op_mono/rn1 +++ b/star/test_suite/1.4M_ms_op_mono/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/1.5M_with_diffusion/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/1.5M_with_diffusion/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/1.5M_with_diffusion/re +++ b/star/test_suite/1.5M_with_diffusion/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/1.5M_with_diffusion/rn1 +++ b/star/test_suite/1.5M_with_diffusion/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/12M_pre_ms_to_core_collapse/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/12M_pre_ms_to_core_collapse/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..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 @@ -#!/bin/bash +#!/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 565b74208..000000000 --- a/star/test_suite/12M_pre_ms_to_core_collapse/re_nomodfiles +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/12M_pre_ms_to_core_collapse/rn1 +++ b/star/test_suite/12M_pre_ms_to_core_collapse/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 38ebf3fc8..000000000 --- a/star/test_suite/12M_pre_ms_to_core_collapse/rn_all +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/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 35bd84f4c..000000000 --- a/star/test_suite/12M_pre_ms_to_core_collapse/rn_nomodfiles +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/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 3e3fbea8c..000000000 --- a/star/test_suite/12M_pre_ms_to_core_collapse/rn_standard +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/15M_dynamo/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/15M_dynamo/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/15M_dynamo/re +++ b/star/test_suite/15M_dynamo/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/15M_dynamo/rn1 +++ b/star/test_suite/15M_dynamo/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/16M_conv_premix/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/16M_conv_premix/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/16M_conv_premix/re +++ b/star/test_suite/16M_conv_premix/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/16M_conv_premix/rn1 +++ b/star/test_suite/16M_conv_premix/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/16M_predictive_mix/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/16M_predictive_mix/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/16M_predictive_mix/re +++ b/star/test_suite/16M_predictive_mix/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/16M_predictive_mix/rn1 +++ b/star/test_suite/16M_predictive_mix/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/1M_pre_ms_to_wd/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/1M_pre_ms_to_wd/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/1M_pre_ms_to_wd/rn1 +++ b/star/test_suite/1M_pre_ms_to_wd/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 aa898ce5e..000000000 --- a/star/test_suite/1M_pre_ms_to_wd/rn_standard +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/1M_thermohaline/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/1M_thermohaline/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/1M_thermohaline/re +++ b/star/test_suite/1M_thermohaline/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/1M_thermohaline/rn1 +++ b/star/test_suite/1M_thermohaline/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/20M_pre_ms_to_core_collapse/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/20M_pre_ms_to_core_collapse/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..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 @@ -#!/bin/bash +#!/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 565b74208..000000000 --- a/star/test_suite/20M_pre_ms_to_core_collapse/re_nomodfiles +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/20M_pre_ms_to_core_collapse/rn1 +++ b/star/test_suite/20M_pre_ms_to_core_collapse/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 1ef23b587..000000000 --- a/star/test_suite/20M_pre_ms_to_core_collapse/rn_all +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/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 35bd84f4c..000000000 --- a/star/test_suite/20M_pre_ms_to_core_collapse/rn_nomodfiles +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/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 fde5dbfab..000000000 --- a/star/test_suite/20M_pre_ms_to_core_collapse/rn_standard +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/20M_z2m2_high_rotation/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/20M_z2m2_high_rotation/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/20M_z2m2_high_rotation/re +++ b/star/test_suite/20M_z2m2_high_rotation/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/20M_z2m2_high_rotation/rn1 +++ b/star/test_suite/20M_z2m2_high_rotation/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/5M_cepheid_blue_loop/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/5M_cepheid_blue_loop/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/5M_cepheid_blue_loop/re +++ b/star/test_suite/5M_cepheid_blue_loop/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/5M_cepheid_blue_loop/rn1 +++ b/star/test_suite/5M_cepheid_blue_loop/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/7M_prems_to_AGB/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/7M_prems_to_AGB/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/7M_prems_to_AGB/re +++ b/star/test_suite/7M_prems_to_AGB/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/7M_prems_to_AGB/rn1 +++ b/star/test_suite/7M_prems_to_AGB/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/R_CrB_star/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/R_CrB_star/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/R_CrB_star/re +++ b/star/test_suite/R_CrB_star/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/R_CrB_star/rn1 +++ b/star/test_suite/R_CrB_star/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/T_tau_gradr/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/T_tau_gradr/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/T_tau_gradr/re +++ b/star/test_suite/T_tau_gradr/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/T_tau_gradr/rn1 +++ b/star/test_suite/T_tau_gradr/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/accreted_material_j/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/accreted_material_j/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/accreted_material_j/re +++ b/star/test_suite/accreted_material_j/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/accreted_material_j/rn1 +++ b/star/test_suite/accreted_material_j/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/adjust_net/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/adjust_net/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/adjust_net/re +++ b/star/test_suite/adjust_net/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/adjust_net/rn1 +++ b/star/test_suite/adjust_net/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +make run diff --git a/star/test_suite/build_and_run b/star/test_suite/build_and_run deleted file mode 100755 index 015afb9f3..000000000 --- a/star/test_suite/build_and_run +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/c13_pocket/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/c13_pocket/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/c13_pocket/re +++ b/star/test_suite/c13_pocket/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/c13_pocket/rn1 +++ b/star/test_suite/c13_pocket/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/carbon_kh/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/carbon_kh/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/carbon_kh/re +++ b/star/test_suite/carbon_kh/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/carbon_kh/rn1 +++ b/star/test_suite/carbon_kh/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +make run diff --git a/star/test_suite/carbon_kh/rnall b/star/test_suite/carbon_kh/rnall deleted file mode 100755 index c6b5ffb89..000000000 --- a/star/test_suite/carbon_kh/rnall +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/cburn_inward/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/cburn_inward/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/cburn_inward/re +++ b/star/test_suite/cburn_inward/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/cburn_inward/rn1 +++ b/star/test_suite/cburn_inward/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/ccsn_IIp/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/ccsn_IIp/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/ccsn_IIp/re +++ b/star/test_suite/ccsn_IIp/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/ccsn_IIp/rn1 +++ b/star/test_suite/ccsn_IIp/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 336fb85b0..000000000 --- a/star/test_suite/ccsn_IIp/rn_all +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/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 45ebd3664..000000000 --- a/star/test_suite/ccsn_IIp/rn_standard +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/check_pulse_atm/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/check_pulse_atm/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/check_pulse_atm/re +++ b/star/test_suite/check_pulse_atm/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/check_pulse_atm/rn1 +++ b/star/test_suite/check_pulse_atm/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/check_redo/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/check_redo/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/check_redo/re +++ b/star/test_suite/check_redo/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/check_redo/rn1 +++ b/star/test_suite/check_redo/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/conductive_flame/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/conductive_flame/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/conductive_flame/re +++ b/star/test_suite/conductive_flame/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/conductive_flame/rn1 +++ b/star/test_suite/conductive_flame/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/conserve_angular_momentum/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/conserve_angular_momentum/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/conserve_angular_momentum/re +++ b/star/test_suite/conserve_angular_momentum/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/conserve_angular_momentum/rn1 +++ b/star/test_suite/conserve_angular_momentum/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/conv_core_cpm/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/conv_core_cpm/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/conv_core_cpm/re +++ b/star/test_suite/conv_core_cpm/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/conv_core_cpm/rn1 +++ b/star/test_suite/conv_core_cpm/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/custom_colors/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/custom_colors/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/custom_colors/re +++ b/star/test_suite/custom_colors/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/custom_colors/rn1 +++ b/star/test_suite/custom_colors/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/custom_rates/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/custom_rates/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/custom_rates/re +++ b/star/test_suite/custom_rates/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/custom_rates/rn1 +++ b/star/test_suite/custom_rates/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/diffusion_smoothness/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/diffusion_smoothness/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/diffusion_smoothness/re +++ b/star/test_suite/diffusion_smoothness/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/diffusion_smoothness/rn1 +++ b/star/test_suite/diffusion_smoothness/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +make run diff --git a/star/test_suite/each_test_clean b/star/test_suite/each_test_clean index 3be4825e5..afa3da5c6 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 5fdb014e5..e56a76e14 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 59bac7614..1c5034420 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 95545a5c1..000000000 --- a/star/test_suite/extended_convective_penetration/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/extended_convective_penetration/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/extended_convective_penetration/re +++ b/star/test_suite/extended_convective_penetration/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/extended_convective_penetration/rn1 +++ b/star/test_suite/extended_convective_penetration/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/gyre_in_mesa_bcep/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/gyre_in_mesa_bcep/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/gyre_in_mesa_bcep/re +++ b/star/test_suite/gyre_in_mesa_bcep/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/gyre_in_mesa_bcep/rn1 +++ b/star/test_suite/gyre_in_mesa_bcep/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 996914540..eb2357176 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 @@ -94,7 +94,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 95545a5c1..000000000 --- a/star/test_suite/gyre_in_mesa_envelope/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/gyre_in_mesa_envelope/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/gyre_in_mesa_envelope/re +++ b/star/test_suite/gyre_in_mesa_envelope/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/gyre_in_mesa_envelope/rn1 +++ b/star/test_suite/gyre_in_mesa_envelope/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 996914540..eb2357176 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 @@ -94,7 +94,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 95545a5c1..000000000 --- a/star/test_suite/gyre_in_mesa_ms/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/gyre_in_mesa_ms/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/gyre_in_mesa_ms/re +++ b/star/test_suite/gyre_in_mesa_ms/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/gyre_in_mesa_ms/rn1 +++ b/star/test_suite/gyre_in_mesa_ms/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 996914540..eb2357176 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 @@ -94,7 +94,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 95545a5c1..000000000 --- a/star/test_suite/gyre_in_mesa_rsg/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/gyre_in_mesa_rsg/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/gyre_in_mesa_rsg/re +++ b/star/test_suite/gyre_in_mesa_rsg/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/gyre_in_mesa_rsg/rn1 +++ b/star/test_suite/gyre_in_mesa_rsg/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 996914540..eb2357176 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 @@ -94,7 +94,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 95545a5c1..000000000 --- a/star/test_suite/gyre_in_mesa_spb/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/gyre_in_mesa_spb/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/gyre_in_mesa_spb/re +++ b/star/test_suite/gyre_in_mesa_spb/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/gyre_in_mesa_spb/rn1 +++ b/star/test_suite/gyre_in_mesa_spb/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 996914540..eb2357176 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 @@ -94,7 +94,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 95545a5c1..000000000 --- a/star/test_suite/gyre_in_mesa_wd/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/gyre_in_mesa_wd/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/gyre_in_mesa_wd/re +++ b/star/test_suite/gyre_in_mesa_wd/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/gyre_in_mesa_wd/rn1 +++ b/star/test_suite/gyre_in_mesa_wd/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 996914540..eb2357176 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 @@ -94,7 +94,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 95545a5c1..000000000 --- a/star/test_suite/hb_2M/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/hb_2M/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/hb_2M/re +++ b/star/test_suite/hb_2M/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/hb_2M/rn1 +++ b/star/test_suite/hb_2M/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/high_mass/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/high_mass/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/high_mass/re +++ b/star/test_suite/high_mass/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/high_mass/rn1 +++ b/star/test_suite/high_mass/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/high_rot_darkening/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/high_rot_darkening/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/high_rot_darkening/re +++ b/star/test_suite/high_rot_darkening/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/high_rot_darkening/rn1 +++ b/star/test_suite/high_rot_darkening/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/high_z/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/high_z/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/high_z/re +++ b/star/test_suite/high_z/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/high_z/rn1 +++ b/star/test_suite/high_z/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/hot_cool_wind/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/hot_cool_wind/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/hot_cool_wind/re +++ b/star/test_suite/hot_cool_wind/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/hot_cool_wind/rn1 +++ b/star/test_suite/hot_cool_wind/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/hse_riemann/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/hse_riemann/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/hse_riemann/re +++ b/star/test_suite/hse_riemann/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/hse_riemann/rn1 +++ b/star/test_suite/hse_riemann/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/irradiated_planet/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/irradiated_planet/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/irradiated_planet/re +++ b/star/test_suite/irradiated_planet/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/irradiated_planet/rn1 +++ b/star/test_suite/irradiated_planet/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/low_z/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/low_z/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/low_z/re +++ b/star/test_suite/low_z/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/low_z/rn1 +++ b/star/test_suite/low_z/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/magnetic_braking/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/magnetic_braking/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/magnetic_braking/re +++ b/star/test_suite/magnetic_braking/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/magnetic_braking/rn1 +++ b/star/test_suite/magnetic_braking/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_brown_dwarf/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_brown_dwarf/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_brown_dwarf/re +++ b/star/test_suite/make_brown_dwarf/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_brown_dwarf/rn1 +++ b/star/test_suite/make_brown_dwarf/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_co_wd/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_co_wd/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_co_wd/re +++ b/star/test_suite/make_co_wd/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_co_wd/rn1 +++ b/star/test_suite/make_co_wd/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_env/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_env/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_env/re +++ b/star/test_suite/make_env/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_env/rn1 +++ b/star/test_suite/make_env/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_he_wd/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_he_wd/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_he_wd/re +++ b/star/test_suite/make_he_wd/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_he_wd/rn1 +++ b/star/test_suite/make_he_wd/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_metals/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_metals/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_metals/re +++ b/star/test_suite/make_metals/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_metals/rn1 +++ b/star/test_suite/make_metals/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_o_ne_wd/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_o_ne_wd/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_o_ne_wd/re +++ b/star/test_suite/make_o_ne_wd/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_o_ne_wd/rn1 +++ b/star/test_suite/make_o_ne_wd/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 08121ffce..000000000 --- a/star/test_suite/make_o_ne_wd/rn_all +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/make_planets/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_planets/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_planets/re +++ b/star/test_suite/make_planets/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_planets/rn1 +++ b/star/test_suite/make_planets/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 aec7a5195..000000000 --- a/star/test_suite/make_pre_ccsn_13bvn/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_pre_ccsn_13bvn/re +++ b/star/test_suite/make_pre_ccsn_13bvn/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_pre_ccsn_13bvn/rn1 +++ b/star/test_suite/make_pre_ccsn_13bvn/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_sdb/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_sdb/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_sdb/re +++ b/star/test_suite/make_sdb/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_sdb/rn1 +++ b/star/test_suite/make_sdb/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_zams/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_zams/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_zams/re +++ b/star/test_suite/make_zams/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_zams/rn1 +++ b/star/test_suite/make_zams/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_zams_low_mass/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_zams_low_mass/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/make_zams_low_mass/re +++ b/star/test_suite/make_zams_low_mass/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_zams_low_mass/rn1 +++ b/star/test_suite/make_zams_low_mass/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/make_zams_ultra_high_mass/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/make_zams_ultra_high_mass/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/make_zams_ultra_high_mass/rn1 +++ b/star/test_suite/make_zams_ultra_high_mass/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/ns_c/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/ns_c/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/ns_c/re +++ b/star/test_suite/ns_c/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/ns_c/rn1 +++ b/star/test_suite/ns_c/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/ns_h/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/ns_h/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/ns_h/re +++ b/star/test_suite/ns_h/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/ns_h/rn1 +++ b/star/test_suite/ns_h/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/ns_he/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/ns_he/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/ns_he/re +++ b/star/test_suite/ns_he/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/ns_he/rn1 +++ b/star/test_suite/ns_he/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/other_physics_hooks/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/other_physics_hooks/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/other_physics_hooks/re +++ b/star/test_suite/other_physics_hooks/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/other_physics_hooks/rn1 +++ b/star/test_suite/other_physics_hooks/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/pisn/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/pisn/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/pisn/re +++ b/star/test_suite/pisn/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/pisn/rn1 +++ b/star/test_suite/pisn/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +make run diff --git a/star/test_suite/pisn/rn_all b/star/test_suite/pisn/rn_all deleted file mode 100755 index f2cb24369..000000000 --- a/star/test_suite/pisn/rn_all +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/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 2c9f1a66a..000000000 --- a/star/test_suite/pisn/rn_standard +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/ppisn/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/ppisn/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/ppisn/re +++ b/star/test_suite/ppisn/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/ppisn/rn1 +++ b/star/test_suite/ppisn/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/radiative_levitation/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/radiative_levitation/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/radiative_levitation/re +++ b/star/test_suite/radiative_levitation/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/radiative_levitation/rn1 +++ b/star/test_suite/radiative_levitation/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/relax_composition_j_entropy/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/relax_composition_j_entropy/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/relax_composition_j_entropy/re +++ b/star/test_suite/relax_composition_j_entropy/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/relax_composition_j_entropy/rn1 +++ b/star/test_suite/relax_composition_j_entropy/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 806506fe1..000000000 --- a/star/test_suite/relax_composition_j_entropy/rn_all +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/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 53ec6426a..000000000 --- a/star/test_suite/relax_composition_j_entropy/rn_standard +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/rsp_BEP/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_BEP/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_BEP/re +++ b/star/test_suite/rsp_BEP/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_BEP/rn1 +++ b/star/test_suite/rsp_BEP/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/rsp_BLAP/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_BLAP/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_BLAP/re +++ b/star/test_suite/rsp_BLAP/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_BLAP/rn1 +++ b/star/test_suite/rsp_BLAP/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/rsp_Cepheid/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_Cepheid/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_Cepheid/re +++ b/star/test_suite/rsp_Cepheid/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_Cepheid/rn1 +++ b/star/test_suite/rsp_Cepheid/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/rsp_Cepheid_6M/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_Cepheid_6M/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_Cepheid_6M/re +++ b/star/test_suite/rsp_Cepheid_6M/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_Cepheid_6M/rn1 +++ b/star/test_suite/rsp_Cepheid_6M/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/rsp_Delta_Scuti/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_Delta_Scuti/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_Delta_Scuti/re +++ b/star/test_suite/rsp_Delta_Scuti/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_Delta_Scuti/rn1 +++ b/star/test_suite/rsp_Delta_Scuti/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/rsp_RR_Lyrae/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_RR_Lyrae/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_RR_Lyrae/re +++ b/star/test_suite/rsp_RR_Lyrae/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_RR_Lyrae/rn1 +++ b/star/test_suite/rsp_RR_Lyrae/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/rsp_Type_II_Cepheid/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_Type_II_Cepheid/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_Type_II_Cepheid/re +++ b/star/test_suite/rsp_Type_II_Cepheid/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_Type_II_Cepheid/rn1 +++ b/star/test_suite/rsp_Type_II_Cepheid/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/rsp_check_2nd_crossing/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/rsp_check_2nd_crossing/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_check_2nd_crossing/re +++ b/star/test_suite/rsp_check_2nd_crossing/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_check_2nd_crossing/rn1 +++ b/star/test_suite/rsp_check_2nd_crossing/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/rsp_gyre/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_gyre/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/rsp_gyre/re +++ b/star/test_suite/rsp_gyre/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_gyre/rn1 +++ b/star/test_suite/rsp_gyre/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 2d4c1bc05..21e2df675 100644 --- a/star/test_suite/rsp_gyre/src/run_star_extras.f90 +++ b/star/test_suite/rsp_gyre/src/run_star_extras.f90 @@ -107,7 +107,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 809330fc5..f6c3da2bf 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 @@ -25,7 +25,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 95545a5c1..000000000 --- a/star/test_suite/rsp_save_and_load_file/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean 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 aec7a5195..000000000 --- a/star/test_suite/rsp_save_and_load_file/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..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 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/rsp_save_and_load_file/rn1 +++ b/star/test_suite/rsp_save_and_load_file/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/semiconvection/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/semiconvection/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/semiconvection/re +++ b/star/test_suite/semiconvection/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/semiconvection/rn1 +++ b/star/test_suite/semiconvection/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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..c779b9d6d --- /dev/null +++ b/star/test_suite/simplex_solar_calibration/Makefile @@ -0,0 +1 @@ +include $(MESA_DIR)/star/work/Makefile \ No newline at end of file diff --git a/star/test_suite/simplex_solar_calibration/clean b/star/test_suite/simplex_solar_calibration/clean deleted file mode 100755 index 95545a5c1..000000000 --- a/star/test_suite/simplex_solar_calibration/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/simplex_solar_calibration/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/simplex_solar_calibration/re +++ b/star/test_suite/simplex_solar_calibration/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/simplex_solar_calibration/rn1 +++ b/star/test_suite/simplex_solar_calibration/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/split_burn_big_net/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/split_burn_big_net/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/split_burn_big_net/re +++ b/star/test_suite/split_burn_big_net/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/split_burn_big_net/rn1 +++ b/star/test_suite/split_burn_big_net/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/starspots/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/starspots/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c38f4ad91..7093783a3 100755 --- a/star/test_suite/starspots/re +++ b/star/test_suite/starspots/re @@ -1,9 +1,11 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/starspots/rn1 +++ b/star/test_suite/starspots/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/test_case_template/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/test_case_template/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/test_case_template/re +++ b/star/test_suite/test_case_template/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/test_case_template/rn1 +++ b/star/test_suite/test_case_template/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/test_memory/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/test_memory/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/timing/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/timing/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/timing/re +++ b/star/test_suite/timing/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/timing/rn1 +++ b/star/test_suite/timing/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/twin_studies/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/twin_studies/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/twin_studies/re +++ b/star/test_suite/twin_studies/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/twin_studies/rn1 +++ b/star/test_suite/twin_studies/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 aec7a5195..000000000 --- a/star/test_suite/tzo/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/tzo/re +++ b/star/test_suite/tzo/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/tzo/rn1 +++ b/star/test_suite/tzo/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/wd_acc_small_dm/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/wd_acc_small_dm/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/wd_acc_small_dm/re +++ b/star/test_suite/wd_acc_small_dm/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/wd_acc_small_dm/rn1 +++ b/star/test_suite/wd_acc_small_dm/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/wd_aic/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/wd_aic/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/wd_aic/re +++ b/star/test_suite/wd_aic/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/wd_aic/rn1 +++ b/star/test_suite/wd_aic/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/wd_c_core_ignition/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/wd_c_core_ignition/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/wd_c_core_ignition/re +++ b/star/test_suite/wd_c_core_ignition/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/wd_c_core_ignition/rn1 +++ b/star/test_suite/wd_c_core_ignition/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 246fad299..000000000 --- a/star/test_suite/wd_c_core_ignition/rn_all +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/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 83875550d..000000000 --- a/star/test_suite/wd_c_core_ignition/rn_standard +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/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 95545a5c1..000000000 --- a/star/test_suite/wd_cool_0.6M/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/wd_cool_0.6M/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/wd_cool_0.6M/re +++ b/star/test_suite/wd_cool_0.6M/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/wd_cool_0.6M/rn1 +++ b/star/test_suite/wd_cool_0.6M/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/wd_diffusion/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/wd_diffusion/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/wd_diffusion/re +++ b/star/test_suite/wd_diffusion/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/wd_diffusion/rn1 +++ b/star/test_suite/wd_diffusion/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/wd_he_shell_ignition/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/wd_he_shell_ignition/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/wd_he_shell_ignition/re +++ b/star/test_suite/wd_he_shell_ignition/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/wd_he_shell_ignition/rn1 +++ b/star/test_suite/wd_he_shell_ignition/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/wd_nova_burst/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/wd_nova_burst/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/wd_nova_burst/re +++ b/star/test_suite/wd_nova_burst/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/wd_nova_burst/rn1 +++ b/star/test_suite/wd_nova_burst/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/wd_stable_h_burn/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/wd_stable_h_burn/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/wd_stable_h_burn/re +++ b/star/test_suite/wd_stable_h_burn/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/wd_stable_h_burn/rn1 +++ b/star/test_suite/wd_stable_h_burn/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 95545a5c1..000000000 --- a/star/test_suite/zams_to_cc_80/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 aec7a5195..000000000 --- a/star/test_suite/zams_to_cc_80/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/test_suite/zams_to_cc_80/re +++ b/star/test_suite/zams_to_cc_80/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 565b74208..000000000 --- a/star/test_suite/zams_to_cc_80/re_nomodfiles +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/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 25590040a..f4ce7695f 100755 --- a/star/test_suite/zams_to_cc_80/rn1 +++ b/star/test_suite/zams_to_cc_80/rn1 @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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 35bd84f4c..000000000 --- a/star/test_suite/zams_to_cc_80/rn_nomodfiles +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/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 6424a2bf1..0bfd9b78c 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,8 +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 - - +the ``make clean``. diff --git a/star/work/clean b/star/work/clean deleted file mode 100755 index 95545a5c1..000000000 --- a/star/work/clean +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -cd make -make clean diff --git a/star/work/make/makefile b/star/work/make/makefile deleted file mode 100644 index 89aa01f2c..000000000 --- a/star/work/make/makefile +++ /dev/null @@ -1,9 +0,0 @@ -ifeq ($(MESA_DIR),) -ifeq ($($MESA_DIR_INTENTIONALLY_EMPTY),) - $(error MESA_DIR enviroment 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 aec7a5195..000000000 --- a/star/work/mk +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/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 c9ef26f96..7093783a3 100755 --- a/star/work/re +++ b/star/work/re @@ -1,6 +1,6 @@ -#!/bin/bash +#!/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 25590040a..f4ce7695f 100755 --- a/star/work/rn +++ b/star/work/rn @@ -1,7 +1,5 @@ -#!/bin/bash +#!/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" +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..d68c30a17 --- /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.f +INTERNAL_DEPENDS_ON := const chem net kap colors neu +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 e02a156fe..000000000 --- a/star_data/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 2b3599335..000000000 --- a/star_data/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 87cd9c69a..000000000 --- a/star_data/cpv +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/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 f45ff6973..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 18c4f4639..000000000 --- a/star_data/replace_v +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/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 350b4d428..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.f - -################################################################# -# -# 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: %.f -ifneq ($(QUIET),) - @echo TEST_COMPILE $< - @$(TEST_COMPILE) $(FCfree) $< -else - $(TEST_COMPILE) $(FCfree) $< -endif - -################################################################# -# -# DEPENDENCIES - -SRC_PATH = $(TEST_SRC_DIR) - -vpath %.f $(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 78c91b0e9..000000000 --- a/star_data/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/star_data/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 1240aa7d4..b8a6c12dc 100644 --- a/stella/res/stella_extras.f90 +++ b/stella/res/stella_extras.f90 @@ -12,14 +12,14 @@ 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*132 runname,filestr,fname,test_str - character*256 line, my_mesa_dir + real(dp) :: dum,time,sum_tau,tauph,tau_extra,gdepos + character(132) filestr,fname,test_str + character(256) line, my_mesa_dir real(dp), parameter :: & A_Fe56 = 56d0, lambda0 = 5169.02d-8, f = 0.023, Z_div_X_solar = 0.02293d0, & @@ -30,25 +30,25 @@ 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) - if (ierr /= 0) then - write(*,*) 'const_init failed' - call mesa_error(__FILE__,__LINE__) - end if + if (ierr /= 0) then + write(*,*) 'const_init failed' + call mesa_error(__FILE__,__LINE__) + end if call math_init() @@ -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 f39220bbe..332aea81c 100755 --- a/touch +++ b/touch @@ -1,56 +1,8 @@ #!/bin/bash -function check_okay { - if [ $? -ne 0 ] - then - echo "FAILED" - exit 1 - fi -} +set -euo pipefile -function do_one { - cd $1 - 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..74dcfce4d --- /dev/null +++ b/turb/Makefile @@ -0,0 +1,26 @@ +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 +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 e02a156fe..000000000 --- a/turb/build_and_test +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -../utils/build_and_test diff --git a/turb/build_and_test_parallel b/turb/build_and_test_parallel deleted file mode 100755 index 2b3599335..000000000 --- a/turb/build_and_test_parallel +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 05b3ad991..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 78c91b0e9..000000000 --- a/turb/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/turb/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/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 0c3cd4fe5..000000000 --- a/utils/build_and_test +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/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 36376609f..000000000 --- a/utils/build_and_test_parallel +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/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 92b9126dc..000000000 --- a/utils/cp_if_newer +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/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 8f63be211..000000000 --- a/utils/e1 +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/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 e30c262fe..000000000 --- a/utils/i1 +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/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 4030ddda4..000000000 --- a/utils/i1p +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/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 14034b2b5..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 4559ea2d7..000000000 --- a/utils/makefile_header +++ /dev/null @@ -1,347 +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 enviroment variable is not set) -endif -endif - - -ifndef MESASDK_ROOT -ifndef MESA_DIR_INTENTIONALLY_EMPTY -$(error MESASDK_ROOT enviroment 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 alot -# 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 970934b54..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 enviroment 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 compilier 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/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 78c91b0e9..000000000 --- a/utils/test/mk +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/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 e5d7960ab..000000000 --- a/utils/test/rn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./tester