If you want to run tests in CADET-Core you need to ensure that in the CMakeSettings.json
file:
the “cmakeCommandArgs” contain:
-DENABLE_TESTS=ON
to enable building the test runner
-DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON
to create statically linked dependencies
"variables"
contains:
{
"name": "HDF5_USE_STATIC_LIBRARIES",
"value": "1",
"type": "STRING"
},
{
"name": "BUILD_SHARED_LIBS",
"value": "0",
"type": "STRING"
},
Then you can find the testRunner(.exe) in CADET-root/build/test/Debug
or CADET-root/build/test/Release
If the breakpoints aren’t catching:
check the files in build\src\libcadet
and place breakpoints in those.
ortler
April 22, 2024, 11:37am
3
Hey @ronald.jaepel ,
could you please elaborate on how you would debug Cadet-Core?
After the code-adjustments in your first post,
do you run certain Cadet test-files in the command line, or python, or do you eg. use Cadet-Process?
Are there log-files?
A rough step-by-step guide for us C++ newbies would be great!
I’ve turned this into a post here
1 Like
ortler
April 26, 2024, 11:55am
5
Hey @ronald.jaepel ,
thank you for creating the step-by-step guide. This helped a lot!
You could add the creation of the h5 file using CADET-Process, eg.
from CADETProcess.simulator import Cadet
from CADETProcess import settings
from examples.batch_elution.process import process
simulator = Cadet()
simulator.install_path = "C:\\ProgramData\\Anaconda3\\envs\\cadet\\"
settings.working_directory = 'D:/workDir/cadet'
import os
full_path = os.path.join(settings.working_directory, 'ExampleProcessDebugFile.h5')
simulator.save_to_h5(process, full_path)
2 Likes