From 90b2c41494863f96afc9736240a76e3d1fccab95 Mon Sep 17 00:00:00 2001 From: Christoph Knote Date: Fri, 11 Mar 2022 07:51:36 +0100 Subject: [PATCH] Works, builds, runs. --- .gitignore | 9 +++++---- doc/boxmox_UserManual.tex => boxmox/UserManual.tex | 2 +- {drv => boxmox}/wrapper | 0 build_dist.sh | 9 +++++---- configure.ac | 13 +++++++++++++ examples/CB05TUCl_EPA.kpp | 2 +- examples/CB05TUCl_NCSU.kpp | 2 +- examples/CBMZ.kpp | 2 +- examples/HETCHEM.kpp | 2 +- examples/MCMv3_3.kpp | 2 +- examples/MOZART_4.kpp | 2 +- examples/MOZART_T1.kpp | 2 +- examples/NO_NO2.kpp | 2 +- examples/RACM.kpp | 2 +- examples/RADM2.kpp | 2 +- examples/RADMKA.kpp | 2 +- examples/SAPRC99.kpp | 2 +- examples/smog.kpp | 2 +- scripts/list_BOXMOX_mechanisms | 4 +--- scripts/new_BOXMOX_experiment_from_example | 4 ++-- 20 files changed, 40 insertions(+), 27 deletions(-) rename doc/boxmox_UserManual.tex => boxmox/UserManual.tex (99%) rename {drv => boxmox}/wrapper (100%) diff --git a/.gitignore b/.gitignore index 6546e1b..7245925 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,11 @@ build src/kpp boxmox*.tar.gz -doc/boxmox*toc -doc/boxmox*aux -doc/boxmox*log -doc/boxmox*pdf +boxmox/UserManual.toc +boxmox/UserManual.aux +boxmox/UserManual.log +boxmox/UserManual.pdf +doc/boxmox_UserManual.pdf src/bison.c src/bison.h diff --git a/doc/boxmox_UserManual.tex b/boxmox/UserManual.tex similarity index 99% rename from doc/boxmox_UserManual.tex rename to boxmox/UserManual.tex index 0a81aa1..55f24a7 100644 --- a/doc/boxmox_UserManual.tex +++ b/boxmox/UserManual.tex @@ -758,7 +758,7 @@ Make sure the following variables are set: #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF \end{verbatim} diff --git a/drv/wrapper b/boxmox/wrapper similarity index 100% rename from drv/wrapper rename to boxmox/wrapper diff --git a/build_dist.sh b/build_dist.sh index dcb7fe6..b324047 100755 --- a/build_dist.sh +++ b/build_dist.sh @@ -9,7 +9,7 @@ echo cp Makefile.am_BLUEPRINT Makefile.am # list all files in these subdirectories -distFiles=$(find drv examples case_studies int models util -type f) +distFiles=$(find boxmox drv examples case_studies int models util -type f) #pretty print them 45 char wide dd tab, backslash at end remove backslash last line remove tab first line printf 'nobase_dist_pkgdata_DATA = %s\n' "${distFiles[*]}" | fmt -w 45 | sed -e 's/\(.*\)$/\t\1 \\/g' | sed '$ s/\\//g' | sed '1 s/\t//g' >> Makefile.am @@ -18,9 +18,10 @@ echo echo " --- build documentation ---" echo -cd doc -pdflatex boxmox_UserManual -pdflatex boxmox_UserManual +cd boxmox +pdflatex UserManual +pdflatex UserManual +cp UserManual.pdf ../doc/boxmox_UserManual.pdf cd .. # now standard: diff --git a/configure.ac b/configure.ac index 923b8c1..48a5f11 100644 --- a/configure.ac +++ b/configure.ac @@ -6,8 +6,21 @@ AC_INIT([boxmox], [1.8], [christoph.knote@med.uni-augsburg.de]) dnl we use the build type foreign here instead of gnu because I do not have a NEWS file and similar, yet. AM_INIT_AUTOMAKE([-Wall foreign tar-pax]) AC_PROG_CC +if test x$CC = "x" ; then + AC_MSG_ERROR([C compiler is required to build KPP.]) +fi AC_PROG_LEX(noyywrap) +if test x$LEX = "x" ; then + AC_MSG_ERROR([flex is required to build KPP.]) +fi AC_PROG_YACC +if test x$YACC = "x" ; then + AC_MSG_ERROR([bison or yacc is required to build KPP.]) +fi +AC_PROG_FC +if test x$FC = "x" ; then + AC_MSG_ERROR([Fortran compiler is required to build BOXMOX mechanisms.]) +fi AC_PROG_MKDIR_P AC_CONFIG_FILES([ Makefile diff --git a/examples/CB05TUCl_EPA.kpp b/examples/CB05TUCl_EPA.kpp index 055aff2..6f838bb 100644 --- a/examples/CB05TUCl_EPA.kpp +++ b/examples/CB05TUCl_EPA.kpp @@ -2,7 +2,7 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF #FUNCTION AGGREGATE diff --git a/examples/CB05TUCl_NCSU.kpp b/examples/CB05TUCl_NCSU.kpp index aa89ca3..7fdc7cb 100644 --- a/examples/CB05TUCl_NCSU.kpp +++ b/examples/CB05TUCl_NCSU.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/CBMZ.kpp b/examples/CBMZ.kpp index 24c3f20..678b9d0 100644 --- a/examples/CBMZ.kpp +++ b/examples/CBMZ.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/HETCHEM.kpp b/examples/HETCHEM.kpp index d9e34ee..f4738c8 100644 --- a/examples/HETCHEM.kpp +++ b/examples/HETCHEM.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/MCMv3_3.kpp b/examples/MCMv3_3.kpp index 9721803..a402443 100644 --- a/examples/MCMv3_3.kpp +++ b/examples/MCMv3_3.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/MOZART_4.kpp b/examples/MOZART_4.kpp index ea63776..ef211e1 100644 --- a/examples/MOZART_4.kpp +++ b/examples/MOZART_4.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/MOZART_T1.kpp b/examples/MOZART_T1.kpp index 985c57d..052b163 100644 --- a/examples/MOZART_T1.kpp +++ b/examples/MOZART_T1.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/NO_NO2.kpp b/examples/NO_NO2.kpp index 28bf260..cef26aa 100644 --- a/examples/NO_NO2.kpp +++ b/examples/NO_NO2.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/RACM.kpp b/examples/RACM.kpp index a8851e2..63e31d4 100644 --- a/examples/RACM.kpp +++ b/examples/RACM.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/RADM2.kpp b/examples/RADM2.kpp index 785be2e..93d692f 100644 --- a/examples/RADM2.kpp +++ b/examples/RADM2.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/RADMKA.kpp b/examples/RADMKA.kpp index ca7a9b7..0a2f021 100644 --- a/examples/RADMKA.kpp +++ b/examples/RADMKA.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/SAPRC99.kpp b/examples/SAPRC99.kpp index d828cf5..5e30a88 100644 --- a/examples/SAPRC99.kpp +++ b/examples/SAPRC99.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/examples/smog.kpp b/examples/smog.kpp index ed76a9d..a0d0cb4 100644 --- a/examples/smog.kpp +++ b/examples/smog.kpp @@ -2,6 +2,6 @@ #LANGUAGE Fortran90 #DOUBLE ON #INTEGRATOR rosenbrock -#DRIVER ../boxmox/boxmox +#DRIVER boxmox #JACOBIAN SPARSE_LU_ROW #HESSIAN OFF diff --git a/scripts/list_BOXMOX_mechanisms b/scripts/list_BOXMOX_mechanisms index 28ada22..7113d8c 100755 --- a/scripts/list_BOXMOX_mechanisms +++ b/scripts/list_BOXMOX_mechanisms @@ -28,9 +28,7 @@ validate_BOXMOX_installation || { echo "Validating BOXMOX installation failed"; BOXMOX_MECH_PATH=${KPP_HOME}/compiled_mechs -if [ -z $(ls -A ${BOXMOX_MECH_PATH}) ]; then - echo No mechanisms compiled yet. -else +if [ ! -z $(ls -A ${BOXMOX_MECH_PATH}) ]; then for mech in $(find ${BOXMOX_MECH_PATH}/*) do mechList+=($(basename $mech)) diff --git a/scripts/new_BOXMOX_experiment_from_example b/scripts/new_BOXMOX_experiment_from_example index 1b00e05..cf3c580 100755 --- a/scripts/new_BOXMOX_experiment_from_example +++ b/scripts/new_BOXMOX_experiment_from_example @@ -18,7 +18,7 @@ then echo "Call with ()." echo "If you omit , a subfolder with the name will be used." echo "Use -f to force removal of existing experiment folder." - echo "Examples available: "$(find ${KPP_HOME}/examples/* -maxdepth 1 -type d -exec basename {} \;) + echo "Examples available: "$(find ${KPP_HOME}/case_studies/* -maxdepth 1 -type d -exec basename {} \;) exit 1 fi @@ -28,7 +28,7 @@ example_req=$1 # check if BOXMOX is correctly set up validate_BOXMOX_installation || { echo "Validating BOXMOX installation failed"; exit 1; } -example_dir=${KPP_HOME}/examples/${example_req} +example_dir=${KPP_HOME}/case_studies/${example_req} # check if example exists if [ ! -d ${example_dir} ] -- GitLab