Работа без участия человека: пакетный режим и командная строка
Обычно расчёт запускают из окна программы. Но часто удобнее иначе: посчитать десяток заданий подряд, запустить длинный счёт на сервере или включить расчёт в свой сценарий обработки. Для этого счётные ядра умеют работать в пакетном режиме: сами открывают задание, считают все шаги, сообщают результат в консоль и закрываются.
| Способ | Что это | Где есть |
|---|---|---|
| Пакетный режим | обычная программа с окном; сама открывает задание, считает и закрывается | Windows (версия 5.0 и MFC-версия), Linux, macOS |
| Консольные счётные ядра | отдельные программы без окон вообще, только расчёт | Linux |
В обоих случаях расчёт один и тот же, и выходные файлы получаются одинаковые.
Имена программ.
| Версия | H-поляризация | X-мода |
|---|---|---|
| TMC Suite 5.0 (новый интерфейс, Windows x64) | planarrt_h.exe |
planarrt_x.exe |
| прежняя MFC-версия (Windows) | tmc_rth.exe |
tmc_rtx.exe |
| консольные ядра для Linux | tmc_rth |
tmc_rtx |
Ниже примеры даны для версии 5.0, установленной в папку по умолчанию
C:\Program Files\TMC Suite Qt\ (при установке «только для меня» — %LOCALAPPDATA%\Programs\TMC Suite Qt\). Для MFC-версии подставьте tmc_rth.exe / tmc_rtx.exe и путь
к её папке bin; ключи и коды возврата у неё те же.
Изменение по исправлениям 26.10.2026 (версия 5.1, новый интерфейс): ошибка на одном шаге свипа больше не обрывает расчёт — см. пп. 1.3 и 1.4.
1. Пакетный режим (Windows)
1.1. Запуск
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "C:\работа\задание.tpl" /Arb
Программа откроет задание, посчитает все шаги с первого по последний (#STEP … #END_STEP),
запишет выходные файлы рядом с заданием (имена — из секции #OUTPUT) и закроется.
Для X-моды всё то же самое, программа — planarrt_x.exe.
Путь к заданию указывайте полным. По нему программа определяет папку, в которой лежат включаемые файлы задания (
#include), файлы распределения (.eps) и падающей волны (.sig), и куда писать результаты. Папка задания должна быть доступна на запись.
1.2. Ключи командной строки
| Ключ | Что делает |
|---|---|
/Ar |
автозапуск: открыть задание, посчитать все шаги. При ошибке окно остаётся открытым, чтобы её было видно |
/Arb |
автозапуск в пакетном режиме: по окончании окно закрывается всегда, в том числе при ошибке |
/Time |
по окончании расчёта всех шагов записать рядом с заданием отчёт о времени расчёта (п. 1.6) |
/GPU |
считать на видеокарте (первая карта с двойной точностью), независимо от настройки в окне «Расчёт на видеокарте» |
/GPU:n |
считать на видеокарте с номером n (счёт с нуля) |
/CPU |
считать на процессоре, даже если в настройках включена видеокарта |
/d |
демонстрационный режим: включает автозапуск и пакетный режим, плюс режим «демо» |
Правила записи ключей:
- ключ можно писать и через косую черту (
/Arb), и через дефис (-Arb); - ключ — отдельное слово через пробел; внутри пути в кавычках ключи не ищутся (путь вида
C:\Time\a.tplключом не считается); - регистр букв в ключах не важен:
/arb=/Arb=/ARB,/D=/d,/time=/Time,/gpu=/GPU(так разбирает ключи ядро); - порядок ключей и имени задания не важен;
- файлом задания считается первый довод, который не начинается с
/или-.
Без /Ar и /Arb программа просто откроет задание в окне и будет ждать действий
пользователя.
Ключ
/d— демонстрационный прогон: ядро включает вывод поля и синхронизацию с программой просмотра поля, а программу, которую оно запустило, закрывает вместе с собой. Это не отдельная «Demo-версия» ядра, о которой пишет докторская диссертация К. Н. Климова (раздел 9.1: Demo-версия не выводит отражённые сигналы на входах) — та собиралась отдельно и в пакет не входит.
О том, как ключи /GPU и /CPU сочетаются с настройкой в окне и когда ядро всё равно считает
на процессоре, — в Расчёт на видеокарте.
1.3. Сообщения в консоль
Окно консоли программа сама не открывает. Но если она запущена с /Ar или /Arb из
командной строки (cmd, bat-файл) или её вывод перенаправлен в файл (> log.txt) или канал
(| more), она пишет туда ход расчёта и ошибки. Каждая строка начинается с имени программы в
квадратных скобках ([PlanarRT_H] или [PlanarRT_X]):
[PlanarRT_H] File: D:\calc\a.tpl
[PlanarRT_H] Steps: 2
[PlanarRT_H] Step 1 of 2: start
[PlanarRT_H] Step 1 of 2: done
[PlanarRT_H] ERROR in .tpl (step 2 of 2): Error : Unknown keyword {...}
[PlanarRT_H] RESULT 1: ERROR in .tpl file - calculation is not done
| Сообщение | Смысл |
|---|---|
File: <путь> |
открыт файл задания |
Steps: N |
в задании найдено N шагов |
Step i of N: start / done |
шаг начат / посчитан |
ERROR: no .tpl file in the command line |
в командной строке нет файла задания |
ERROR: can't open file <путь> |
файл задания не найден |
ERROR in .tpl: …, ERROR in .tpl (step i of N): … |
ошибка в задании (текст — как в строке состояния окна) |
ERROR in .tpl: no #STEP to calculate |
в задании нет ни одного шага |
ERROR in calculation (step i of N): … |
ошибка во время счёта шага |
ERROR in calculation (step i of N, f): … - the S-matrix of this step is zeros in the .s |
ошибка на шаге i свипа (f — частота шага). На этой частоте в .s записываются нули; расчёт продолжается со следующего шага (с 26.10.2026) |
Calculated with errors at K step(s): … First: Error at step N (f): … |
итог свипа, в котором были шаги с ошибкой: их число, номера и частоты, текст первой ошибки |
WARNING: … |
предупреждение ядра; расчёт продолжается. Например, о незатухшем отклике в окне SMATRIX многочастотного расчёта (Многочастотный расчёт, п. 4.1) или (X-ядро) о положительной добавке ε вместе с плазмой N или полем B в одних узлах (PlanarRT X, раздел 8.3) |
ERROR in calculation (step i): not enough memory |
не хватило памяти |
STOPPED before step i of N / STOPPED at step i of N |
расчёт остановлен или окно закрыто |
RESULT n: … |
итог, n — код возврата (п. 1.4) |

Рисунок 1. Успешный расчёт с /Arb из bat-файла: ход расчёта, RESULT 0 и код возврата 0.

Рисунок 2. Задание с ошибкой (частота SMATRIX не равна FREQ): расчёт не выполнялся,
RESULT 1 и код возврата 1.
Если задание не посчиталось, проверьте строку
Steps: N. Препроцессор молча пропускает вызов неизвестного макроса шага, и такой шаг просто исчезает из задания — расчёт при этом завершается с кодом 0.
1.4. Коды возврата
| Код | Итоговая строка | Что означает |
|---|---|---|
| 0 | RESULT 0: OK - all steps are calculated |
все шаги посчитаны |
| 1 | RESULT 1: ERROR in .tpl file - calculation is not done |
ошибка в задании: файл не найден, не указан, ошибка препроцессора или данных. Расчёт не выполнялся |
| 2 | RESULT 2: ERROR during calculation |
ошибка во время расчёта шага: не хватило памяти, ошибка в формуле ε или плазмы (например, корень из отрицательного числа — формула вычисляется при построении блоков, уже на шаге расчёта), ошибка записи .s, окно ДН кончается на конце времени расчёта или позже, частота ниже отсечки порта, S-матрица не является числом (NaN, Inf) и т. п. |
| 3 | RESULT 3: STOPPED - calculation is not finished |
расчёт остановлен или окно закрыто до окончания |
Ошибка на одном шаге не обрывает свип (с 26.10.2026). Если шаг закончился ошибкой, в .s на
его частоте записывается S-матрица из нулей, в консоль выводится
ERROR in calculation (step N of M, f): …, и расчёт идёт дальше. В конце — код возврата 2 и
итоговая строка Calculated with errors at … First: Error at step N (f): … со списком шагов с
ошибками; та же строка остаётся в строке состояния окна, а слева от неё — надпись
«Готово с ошибками» (красным). В многочастотном расчёте нули записываются только на частотах с ошибкой (например, ниже
отсечки порта), остальные частоты считаются. Раньше первая ошибка останавливала расчёт, и шаги
после неё не считались.
Пример — свип из трёх шагов, на втором шаге (72 ГГц) порт не возбуждён:
[PlanarRT_H] Steps: 3
[PlanarRT_H] Step 1 of 3: start
[PlanarRT_H] Step 1 of 3: done
[PlanarRT_H] Step 2 of 3: start
[PlanarRT_H] ERROR in calculation (step 2 of 3, 72 GHz): S-matrix: There are no exited inputs in file {...\o.t} - the S-matrix of this step is zeros in the .s
[PlanarRT_H] Step 3 of 3: start
[PlanarRT_H] Step 3 of 3: done
[PlanarRT_H] Calculated with errors at 1 step(s): 2 (72 GHz) - the S-matrix there is zeros. First: Error at step 2 (72 GHz): S-matrix: There are no exited inputs in file {...\o.t}
[PlanarRT_H] RESULT 2: ERROR during calculation

Рисунок 3. Свип с ошибкой на шаге 2: шаг 3 всё равно посчитан, в конце — список шагов с
ошибками, RESULT 2 и код возврата 2.
Код возврата читают так:
- в bat-файле —
%ERRORLEVEL%илиif errorlevel 1 …; - в обычном окне
cmd(не в bat-файле)cmdне ждёт оконную программу — запускайте черезstart /wait:
start /wait "" "C:\Program Files\TMC Suite Qt\planarrt_h.exe" "D:\calc\a.tpl" /Arb
echo %ERRORLEVEL%
Пример bat-файла, который останавливается на первом непосчитанном задании:
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "D:\calc\a.tpl" /Arb
if errorlevel 1 echo Задача a.tpl не посчитана & goto :eof
Запуск из Git Bash:
/Arbbash превращает в путь. Перед командой поставьтеMSYS_NO_PATHCONV=1или пишите ключи через дефис (-Arb).
1.5. Расчёт на видеокарте в пакетном режиме
Без ключей ядро в пакетном режиме считает так, как выбрано в окне Настройки → Расчёт на
видеокарте… (если последняя проверка видеокарты была пройдена). Ключи /GPU и /CPU
главнее этой настройки:
"C:\Program Files\TMC Suite Qt\planarrt_x.exe" "D:\calc\big.tpl" /Arb /Time /GPU
"C:\Program Files\TMC Suite Qt\planarrt_x.exe" "D:\calc\big.tpl" /Arb /CPU
Где фактически шёл расчёт каждого шага, пишет строка Compute: отчёта /Time.
1.6. Отчёт о времени расчёта: ключ /Time
Сколько времени занял расчёт и на что оно ушло, можно узнать двумя способами.
| Способ | Как получить |
|---|---|
| Из окна программы | после расчёта: Вид → Статистика (Shift+F4) → кнопка «Время расчёта…» → кнопка «Экспорт в TXT…» |
| Без окна | добавить к запуску ключ /Time (или -Time) |
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "C:\работа\задание.tpl" /Arb /Time
С ключом /Time программа в конце расчёта всех шагов записывает рядом с заданием текстовый
файл с тем же отчётом, что показывает окно «Время расчёта»:
<имя задания>.timing_<H или X>_win64.txt
Например, для задание.tpl и H-моды — задание.timing_H_win64.txt. (Для 32-разрядной
MFC-версии — …_win32.txt.) Без ключа файл не создаётся: считается только само задание.

Рисунок 4. Окно «Время расчёта» (Статистика → «Время расчёта…»). Тот же текст записывается в
файл по ключу /Time.

Рисунок 5. Начало файла ok.timing_H_win64.txt, записанного по ключу /Time (выведен в окне
консоли): шапка, сетка шага, строка Compute: и время фаз A–C.
В отчёте:
- в шапке — ядро и платформа, путь к заданию, время создания отчёта, компьютер, процессор, объём памяти, пиковый расход памяти процессом;
- по каждому шагу — размер сетки (
nX,nY, число узлов и блоков), число тактов, шаг по времени и пространству, строкаCompute:(на процессоре или на видеокарте шёл расчёт и почему, см. Расчёт на видеокарте), строкаDistribution files (.eps); - время каждой фазы: A — разбор задания (препроцессор, чтение секций), B — подготовка (файлы, память сетки, построение блоков), C — цикл по времени (отдельно — чистый счёт и запись на диск), D — постобработка.
Строка Distribution files (.eps) показывает, использует ли шаг файлы распределения:
| Что написано | Что это значит |
|---|---|
not used |
файлов распределения в шаге нет: среды нет вовсе либо она задана числом или формулой |
written by N block(s) |
N блоков вида RECT_STAT [имя]выражение посчитали распределение и записали его в файл; время записи — строка B5 |
read by M block(s) |
M блоков FILE имя; взяли готовое распределение из файла; время — строка B5a |
Если файлов распределения нет, строки B5 и B5a равны нулю — это нормально, на остальные строки отчёта это не влияет.
Если шаг не посчитался (ошибка в задании, не найден файл распределения), отчёт всё равно записывается: в нём у шага стоит состояние
errorилиnot run, а число выполненных тактов равно нулю. Самого текста ошибки в отчёте нет — он виден в консоли (п. 1.3) и в левой части строки состояния окна программы.
2. Linux и macOS
2.1. Пакетный режим программы с окном
На Linux и macOS ключи пишутся только через дефис (путь к файлу там сам начинается с косой черты):
planarrt_h -Arb /home/имя/работа/задание.tpl
На macOS внутри пакета .app лежит сама программа, к ней и обращаются:
/Applications/PlanarRT_H.app/Contents/MacOS/PlanarRT_H -Arb /Users/имя/работа/задание.tpl
2.2. Консольные счётные ядра для Linux
Это отдельные программы — tmc_rth (H-мода) и tmc_rtx (X-мода). Окон у них нет вовсе,
графическая оболочка на машине не нужна: их ставят на сервер, где есть только терминал. Ключей
они не принимают.
tmc_rth /home/имя/работа/задание.tpl
tmc_rtx /home/имя/работа/задание.tpl
Имя выходного файла ядро берёт из самого задания, из секции #OUTPUT, — второй аргумент не
нужен.
Коды возврата консольных ядер Linux отличаются от Windows:
| Код | Что означает |
|---|---|
| 0 | расчёт прошёл |
| 1 | ошибка: файл задания не открылся, не прочитался или счёт прервался |
| 2 | программа запущена без аргумента |
По коду возврата удобно останавливать сценарий, если очередное задание не посчиталось:
tmc_rth /путь/задание.tpl || { echo "не посчиталось"; exit 1; }
Ход разбора задания и счёта идёт в обычный вывод, сообщения об ошибках — в поток ошибок. Полезные строки:
Step:1;Error:no задание прочитано, ошибок нет
Set block 55; points:1057041; eps = {...} прочитан файл распределения
Step:1;Can't open diel.data file {...} файл распределения не найден
3. Несколько заданий подряд
Windows (bat-файл)
@echo off
for %%f in (C:\работа\*.tpl) do (
echo == %%f
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "%%f" /Arb /Time
if errorlevel 1 echo ошибка, код %%ERRORLEVEL%%, пропускаем
)
Linux и macOS
for f in /home/имя/работа/*.tpl; do
echo "== $f"
tmc_rth "$f" || echo " ошибка, пропускаем"
done
4. Что влияет на скорость
- Вывод полей и топологии. С выключенными
FIELDSиTOPOLOGYв секции#OUTPUTсчёт идёт заметно быстрее: приFIELDSна каждом такте на диск переписывается вся сетка. Убирать строки нужно в каждом шаге#STEP— у каждого шага своя секция#OUTPUT. - Где лежит задание. Держите задание и результаты на локальном диске. Если работать с сетевой папки или с раздела другой системы (например, с раздела Windows, подключённого в Linux), каждая запись идёт длинным путём и счёт замедляется в разы.
- Синхронизация с FieldView. В режиме Настройки → Синхронизация ядро после каждого кадра
поля ждёт, пока FieldView его прочитает. В пакетном режиме (
/Ar,/Arb) ядро FieldView не ждёт. В обычном режиме после одного неудачного ожидания ядро не ждёт снова, пока FieldView не прочитает файл. - Видеокарта. На больших сетках расчёт на видеокарте ускоряет цикл по времени в десятки раз (Расчёт на видеокарте).
5. Частые вопросы
Программа закрылась сразу, файлов нет.
Посмотрите код возврата и консоль. Код 1 — не найдено задание или включаемый файл: проверьте,
что путь полный и что рядом с заданием лежат файлы, на которые оно ссылается (#include,
распределения .eps, падающая волна .sig).
Код 0, но выходные файлы не появились.
Проверьте строку Steps: N в консоли (шаг мог «исчезнуть» из-за неизвестного макроса) и секцию
#OUTPUT: строка FILE <имя>; обязательна и должна идти первой, а имя не должно содержать
точку.
Код 1, ошибка в строке SMATRIX.
В одночастотном режиме частота в SMATRIX должна равняться FREQ шага, а окно Tmin; Tmax; —
быть задано (Файл задания .tpl, раздел 7.4).
Код 2.
Задание прочитано, но хотя бы один шаг не досчитан. Текст ошибки — в строке консоли
ERROR in calculation … или Error at step N (f): …. Остальные шаги свипа при этом посчитаны, а
на частоте шага с ошибкой в .s — нули. Частые причины: не хватило памяти, ошибка в формуле ε
или плазмы, частота ниже отсечки порта, окно диаграммы направленности кончается на конце времени
расчёта или позже, расходящееся поле (S не является числом), ошибка записи .s (больше 99 частот,
больше 20 портов, существующий .s не читается).
.s содержит лишние частоты или старые числа.
Файл .s дописывается, а не перезаписывается. Перед повторным расчётом удаляйте его.
Нужно посмотреть результат.
Выходные файлы одинаковы во всех системах. Их открывают программы просмотра пакета: .t —
TMCROS, .s — TMCGROUT, .DAT — TMC_DN, поля (.ex, .AMP, .FAZ) — FieldView. Файл,
посчитанный на Linux, открывается в Windows-версии и наоборот.
Можно ли считать на одной системе, а смотреть на другой. Да, ради этого форматы и сохранены неизменными. Задания и результаты переносятся между Windows, Linux и macOS как есть.
Unattended operation: batch mode and the command line
A computation is usually started from the program window. Often, however, another way is more convenient: computing a dozen task files in a row, running a long computation on a server, or including the computation in your own processing script. For this, the compute kernels can work in batch mode: they open the task file themselves, compute all steps, report the result to the console and close.
| Method | What it is | Where available |
|---|---|---|
| Batch mode | the ordinary program with a window; it opens the task file itself, computes and closes | Windows (version 5.0 and the MFC version), Linux, macOS |
| Console compute kernels | separate programs with no windows at all, computation only | Linux |
In both cases the computation is the same, and the output files are identical.
Program names.
| Version | H-polarization | X-mode |
|---|---|---|
| TMC Suite 5.0 (new interface, Windows x64) | planarrt_h.exe |
planarrt_x.exe |
| previous MFC version (Windows) | tmc_rth.exe |
tmc_rtx.exe |
| console kernels for Linux | tmc_rth |
tmc_rtx |
The examples below are given for version 5.0 installed in the default folder
C:\Program Files\TMC Suite Qt\ (for a "just for me" installation — %LOCALAPPDATA%\Programs\TMC Suite Qt\). For the MFC version, substitute tmc_rth.exe / tmc_rtx.exe and the path
to its bin folder; its keys and exit codes are the same.
Change after the fixes of 26.10.2026 (version 5.1, new interface): an error at one sweep step no longer aborts the computation — see Sec. 1.3 and 1.4.
1. Batch mode (Windows)
1.1. Starting
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "C:\work\task.tpl" /Arb
The program opens the task file, computes all steps from the first to the last (#STEP … #END_STEP),
writes the output files next to the task file (names are taken from the #OUTPUT section) and closes.
For the X-mode everything is the same; the program is planarrt_x.exe.
Give the full path to the task file. From it the program determines the folder containing the task's include files (
#include), distribution files (.eps) and incident-wave files (.sig), and where to write the results. The task folder must be writable.
1.2. Command-line keys
| Key | What it does |
|---|---|
/Ar |
autorun: open the task file and compute all steps. On an error the window stays open so that the error can be seen |
/Arb |
autorun in batch mode: when finished, the window always closes, including after an error |
/Time |
after all steps are computed, write a calculation-time report next to the task file (Sec. 1.6) |
/GPU |
compute on the video card (the first card with double precision), regardless of the setting in the Calculation on the video card window |
/GPU:n |
compute on the video card number n (counting from zero) |
/CPU |
compute on the processor even if the video card is enabled in the settings |
/d |
demonstration mode: turns on autorun and batch mode, plus the "demo" mode |
Rules for writing keys:
- a key can be written with a slash (
/Arb) or with a hyphen (-Arb); - a key is a separate word delimited by spaces; keys are not searched for inside a quoted path (a path such as
C:\Time\a.tplis not treated as a key); - the letter case of keys does not matter:
/arb=/Arb=/ARB,/D=/d,/time=/Time,/gpu=/GPU(this is how the kernel parses keys); - the order of the keys and the task file name does not matter;
- the task file is the first argument that does not begin with
/or-.
Without /Ar and /Arb the program simply opens the task file in its window and waits for the
user's actions.
The
/dkey is a demonstration run: the kernel turns on field output and synchronization with the field viewer, and closes the program it has started together with itself. This is not the separate "Demo version" of the kernel described in K. N. Klimov's doctoral dissertation (Sec. 9.1: the Demo version does not output the reflected signals at the ports) — that one was built separately and is not part of the package.
How the /GPU and /CPU keys combine with the setting in the window, and when the kernel still computes
on the processor, is described in GPU computing.
1.3. Console messages
The program does not open a console window by itself. But if it is started with /Ar or /Arb from the
command line (cmd, a bat file) or its output is redirected to a file (> log.txt) or a pipe
(| more), it writes the progress of the computation and errors there. Each line begins with the program name in
square brackets ([PlanarRT_H] or [PlanarRT_X]):
[PlanarRT_H] File: D:\calc\a.tpl
[PlanarRT_H] Steps: 2
[PlanarRT_H] Step 1 of 2: start
[PlanarRT_H] Step 1 of 2: done
[PlanarRT_H] ERROR in .tpl (step 2 of 2): Error : Unknown keyword {...}
[PlanarRT_H] RESULT 1: ERROR in .tpl file - calculation is not done
| Message | Meaning |
|---|---|
File: <path> |
the task file has been opened |
Steps: N |
N steps were found in the task file |
Step i of N: start / done |
the step has started / has been computed |
ERROR: no .tpl file in the command line |
there is no task file on the command line |
ERROR: can't open file <path> |
the task file was not found |
ERROR in .tpl: …, ERROR in .tpl (step i of N): … |
an error in the task file (the text is the same as in the window's status bar) |
ERROR in .tpl: no #STEP to calculate |
the task file contains no steps |
ERROR in calculation (step i of N): … |
an error while computing the step |
ERROR in calculation (step i of N, f): … - the S-matrix of this step is zeros in the .s |
an error at sweep step i (f is the frequency of the step). Zeros are written to the .s at this frequency; the computation continues with the next step (since 26.10.2026) |
Calculated with errors at K step(s): … First: Error at step N (f): … |
the summary of a sweep that had steps with errors: their number, indices and frequencies, and the text of the first error |
WARNING: … |
a kernel warning; the computation continues. For example, about a response that has not decayed within the SMATRIX window of a multi-frequency computation (Multi-frequency computation, Sec. 4.1) or (X kernel) about a positive ε increment together with plasma N or field B in the same nodes (PlanarRT X, Section 8.3) |
ERROR in calculation (step i): not enough memory |
there was not enough memory |
STOPPED before step i of N / STOPPED at step i of N |
the computation was stopped or the window was closed |
RESULT n: … |
the summary; n is the exit code (Sec. 1.4) |

Figure 1. Successful computation with /Arb from a bat file: computation progress, RESULT 0 and exit code 0.

Figure 2. Task file with an error (the SMATRIX frequency is not equal to FREQ): the computation was not performed,
RESULT 1 and exit code 1.
If the task was not computed, check the
Steps: Nline. The preprocessor silently skips a call of an unknown step macro, and such a step simply disappears from the task — the computation then finishes with code 0.
1.4. Exit codes
| Code | Summary line | Meaning |
|---|---|---|
| 0 | RESULT 0: OK - all steps are calculated |
all steps have been computed |
| 1 | RESULT 1: ERROR in .tpl file - calculation is not done |
an error in the task file: the file was not found or not specified, a preprocessor or data error. The computation was not performed |
| 2 | RESULT 2: ERROR during calculation |
an error while computing a step: not enough memory, an error in the ε or plasma formula (for example, the square root of a negative number — the formula is evaluated when the blocks are built, i.e. already at the computation step), an error writing the .s, the RP window ends at or after the end of the computation time, the frequency is below the port cutoff, the S-matrix is not a number (NaN, Inf), etc. |
| 3 | RESULT 3: STOPPED - calculation is not finished |
the computation was stopped or the window was closed before the end |
An error at one step does not abort the sweep (since 26.10.2026). If a step ends with an error, an S-matrix of zeros is
written to the .s at its frequency, the console shows
ERROR in calculation (step N of M, f): …, and the computation goes on. At the end the exit code is 2 and the
summary line Calculated with errors at … First: Error at step N (f): … lists the steps with
errors; the same line remains in the window's status bar, and to the left of it the label
"Done with errors" (in red) is shown. In a multi-frequency computation zeros are written only at the frequencies with an error (for example, below the
port cutoff); the other frequencies are computed. Previously the first error stopped the computation, and the steps
after it were not computed.
Example — a sweep of three steps; at the second step (72 GHz) the port is not excited:
[PlanarRT_H] Steps: 3
[PlanarRT_H] Step 1 of 3: start
[PlanarRT_H] Step 1 of 3: done
[PlanarRT_H] Step 2 of 3: start
[PlanarRT_H] ERROR in calculation (step 2 of 3, 72 GHz): S-matrix: There are no exited inputs in file {...\o.t} - the S-matrix of this step is zeros in the .s
[PlanarRT_H] Step 3 of 3: start
[PlanarRT_H] Step 3 of 3: done
[PlanarRT_H] Calculated with errors at 1 step(s): 2 (72 GHz) - the S-matrix there is zeros. First: Error at step 2 (72 GHz): S-matrix: There are no exited inputs in file {...\o.t}
[PlanarRT_H] RESULT 2: ERROR during calculation

Figure 3. Sweep with an error at step 2: step 3 is computed anyway; at the end — the list of steps with
errors, RESULT 2 and exit code 2.
The exit code is read as follows:
- in a bat file —
%ERRORLEVEL%orif errorlevel 1 …; - in an ordinary
cmdwindow (not in a bat file)cmddoes not wait for a windowed program — start it withstart /wait:
start /wait "" "C:\Program Files\TMC Suite Qt\planarrt_h.exe" "D:\calc\a.tpl" /Arb
echo %ERRORLEVEL%
An example bat file that stops at the first task that was not computed:
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "D:\calc\a.tpl" /Arb
if errorlevel 1 echo Task a.tpl was not computed & goto :eof
Starting from Git Bash: bash turns
/Arbinto a path. PutMSYS_NO_PATHCONV=1before the command or write the keys with a hyphen (-Arb).
1.5. GPU computing in batch mode
Without keys, the kernel in batch mode computes as selected in the Config → Compute (GPU)...
window (if the last video card check was passed). The /GPU and /CPU keys
take precedence over this setting:
"C:\Program Files\TMC Suite Qt\planarrt_x.exe" "D:\calc\big.tpl" /Arb /Time /GPU
"C:\Program Files\TMC Suite Qt\planarrt_x.exe" "D:\calc\big.tpl" /Arb /CPU
Where each step was actually computed is shown by the Compute: line of the /Time report.
1.6. Calculation-time report: the /Time key
How long the computation took and what the time was spent on can be found in two ways.
| Method | How to get it |
|---|---|
| From the program window | after the computation: View → Statistics (Shift+F4) → the Calc. time... button → the Export to TXT... button |
| Without a window | add the /Time (or -Time) key to the command line |
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "C:\work\task.tpl" /Arb /Time
With the /Time key, after all steps are computed the program writes, next to the task file, a text
file with the same report that the Calculation time window shows:
<task name>.timing_<H or X>_win64.txt
For example, for task.tpl and the H-mode — task.timing_H_win64.txt. (For the 32-bit
MFC version — …_win32.txt.) Without the key the file is not created: only the task itself is computed.

Figure 4. The Calculation time window (Statistics → Calc. time...). The same text is written to the
file by the /Time key.

Figure 5. The beginning of the file ok.timing_H_win64.txt written by the /Time key (shown in a console
window): the header, the step grid, the Compute: line and the time of phases A–C.
The report contains:
- in the header — the kernel and platform, the path to the task file, the report creation time, the computer, the processor, the amount of memory, the peak memory use of the process;
- for each step — the grid size (
nX,nY, the number of nodes and blocks), the number of time steps, the time step and the grid step, theCompute:line (whether the computation ran on the processor or on the video card and why, see GPU computing), theDistribution files (.eps)line; - the time of each phase: A — parsing the task file (preprocessor, reading the sections), B — preparation (files, grid memory, building the blocks), C — the time loop (with pure computation and disk writes shown separately), D — post-processing.
The Distribution files (.eps) line shows whether the step uses distribution files:
| What is written | What it means |
|---|---|
not used |
the step has no distribution files: there is no medium at all, or it is given by a number or a formula |
written by N block(s) |
N blocks of the form RECT_STAT [name]expression computed the distribution and wrote it to a file; the writing time is line B5 |
read by M block(s) |
M blocks FILE name; took a ready distribution from a file; the time is line B5a |
If there are no distribution files, lines B5 and B5a are zero — this is normal and does not affect the other lines of the report.
If a step was not computed (an error in the task file, a distribution file not found), the report is still written: the step has the state
errorornot runin it, and the number of completed time steps is zero. The error text itself is not in the report — it is shown in the console (Sec. 1.3) and in the left part of the status bar of the program window.
2. Linux and macOS
2.1. Batch mode of the windowed program
On Linux and macOS keys are written only with a hyphen (a file path there itself begins with a slash):
planarrt_h -Arb /home/user/work/task.tpl
On macOS the program itself lies inside the .app bundle, and it is called directly:
/Applications/PlanarRT_H.app/Contents/MacOS/PlanarRT_H -Arb /Users/user/work/task.tpl
2.2. Console compute kernels for Linux
These are separate programs — tmc_rth (H-mode) and tmc_rtx (X-mode). They have no windows at all,
and no graphical environment is needed on the machine: they are installed on a server that has only a terminal. They
accept no keys.
tmc_rth /home/user/work/task.tpl
tmc_rtx /home/user/work/task.tpl
The kernel takes the output file name from the task file itself, from the #OUTPUT section — a second argument is not
needed.
The exit codes of the Linux console kernels differ from Windows:
| Code | Meaning |
|---|---|
| 0 | the computation succeeded |
| 1 | an error: the task file could not be opened or read, or the computation was interrupted |
| 2 | the program was started without an argument |
The exit code makes it easy to stop a script if the next task file was not computed:
tmc_rth /path/task.tpl || { echo "not computed"; exit 1; }
The progress of parsing the task file and of the computation goes to standard output, error messages to the error stream. Useful lines:
Step:1;Error:no the task file has been read, no errors
Set block 55; points:1057041; eps = {...} a distribution file has been read
Step:1;Can't open diel.data file {...} the distribution file was not found
3. Several task files in a row
Windows (bat file)
@echo off
for %%f in (C:\work\*.tpl) do (
echo == %%f
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "%%f" /Arb /Time
if errorlevel 1 echo error, code %%ERRORLEVEL%%, skipping
)
Linux and macOS
for f in /home/user/work/*.tpl; do
echo "== $f"
tmc_rth "$f" || echo " error, skipping"
done
4. What affects the speed
- Field and topology output. With
FIELDSandTOPOLOGYturned off in the#OUTPUTsection the computation runs noticeably faster: withFIELDSthe whole grid is rewritten to disk at every time step. The lines must be removed in every#STEP— each step has its own#OUTPUTsection. - Where the task file is. Keep the task file and the results on a local disk. When working from a network folder or from a partition of another system (for example, a Windows partition mounted in Linux), each write goes a long way and the computation slows down many times.
- Synchronization with FieldView. In the Config → Synchronization mode the kernel, after each field
frame, waits until FieldView reads it. In batch mode (
/Ar,/Arb) the kernel does not wait for FieldView. In normal mode, after one unsuccessful wait, the kernel does not wait again until FieldView reads the file. - Video card. On large grids GPU computing speeds up the time loop by tens of times (GPU computing).
5. Frequently asked questions
The program closed immediately, there are no files.
Check the exit code and the console. Code 1 means the task file or an include file was not found: check
that the path is full and that the files the task refers to lie next to it (#include,
.eps distributions, .sig incident wave).
Code 0, but the output files did not appear.
Check the Steps: N line in the console (a step may have "disappeared" because of an unknown macro) and the
#OUTPUT section: the FILE <name>; line is mandatory and must come first, and the name must not contain
a dot.
Code 1, an error in the SMATRIX line.
In single-frequency mode the frequency in SMATRIX must equal the FREQ of the step, and the window Tmin; Tmax; must
be specified (Task file .tpl, Section 7.4).
Code 2.
The task file has been read, but at least one step was not completed. The error text is in the console line
ERROR in calculation … or Error at step N (f): …. The other sweep steps are computed, and
at the frequency of the step with the error the .s contains zeros. Common causes: not enough memory, an error in the ε
or plasma formula, a frequency below the port cutoff, the radiation pattern window ends at or after the end of the
computation time, a diverging field (S is not a number), an error writing the .s (more than 99 frequencies,
more than 20 ports, an existing .s cannot be read).
The .s contains extra frequencies or old numbers.
The .s file is appended to, not overwritten. Delete it before computing again.
I need to view the result.
The output files are the same on all systems. They are opened by the viewers of the package: .t —
TMCROS, .s — TMCGROUT, .DAT — TMC_DN, fields (.ex, .AMP, .FAZ) — FieldView. A file
computed on Linux opens in the Windows version and vice versa.
Can I compute on one system and view on another? Yes, this is why the formats have been kept unchanged. Task files and results are moved between Windows, Linux and macOS as they are.