Test running (especially in Debug mode)

If you want to run tests in CADET-Core you need to ensure that in the CMakeSettings.json file:

  1. the “cmakeCommandArgs” contain:
    1. -DENABLE_TESTS=ON to enable building the test runner
    2. -DENABLE_STATIC_LINK_LAPACK=ON -DENABLE_STATIC_LINK_DEPS=ON to create statically linked dependencies
  2. "variables" contains:
    "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.

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

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)