Руководство к MFC-версии 1.3. Для версии 5.0 (Qt6) см. Руководство пользователя.

Расчёт на видеокарте (MFC 1.3, Windows 64-бит)

Счётные ядра PlanarRT_H (tmc_rth.exe) и PlanarRT_X (tmc_rtx.exe) в 64-битной сборке MFC 1.3 умеют вести основную часть расчёта на видеокарте (GPU) через OpenCL. На больших сетках это в десятки раз быстрее, чем на процессоре. Интерфейс программы англоязычный: названия пунктов меню приводятся как в программе, рядом — русское пояснение.

Результат не меняется. Видеокарта считает по тем же формулам в том же порядке, поэтому числа совпадают с расчётом на процессоре бит в бит. Менять файлы заданий (.tpl) не нужно.


1. Что считается на видеокарте

Часть расчёта Где считается
Обновление всех узлов сетки на каждом такте — почти всё время счёта видеокарта
Узлы блоков металла (METAL), поглотителей (ABSORBER), магнитных стенок (MAGNETIC) видеокарта
Порты: возбуждение волны и запись сигналов процессор
Препроцессор, разбор задания, запись всех выходных файлов процессор

Задания с выводом поля (FIELDS) и с накоплением поля для диаграммы направленности (FIELD_DISTRIBUTION) ускоряются слабее: для них вся сетка копируется с видеокарты в память компьютера.

1.1 Насколько быстрее

Задание bench_1M.tpl (сетка 1000 × 1000 = 1 млн узлов, 1000 тактов; текст — в разделе 8) посчитано два раза подряд в одном окне PlanarRT_H 1.3 (win64). Компьютер: Intel Core i5-9600KF, NVIDIA GeForce RTX 5070 Ti 16 ГБ, драйвер 621.01.

Где считалось Чистое время счёта нс на узел за такт Ускорение
Процессор (Compute: CPU) 1,978 с 1,978 ×1
Видеокарта (Compute: GPU 0: NVIDIA GeForce RTX 5070 Ti) 0,103 с 0,103 ×19

Чем больше сетка, тем больше выигрыш: на десятках миллионов узлов ускорение доходит до ×30 и выше. На другой видеокарте цифры будут другими — они зависят прежде всего от скорости её памяти.


2. Что нужно перед началом

Требование Пояснение
Windows 64-бит и 64-битная программа ядро из папки bin\win64. В 32-битной сборке (bin\win32) расчёт на видеокарте недоступен — пункт меню серый (раздел 7)
Видеокарта с двойной точностью (double, cl_khr_fp64) расчёт идёт в числах двойной точности; карта без неё не используется. Подходят современные карты NVIDIA GeForce/RTX и AMD Radeon
Обычный драйвер видеокарты NVIDIA или AMD ставится с сайта производителя; в нём уже есть OpenCL (файл C:\Windows\System32\OpenCL.dll)
CUDA, SDK, пакеты разработчика не нужны

Как узнать, какая у вас видеокарта: нажмите правой кнопкой мыши на кнопку «Пуск» → «Диспетчер устройств» → раскройте «Видеоадаптеры». Если там только встроенная графика процессора (например, Intel UHD Graphics), видеокарта может пройти проверку, но заметного ускорения не будет.

Где лежит программа. После установки пакета ядро запускается из меню «Пуск» → TMC Suite → PlanarRT H (tmc_rth). Сам файл:

C:\Program Files\TMC Suite\bin\win64\tmc_rth.exe

Ядро X-моды — tmc_rtx.exe в той же папке, ярлык PlanarRT X (tmc_rtx). Всё, что написано ниже про PlanarRT_H, для PlanarRT_X делается точно так же.


3. Шаг 1. Запустите программу

Откройте «Пуск», найдите папку TMC Suite и нажмите PlanarRT H (tmc_rth). Откроется главное окно ядра:

