Testing section will be added soon
Hey,
I just wondered if the example file is still available somewhere. Couldn’t find it on Github.
Hello,
I am not sure what happened there, but please use the following link to access the sample file:
Perfect! Thanks a lot. I guess it was called ExampleBinding.cpp before. Thats why my search was futile.
Hey,I am new to modify the adsorption isotherm. I can not find the working directory
\src
Can anynone tell me where is it or do I need to download it to a specific directory from GitHub?
Another question is where the testing section is?
Hey chenkangnan,
the src directory is included when you clone the CADET repository from GitHub - modsim/CADET: A modular, fast, and accurate simulation framework for (column) liquid chromatography. This repository also includes the tests in the /test folder.
To run the tests you can reference this post.
If you have any more specific questions feel free to ask or join us at the CADET Office Hours.
Thank you for your quick reply and suggestion. I know how to clone the CADET repository from GitHub - modsim/CADET: A modular, fast, and accurate simulation framework for (column) liquid chromatography.
But where should I move it to? I don’t know if you understand what I mean.
If you want to know how to build CADET from source, I recommend referencing the documentation, under “Install from source” there are guides for how to build CADET on Linux, Windows and OSX.
Thank you very much.It helps a lot
Hey I am trying to follow along but I am getting an issue when trying to compile everything. I downloaded the TestBinding.cpp and the only thing I changed was Langmuir->Test.
These are the errors I am getting after doing bluid all.
Severity | Code | Description | Project | File | Line | Suppression State | Details |
---|---|---|---|---|---|---|---|
Error (active) | E0276 | name followed by ‘::’ must be a class or namespace name | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 56 | ||
Error (active) | E0276 | name followed by ‘::’ must be a class or namespace name | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 58 | ||
Error (active) | E0020 | identifier _kA is undefined | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 60 | ||
Error (active) | E0020 | identifier _kD is undefined | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 60 | ||
Error (active) | E0020 | identifier _qMax is undefined | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 60 | ||
Error (active) | E0276 | name followed by ‘::’ must be a class or namespace name | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 66 | ||
Error (active) | E0276 | name followed by ‘::’ must be a class or namespace name | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 68 | ||
Error (active) | E0020 | identifier _kA is undefined | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 70 | ||
Error (active) | E0020 | identifier _kD is undefined | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 70 | ||
Error (active) | E0020 | identifier _qMax is undefined | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 70 | ||
Error (active) | E0020 | identifier TestParamHandler is undefined | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 210 | ||
Error (active) | E0020 | identifier ExtTestParamHandler is undefined | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 211 | ||
Error (active) | E0349 | no operator = matches these operands | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 217 | ||
Error (active) | E0349 | no operator = matches these operands | VersionInfo.obj (src\libcadet\libcadet_object.dir\Release\VersionInfo.obj) - aRELEASE | D:\CADET\src\libcadet\model\binding\TestBinding.cpp | 218 | ||
Warning | MSB8028 | The intermediate directory (sundials_idas_static.dir\Release) contains files shared from another project (sundials_idas_static.vcxproj). This can lead to incorrect clean and rebuild behavior. | D:\CADET\build\CADET | C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets | 531 | ||
Warning | MSB8028 | The intermediate directory (sundials_nvecserial_static.dir\Release) contains files shared from another project (sundials_nvecserial_static.vcxproj). This can lead to incorrect clean and rebuild behavior. | D:\CADET\build\CADET | C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets | 531 | ||
Warning | MSB8028 | The intermediate directory (libcadet_nonlinalg_static.dir\Release) contains files shared from another project (libcadet_nonlinalg_static.vcxproj). This can lead to incorrect clean and rebuild behavior. | D:\CADET\build\CADET | C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets | 531 | ||
Error | [json.exception.parse_error.101] parse error at 13: syntax error - invalid literal; last read: ‘name: T’ [D:\CADET\build\src\libcadet\libcadet_object.vcxproj] | D:\CADET\build\CADET | D:\CADET\build\CADET\CUSTOMBUILD | 1 | |||
Error | MSB8066 | Custom build for ‘D:\CADET\src\libcadet\model\binding\TestBinding.cpp’ exited with code -3. | D:\CADET\build\CADET | C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets | 254 |
Hey Daniel,
thanks for posting & welcome to the forum.
Without the code I can’t do much with the error messages I’m afraid. Can you share your fork of CADET with us?
Hey Daniel,
Thanks for providing your code. Is there a particular reason you don’t use some git host like Github/lab? I would suggest to properly fork it and to create a Pull Request. This makes testing, reviews etc. So much easier. We’re also happy to support you with that if you need help.
Hey,
I have never done anything like that before so I did not think of doing it. Is the code I provided antiquate or would you preferer I figure out how to do using GitHub?
Hey Daniel,
using git and GitHub are super useful skills that will come in handy many, many times in the future if you’ll be working with code, so I’d also recommend taking the time now to learn it. As Jo said, if you need help with git & GitHub feel free to ask.
Thanks for the advice, I created a pull request here. Please let me know if I did anything wrong when making the request.
Not sure about the current development for this issue. I just had very similar error code and was able to resolve them by having a close look at my testBinding.cpp
file. There was a typo in the file. I started again by copying an existing and working binding file (eg. StericMassActionBinding.cpp
) and just changing all names, variables, etc. as instructed above.
@Daniel I think your second to last error message hints in the same direction (syntax error - invalid literal; last read: ‘name: T’)
My error codes were:
Severity | Code | Description | Project | File | Line | Suppression State | Details |
---|---|---|---|---|---|---|---|
Error | MSB8066 | Custom build for ‘D:\repos\CADET_testBinding\src\libcadet\model\binding\testBinding.cpp;D:\repos\CADET_testBinding\src\libcadet\model\reaction\DummyReaction.cpp;D:\repos\CADET_testBinding\src\libcadet\model\reaction\MassActionLawReaction.cpp’ exited with code -3. | D:\repos\CADET_testBinding\build\testBinding | C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets | 254 | ||
Error | [json.exception.parse_error.101] parse error at 628: syntax error - unexpected ‘{’; expected ‘]’ [D:\repos\CADET_testBinding\build\src\libcadet\libcadet_object.vcxproj] | D:\repos\CADET_testBinding\build\testBinding | D:\repos\CADET_testBinding\build\CUSTOMBUILD | 1 |
Hey,
sorry for the delays. I’ve just had a chance to look into your code, and (as @ortler correctly pointed out) the error invalid literal; last read: '"name": T'
points to the problem. Your code was
/*<codegen>
{
"name": TestParamHandler",
"externalName": "ExtTestParamHandler",
"parameters":
[
{ "type": "ScalarComponentDependentParameter", "varName": "kA", "confName": "MCL_KA"},
{ "type": "ScalarComponentDependentParameter", "varName": "kD", "confName": "MCL_KD"},
{ "type": "ScalarComponentDependentParameter", "varName": "qMax", "confName": "MCL_QMAX"}
]
}
</codegen>*/
With a missing "
before TestParamHandler
. It should be
/*<codegen>
{
"name": "TestParamHandler",
"externalName": "ExtTestParamHandler",
"parameters":
[
{ "type": "ScalarComponentDependentParameter", "varName": "kA", "confName": "MCL_KA"},
{ "type": "ScalarComponentDependentParameter", "varName": "kD", "confName": "MCL_KD"},
{ "type": "ScalarComponentDependentParameter", "varName": "qMax", "confName": "MCL_QMAX"}
]
}
</codegen>*/
with that change it now compiles without errors. The Errors E0020
and E0276
are incorrectly flagged as errors by VisualStudio.
Regarding:
My error codes were:
Severity Code Description Project File Line Suppression State Details Error MSB8066 Custom build for ‘D:\repos\CADET_testBinding\src\libcadet\model\binding\testBinding.cpp;D:\repos\CADET_testBinding\src\libcadet\model\reaction\DummyReaction.cpp;D:\repos\CADET_testBinding\src\libcadet\model\reaction\MassActionLawReaction.cpp’ exited with code -3. D:\repos\CADET_testBinding\build\testBinding C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 254 Error [json.exception.parse_error.101] parse error at 628: syntax error - unexpected ‘{’; expected ‘]’ [D:\repos\CADET_testBinding\build\src\libcadet\libcadet_object.vcxproj] D:\repos\CADET_testBinding\build\testBinding D:\repos\CADET_testBinding\build\CUSTOMBUILD 1
I had that exact error yesterday while working on the MMC isotherm. In my case it was a missing comma at the end of a line in the parameters
list in the *<codegen>
block at the top of the file.
same for me, took me some time to figure it out