7. Проверка собранного пакета

Что будет сделано на этой странице: вы запустите собранные программы (из папки поставки и из папки сборки — с правильным окружением), выполните пробный расчёт обоими счётными ядрами в пакетном режиме и проверите коды завершения; при желании — сравните новую сборку с прежней побайтно.


7.1. Главное правило запуска

Откуда запускаете Что нужно
папка поставки dist\TMC_Suite_Qt6_win64 ничего: все DLL и модули Qt лежат рядом с программами
установленный пакет (после установщика) ничего
папка сборки dist\win64\bin задать окружение (раздел 7.3): PATH с папками Qt и MinGW и QT_PLUGIN_PATH

Если запустить программу из dist\win64\bin двойным щелчком, появится системное окно ошибки («no Qt platform plugin…» или «система не обнаружила libstdc++-6.dll») — см. страницу 8, раздел 8.5. Такое окно закрывается только кнопкой ОК вручную.


7.2. Запуск из папки поставки

  1. Откройте в Проводнике папку C:\src\TMC_Suite\dist\TMC_Suite_Qt6_win64.
  2. Запустите двойным щелчком по очереди: planarrt_h.exe, planarrt_x.exe, tmcgrout.exe, tmcros.exe, tmc_dn.exe, fieldview.exe, TplDesigner.exe.
  3. Каждая программа должна открыть окно в тёмном оформлении без сообщений об ошибках. Закройте окно крестиком в правом верхнем углу.
Окно счётного ядра PlanarRT H (Qt6-версия)
Окно счётного ядра PlanarRT H (Qt6-версия)
Стартовое окно TPL Designer
Стартовое окно TPL Designer

Полная проверка окон (кнопки панели инструментов, переключатели, Config → Compute (GPU)…, Help → About, вьюверы, FieldView, TPL Designer) — по чек-листу ПРОВЕРКА_ИНТЕРФЕЙСА.txt, который лежит в папке поставки. Интерфейс проверяется щелчками по настоящим окнам: успешный пробный расчёт не доказывает, что работают окна.


7.3. Запуск из папки сборки dist\win64\bin

В dist\win64\bin лежит часть DLL Qt (их копирует туда сборка TPL Designer), но нет папки модулей platforms\qwindows.dll и библиотек MinGW (libstdc++-6.dll и др.). Поэтому окружение задаётся вручную — в окне Командная строка:

set PATH=C:\Qt\6.11.3\mingw_64\bin;C:\Qt\Tools\mingw1310_64\bin;%PATH%
set QT_PLUGIN_PATH=C:\Qt\6.11.3\mingw_64\plugins
"C:\src\TMC_Suite\dist\win64\bin\planarrt_h.exe"

То же в Git Bash:

export PATH="/c/Qt/6.11.3/mingw_64/bin:/c/Qt/Tools/mingw1310_64/bin:$PATH"
export QT_PLUGIN_PATH="C:/Qt/6.11.3/mingw_64/plugins"
"/c/src/TMC_Suite/dist/win64/bin/planarrt_h.exe" &

Правила:

  • QT_PLUGIN_PATH — только полный путь (с буквой диска). С относительным путём Qt не найдёт модули, и появится окно ошибки.
  • Переменные set/export действуют только в этом окне. В новом окне их задают снова.
  • Папка Qt 6.11.3 должна стоять в PATH раньше других папок с DLL Qt или MinGW (иначе программа может подхватить чужие DLL — страница 8, раздел 8.5).

7.4. Пробный расчёт в пакетном режиме

Счётные ядра умеют считать без участия человека: ключ /Arb запускает расчёт и закрывает окно по окончании (в том числе при ошибке), ключ /Time записывает рядом с заданием отчёт о времени расчёта.

Ядро H

  1. Создайте пустую папку C:\tmc_test и скопируйте в неё файл C:\src\TMC_Suite\dist\TMC_Suite_Qt6_win64\samples\DEMO\PlanarRT_H\demo_h.tpl. Задание demo_h.tpl самодостаточно (не подключает других файлов) и считается быстро (сетка 200×100). Ядро пишет результаты рядом с заданием, поэтому считайте в отдельной папке, а не в папке образцов.
  2. Откройте Командная строка и выполните по очереди:

    cd /d C:\tmc_test
    start /wait "" "C:\src\TMC_Suite\dist\TMC_Suite_Qt6_win64\planarrt_h.exe" demo_h.tpl /Arb /Time
    echo %ERRORLEVEL%
    

    start /wait нужен потому, что ядро — оконная программа: без него командная строка не дождётся конца расчёта и не получит код завершения. На время расчёта на экране появится окно ядра; оно закроется само.

  3. Ожидается:

    • число 0 после echo %ERRORLEVEL%;
    • в C:\tmc_test — выходные файлы расчёта (среди них demo_h.t — выходной сигнал) и отчёт о времени demo_h.timing_H_win64.txt.

    Проверка: dir C:\tmc_test.