Главное окно PlanarRT_H сразу после запуска: меню File, Edit, View, Run, Config, Window, Help, панель кнопок и строка состояния внизу
Главное окно PlanarRT_H сразу после запуска: меню File, Edit, View, Run, Config, Window, Help, панель кнопок и строка состояния внизу

Пока задание не открыто, в строке состояния внизу может быть написано Error in prepr: can't open file — это нормально: программа ещё не знает, какой файл считать.


4. Шаг 2. Включите расчёт на видеокарте

  1. В строке меню нажмите Config (Настройки) — на снимке цифра 1.
  2. В открывшемся списке нажмите Compute on GPU (OpenCL) («Считать на видеокарте») — цифра 2.
Меню Config: (1) — пункт Config, (2) — Compute on GPU (OpenCL)
Меню Config: (1) — пункт Config, (2) — Compute on GPU (OpenCL)

Если подходящая видеокарта найдена, никаких окон не появится — пункт просто получит галочку. Чтобы убедиться, снова откройте Config:

Галочка слева от Compute on GPU (OpenCL) — расчёт на видеокарте включён
Галочка слева от Compute on GPU (OpenCL) — расчёт на видеокарте включён

Закройте меню клавишей Esc или щелчком мимо него.

Настройка запоминается. Галочка сохраняется и при следующем запуске PlanarRT_H будет стоять сама — включать её каждый раз не нужно. У PlanarRT_X своя такая же галочка: её включают в меню Config ядра X отдельно.

Если вместо галочки появилось окно с предупреждением — видеокарта не подошла, расчёт останется на процессоре. Что означает текст и что делать — в разделе 7.2.


5. Шаг 3. Откройте задание и запустите расчёт

5.1 Откройте файл задания (.tpl)

  1. На панели кнопок нажмите Open — жёлтая открытая папка, вторая слева. Можно также нажать Ctrl+O или выбрать File → Open.

    Кнопка Open на панели кнопок (при наведении мыши появляется подсказка Open)
    Кнопка Open на панели кнопок (при наведении мыши появляется подсказка Open)
  2. В окне Open перейдите в папку с заданием и выберите файл .tpl — его имя появится в поле «Имя файла» (цифра 1).

  3. Нажмите «Открыть» (цифра 2).

    Окно Open: выбран файл bench_1M.tpl (1), кнопка «Открыть» (2)
    Окно Open: выбран файл bench_1M.tpl (1), кнопка «Открыть» (2)

Название файла появится в заголовке окна, а в строке состояния — Step:1;Error:no («шаг 1, ошибок нет»):

Задание открыто: в заголовке — [bench_1M.tpl], внизу — Step:1;Error:no
Задание открыто: в заголовке — [bench_1M.tpl], внизу — Step:1;Error:no

Для первой пробы возьмите задание bench_1M.tpl из раздела 8: на нём ускорение хорошо видно. Небольшие задания (меньше 150 000 узлов для H-моды и 60 000 для X-моды) программа нарочно считает на процессоре — там он быстрее (раздел 6.2).

5.2 Запустите расчёт

Нажмите на панели кнопку Run (жёлтый треугольник ▶) или клавишу F5:

Кнопка Run на панели кнопок
Кнопка Run на панели кнопок

То же самое есть в меню Run → Run:

Меню Run: пункт Run (F5)
Меню Run: пункт Run (F5)

Ничего дополнительно выбирать не нужно: раз галочка Compute on GPU стоит, ядро само отправит сетку на видеокарту. Когда расчёт закончится, в строке состояния появится Finish step 1, а рядом с заданием — файлы результатов (.t, .s и др.), как и при обычном расчёте.

Расчёт закончен: Finish step 1 в строке состояния; справа — номер последнего такта nT:1000
Расчёт закончен: Finish step 1 в строке состояния; справа — номер последнего такта nT:1000

6. Шаг 4. Проверьте, что считала видеокарта

