KineticPreProcessor / KPP

The KPP kinetic preprocessor is a software tool that assists the computer simulation of chemical kinetic systems
GNU General Public License v3.0
21 stars 11 forks source link

[PULL REQUEST] Implement a check for a minimum version (add add some function prototypes) -- Closes #31 #34

Closed yantosca closed 2 years ago

yantosca commented 2 years ago

This PR corresponds to feature request #31. We have now added:

  1. The #MINVERSION switch can now define a minimum version for a KPP mechanism. If the KPP version is older than this minimum version, it will stop with a fatal error. (If #MINVERSION is missing, then this error check will be skipped).
  2. Updated the C-I tests to add the ros_minver test... this is a Rosenbrock mechanism but it should fail on the minimum version error check. The C-I test scripts will interpret its failure as a succes.
  3. Also added some missing function prototypes, in order to remove the -Wimplicit-function-declaration warning messages at compile time.
yantosca commented 2 years ago

I will attend to the failing C-I test soon. I think there may be an issue in the script.

yantosca commented 2 years ago

Or actually the build test failed on #MINVERSION but the Docker container interpreted that as an error. I will doublecheck the script logic.

This is KPP-2.4.0.

KPP is parsing the equation file.

You are using KPP 2.4.0, but your mechanism needs version none or later.

Fatal error : 1 errors and 0 warnings encountered.
Program aborted
The command '/bin/sh -c /kpp/.ci-pipelines/ci-testing-script.sh' returned a non-zero code: 1
##[error]The command '/bin/sh -c /kpp/.ci-pipelines/ci-testing-script.sh' returned a non-zero code: 1
yantosca commented 2 years ago

I will also update the latex manual file in a subsequent commit.

yantosca commented 2 years ago

The CI test problem is now fixed in commit f1f06310be5937f8cf5798b854a352ade51ebfe8. This was due to improper string comparison in the function KppVersionIsTooOld. Using strncmp in the test fixed it. Shout out to @laestrada for figuring this out!

yantosca commented 2 years ago

Also added #MINVERSION documentation to the kpp_UserManual.tex file in commit ec67fd33120237432a404d45815d87501241dad8.

yantosca commented 2 years ago

Thanks @RolfSander. One more feature to merge in, working on it now.