Ядро X

То же для X-моды: скопируйте в C:\tmc_test файл samples\DEMO\PlanarRT_X\demo_x.tpl из папки поставки и выполните:

cd /d C:\tmc_test
start /wait "" "C:\src\TMC_Suite\dist\TMC_Suite_Qt6_win64\planarrt_x.exe" demo_x.tpl /Arb /Time
echo %ERRORLEVEL%

Ожидается 0, файлы demo_x.* и demo_x.timing_X_win64.txt.

Что значат коды завершения

Код Смысл
0 всё посчитано
1 ошибка задания (нет файла, ошибка препроцессора или данных); расчёт не выполнялся
2 ошибка во время счёта
3 расчёт остановлен или окно закрыто

Если ядро запущено с /Arb из bat-файла, оно пишет ход расчёта в окно командной строки — строки вида [PlanarRT_H] Step 1 of 1: done и итог RESULT 0: OK - all steps are calculated:

Успешный пакетный запуск ядра H из bat-файла
Успешный пакетный запуск ядра H из bat-файла

Подробно о пакетном режиме — руководство пользователя, глава «Работа без участия человека: пакетный режим и командная строка» (docs\user-manual\console-mode.md).

Запуск из Git Bash

В Git Bash ключи /Arb и /Time превращаются в пути. Отключите это MSYS_NO_PATHCONV=1:

cd /c/tmc_test
MSYS_NO_PATHCONV=1 "/c/src/TMC_Suite/dist/TMC_Suite_Qt6_win64/planarrt_h.exe" demo_h.tpl /Arb /Time; echo $?

(или пишите ключи через дефис: -Arb -Time).

Для пробных прогонов не включайте в задании вывод полей (FIELDS) и топологии (TOPOLOGY) в разделе вывода — с ними расчёт идёт на порядки дольше.

Проводник: C:\tmc_test после пробного расчёта
Проводник: C:\tmc_test после пробного расчёта


Назад: 6. Установщик · Далее: 8. Ошибки и решения

7. Checking the built package

What this page covers: you will start the built programs (from the distribution folder and from the build folder — with the correct environment), run a trial computation with both compute kernels in batch mode and check the exit codes; optionally, compare the new build with the previous one byte by byte.


7.1. The main rule for starting programs

Where you start from What is needed
the distribution folder dist\TMC_Suite_Qt6_win64 nothing: all DLLs and Qt modules are next to the programs
the installed package (after the installer) nothing
the build folder dist\win64\bin set up the environment (section 7.3): PATH with the Qt and MinGW folders and QT_PLUGIN_PATH

If you start a program from dist\win64\bin by double-clicking, a system error window will appear ("no Qt platform plugin…" or "the system cannot find libstdc++-6.dll") — see page 8, section 8.5. Such a window can only be closed manually with the OK button.


7.2. Starting from the distribution folder

  1. Open in File Explorer the folder C:\src\TMC_Suite\dist\TMC_Suite_Qt6_win64.
  2. Double-click, one after another: planarrt_h.exe, planarrt_x.exe, tmcgrout.exe, tmcros.exe, tmc_dn.exe, fieldview.exe, TplDesigner.exe.
  3. Each program must open a window with the dark theme without error messages. Close the window with the cross in the upper right corner.
Window of the PlanarRT H compute kernel (Qt6 version)
Window of the PlanarRT H compute kernel (Qt6 version)
TPL Designer start window
TPL Designer start window

A full check of the windows (toolbar buttons, switches, Config → Compute (GPU)…, Help → About, viewers, FieldView, TPL Designer) follows the check list ПРОВЕРКА_ИНТЕРФЕЙСА.txt, which is in the distribution folder. The user interface is checked by clicking in the real windows: a successful trial computation does not prove that the windows work.


7.3. Starting from the build folder dist\win64\bin