Главное окно не показывает, где шёл счёт. Это видно в отчёте о времени расчёта.

  1. Нажмите Shift+F4 (или View → Statistics). Откроется окно Statistics.
  2. В правом нижнем углу нажмите Calc. time...

    Окно Statistics: кнопка Calc. time... обведена
    Окно Statistics: кнопка Calc. time... обведена
  3. В окне Calculation time найдите в разделе STEP 1 строку Compute:

    Отчёт о времени расчёта: строка Compute: GPU 0: NVIDIA GeForce RTX 5070 Ti — счёт шёл на видеокарте
    Отчёт о времени расчёта: строка Compute: GPU 0: NVIDIA GeForce RTX 5070 Ti — счёт шёл на видеокарте

6.1 Как читать строку Compute

Что написано Что это значит
GPU 0: NVIDIA GeForce RTX 5070 Ti (OpenCL 3.0 CUDA, driver 621.01, 15.9 GB) Счёт шёл на видеокарте. 0 — номер карты, дальше название, версия OpenCL, драйвер и память
CPU галочка Compute on GPU не стояла — считал процессор
CPU (grid of N nodes is below the GPU threshold M ...) сетка слишком маленькая, на процессоре быстрее (6.2). Это не ошибка
CPU (the grid needs X GB, card ... has Y GB) сетка не помещается в память видеокарты — посчитано на процессоре
CPU (key /CPU) программа запущена с ключом /CPU (6.3)
другие строки CPU (...) видеокарта не смогла начать расчёт; в скобках — причина (раздел 7)

В этом же окне строка PURE CALCULATION TIME — чистое время счёта, а Speed — наносекунды на узел за такт. Кнопка Export to TXT... сохраняет отчёт в текстовый файл, Close закрывает окно.

6.2 Маленькие задания считаются на процессоре

Перед каждым шагом ядро смотрит на размер сетки. Если узлов меньше порога, расчёт остаётся на процессоре, даже когда галочка стоит: на маленькой сетке пересылка данных на видеокарту съедает весь выигрыш. Так задумано.

Ядро Порог (узлов сетки) Пример сетки на пороге
PlanarRT_H 150 000 около 390 × 390
PlanarRT_X 60 000 около 245 × 245

Число узлов задания видно в окне Statistics в поле NumNode.

6.3 Ключи командной строки

Ядро можно запускать из командной строки или bat-файла. Ключи сильнее галочки в меню; пока ядро запущено с одним из них, пункт Compute on GPU недоступен (серый).

Ключ Что делает
/GPU считать на видеокарте (первая подходящая, номер 0)
/GPU:1 считать на видеокарте номер 1, если их в компьютере несколько (нумерация с 0)
/CPU считать только на процессоре, даже если галочка стоит
"C:\Program Files\TMC Suite\bin\win64\tmc_rth.exe" bench_1M.tpl /GPU

Пока идёт расчёт, переключать галочку нельзя — пункт становится серым до окончания счёта.


7. Если что-то не так

7.1 Пункт Compute on GPU серый

32-битная программа: пункт Compute on GPU (OpenCL) серый и не нажимается
32-битная программа: пункт Compute on GPU (OpenCL) серый и не нажимается
Причина Что делать
Запущена 32-битная программа (из bin\win32) запускайте bin\win64\tmc_rth.exe; если пакет установлен как 32-битный — установите 64-битный вариант
Ядро запущено с ключом /GPU или /CPU так задумано: решает ключ (6.3)
Сейчас идёт расчёт дождитесь окончания или нажмите Stop (Alt+F5)

7.2 После нажатия появилось окно с предупреждением

Галочка при этом не ставится, считать будет процессор. Текст окна — на английском:

Текст в окне Перевод и что делать
OpenCL.dll was not found in the system folder - install the driver of the video card. В системе нет OpenCL. Установите драйвер видеокарты с сайта NVIDIA или AMD и перезапустите программу
OpenCL has no video card (no OpenCL driver of a video card is installed). OpenCL есть, но драйвер видеокарты его не поддерживает или стоит стандартный драйвер Windows. Установите драйвер с сайта производителя карты
No video card with double precision (cl_khr_fp64) - the calculation needs it. Видеокарта не умеет двойную точность (часто — встроенная графика). На ней считать нельзя
TMC_GPU asks for the card N, but there are M card(s) ... В переменной среды TMC_GPU указан номер карты, которой нет. Удалите переменную или исправьте номер

