MFC 1.3 · Шаг 5. Проверка результата и пробный запуск
Что будет сделано на этой странице. Вы убедитесь, что сборка создала все 12 файлов на каждое собранное сочетание, что программы нужной разрядности и не требуют посторонних библиотек, запустите каждую программу и выполните пробный расчёт на коротком задании — сначала в окне счётного ядра, затем автоматически из командной строки с проверкой кода возврата.
5.1 Список ожидаемых файлов
После сборки одного сочетания должно появиться 6 программ и 6 библиотек. Ниже — для Release x64 и Release Win32, с размерами из реальной сборки (Visual Studio 2026 18.11.1). У вас размеры могут немного отличаться при другой версии компилятора — это нормально; важно, чтобы файлы были и не были нулевыми.
Программы (dist\<платформа>\bin\):
| Файл | Что это | Release x64 (dist\win64\bin) |
Release Win32 (dist\win32\bin) |
|---|---|---|---|
tmc_rth.exe |
счётное ядро, H-поляризация | 5 258 240 байт (≈ 5,0 МБ) | 4 131 840 байт (≈ 3,9 МБ) |
tmc_rtx.exe |
счётное ядро, X-мода | 5 294 080 байт (≈ 5,0 МБ) | 4 157 440 байт (≈ 4,0 МБ) |
TMCROS.exe |
вьювер временных сигналов | 4 623 360 байт (≈ 4,4 МБ) | 3 575 808 байт (≈ 3,4 МБ) |
TMCGROUT.exe |
вьювер матриц рассеяния | 4 574 208 байт (≈ 4,4 МБ) | 3 531 264 байт (≈ 3,4 МБ) |
TMC_DN.exe |
вьювер диаграмм направленности | 4 668 416 байт (≈ 4,5 МБ) | 3 611 136 байт (≈ 3,4 МБ) |
FieldView.exe |
визуализация полей (OpenGL) | 4 753 408 байт (≈ 4,5 МБ) | 3 702 272 байт (≈ 3,5 МБ) |
Рядом с каждым .exe лежит одноимённый .pdb (30–40 МБ) — отладочная информация. Для работы
программ он не нужен, в установщик не попадает.
Отладочные программы (dist\<платформа>\debug\bin\) примерно в 2,5 раза больше:
например, tmc_rth.exe Debug x64 — 13 407 232 байта.
Библиотеки (dist\<платформа>\lib\): complex.lib, exprint.lib, Prepr.lib,
SFILE95.lib, TMCIndan.lib, TMCLibError.lib. Они нужны только для сборки программ;
пользователю их передавать не надо.
Имена библиотек на диске пишутся так, как назван проект (
Prepr.lib,SFILE95.lib), а в настройках компоновщика — строчными (prepr.lib,sfile95.lib). В Windows регистр букв в именах файлов не важен, это не ошибка.
5.2 Проверка одной командой
Откройте Developer PowerShell for VS (шаг 4, пункт 4.1),
перейдите в корень (cd C:\src\TMC_Suite) и вставьте целиком:
$exe = 'FieldView','TMC_DN','TMCGROUT','TMCROS','tmc_rth','tmc_rtx'
$lib = 'complex','exprint','Prepr','SFILE95','TMCIndan','TMCLibError'
foreach ($d in 'win64','win32','win64\debug','win32\debug') {
$miss = @()
foreach ($n in $exe) { if (-not (Test-Path "dist\$d\bin\$n.exe")) { $miss += "$n.exe" } }
foreach ($n in $lib) { if (-not (Test-Path "dist\$d\lib\$n.lib")) { $miss += "$n.lib" } }
if ($miss.Count -eq 0) { "dist\$d : OK, all 12 files" } else { "dist\$d : MISSING " + ($miss -join ', ') }
}
После сборки всех четырёх сочетаний результат должен быть таким (проверено):
dist\win64 : OK, all 12 files
dist\win32 : OK, all 12 files
dist\win64\debug : OK, all 12 files
dist\win32\debug : OK, all 12 files
Если вы собирали не все сочетания, для несобранных будет строка MISSING … — это ожидаемо.
Разрядность программ
dumpbin /nologo /headers dist\win64\bin\tmc_rth.exe | findstr /c:"machine"
dumpbin /nologo /headers dist\win32\bin\tmc_rth.exe | findstr /c:"machine"
Ожидаемый ответ: для win64 — строка 8664 machine (x64), для win32 — 14C machine (x86)
(и ещё строка 32 bit word machine).
Программам не нужны посторонние DLL
dumpbin /nologo /dependents dist\win64\bin\tmc_rth.exe
В списке должны быть только системные библиотеки Windows: KERNEL32.dll, USER32.dll,
GDI32.dll, ADVAPI32.dll, SHELL32.dll, ole32.dll, gdiplus.dll, WINMM.dll и т. п.;
у FieldView.exe дополнительно OPENGL32.dll и GLU32.dll. Библиотек вида MSVCP140.dll,
VCRUNTIME140.dll, mfc140.dll быть не должно: MFC и библиотека C подключены
статически, поэтому собранные программы запускаются на любом компьютере с Windows без
установки Visual C++ Redistributable (проверено).
5.3 Запуск программ
- Откройте в Проводнике
C:\src\TMC_Suite\dist\win64\bin(илиdist\win32\bin). - Дважды щёлкните по каждой из шести программ по очереди. Каждая должна открыть своё окно без сообщений об ошибке. Закройте окно (крестик или File → Exit).
Если вы перенесли программы на другой компьютер через интернет (почта, облако) и Windows показывает синее окно «Система Windows защитила ваш компьютер» (SmartScreen) — это потому, что программы не подписаны цифровой подписью. Нажмите «Подробнее» → «Выполнить в любом случае». На компьютере, где программы собраны, такого окна обычно нет.
5.4 Пробный расчёт: подготовка задания
Образцы заданий (samples) в репозиторий не входят, поэтому для проверки сборки используйте
короткое задание ниже — излучающий планарный рупор на сетке 240 × 200 узлов. Оно считается
несколько секунд, подходит обоим ядрам (tmc_rth.exe и tmc_rtx.exe) и создаёт файлы
для всех вьюверов.
- Создайте папку
C:\tmc_test(Проводник → дискC:→ правая кнопка → Создать → Папку). Не используйте для расчётов папкуC:\Program Files\…: ядро пишет результаты рядом с файлом задания, а туда обычному пользователю писать нельзя. - Откройте Блокнот (Пуск → набрать
Блокнотилиnotepad). - Скопируйте в него текст ниже целиком, от
#TMC_RT_Hдо#EOF:
#TMC_RT_H
! test1.tpl - planar horn, test task for the build check of TMC Suite
#define L_box @ ( 240.0 )
#define W_box @ ( 200.0 )
#define W_delta @ ( 1.0 )
#define W_chan @ ( 20.0 )
#define L_feed @ ( 60.0 )
#define L_flare @ ( 50.0 )
#define D_aper @ ( 80.0 )
#define F @ ( 10.0 )
#define yc @ ( W_box/2 )
#define ylo @ ( yc - W_chan/2 )
#define yhi @ ( yc + W_chan/2 )
#STEP
#PARM
ANGLE_UNIT radian;
FREQ_UNIT GHz;
LONG_UNIT mm;
TIME_UNIT ns;
DELTA W_delta;
TIME 0.; 3.;
X_MIN 0.0;
X_MAX L_box;
Y_MIN 0.0;
Y_MAX W_box;
FREQ F;
#END_PARM
#TOPOLOGY
BLOCK 1;
RECT_STAT METAL; 0.0; L_feed; ylo-W_delta; ylo;
END_B
BLOCK 2;
RECT_STAT METAL; 0.0; L_feed; yhi; yhi+W_delta;
END_B
BLOCK 3;
POLYGON_STAT METAL;
L L_feed; ylo;
L L_feed+L_flare; yc-D_aper/2;
L L_feed+L_flare; yc-D_aper/2;
END_B
BLOCK 4;
POLYGON_STAT METAL;
L L_feed; yhi;
L L_feed+L_flare; yc+D_aper/2;
L L_feed+L_flare; yc+D_aper/2;
END_B
BLOCK 5;
INPUT_X ; ylo; yhi; 0; 1000;
END_B
BLOCK 6;
RECT_STAT ABSORBER; L_box-5*W_delta; L_box-2*W_delta; 2*W_delta; W_box-2*W_delta;
END_B
BLOCK 7;
RECT_STAT ABSORBER; 2*W_delta; L_box-2*W_delta; 2*W_delta; 5*W_delta;
END_B
BLOCK 8;
RECT_STAT ABSORBER; 2*W_delta; L_box-2*W_delta; W_box-5*W_delta; W_box-2*W_delta;
END_B
#END_TOPOLOGY
#LINK_LIST
T 1; 0.0; 0.0;
T 2; 0.0; 0.0;
T 3; 0.0; 0.0;
T 4; 0.0; 0.0;
T 5; 0.0; 0.0;
T 6; 0.0; 0.0;
T 7; 0.0; 0.0;
T 8; 0.0; 0.0;
#END_LINK
#OUTPUT
FILE test1;
TOPOLOGY;
FIELDS;
SMATRIX test1; F; 1.5; 2.5;
FIELD_DISTRIBUTION_M test1; F; 1.5; 2.5;
#END_OUTPUT
#END_STEP
#EOF
- Файл → Сохранить как… → папка
C:\tmc_test→ в поле «Тип файла» выберите «Все файлы (*.*)» → имя файлаtest1.tpl→ Сохранить. Проверьте в Проводнике, что файл называется именноtest1.tpl, а неtest1.tpl.txt(чтобы видеть расширения: Проводник → Вид → Показать → Расширения имён файлов).
В тексте задания только латинские буквы, поэтому кодировка при сохранении не важна. Если будете добавлять комментарии по-русски (строки, начинающиеся с
!), сохраняйте файл в кодировке ANSI (Windows-1251) — так их понимает препроцессор заданий.
5.5 Пробный расчёт в окне ядра
- Запустите
C:\src\TMC_Suite\dist\win64\bin\tmc_rth.exe. - Меню File → Open… (Ctrl+O) → откройте
C:\tmc_test\test1.tpl. - Меню Run → Run (клавиша F5). Ход расчёта показывается в строке состояния внизу окна. Расчёт длится несколько секунд.
- Когда расчёт закончится, в папке
C:\tmc_testдолжны появиться файлы результатов (список — в пункте 5.7). -
Посмотрите результаты из меню ядра View (Вид):
- View → Output — временной сигнал на порту (вьювер TMCROS);
- View → S-matrix — матрица рассеяния (вьювер TMCGROUT);
- View → Directional Pattern — диаграмма направленности (вьювер TMC_DN);
- View → Field and topology — поле и топология (FieldView);
- View → Statistics — окно статистики расчёта.
При первом вызове каждого вьювера ядро попросит указать его программу. Укажите файл из той же папки
binи той же разрядности, что и ядро (дляdist\win64\bin\tmc_rth.exe—dist\win64\bin\TMCROS.exe,…\TMCGROUT.exe,…\TMC_DN.exe,…\FieldView.exe). Ядро запомнит выбор; изменить его можно в меню Config → Viewer. (Установщик из шага 6 прописывает эти пути сам.)
То же повторите для tmc_rtx.exe (X-мода), если нужно проверить и его.
5.6 Пробный расчёт из командной строки (с кодом возврата)
Ядра умеют считать без участия пользователя: ключ /Arb открывает задание, считает все шаги,
пишет ход расчёта в консоль и закрывает окно, а итог сообщает кодом возврата.
В Windows PowerShell (подойдёт и обычное, не обязательно Developer):
cd C:\tmc_test
& C:\src\TMC_Suite\dist\win64\bin\tmc_rth.exe test1.tpl /Arb | Out-Host
$LASTEXITCODE
Окно ядра на несколько секунд появится и само закроется. Ожидаемый вывод (проверено):
[tmc_rth] File: test1.tpl
[tmc_rth] Steps: 1
[tmc_rth] Step 1 of 1: start
[tmc_rth] Step 1 of 1: done
[tmc_rth] RESULT 0: OK - all steps are calculated
0
| Out-Hostв конце команды нужен: с ним PowerShell дожидается окончания расчёта и показывает сообщения ядра. Без него PowerShell сразу вернёт управление, а сообщения не появятся (ядро — оконная программа).
В Командной строке (cmd) то же самое удобно делать через пакетный файл — в нём cmd
дожидается окончания программы. Создайте в Блокноте C:\tmc_test\run_test.bat:
@echo off
cd /d C:\tmc_test
C:\src\TMC_Suite\dist\win64\bin\tmc_rth.exe test1.tpl /Arb > console.txt
echo ERRORLEVEL=%ERRORLEVEL%
type console.txt
и запустите его двойным щелчком или из cmd. Ожидаемо: ERRORLEVEL=0 и те же пять строк.
Коды возврата ядер:
| Код | Значение (как пишет ядро) |
|---|---|
0 |
OK - all steps are calculated — все шаги посчитаны |
1 |
ERROR in .tpl file - calculation is not done — ошибка в задании, расчёт не выполнялся |
2 |
ERROR during calculation — ошибка во время расчёта |
3 |
STOPPED - calculation is not finished — расчёт прерван |
Дополнительный ключ /Time (например, tmc_rth.exe test1.tpl /Arb /Time) создаёт отчёт о
времени расчёта — файл вида test1.timing_H_win64.txt.
Замер: расчёт test1.tpl ядром tmc_rth.exe Release x64 — 4,7 с, ядром tmc_rtx.exe
Release Win32 — 7,5 с (вместе с открытием и закрытием окна).
5.7 Какие файлы должен создать расчёт
После расчёта test1.tpl в папке C:\tmc_test (размеры из реального прогона ядром H):
| Файл | Размер | Чем открывать |
|---|---|---|
test1.s |
357 байт | TMCGROUT — матрица рассеяния (отражение от порта) |
test1.t |
76 638 байт | TMCROS — временной сигнал на порту |
test1.tt |
392 191 байт (у ядра X — 1 566 621) | FieldView — топология |
test1.ex |
391 753 байта | FieldView — поле |
test1.AMP, test1.FAZ |
по 391 753 байта | TMC_DN — амплитуда и фаза поля |
test1.DAT |
309 019 байт | TMC_DN — диаграмма направленности |
Если файлы появились, у них ненулевой размер, а код возврата 0 — сборка рабочая.
Замечания:
- Перед повторным расчётом в той же папке удалите прежние результаты (всё, кроме
test1.tpl) или считайте в новой папке — так проще убедиться, что файлы созданы заново. - Файлы, созданные 32- и 64-битной версией, побайтно не совпадают: внутрь записывается полный путь к файлу, а последние знаки чисел могут отличаться. Это нормально.
- Больше примеров заданий — в папке
samples\SAMPLE_R, которую ставит установщикTMC_Suite_Setup.exeиз раздела Releases (по умолчанию вC:\Program Files\TMC Suite\samples\SAMPLE_R).
Дальше — Шаг 6. Установщик и переносимая папка.
MFC 1.3 · Step 5. Checking the result and a test run
What this page covers. You will make sure that the build has created all 12 files for each built combination, that the programs have the right bitness and do not require third-party libraries, start each program and perform a test run on a short task file — first in the compute kernel window, then automatically from the command line with a check of the exit code.
5.1 List of expected files
After building one combination, 6 programs and 6 libraries should appear. Below — for Release x64 and Release Win32, with sizes from a real build (Visual Studio 2026 18.11.1). Your sizes may differ slightly with another compiler version — this is normal; what matters is that the files exist and are not empty.
Programs (dist\<platform>\bin\):
| File | What it is | Release x64 (dist\win64\bin) |
Release Win32 (dist\win32\bin) |
|---|---|---|---|
tmc_rth.exe |
compute kernel, H-polarization | 5,258,240 bytes (≈ 5.0 MB) | 4,131,840 bytes (≈ 3.9 MB) |
tmc_rtx.exe |
compute kernel, X-mode | 5,294,080 bytes (≈ 5.0 MB) | 4,157,440 bytes (≈ 4.0 MB) |
TMCROS.exe |
time signal viewer | 4,623,360 bytes (≈ 4.4 MB) | 3,575,808 bytes (≈ 3.4 MB) |
TMCGROUT.exe |
scattering matrix viewer | 4,574,208 bytes (≈ 4.4 MB) | 3,531,264 bytes (≈ 3.4 MB) |
TMC_DN.exe |
radiation pattern viewer | 4,668,416 bytes (≈ 4.5 MB) | 3,611,136 bytes (≈ 3.4 MB) |
FieldView.exe |
field visualization (OpenGL) | 4,753,408 bytes (≈ 4.5 MB) | 3,702,272 bytes (≈ 3.5 MB) |
Next to each .exe there is a .pdb of the same name (30–40 MB) — debug information. It is not
needed to run the programs and is not included in the installer.
Debug programs (dist\<platform>\debug\bin\) are about 2.5 times larger:
for example, tmc_rth.exe Debug x64 is 13,407,232 bytes.
Libraries (dist\<platform>\lib\): complex.lib, exprint.lib, Prepr.lib,
SFILE95.lib, TMCIndan.lib, TMCLibError.lib. They are needed only for building the programs;
there is no need to give them to users.
On disk the library names are written as the project is named (
Prepr.lib,SFILE95.lib), while in the linker settings they are lowercase (prepr.lib,sfile95.lib). In Windows the letter case in file names does not matter; this is not an error.
5.2 Checking with one command
Open Developer PowerShell for VS (step 4, section 4.1),
go to the root (cd C:\src\TMC_Suite) and paste as a whole:
$exe = 'FieldView','TMC_DN','TMCGROUT','TMCROS','tmc_rth','tmc_rtx'
$lib = 'complex','exprint','Prepr','SFILE95','TMCIndan','TMCLibError'
foreach ($d in 'win64','win32','win64\debug','win32\debug') {
$miss = @()
foreach ($n in $exe) { if (-not (Test-Path "dist\$d\bin\$n.exe")) { $miss += "$n.exe" } }
foreach ($n in $lib) { if (-not (Test-Path "dist\$d\lib\$n.lib")) { $miss += "$n.lib" } }
if ($miss.Count -eq 0) { "dist\$d : OK, all 12 files" } else { "dist\$d : MISSING " + ($miss -join ', ') }
}
After building all four combinations, the result should be as follows (verified):
dist\win64 : OK, all 12 files
dist\win32 : OK, all 12 files
dist\win64\debug : OK, all 12 files
dist\win32\debug : OK, all 12 files
If you did not build all combinations, there will be a MISSING … line for those not built — this is expected.
Bitness of the programs
dumpbin /nologo /headers dist\win64\bin\tmc_rth.exe | findstr /c:"machine"
dumpbin /nologo /headers dist\win32\bin\tmc_rth.exe | findstr /c:"machine"
Expected answer: for win64 — the line 8664 machine (x64), for win32 — 14C machine (x86)
(and also the line 32 bit word machine).
The programs do not need third-party DLLs
dumpbin /nologo /dependents dist\win64\bin\tmc_rth.exe
The list should contain only Windows system libraries: KERNEL32.dll, USER32.dll,
GDI32.dll, ADVAPI32.dll, SHELL32.dll, ole32.dll, gdiplus.dll, WINMM.dll, etc.;
FieldView.exe additionally has OPENGL32.dll and GLU32.dll. Libraries like MSVCP140.dll,
VCRUNTIME140.dll, mfc140.dll must not be there: MFC and the C library are linked
statically, so the built programs run on any computer with Windows without
installing the Visual C++ Redistributable (verified).
5.3 Starting the programs
- Open
C:\src\TMC_Suite\dist\win64\bin(ordist\win32\bin) in File Explorer. - Double-click each of the six programs in turn. Each should open its window without error messages. Close the window (the close button or File → Exit).
If you transferred the programs to another computer via the internet (e-mail, cloud) and Windows shows the blue window Windows protected your PC (SmartScreen), this is because the programs are not digitally signed. Click More info → Run anyway. On the computer where the programs were built, this window usually does not appear.
5.4 Test run: preparing the task file
Sample task files (samples) are not included in the repository, so to check the build use the
short task file below — a radiating planar horn on a grid of 240 × 200 nodes. It computes
in a few seconds, suits both kernels (tmc_rth.exe and tmc_rtx.exe) and creates files
for all viewers.
- Create the folder
C:\tmc_test(File Explorer → driveC:→ right-click → New → Folder). Do not use theC:\Program Files\…folder for computations: the kernel writes the results next to the task file, and a regular user cannot write there. - Open Notepad (Start → type
Notepadornotepad). - Copy the text below into it in full, from
#TMC_RT_Hto#EOF:
#TMC_RT_H
! test1.tpl - planar horn, test task for the build check of TMC Suite
#define L_box @ ( 240.0 )
#define W_box @ ( 200.0 )
#define W_delta @ ( 1.0 )
#define W_chan @ ( 20.0 )
#define L_feed @ ( 60.0 )
#define L_flare @ ( 50.0 )
#define D_aper @ ( 80.0 )
#define F @ ( 10.0 )
#define yc @ ( W_box/2 )
#define ylo @ ( yc - W_chan/2 )
#define yhi @ ( yc + W_chan/2 )
#STEP
#PARM
ANGLE_UNIT radian;
FREQ_UNIT GHz;
LONG_UNIT mm;
TIME_UNIT ns;
DELTA W_delta;
TIME 0.; 3.;
X_MIN 0.0;
X_MAX L_box;
Y_MIN 0.0;
Y_MAX W_box;
FREQ F;
#END_PARM
#TOPOLOGY
BLOCK 1;
RECT_STAT METAL; 0.0; L_feed; ylo-W_delta; ylo;
END_B
BLOCK 2;
RECT_STAT METAL; 0.0; L_feed; yhi; yhi+W_delta;
END_B
BLOCK 3;
POLYGON_STAT METAL;
L L_feed; ylo;
L L_feed+L_flare; yc-D_aper/2;
L L_feed+L_flare; yc-D_aper/2;
END_B
BLOCK 4;
POLYGON_STAT METAL;
L L_feed; yhi;
L L_feed+L_flare; yc+D_aper/2;
L L_feed+L_flare; yc+D_aper/2;
END_B
BLOCK 5;
INPUT_X ; ylo; yhi; 0; 1000;
END_B
BLOCK 6;
RECT_STAT ABSORBER; L_box-5*W_delta; L_box-2*W_delta; 2*W_delta; W_box-2*W_delta;
END_B
BLOCK 7;
RECT_STAT ABSORBER; 2*W_delta; L_box-2*W_delta; 2*W_delta; 5*W_delta;
END_B
BLOCK 8;
RECT_STAT ABSORBER; 2*W_delta; L_box-2*W_delta; W_box-5*W_delta; W_box-2*W_delta;
END_B
#END_TOPOLOGY
#LINK_LIST
T 1; 0.0; 0.0;
T 2; 0.0; 0.0;
T 3; 0.0; 0.0;
T 4; 0.0; 0.0;
T 5; 0.0; 0.0;
T 6; 0.0; 0.0;
T 7; 0.0; 0.0;
T 8; 0.0; 0.0;
#END_LINK
#OUTPUT
FILE test1;
TOPOLOGY;
FIELDS;
SMATRIX test1; F; 1.5; 2.5;
FIELD_DISTRIBUTION_M test1; F; 1.5; 2.5;
#END_OUTPUT
#END_STEP
#EOF
- File → Save As… → folder
C:\tmc_test→ in the Save as type field choose All Files (*.*) → file nametest1.tpl→ Save. Check in File Explorer that the file is named exactlytest1.tpl, nottest1.tpl.txt(to see extensions: File Explorer → View → Show → File name extensions).
The task file text contains only Latin letters, so the encoding when saving does not matter. If you add comments in Russian (lines starting with
!), save the file in the ANSI encoding (Windows-1251) — this is how the task file preprocessor understands them.
5.5 Test run in the kernel window
- Start
C:\src\TMC_Suite\dist\win64\bin\tmc_rth.exe. - Menu File → Open… (Ctrl+O) → open
C:\tmc_test\test1.tpl. - Menu Run → Run (the F5 key). The progress of the computation is shown in the status bar at the bottom of the window. The computation takes a few seconds.
- When the computation is finished, the result files should appear in the folder
C:\tmc_test(the list is in section 5.7). -
View the results from the kernel’s View menu:
- View → Output — time signal at the port (TMCROS viewer);
- View → S-matrix — scattering matrix (TMCGROUT viewer);
- View → Directional Pattern — radiation pattern (TMC_DN viewer);
- View → Field and topology — field and topology (FieldView);
- View → Statistics — computation statistics window.
On the first call of each viewer, the kernel asks you to specify its program. Specify the file from the same
binfolder and of the same bitness as the kernel (fordist\win64\bin\tmc_rth.exe—dist\win64\bin\TMCROS.exe,…\TMCGROUT.exe,…\TMC_DN.exe,…\FieldView.exe). The kernel remembers the choice; it can be changed in the Config → Viewer menu. (The installer from step 6 sets these paths itself.)
Repeat the same for tmc_rtx.exe (X-mode) if you need to check it too.
5.6 Test run from the command line (with exit code)
The kernels can compute without user interaction: the /Arb switch opens the task file, computes all steps,
writes the progress to the console and closes the window, and reports the outcome with an exit code.
In Windows PowerShell (a regular one will do, not necessarily Developer):
cd C:\tmc_test
& C:\src\TMC_Suite\dist\win64\bin\tmc_rth.exe test1.tpl /Arb | Out-Host
$LASTEXITCODE
The kernel window appears for a few seconds and closes by itself. Expected output (verified):
[tmc_rth] File: test1.tpl
[tmc_rth] Steps: 1
[tmc_rth] Step 1 of 1: start
[tmc_rth] Step 1 of 1: done
[tmc_rth] RESULT 0: OK - all steps are calculated
0
| Out-Hostat the end of the command is needed: with it PowerShell waits for the computation to finish and shows the kernel messages. Without it PowerShell returns control immediately, and the messages do not appear (the kernel is a windowed program).
In Command Prompt (cmd) it is convenient to do the same with a batch file — in it cmd
waits for the program to finish. Create C:\tmc_test\run_test.bat in Notepad:
@echo off
cd /d C:\tmc_test
C:\src\TMC_Suite\dist\win64\bin\tmc_rth.exe test1.tpl /Arb > console.txt
echo ERRORLEVEL=%ERRORLEVEL%
type console.txt
and run it by double-clicking or from cmd. Expected: ERRORLEVEL=0 and the same five lines.
Kernel exit codes:
| Code | Meaning (as the kernel writes it) |
|---|---|
0 |
OK - all steps are calculated — all steps are computed |
1 |
ERROR in .tpl file - calculation is not done — error in the task file, the computation was not performed |
2 |
ERROR during calculation — error during the computation |
3 |
STOPPED - calculation is not finished — the computation was interrupted |
The additional /Time switch (for example, tmc_rth.exe test1.tpl /Arb /Time) creates a
computation time report — a file like test1.timing_H_win64.txt.
Measurement: computing test1.tpl with tmc_rth.exe Release x64 — 4.7 s, with tmc_rtx.exe
Release Win32 — 7.5 s (including opening and closing the window).
5.7 Which files the computation should create
After computing test1.tpl, in the folder C:\tmc_test (sizes from a real run of the H kernel):
| File | Size | What to open it with |
|---|---|---|
test1.s |
357 bytes | TMCGROUT — scattering matrix (reflection from the port) |
test1.t |
76,638 bytes | TMCROS — time signal at the port |
test1.tt |
392,191 bytes (for the X kernel — 1,566,621) | FieldView — topology |
test1.ex |
391,753 bytes | FieldView — field |
test1.AMP, test1.FAZ |
391,753 bytes each | TMC_DN — field amplitude and phase |
test1.DAT |
309,019 bytes | TMC_DN — radiation pattern |
If the files have appeared, have a non-zero size, and the exit code is 0, the build works.
Notes:
- Before a repeated computation in the same folder, delete the previous results (everything except
test1.tpl) or compute in a new folder — this makes it easier to make sure the files were created anew. - Files created by the 32-bit and 64-bit versions do not match byte for byte: the full path to the file is written inside, and the last digits of numbers may differ. This is normal.
- More sample task files are in the
samples\SAMPLE_Rfolder, which is installed by the installerTMC_Suite_Setup.exefrom the Releases section (by default toC:\Program Files\TMC Suite\samples\SAMPLE_R).