-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes to make MGITM compliant with SWMF
- Loading branch information
bartvand
committed
May 23, 2024
1 parent
8915134
commit 7615edf
Showing
574 changed files
with
233 additions
and
184,606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
#^CFG FILE TESTING | ||
|
||
### TESTS FOR THE STAND-ALONE GITM ### | ||
|
||
TIMINGFILE =./.test_file_timing.txt | ||
STARTTIME =rm $(TIMINGFILE); date +%s |xargs printf >$(TIMINGFILE);printf "*-1+">>$(TIMINGFILE); | ||
ENDTIME = date +%s >>$(TIMINGFILE); cat $(TIMINGFILE) | bc; | ||
|
||
timing: | ||
-@if([ "${TIMING}" ]); then $(STARTTIME) fi | ||
-@if([ "${TIMING}" ]); then $(ENDTIME) fi | ||
|
||
test: | ||
echo "Tests do not work currently" | ||
@rm -f *.diff | ||
-@($(MAKE) test_gitm_earth) | ||
-@($(MAKE) test_gitm_mars) | ||
@ls -l *.diff | ||
|
||
# All tests are done in this directory: | ||
TESTDIR = run_test | ||
|
||
# Reference solution is put into this directory when needed: | ||
REFDIR = run_test_ref | ||
|
||
test_help: | ||
@echo " test (run all tests)" | ||
@echo " test KEEP=y (run tests and keep run directories)" | ||
@echo " test MPIRUN= (run tests serially)" | ||
@echo " test NPFLAG=-n NP=3 (run tests with ${PARALLEL} -n 3)" | ||
@echo " test PARALLEL='ibrun' (run tests with ibrun)" | ||
@echo " test_gitm_earth (run Earth GITM test)" | ||
@echo " test_gitm_mars (run Mars GITM test)" | ||
|
||
test_rundir: | ||
rm -rf ${TESTDIR} | ||
$(MAKE) rundir RUNDIR=${TESTDIR} STANDALONE=YES | ||
|
||
### EARTH GITM TEST ### | ||
|
||
test_gitm_earth: | ||
$(MAKE) test_gitm_earth_1d | ||
# $(MAKE) test_gitm_earth_eclipse | ||
# $(MAKE) test_gitm_earth_3d | ||
|
||
test_gitm_earth_1d: | ||
@echo "test_gitm_earth_1d_compile..." > test_gitm_earth_1d.diff | ||
$(MAKE) test_gitm_earth_1d_compile | ||
@echo "test_gitm_earth_1d_rundir..." >> test_gitm_earth_1d.diff | ||
$(MAKE) test_gitm_earth_1d_rundir | ||
@echo "test_gitm_earth_1d_run..." >> test_gitm_earth_1d.diff | ||
$(MAKE) test_gitm_earth_1d_run | ||
@echo "test_gitm_earth_1d_check..." >> test_gitm_earth_1d.diff | ||
$(MAKE) test_gitm_earth_1d_check | ||
@if([ "${KEEP}" ]); then rm -rf run_$@; mv ${TESTDIR} run_$@; fi | ||
|
||
test_gitm_earth_eclipse: | ||
@echo "test_gitm_earth_eclipse_compile..." > test_gitm_earth_eclipse.diff | ||
$(MAKE) test_gitm_earth_eclipse_compile | ||
@echo "test_gitm_earth_eclipse_rundir..." >> test_gitm_earth_eclipse.diff | ||
$(MAKE) test_gitm_earth_eclipse_rundir | ||
@echo "test_gitm_earth_eclipse_run..." >> test_gitm_earth_eclipse.diff | ||
$(MAKE) test_gitm_earth_eclipse_run | ||
@echo "test_gitm_earth_eclipse_check..." >> test_gitm_earth_eclipse.diff | ||
$(MAKE) test_gitm_earth_eclipse_check | ||
@if([ "${KEEP}" ]); then rm -rf run_$@; mv ${TESTDIR} run_$@; fi | ||
|
||
test_gitm_earth_3d: | ||
@echo "test_gitm_earth_3d_compile..." > test_gitm_earth_3d.diff | ||
$(MAKE) test_gitm_earth_3d_compile | ||
@echo "test_gitm_earth_3d_rundir..." >> test_gitm_earth_3d.diff | ||
$(MAKE) test_gitm_earth_3d_rundir | ||
@echo "test_gitm_earth_3d_run..." >> test_gitm_earth_3d.diff | ||
$(MAKE) test_gitm_earth_3d_run | ||
@echo "test_gitm_earth_3d_check..." >> test_gitm_earth_3d.diff | ||
$(MAKE) test_gitm_earth_3d_check | ||
@if([ "${KEEP}" ]); then rm -rf run_$@; mv ${TESTDIR} run_$@; fi | ||
|
||
# ---------------------------------------------------- | ||
# 1D tests | ||
# ---------------------------------------------------- | ||
|
||
# Plain 1D | ||
test_gitm_earth_1d_compile: | ||
./Config.pl -Earth -g=1,1,50,4 | ||
$(MAKE) GITM | ||
|
||
test_gitm_earth_1d_rundir: test_rundir | ||
cd ${TESTDIR}; cp UA/DataIn/UAM.in.1d ./UAM.in | ||
|
||
test_gitm_earth_1d_run: | ||
cd ${TESTDIR}; ${PARALLEL} ${NPFLAG} 1 ./GITM.exe > runlog_earth_1d | ||
|
||
test_gitm_earth_1d_check: | ||
@(${SCRIPTDIR}/DiffNum.pl -b -r=1e-5 \ | ||
${TESTDIR}/UA/data/log0000000?.dat ${TESTDIR}/UA/DataIn/log00000004.1d.dat \ | ||
> test_gitm_earth_1d.diff) | ||
ls -l test_gitm_earth_1d.diff | ||
|
||
# Eclipse 1D | ||
test_gitm_earth_eclipse_compile: | ||
./Config.pl -Earth -g=1,1,50,4 | ||
$(MAKE) GITM | ||
|
||
test_gitm_earth_eclipse_rundir: test_rundir | ||
cd ${TESTDIR}; cp UA/DataIn/UAM.in.eclipse ./UAM.in | ||
|
||
test_gitm_earth_eclipse_run: | ||
cd ${TESTDIR}; ${PARALLEL} ${NPFLAG} 1 ./GITM.exe > runlog_earth_eclipse | ||
|
||
test_gitm_earth_eclipse_check: | ||
@(${SCRIPTDIR}/DiffNum.pl -b -r=1e-5 \ | ||
${TESTDIR}/UA/data/log0000000?.dat ${TESTDIR}/UA/DataIn/log00000002.eclipse.dat \ | ||
> test_gitm_earth_eclipse.diff) | ||
ls -l test_gitm_earth_eclipse.diff | ||
|
||
# ---------------------------------------------------- | ||
# 3D tests | ||
# ---------------------------------------------------- | ||
|
||
test_gitm_earth_3d_compile: | ||
./Config.pl -Earth -g=9,9,50,4 | ||
$(MAKE) GITM | ||
|
||
test_gitm_earth_3d_rundir: test_rundir | ||
cd ${TESTDIR}; cp UA/DataIn/UAM.in.3d ./UAM.in | ||
|
||
test_gitm_earth_3d_run: | ||
cd ${TESTDIR}; ${PARALLEL} ${NPFLAG} 4 ./GITM.exe | ||
|
||
test_gitm_earth_3d_check: | ||
(${SCRIPTDIR}/DiffNum.pl -b -r=1e-5 \ | ||
${TESTDIR}/UA/data/log00000002.dat ${TESTDIR}/UA/DataIn/log00000002.3d.dat \ | ||
> test_gitm_earth_3d.diff) | ||
ls -l test_gitm_earth_3d.diff | ||
|
||
### MARS GITM TEST ### | ||
|
||
test_gitm_mars: | ||
make test_gitm_mars_1d | ||
make test_gitm_mars_3d | ||
|
||
test_gitm_mars_1d: | ||
@echo "test_gitm_mars_1d_compile..." > test_gitm_mars_1d.diff | ||
$(MAKE) test_gitm_mars_1d_compile | ||
@echo "test_gitm_mars_1d_rundir..." >> test_gitm_mars_1d.diff | ||
$(MAKE) test_gitm_mars_1d_rundir | ||
@echo "test_gitm_mars_1d_run..." >> test_gitm_mars_1d.diff | ||
$(MAKE) test_gitm_mars_1d_run | ||
@echo "test_gitm_mars_1d_check..." >> test_gitm_mars_1d.diff | ||
$(MAKE) test_gitm_mars_1d_check | ||
@if([ "${KEEP}" ]); then rm -rf run_$@; mv ${TESTDIR} run_$@; fi | ||
|
||
test_gitm_mars_3d: | ||
@echo "test_gitm_mars_3d_compile..." > test_gitm_mars_3d.diff | ||
$(MAKE) test_gitm_mars_3d_compile | ||
@echo "test_gitm_mars_3d_rundir..." >> test_gitm_mars_3d.diff | ||
$(MAKE) test_gitm_mars_3d_rundir | ||
@echo "test_gitm_mars_3d_run..." >> test_gitm_mars_3d.diff | ||
$(MAKE) test_gitm_mars_3d_run | ||
@echo "test_gitm_mars_3d_check..." >> test_gitm_mars_3d.diff | ||
$(MAKE) test_gitm_mars_3d_check | ||
@if([ "${KEEP}" ]); then rm -rf run_$@; mv ${TESTDIR} run_$@; fi | ||
|
||
# ---------------------------------------------------- | ||
# 1D tests | ||
# ---------------------------------------------------- | ||
|
||
test_gitm_mars_1d_compile: | ||
./Config.pl -Mars | ||
./Config.pl -g=1,1,120,4 | ||
$(MAKE) GITM | ||
|
||
test_gitm_mars_1d_rundir: test_rundir | ||
cd ${TESTDIR}; cp UA/DataIn/UAM.mars.in.1d ./UAM.in | ||
|
||
test_gitm_mars_1d_run: | ||
cd ${TESTDIR}; ${PARALLEL} ${NPFLAG} 1 ./GITM.exe > runlog_mars_1d | ||
|
||
test_gitm_mars_1d_check: | ||
@(${SCRIPTDIR}/DiffNum.pl -b -r=1e-5 \ | ||
${TESTDIR}/UA/data/log0000000?.dat ${TESTDIR}/UA/DataIn/log00000002.1d.dat.mars \ | ||
> test_gitm_mars_1d.diff) | ||
ls -l test_gitm_mars_1d.diff | ||
|
||
# ---------------------------------------------------- | ||
# 3D tests | ||
# ---------------------------------------------------- | ||
|
||
test_gitm_mars_3d_compile: | ||
./Config.pl -Mars | ||
./Config.pl -g=8,4,120,4 | ||
$(MAKE) GITM | ||
|
||
test_gitm_mars_3d_rundir: test_rundir | ||
cd ${TESTDIR}; cp UA/DataIn/UAM.mars.in.3d ./UAM.in | ||
|
||
test_gitm_mars_3d_run: | ||
cd ${TESTDIR}; ${PARALLEL} ${NPFLAG} 4 ./GITM.exe > runlog_mars_3d | ||
|
||
test_gitm_mars_3d_check: | ||
(${SCRIPTDIR}/DiffNum.pl -b -r=1e-5 \ | ||
${TESTDIR}/UA/data/log0000000?.dat ${TESTDIR}/UA/DataIn/log00000002.3d.dat.mars \ | ||
> test_gitm_mars_3d.diff) | ||
ls -l test_gitm_mars_3d.diff | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.