7.3 Галочка стоит, но в отчёте Compute: CPU (...)

  • Сетка меньше порога — это нормально (6.2).
  • Не хватает памяти видеокарты (the grid needs X GB) — нужна карта с бо́льшей памятью или сетка поменьше. Ориентир: около 32 байт на узел для H-моды и 96 байт на узел для X-моды.
  • OpenCL start ... failed — обновите драйвер видеокарты и перезагрузите компьютер.
  • Причина всегда написана в скобках в строке Compute (6.1).

8. Пробное задание bench_1M.tpl

На этом задании сняты все скриншоты и замер из раздела 1.1. Чтобы повторить:

  1. Создайте папку, например C:\tmc_test.
  2. Откройте Блокнот, вставьте текст ниже и сохраните как C:\tmc_test\bench_1M.tpl (в поле «Тип файла» выберите «Все файлы», чтобы Блокнот не дописал .txt).
  3. Выполните шаги 1–4 этой инструкции. Затем снимите галочку Config → Compute on GPU, нажмите Run → Load first step (Shift+F5), снова F5 — и сравните время в отчёте Calc. time...
#TMC_RT_H
! ==== BENCH 1M: замер скорости расчёта ====
! Сетка 1000 x 1000 = 1,000,000 узлов (шаг 1 мм), 1000 тактов по времени.
! Порт INPUT_X слева, диэлектрик (eps=2) на правой половине.
! TOPOLOGY и FIELDS закомментированы (иначе запись всей сетки на диск).
#STEP
#PARM
 ANGLE_UNIT radian;
 FREQ_UNIT  GHz;
 LONG_UNIT  mm;
 TIME_UNIT  ns;
 DELTA  1;
 TIME   0.; 2.359833664;
 X_MIN  0.0;
 X_MAX  998.5;
 Y_MIN  0.0;
 Y_MAX  998.5;
 FREQ   15;
#END_PARM

#TOPOLOGY
 BLOCK 1;
  INPUT_X ; 249.6; 748.9; 0; 2.359833664; 1; 0;
 END_B
 BLOCK 2;
  RECT_STAT 1.0; 499.2; 998.5; 0.0; 998.5;
 END_B
#END_TOPOLOGY

#LINK_LIST
 T 1; 0.0; 0.0;
 T 2; 0.0; 0.0;
#END_LINK

#OUTPUT
 FILE bench_1M;
! TOPOLOGY;
! FIELDS;
 SMATRIX bench_1M; 15; 0.; 2.359833664;
#END_OUTPUT
#END_STEP
#EOF

Сетка 1000 × 1000 = 1 млн узлов (шаг 1 мм), 1000 тактов; порт слева, диэлектрик с ε = 2 на правой половине. Вывод TOPOLOGY и FIELDS закомментирован, поэтому главное окно во время счёта остаётся чёрным — так и должно быть.

This is the manual for the MFC version 1.3. For version 5.0 (Qt6), see the User manual.

GPU computing (MFC 1.3, Windows 64-bit)

The compute kernels PlanarRT_H (tmc_rth.exe) and PlanarRT_X (tmc_rtx.exe) of the 64-bit MFC 1.3 build can run the main part of the calculation on the video card (GPU) through OpenCL. On large grids this is tens of times faster than on the CPU. The program interface is in English; menu items are given exactly as in the program.

The result does not change. The video card uses the same formulas in the same order, so the numbers match the CPU calculation bit for bit. Task files (.tpl) need no changes.


1. What runs on the video card

Part of the calculation Where it runs
Update of all grid nodes on every time step — almost all of the run time video card
Nodes of metal (METAL), absorber (ABSORBER) and magnetic wall (MAGNETIC) blocks video card
Ports: wave excitation and signal recording CPU
Preprocessor, task parsing, writing all output files CPU

