Troubleshooting¶
This page lists problems users run into, with what PINNStudio reports and what to do about it. The messages are quoted as PINNStudio prints them. If your problem is not here, or a remedy does not help, please report it.
For installation problems (commands not found, Python missing, the installer cannot use the GPU), see also Common installation problems.
PINNStudio does not start¶
Start PINNStudio from a terminal (pinnstudio, or ./venv/bin/pinnstudio / .\venv\Scripts\pinnstudio.exe for a
source installation) to see the error. When it is started from its icon on Windows there is no console, and the
output goes to ~/.pinnstudio/pinnstudio.log in your home folder.
Linux: "Could not load the Qt platform plugin "xcb"". Qt 6 needs a few system libraries for the X11 platform plugin that minimal installations may not have. PINNStudio's own Linux tests install these packages first (Ubuntu names):
sudo apt-get install libegl1 libgl1 libxkbcommon0 libxkbcommon-x11-0 libxcb-cursor0 libxcb-icccm4 \
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xinerama0 \
libxcb-xfixes0 libfontconfig1 libdbus-1-3
libxcb-cursor0 is the one most often missing. On a computer without a display (a server or a cluster node) the
window cannot open; train there with an exported script
instead.
Python 3.11: Fatal Python error: none_dealloc: deallocating None (or bool_dealloc). PySide6
6.12.0 has a reference-counting defect that ends the program on Python 3.11; PINNStudio therefore
requires PySide6 below 6.12 there. If a manual upgrade installed 6.12.0, put an earlier version back (or use
Python 3.12 or newer, where the defect is harmless):
Windows: [WinError 1114] A dynamic link library (DLL) initialization routine failed (c10.dll). PyTorch fails
to load on Windows if Qt (PySide6) is loaded first, because both bring a Microsoft C++ runtime. PINNStudio loads PyTorch
first when it starts (pinnstudio command, python -m pinnstudio, the icon). The error can still appear if you
import PINNStudio's window from your own script after PySide6; import torch before PySide6 there.
The window opened, but disappeared or shows a message box "PINNStudio error". An unexpected error is shown in a
message box and written to ~/.pinnstudio/pinnstudio.log; PINNStudio keeps running. Please report it with the text
of the message (Reporting a problem).
The layout is unusable (panels collapsed or off-screen after a change of screen). View › Reset Layout restores the default layout. Settings › Display Settings... has the theme and the UI scale.
Typing pinnstudio starts an old version. Another installation comes first on the PATH; see
Common installation problems.
Missing or incompatible packages¶
PINNStudio needs DeepXDE (1.10.0 or newer), PyTorch (2.0 or newer), PySide6, NumPy below 2.5, SciPy, Matplotlib and
pandas. The installers and pip install pinnstudio install them. Problems appear when packages are installed or
upgraded by hand afterwards:
ModuleNotFoundError: No module named ...in the Training Log or the terminal: the package is missing from the Python PINNStudio runs in. The generated scripts run with the same Python as the window, so install the package there (python -m pip install <package>with that Python), or reinstall PINNStudio.- NumPy 2.5 or newer: DeepXDE 1.15's 2D
Polygon/Trianglegeometry callsnp.crosson two-component vectors, which NumPy 2.5 no longer allows (it raisesValueError). PINNStudio requiresnumpy<2.5for this reason; if a newer NumPy got installed, install an older one:pip install "numpy<2.5". - Intel Mac: PyTorch 2.2 (the last for Intel Macs) cannot use NumPy 2 ("Failed to initialize NumPy"). PINNStudio
requires
numpy<2there. - The NNCG optimizer in a training phase needs DeepXDE 1.13.0 or newer. With an older DeepXDE, Solve stops
with
⚠️ A Training Phase is set to use NNCG, which requires deepxde>=1.13.0 (you have ... installed).; upgrade DeepXDE or choose Adam or L-BFGS for that phase.
PyTorch does not use the GPU¶
Check first what PyTorch finds: Settings › GPU / Hardware... says either Detected 1 GPU(s) -- 0: <name> or
No CUDA GPU detected -- training will run on CPU regardless of these settings. The first lines of a run's Training
Log say the same (✅ GPU: <name>, or ⚠️ No GPU found — running on CPU).
If you have an NVIDIA GPU but PyTorch does not see it:
- Check that Train on in Settings › GPU / Hardware... is GPU when there is one, not CPU.
- Check that the NVIDIA driver works:
nvidia-smimust print the GPU and a CUDA Version. - Look at the terminal PINNStudio was started from. When
nvidia-smiworks but PyTorch cannot use the GPU, PINNStudio printsAn NVIDIA GPU was detected, but PyTorch cannot use it (PINNStudio runs on the CPU for now)., followed by the commands that fix it for your installation: run the one-command installer again (installer copies), or install the PyTorch build for your driver withpip(see CPU-only or NVIDIA GPU PyTorch). If it saysThe NVIDIA driver is too old for the PyTorch builds available now., update the driver first. - With several GPUs, GPU device index in the same dialog chooses which one is used.
On a Mac, PINNStudio trains on the CPU on purpose ([Info] Training on the CPU (Apple GPU / MPS not used)).
PINNStudio's installers and GPU checks cover NVIDIA GPUs (CUDA) only.
The GPU runs out of memory¶
A run that fails with CUDA out of memory (OutOfMemoryError) ends with the tip
💡 Tip: the GPU ran out of memory. Fewer training points, a smaller network, a smaller Error Analysis/plot grid, or
Train on: CPU (slower, but uses the computer's memory) can help.
What uses GPU memory, roughly in order:
- Collocation points: Domain points, Boundary points, Initial points and Test points on the Collocation points page, plus points added during training (RAR, resampling, extra training points). Second and higher derivatives in the equations multiply the memory per point.
- The network: hidden layers and neurons per layer (Neural network).
- Evaluation after training: the grid of the plots (Settings › Plot Settings...) and of the error analysis. A run that trains but fails while plotting needs a coarser grid, not fewer training points.
Settings › GPU / Hardware... › Max GPU memory to reserve (%) (95 % by default) caps the share of the GPU's memory PyTorch may use. Lower it to leave memory for other programs on the same GPU; it does not make a run need less memory. If nothing helps, Train on: CPU uses the computer's main memory instead (slower).
Solve does not start: settings to fix¶
Before every run, PINNStudio checks the settings. While you edit, the model tree marks the pages with a setting that
would stop Solve, and the toolbar shows a button such as 2 settings to fix; clicking it goes to the first one.
When you press Solve anyway, the Training Log lists every problem after
❌ Cannot start -- this configuration has invalid settings:.
Equations, output names and constants¶
On the Equations page, each equation is typeset as you type it. A name PINNStudio does not recognize is shown as
Unknown name: k. Add it as a constant, or check the spelling., and an expression that cannot be read yet as
This isn't a complete expression yet. Common causes:
- a missing
*: write5*u, not5u, andu*du_x, notu du_x; - a coefficient that is neither a number nor a named constant (add it under the constants, or in an inverse problem as an unknown parameter);
- a derivative not written in the form
d<output>_<variables>(for exampledu_xxordv_t), or one that PINNStudio does not build, such asdu_xxy. The second is refused withEquations: du_xxy is not available (see Derivative syntax on the Equations page) -- write the equation with the derivatives PINNStudio provides, e.g. a third derivative as a new output.(see Equations, outputs and constants).
Output names must be usable in the equations. These messages come from the check:
Output name 'my u' can't be used in the equations: use letters, digits and _ (not starting with a digit), and not a Python word such as lambda.Output name 'y' is already used for something else (a coordinate, the array y the outputs are read from, a module, a math function or a side name) -- pick another name (e.g. u1, u2).Output name 'u' is used for two outputs -- give each output its own name.- For an ODE:
ODE problems use t as the variable (and x internally), so an output can't be named 'x' -- rename it (e.g. y1, y2). - For inverse problems:
Trainable variable "my var" can't be used as a name in the equations: ...
If a run fails with a Python error from the equations (SyntaxError, NameError), the run ends with
❌ Error during training. Check log above. and the tip 💡 Tip: Check PDE/IC syntax — use * for multiplication
(e.g. 5*u not 5u). The lines above it in the log name the expression.
Incompatible training-method combinations¶
Some methods cannot be used together. The check refuses them with an explanation, for example (all combinations, including the ones that are allowed, are on Compatibility of methods):
| Combination | Message (shortened) |
|---|---|
| Causal training on a steady problem | Causal training needs a time-dependent problem (it weights the residual by time). |
| Causal training on an ODE | Causal training isn't available for an ODE ...; turn it off. |
| Per-point weights (RBA, SA-PINN) with the Point Resampler callback | Per-point weights (RBA) belong to fixed training points, but the Point Resampler callback replaces the points every ... steps and the weights would start over each time -- turn the Point Resampler off, or set Per-point weights to None. |
| Per-point weights with resampling in time windows | Time-adaptive training: resampling adds collocation points, which per-point weights (...) can't follow -- ... |
| Exact initial condition with time-adaptive training | Exact initial condition can't be combined with time-adaptive training yet ... -- untick 'Exact' on the Initial Conditions page, or switch time-adaptive training off. |
| Exact initial condition on a steady problem or an ODE | Exact initial condition: needs a time-dependent PDE problem. |
| Exact initial condition with your own output-transform formula | Exact initial condition can't be combined with your own output transform formula -- ... |
| Exact periodicity without a periodic boundary condition | Exact periodicity: no boundary condition is periodic -- add a periodic BC row (or untick 'Exact periodicity' on the Boundary Conditions page). |
| Exact periodicity with the network's input transform | Exact periodicity can't be combined with the Network page's input transform -- ... |
| IC pre-training when every initial condition is exact | IC pre-training fits the network to the initial conditions given as loss terms, but no output has one ... -- untick IC pre-training. |
| IC pre-training on an ODE or a steady problem | IC pre-training needs a time-dependent PDE: ... -- untick IC pre-training. |
| A boundary condition for an output the problem does not have | BC 2 applies to output 3, but the problem has 2 output(s): pick one of them in the BC's Output box. |
| A loss function other than MSE or MAE (from a problem saved by an older version) | Loss function ...: not usable for a PINN (the equation residuals have target 0, or the loss does not exist with PyTorch) -- choose MSE or MAE in the Training phases. |
| 'Scale by initial losses' with time-adaptive training | 'Scale by initial losses' isn't available with Time-Adaptive training -- turn one of them off. |
| Growing time range or backward compatibility without transfer learning | Time-adaptive training: Growing time range ... train one network through all the time windows, so they need 'transfer learning' ... -- tick it, or untick ... |
| STMsFFN network on an ODE or a steady problem | STMsFFN needs space and time; an ODE has only t -- use MsFFN. / STMsFFN separates space and time, so it needs a time-dependent problem; use MsFFN for a steady one. |
| Weight decay with a PFNN, MsFFN or STMsFFN network | Weight decay can't be used with a ... network (DeepXDE's ... has no regularization): set it to 0, or use an FNN. |
frac(...) with RAR, time-adaptive training or IC pre-training |
frac(...) problems can't use RAR, Time-Adaptive training or IC pre-training ... |
Optimizer settings are checked when you press Solve: a nonzero weight decay (Settings › Optimizer Settings...) cannot be used with an L-BFGS or NNCG phase, and an AdamW phase needs a nonzero weight decay.
Other messages¶
Inverse mode needs at least one observed-data file to fit against, but no observation row has a file selected.: choose a measured-data file on the Inverse problem page.x_min (...) must be less than x_max (...).and the same fory,zandt: the domain or time interval is inverted.Optimizer Scheduler is enabled but has no phases configured; ...orEvery configured Optimizer Scheduler phase has 0 iterations; ...: add a phase on the Training page (Add Phase) or give one a positive number of iterations.❌ Cannot start -- the results folder's path is too long for Windows (...): choose a shorter Save to folder on the Results page, or turn on Windows' long paths (LongPathsEnabled).
A boundary condition matches no points¶
A boundary condition whose Where selects no training point has no loss to compute: its loss term is NaN at any
weight. Training then goes on without it, and an L-BFGS phase stops inside PyTorch's line search with an
IndexError. Typical causes are a side name such as left on a disk or another curved shape (which has no flat
sides), for example after changing an example's domain, or a condition on an edge that no longer exists.
Before training, both scripts print which conditions are empty:
⚠️ Condition(s) [2] (in loss order: Boundary Conditions rows, then initial conditions, then measured data)
select no training point, so their loss is NaN -- check their 'Where' (e.g. a side such as 'left' on a disk or
other curved shape). Change or remove them.
The numbers count the rows of the Boundary conditions page first, then the initial conditions, then the measured data.
For a sketched or combined domain, a condition whose last edge was removed is refused before training:
BC 2 picks no part of the boundary (its last edge was taken out): pick its edges in the Geometry view, or delete the
BC.
The loss becomes NaN or Inf¶
When the loss table in the Training Log shows nan or inf, find out where it starts:
- NaN in one column from the first step: that loss term cannot be computed. Check the condition belonging to the column (see the previous section for empty conditions) and its expression.
- NaN everywhere from the first step: an expression is undefined somewhere in the domain, for example a division
by zero,
logorsqrtof a value that can be zero or negative, or a function whose derivative is infinite at a point (the square root of a distance, at the centre). The equations, initial conditions, boundary values and output transforms all count. Shift or smooth the expression (for example add a small constant under a square root). - NaN after some training: the training diverged. Lower the learning rate of the Adam phase (Training page), lower very large loss weights (Loss weights), or use float64 (Settings › Float Precision..., or Precision on the Training page), which also helps L-BFGS. Very large or very small coefficients in the equations are a frequent cause; scaling the equations so their residuals are of order 1 helps.
A run with a NaN loss still produces plots, but they are meaningless.
Training does not converge, or converges to a wrong solution¶
PINNs do not always converge, and a small loss does not guarantee a correct solution. Problems with sharp fronts, interfaces (phase fields), multiple scales, long time ranges or strong nonlinearity are hard for every PINN method; some may not be solvable to useful accuracy with any setting PINNStudio offers. What helps, in the order the project's training methods study found most useful:
- Check the problem first. Compare the typeset equations with the intended ones, check the units and the sign
convention (PINNStudio's equations are residuals: everything on one side,
= 0), and make sure the initial and boundary conditions are consistent with each other. - Scale the equations so that every residual is of order 1, and scale the outputs accordingly (Neural network › output transform).
- Train longer, or with more points. Add iterations to the phases or an L-BFGS phase after Adam, and increase Domain points. Watch the test loss: if it rises while the training loss falls, more points are needed.
- Build the conditions into the network. An exact initial condition and exact periodicity remove those loss terms (Exact constraints).
- Use one automatic weighting method (RBA, SA-PINN or causal training, on the Loss weights page; see RBA and SA-PINN and Causal training), or add points where the residual is large with RAR.
- Split long time ranges into time windows (Time windows and bc-PINN).
- Try another network: more or wider layers, another activation, or Fourier-feature networks (MsFFN, STMsFFN) for multi-scale and oscillating solutions (Networks and Fourier features).
These methods help on hard problems but can make results worse on problems a plain PINN already solves well. Compare with a plain run, use a parameter sweep to compare settings systematically, and judge the result by its error against reference data, not by the loss. The examples' Tuned settings show what worked for each example. See also Scope and limitations.
Diagnosing poor results¶
The sections below start from what you see and list likely causes, the settings to look at and how to narrow the cause down. They do not promise that a change fixes the problem: PINN training depends on the equation, the domain and the budget, and a change that helps one problem can hurt another. Which method to try for which difficulty is discussed in Choosing a training strategy; which methods can be combined is on Compatibility of methods.
Four tools in the Results area come up repeatedly:
- the Error analysis tab: the relative L₂ error (and MSE, maximum error) against reference data at each comparison time (Error Analysis; without reference data, use Exact solution formula if you know the solution);
- Each loss term in the Live loss tab, or Show: Each loss term in the Loss tab of Plot settings: one line per equation, condition and data file (Results and plots);
- History › Compare: the loss and error of several saved runs on one plot;
- a Parameter sweep (One at a time) over the one setting you suspect, with the error as the measure.
Change one setting at a time and keep the random seed fixed (Settings › Random Seed...), so that a difference between two runs comes from the setting and not from the initialisation.
The loss falls but the error stays high¶
Likely causes. The equations, conditions or reference data describe different problems (a sign, a coefficient, a units or time-scale mismatch, reference files for other times or outputs); a loss term that is small only because its weight or scale is small; too few collocation points, so the network fits the residual at the points and not between them; a trivial or wrong solution that also satisfies the training points.
Settings to look at. The typeset equations on the Equations page; Initial conditions and Boundary conditions; the reference files, their times and outputs in the Error Analysis dialog; Domain points: and Test points: on the Collocation points page; the term weights on Loss weights.
Diagnostic steps.
- Compare the error per time and per output in the Error analysis tab. An error that is large at \( t = 0 \) points to the initial condition or to the reference data; one that is large everywhere, to the equation.
- Look at Each loss term. Note the term that is largest after weighting, and whether one term is many orders of magnitude smaller than the others.
- Compare the training and test loss: a test loss well above the training loss means the points do not cover the domain densely enough.
- Sweep Domain points: or the training length and see whether the error follows the loss.
Initial or boundary conditions are poorly satisfied¶
Likely causes. The condition's loss term is outweighed by the PDE term; the condition selects fewer points than intended (a Where: expression that matches part of the boundary, or none); too few Boundary points: or Initial points:; conditions that contradict each other or the initial condition at a corner.
Settings to look at. The row's Where:, Output: and Value: on Boundary conditions; Boundary points: and Initial points:; the BC and IC weights on Loss weights; Exact (built into the network) on Initial conditions and Exact periodicity (periodic inputs) on Boundary conditions (Exact constraints).
Diagnostic steps.
- Select the condition in the model tree: the domain view marks the edges (faces in 3D) it covers. A condition with no point is reported before training (A boundary condition matches no points).
- Find the condition's line in Each loss term and compare it with the PDE term.
- Look at the line comparison at the first comparison time and near the boundaries in the Error analysis tab.
- Sweep the condition's weight, or compare a run with an exact constraint against the soft one in History › Compare.
Inverse parameters do not converge¶
Likely causes. The measured data do not determine the parameter (too few points, points where the solution does not depend on it, or a parameter that only appears in a product with another); the data term is outweighed; a poor Initial guess far from the value; noisy data; a forward model (equation, conditions) that does not match how the data were produced.
Settings to look at. On the Inverse problem page: Initial guess, each file's Measures: and Loss weight:, Use: (all points, a grid, random points), Check the equation at the measured points too (anchors); the training length on Training; Save parameters: on Results (Inverse problems, Observational data).
Diagnostic steps.
- Plot Parameter Convergence: a parameter that is still drifting at the end needs more training; one that settles on a different value at different initial guesses is not determined by the data.
- Fill in True value when it is known (for a test problem): it is drawn on the convergence plot and used for the parameter error, never in training.
- Look at the data term in Each loss term. If it stays large, check the file's columns and Measures:.
- Run the forward problem with the parameter fixed at its expected value and compare it with the data: if the forward solution does not match the data, the inverse problem cannot either.
- Sweep the Initial guess or the data weight (both can be swept) and compare the estimates.
A converged parameter is not necessarily the unique one that explains the data; see Scope and limitations.
Training is unstable¶
Likely causes. A learning rate too large for the problem; loss weights that differ by orders of magnitude; residuals of very different sizes because the equation is not scaled; float32 round-off in L-BFGS; per-point weights that grow without bound.
Settings to look at. Learning rate: and Learning rate decay: of each phase on Training; the weights on Loss weights; Precision: (float64); Per-point weights: and its settings (Optimizers and training phases, Loss weights).
Diagnostic steps.
- Find where the loss starts to oscillate or jump in the loss plot, and in which term (Each loss term).
- Lower the Adam learning rate by a factor of ten, or add a decay, and compare in History.
- If the jumps start in an L-BFGS phase, repeat it with Precision: float64.
- Switch off one adaptive method at a time.
The loss is NaN or Inf¶
See The loss becomes NaN or Inf: find the first column and the first step that
show nan, which tells an expression that cannot be evaluated (from the first step) from a diverging run (after
some steps).
The collocation points do not resolve the solution¶
Likely causes. The solution has a front, a shock, a boundary layer or a small feature that the points sample too coarsely; the test points are too few to show it; points cluster or leave gaps (with pseudo sampling).
Settings to look at. Domain points:, Point distribution: and Extra training points: on Collocation points; the Point Resampling callback on Training; RAR on Adaptive training (RAR).
Diagnostic steps.
- In 2D and 3D, tick View domain & point distribution to see where the points are.
- Look at the surface comparison (PINN, reference, error) in the Error analysis tab: an error concentrated along a curve points to resolution rather than to the equation.
- Sweep Domain points: (for example two or three values a factor of two apart). An error that falls with more points is limited by resolution.
- With RAR, the figures under
solution_results/rar_rounds/show where each round added points.
Good at early times, poor at late times¶
Likely causes. Errors made early are propagated forward; the network fits late times before the early solution is right (the causality problem causal training addresses); a long time interval for one network; a time scale of the equation that is short compared with the interval.
Settings to look at. The time interval on Geometry; Causal training on Loss weights (Causal training); Time Adaptive Training and its options on Adaptive training (Time windows and bc-PINN).
Diagnostic steps.
- Read the error per comparison time in the Error analysis tab; add comparison times (Compare at times: for a formula, more reference files otherwise) to see where the error starts to grow.
- Train a shorter interval with the same settings. If the shorter run is accurate, the length of the interval is the difficulty.
- With time windows, each window's model and results are saved separately; compare the windows to find the first one that goes wrong.
Training is unexpectedly slow¶
See Training is slow for the device, threads and precision. In addition: every adaptive method adds work (RAR and resampling rounds train again after each round; time windows train every window; bc-PINN stores points for every earlier window), Fourier-feature networks and higher derivatives cost more per iteration, and L-BFGS iterations each evaluate the loss more than once. Compare the time of the run with and without the method (History lists each run), and use Early Stopping or Training Timer to bound a run.
An exact constraint or adaptive method is refused¶
The check before Solve names the combination and what to change; the messages are in Incompatible training-method combinations, and every combination, refused or not, is on Compatibility of methods. A combination that is not refused but that no example or test uses is marked untested there: it may work, but check its result against reference data.
Error Analysis cannot find the reference data¶
After loading an example. Examples with reference data configure Error Analysis themselves
(✅ Error analysis auto-configured — 5 ground truth files from template). If this line is missing, the example's
files were not found in the installation's reference_data folder: reinstall PINNStudio. (Releases before 1.2.0
shipped without reference_data.)
A problem saved on another computer. A saved problem stores data files as paths. Files inside
PINNStudio's reference_data folder are saved relative to it and are found on any installation; your own files must
be at the same path, or chosen again in the Error Analysis dialog (Results page).
Your own reference files. In the Error Analysis dialog, Reference files expects one plain-text file per
time, with one row per point and the columns of the problem: the coordinates (x, then y and z), the time (not for a
steady problem), then the value, for example x, t, u for a 1D time-dependent problem. The time is read from the
file's first row and shown next to the file (✅ t = 0.25 (… pts)). A file that cannot be read shows ❌ and the
reason. If no row has a readable file, the log says ❌ Error Analysis: no valid reference files loaded.
No reference data at all. Choose Exact solution formula in the dialog if the exact solution is known, or compute reference files with another solver.
After training. Run Error Analysis sets up the error analysis for the next run
(✅ Error Analysis configured — ... reference files, will run after training.). To evaluate a model that has already
been trained, set up the error analysis and then load the model under Restore & visualize, which runs it for the
reference times inside the model's time range.
An exported script fails outside PINNStudio¶
ModuleNotFoundError: the Python you run it with lacks DeepXDE, PyTorch, NumPy, SciPy or Matplotlib. Run it with the Python PINNStudio runs in, or install PINNStudio (or these packages) in your environment. For a copy installed with the one-command installer, that Python is in the folderuv tool dirprints (pinnstudio/bin/python, orpinnstudio\Scripts\python.exeon Windows).FileNotFoundErroror an empty results folder: the script contains the full paths of the results folder and of every data file as they were on the computer that exported it. Edit them near the top of the script (save_dir) and where the data files are read, or export the script again on the computer that runs it.- The script runs on a different device than expected: the GPU settings of Settings › GPU / Hardware... are
written into the script. To force the CPU, set
CUDA_VISIBLE_DEVICES=-1in the environment, or export the script with Train on: CPU. - Different results from Solve: on the CPU and with the same seed, the export trained the same model as
Solve in all 89 configurations of the built-in examples that the project's check compared (Tuned settings,
shortened training; the parameter-sweep example is not included; see
Export equivalence). Small
differences between runs on a GPU, or between CPU and GPU, are normal floating-point nondeterminism. A large
difference is a bug: please report it with the
.pinn.jsonfile and the script.
A checkpoint cannot be restored¶
Restore & visualize needs a model file (.pt) and the run's configuration (Config). When you choose the
model file, PINNStudio looks for the configuration next to it: a .json file of the same name, then
model_config.json in the same folder (solution_results of the run), or for a time window its
step_config.json. If none is found, the log says ⚠️ No config found — please browse manually.; choose the run's
model_config.json yourself.
❌ Please select a model file./❌ Please select a model_config.json file./❌ Please select a save directory.: one of the three fields is empty.❌ Could not read config: ...: the file is not a run configuration (a.pinn.jsonproblem file is not one).- PyTorch reports missing or unexpected keys, or sizes that do not match: the model file and the configuration come from different runs (for example another network size or number of outputs). Use the two files from the same run folder.
- The optimizer is not chosen by hand: PINNStudio takes it from the model file's name (
model_adam...ormodel_lbfgs...), otherwise from the last training phase in the configuration, and the log says✅ Auto-detected optimizer from model_config.json: .... Keep the file names the run gave the checkpoints.
See Restore & visualize and Checkpoints and restoring.
Custom geometry problems¶
Geometry Type is 'Custom' but no shapes have been added; add at least one shape in the Custom geometry builder.: add a shape on the Geometry page.- The domain or the conditions are not what you intended: look at the domain view, which appears when you select Geometry, Collocation points or a boundary condition in the model tree; selecting a condition shows the edges (faces in 3D) it covers.
- A side name on a curved or combined shape: side names such as
leftonly exist on boxes; for other shapes pick the edges in the Sketch or write a Where expression. See A boundary condition matches no points. - Polygon and triangle geometries fail with
ValueErrorfromnp.cross: NumPy 2.5 or newer is installed; see Missing or incompatible packages. - DXF or SVG import: only closed outlines of plain geometry are read (lines, arcs, circles, ellipses, polylines and paths, with arcs and curves approximated by short straight pieces). DXF blocks, splines, text and dimensions, and SVG clipping, masks and strokes are ignored. Check the result in the Sketch before training. See Geometry and domain.
Training is slow¶
- CPU threads. On the CPU, PINNStudio's scripts use about one thread per performance core, at most 8
(Settings › GPU / Hardware... › CPU threads: Automatic). More threads are usually slower on processors with
efficiency cores. You can set a number of your own there; the environment variable
OMP_NUM_THREADSoverrides Automatic. - CPU or GPU. A GPU pays off for larger problems (a few thousand points and more). A small problem, such as a 1D problem or an ODE with a few hundred points, is often faster on the CPU: Train on: CPU. PINNStudio prints a tip in the Training Log when a small 1D problem trains on the GPU.
- Precision. float32 (the default) is faster than float64.
- Problem size. Training time grows with the number of points, the size of the network, the order of the derivatives and the number of outputs and equations. Start with fewer points and iterations, and increase them once the set-up works.
- Callbacks. Early Stopping ends a run once the loss stops improving; Training Timer stops it after a given time.
- Windows: starting a run. Starting a run takes longer than on Linux, most of it importing PyTorch and
DeepXDE. Windows Defender scans every file Python loads, which added 1.5 to 2 s per run on a test laptop. If you
are comfortable with it, an exclusion for the folder of an installer copy removes that (PowerShell as
administrator:
Add-MpPreference -ExclusionPath "$env:APPDATA\uv\tools\pinnstudio";uv tool dirshows the folder if yours is elsewhere). It is optional; PINNStudio works the same without it. - Windows laptops: power mode. Plug in and choose the Best performance power mode (Windows Settings › System › Power). A small network on the GPU is limited by how fast the CPU hands it work, so a CPU that slows down on battery or when hot slows the GPU too; on the test laptop the 1D examples trained 1.5 to 3 times faster with Train on: CPU.
Training speed summarizes the speed measurements, and Seeds, precision and hardware has more on hardware and precision.