dist\win64\bin contains some of the Qt DLLs (they are copied there by the TPL Designer build), but there is no module folder platforms\qwindows.dll and no MinGW libraries (libstdc++-6.dll, etc.). Therefore the environment is set up manually — in the Command Prompt window:

set PATH=C:\Qt\6.11.3\mingw_64\bin;C:\Qt\Tools\mingw1310_64\bin;%PATH%
set QT_PLUGIN_PATH=C:\Qt\6.11.3\mingw_64\plugins
"C:\src\TMC_Suite\dist\win64\bin\planarrt_h.exe"

The same in Git Bash:

export PATH="/c/Qt/6.11.3/mingw_64/bin:/c/Qt/Tools/mingw1310_64/bin:$PATH"
export QT_PLUGIN_PATH="C:/Qt/6.11.3/mingw_64/plugins"
"/c/src/TMC_Suite/dist/win64/bin/planarrt_h.exe" &

Rules:

  • QT_PLUGIN_PATH — only a full path (with the drive letter). With a relative path Qt will not find the modules, and an error window will appear.
  • The set/export variables apply only in this window. In a new window they are set again.
  • The Qt 6.11.3 folder must come in PATH before other folders with Qt or MinGW DLLs (otherwise the program may pick up other DLLs — page 8, section 8.5).

7.4. Trial computation in batch mode

The compute kernels can compute unattended: the /Arb option starts the computation and closes the window when it finishes (including on an error), the /Time option writes a computation-time report next to the task file.

Kernel H

  1. Create an empty folder C:\tmc_test and copy into it the file C:\src\TMC_Suite\dist\TMC_Suite_Qt6_win64\samples\DEMO\PlanarRT_H\demo_h.tpl. The task file demo_h.tpl is self-contained (it does not include other files) and computes quickly (a 200×100 grid). The kernel writes the results next to the task file, so compute in a separate folder, not in the samples folder.
  2. Open Command Prompt and run, one after another:

    cd /d C:\tmc_test
    start /wait "" "C:\src\TMC_Suite\dist\TMC_Suite_Qt6_win64\planarrt_h.exe" demo_h.tpl /Arb /Time
    echo %ERRORLEVEL%
    

    start /wait is needed because the kernel is a windowed program: without it the command prompt will not wait for the end of the computation and will not get the exit code. During the computation the kernel window appears on the screen; it closes by itself.

  3. Expected:

    • the number 0 after echo %ERRORLEVEL%;
    • in C:\tmc_test — the computation output files (among them demo_h.t, the output signal) and the time report demo_h.timing_H_win64.txt.

    Check: dir C:\tmc_test.

Kernel X

The same for the X-mode: copy into C:\tmc_test the file samples\DEMO\PlanarRT_X\demo_x.tpl from the distribution folder and run:

cd /d C:\tmc_test
start /wait "" "C:\src\TMC_Suite\dist\TMC_Suite_Qt6_win64\planarrt_x.exe" demo_x.tpl /Arb /Time
echo %ERRORLEVEL%

Expected: 0, the files demo_x.* and demo_x.timing_X_win64.txt.

What the exit codes mean

Code Meaning
0 everything has been computed
1 task-file error (missing file, preprocessor or data error); the computation was not performed
2 error during the computation
3 the computation was stopped or the window was closed

If the kernel is started with /Arb from a bat file, it writes the progress of the computation to the command prompt window — lines like [PlanarRT_H] Step 1 of 1: done and the result RESULT 0: OK - all steps are calculated:

Successful batch run of the H kernel from a bat file
Successful batch run of the H kernel from a bat file

For details on batch mode, see the user manual, chapter "Unattended operation: batch mode and the command line" (docs\user-manual\console-mode.md).

Running from Git Bash

In Git Bash the /Arb and /Time options are converted into paths. Disable this with MSYS_NO_PATHCONV=1:

cd /c/tmc_test
MSYS_NO_PATHCONV=1 "/c/src/TMC_Suite/dist/TMC_Suite_Qt6_win64/planarrt_h.exe" demo_h.tpl /Arb /Time; echo $?

(or write the options with a hyphen: -Arb -Time).

For trial runs, do not enable the output of fields (FIELDS) and topology (TOPOLOGY) in the output section of the task file — with them the computation takes orders of magnitude longer.

File Explorer: C:\tmc_test after the trial computation
File Explorer: C:\tmc_test after the trial computation


Back: 6. Installer · Next: 8. Errors and solutions