Tasks with field output (FIELDS) or with field accumulation for the directional pattern (FIELD_DISTRIBUTION) are accelerated less: for them the whole grid is copied from the video card to the computer memory.

1.1 How much faster

The task bench_1M.tpl (a 1000 × 1000 = 1 million node grid, 1000 time steps; its text is in section 8) was run twice in a row in the same PlanarRT_H 1.3 (win64) window. Computer: Intel Core i5-9600KF, NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.01.

Where it ran Pure calculation time ns per node per step Speed-up
CPU (Compute: CPU) 1.978 s 1.978 ×1
Video card (Compute: GPU 0: NVIDIA GeForce RTX 5070 Ti) 0.103 s 0.103 ×19

The larger the grid, the larger the gain: on tens of millions of nodes the speed-up reaches ×30 and more. On another video card the numbers will differ — they depend mainly on its memory speed.


2. What you need

Requirement Explanation
64-bit Windows and the 64-bit program the kernel from the bin\win64 folder. In the 32-bit build (bin\win32) GPU computing is not available — the menu item is grey (section 7)
A video card with double precision (double, cl_khr_fp64) the calculation uses double-precision numbers; a card without it is not used. Modern NVIDIA GeForce/RTX and AMD Radeon cards are suitable
The usual NVIDIA or AMD video card driver installed from the manufacturer's website; it already contains OpenCL (the file C:\Windows\System32\OpenCL.dll)
CUDA, SDK, developer packages not needed

How to find out which video card you have: right-click the Start button → Device Manager → expand Display adapters. If there is only the integrated graphics of the processor (for example, Intel UHD Graphics), it may pass the check, but there will be no noticeable speed-up.

Where the program is. After installing the package the kernel is started from Start → TMC Suite → PlanarRT H (tmc_rth). The file itself:

C:\Program Files\TMC Suite\bin\win64\tmc_rth.exe

The X-mode kernel is tmc_rtx.exe in the same folder, shortcut PlanarRT X (tmc_rtx). Everything below about PlanarRT_H is done in exactly the same way in PlanarRT_X.


3. Step 1. Start the program

Open Start, find the TMC Suite folder and click PlanarRT H (tmc_rth). The main window of the kernel opens:

The main window of PlanarRT_H right after start: the File, Edit, View, Run, Config, Window, Help menu, the toolbar and the status bar at the bottom
The main window of PlanarRT_H right after start: the File, Edit, View, Run, Config, Window, Help menu, the toolbar and the status bar at the bottom

While no task is open, the status bar may say Error in prepr: can't open file — this is normal: the program does not yet know which file to calculate.


4. Step 2. Turn on GPU computing

  1. In the menu bar click Config — number 1 in the picture.
  2. In the list that opens click Compute on GPU (OpenCL) — number 2.
The Config menu: (1) — Config, (2) — Compute on GPU (OpenCL)
The Config menu: (1) — Config, (2) — Compute on GPU (OpenCL)

If a suitable video card is found, no window appears — the item simply gets a check mark. To make sure, open Config again:

The check mark to the left of Compute on GPU (OpenCL) — GPU computing is on
The check mark to the left of Compute on GPU (OpenCL) — GPU computing is on

Close the menu with Esc or by clicking outside it.

The setting is remembered. The check mark is saved and will be there the next time PlanarRT_H starts — there is no need to turn it on every time. PlanarRT_X has its own check mark of the same kind: it is turned on separately in the Config menu of the X kernel.

If a warning window appears instead of the check mark, the video card is not suitable and the calculation stays on the CPU. What the text means and what to do is in section 7.2.


5. Step 3. Open a task and start the calculation

5.1 Open a task file (.tpl)

  1. On the toolbar click Open — the yellow open folder, second from the left. You can also press Ctrl+O or choose File → Open.

    The Open button on the toolbar (the tooltip Open appears under the mouse)
    The Open button on the toolbar (the tooltip Open appears under the mouse)
  2. In the Open window go to the folder with the task and select the .tpl file — its name appears in the File name box (number 1).

  3. Click Open (number 2).

    The Open window: bench_1M.tpl is selected (1), the Open button (2)
    The Open window: bench_1M.tpl is selected (1), the Open button (2)

The file name appears in the window title, and the status bar shows Step:1;Error:no ("step 1, no errors"):

The task is open: [bench_1M.tpl] in the title, Step:1;Error:no at the bottom
The task is open: [bench_1M.tpl] in the title, Step:1;Error:no at the bottom

For the first try take the task bench_1M.tpl from section 8: the speed-up is clearly visible on it. Small tasks (fewer than 150,000 nodes for the H mode and 60,000 for the X mode) are deliberately calculated on the CPU — it is faster there (section 6.2).

5.2 Start the calculation

Click the Run button on the toolbar (the yellow triangle ▶) or press F5:

The Run button on the toolbar
The Run button on the toolbar

The same command is in the Run → Run menu:

The Run menu: Run (F5)
The Run menu: Run (F5)

Nothing else has to be chosen: since Compute on GPU is checked, the kernel sends the grid to the video card by itself. When the calculation ends, the status bar shows Finish step 1, and the result files (.t, .s and others) appear next to the task, as in an ordinary calculation.

The calculation has finished: Finish step 1 in the status bar; on the right — the number of the last time step nT:1000
The calculation has finished: Finish step 1 in the status bar; on the right — the number of the last time step nT:1000

6. Step 4. Check that the video card did the work

The main window does not show where the calculation ran. This is shown in the calculation time report.

  1. Press Shift+F4 (or View → Statistics). The Statistics window opens.
  2. In the lower right corner click Calc. time...

    The Statistics window: the Calc. time... button is outlined
    The Statistics window: the Calc. time... button is outlined
  3. In the Calculation time window find the Compute line in the STEP 1 section:

    The calculation time report: the line Compute: GPU 0: NVIDIA GeForce RTX 5070 Ti — the calculation ran on the video card
    The calculation time report: the line Compute: GPU 0: NVIDIA GeForce RTX 5070 Ti — the calculation ran on the video card

6.1 How to read the Compute line

What it says What it means
GPU 0: NVIDIA GeForce RTX 5070 Ti (OpenCL 3.0 CUDA, driver 621.01, 15.9 GB) The calculation ran on the video card. 0 is the card number, then the name, OpenCL version, driver and memory
CPU Compute on GPU was not checked — the CPU did the calculation
CPU (grid of N nodes is below the GPU threshold M ...) the grid is too small, the CPU is faster (6.2). This is not an error
CPU (the grid needs X GB, card ... has Y GB) the grid does not fit into the video card memory — calculated on the CPU
CPU (key /CPU) the program was started with the /CPU key (6.3)
other CPU (...) lines the video card could not start the calculation; the reason is in brackets (section 7)

In the same window PURE CALCULATION TIME is the pure calculation time, and Speed is nanoseconds per node per time step. Export to TXT... saves the report to a text file, Close closes the window.

6.2 Small tasks are calculated on the CPU

Before every step the kernel looks at the grid size. If there are fewer nodes than the threshold, the calculation stays on the CPU even when the check mark is on: on a small grid the data transfer to the video card eats all the gain. This is intended.

Kernel Threshold (grid nodes) Grid at the threshold
PlanarRT_H 150,000 about 390 × 390
PlanarRT_X 60,000 about 245 × 245

The number of nodes of a task is shown in the Statistics window, in the NumNode box.

6.3 Command-line keys

The kernel can be started from the command line or a bat file. The keys are stronger than the menu check mark; while the kernel runs with one of them, Compute on GPU is unavailable (grey).

Key What it does
/GPU calculate on the video card (the first suitable one, number 0)
/GPU:1 calculate on video card number 1 if the computer has several (numbering from 0)
/CPU calculate only on the CPU, even if the check mark is on
"C:\Program Files\TMC Suite\bin\win64\tmc_rth.exe" bench_1M.tpl /GPU

While a calculation is running, the check mark cannot be switched — the item stays grey until it ends.


7. Troubleshooting

7.1 Compute on GPU is grey

The 32-bit program: Compute on GPU (OpenCL) is grey and cannot be clicked
The 32-bit program: Compute on GPU (OpenCL) is grey and cannot be clicked
Reason What to do
The 32-bit program is running (from bin\win32) start bin\win64\tmc_rth.exe; if the package is installed as 32-bit, install the 64-bit variant
The kernel was started with /GPU or /CPU this is intended: the key decides (6.3)
A calculation is running wait until it ends or click Stop (Alt+F5)

7.2 A warning window appears after the click

The check mark is not set in this case; the CPU will do the calculation.

Text in the window What to do
OpenCL.dll was not found in the system folder - install the driver of the video card. There is no OpenCL in the system. Install the video card driver from the NVIDIA or AMD website and restart the program
OpenCL has no video card (no OpenCL driver of a video card is installed). OpenCL is there, but the video card driver does not support it, or the standard Windows driver is installed. Install the driver from the card manufacturer's website
No video card with double precision (cl_khr_fp64) - the calculation needs it. The video card has no double precision (often integrated graphics). It cannot be used
TMC_GPU asks for the card N, but there are M card(s) ... The TMC_GPU environment variable names a card that does not exist. Delete the variable or fix the number

7.3 The check mark is on, but the report says Compute: CPU (...)

  • The grid is below the threshold — this is normal (6.2).
  • Not enough video card memory (the grid needs X GB) — a card with more memory or a smaller grid is needed. A rough guide: about 32 bytes per node for the H mode and 96 bytes per node for the X mode.
  • OpenCL start ... failed — update the video card driver and restart the computer.
  • The reason is always written in brackets in the Compute line (6.1).

8. Test task bench_1M.tpl

All the screenshots and the measurement from section 1.1 were made on this task. To repeat:

  1. Create a folder, for example C:\tmc_test.
  2. Open Notepad, paste the text below and save it as C:\tmc_test\bench_1M.tpl (in Save as type choose All files so that Notepad does not add .txt).
  3. Do steps 1–4 of this guide. Then clear Config → Compute on GPU, choose Run → Load first step (Shift+F5), press F5 again and compare the times in the Calc. time... report.
#TMC_RT_H
! ==== BENCH 1M: calculation speed measurement ====
! Grid 1000 x 1000 = 1,000,000 nodes (1 mm step), 1000 time steps.
! Port INPUT_X on the left, dielectric (eps=2) on the right half.
! TOPOLOGY and FIELDS are commented out (otherwise the whole grid is written to disk).
#STEP
#PARM
 ANGLE_UNIT radian;
 FREQ_UNIT  GHz;
 LONG_UNIT  mm;
 TIME_UNIT  ns;
 DELTA  1;
 TIME   0.; 2.359833664;
 X_MIN  0.0;
 X_MAX  998.5;
 Y_MIN  0.0;
 Y_MAX  998.5;
 FREQ   15;
#END_PARM

#TOPOLOGY
 BLOCK 1;
  INPUT_X ; 249.6; 748.9; 0; 2.359833664; 1; 0;
 END_B
 BLOCK 2;
  RECT_STAT 1.0; 499.2; 998.5; 0.0; 998.5;
 END_B
#END_TOPOLOGY

#LINK_LIST
 T 1; 0.0; 0.0;
 T 2; 0.0; 0.0;
#END_LINK

#OUTPUT
 FILE bench_1M;
! TOPOLOGY;
! FIELDS;
 SMATRIX bench_1M; 15; 0.; 2.359833664;
#END_OUTPUT
#END_STEP
#EOF

A 1000 × 1000 = 1 million node grid (1 mm step), 1000 time steps; a port on the left, a dielectric with ε = 2 on the right half. TOPOLOGY and FIELDS output is commented out, so the main window stays black during the calculation — this is how it should be.