Run massive simulations when your client needs it. Pay nothing when they don’t.
This tutorial will show you how to run gprMax simulations using the Inductiva API.
We will cover the Bowtie antenna model case from the gprMax examples to help you get started with simulations.
This example shows how to use a built-in antenna model in a simulation. Using a realistic antenna, like a MALA 1.2 GHz model, instead of a simple source improves accuracy, especially for near-field targets and complex antenna-environment interactions.
Download the required files here and save them to a folder named SimulationFiles. Then, you’ll be ready to send your simulation to the Cloud.
Here is the code required to run a gprMax simulation using the Inductiva API:
"""gprMax example."""
import inductiva
# Allocate cloud machine on Google Cloud Platform
cloud_machine = inductiva.resources.MachineGroup( \
provider="GCP",
machine_type="c2d-highcpu-16")
# Initialize the Simulator
gprMax = inductiva.simulators.GprMax(version="3.1.7")
# List of commands to run
commands = [
"python -m gprMax antenna_like_MALA_1200_fs.in",
]
# Run simulation
task = gprMax.run(\
input_dir="/Path/to/SimulationFiles",
commands=commands,
on=cloud_machine)
# Wait for the simulation to finish and download the results
task.wait()
cloud_machine.terminate()
task.download_outputs()
task.print_summary()
In this basic example, we're using a cloud machine (c2d-highcpu-16) equipped with 16
virtual CPUs. For larger or more compute-intensive simulations, consider adjusting the machine_type parameter to select a machine with more virtual CPUs or one equipped with
GPUs. You can explore the full range of available machines here.
Note: Setting
spot=Trueenables the use of spot machines, which are available at substantial discounts. However, your simulation may be interrupted if the cloud provider reclaims the machine.
To adapt this script for other gprMax simulations, replace input_dir with the path to your gprMax input files and set the commands accordingly. Be sure to specify the gprMax version compatible with your input files.
When the simulation is complete, we terminate the machine, download the results and print a summary of the simulation as shown below.
Task status: Success
Timeline:
Waiting for Input at 12/11, 14:39:27 0.816 s
In Queue at 12/11, 14:39:28 57.399 s
Preparing to Compute at 12/11, 14:40:26 4.071 s
In Progress at 12/11, 14:40:30 164.437 s
└> 164.254 s python -m gprMax antenna_like_MALA_1200_fs.in
Finalizing at 12/11, 14:43:14 0.559 s
Success at 12/11, 14:43:15
Data:
Size of zipped output: 29.70 KB
Size of unzipped output: 185.09 KB
Number of output files: 5
Total estimated cost (US$): 0.0037 US$
Estimated computation cost (US$): 0.0037 US$
Task orchestration fee (US$): 0 US$
Note: A per-run orchestration fee (0.010 US$) applies to tasks run from 01 Dec 2025, in addition to the computation costs.
Learn more about costs at: https://inductiva.ai/guides/how-it-works/basics/how-much-does-it-cost
As you can see in the "In Progress" line, the part of the timeline that represents the actual execution of the simulation, the core computation time of this simulation was approximately 3 minutes.
Test Your Inductiva Setup
Test your Inductiva.AI setup by running a quick gprMax simulation in the cloud before scaling to larger wave propagation studies.
The Inductiva Guide to GROMACS
Learn to run and scale GROMACS simulations on the Inductiva.AI Cloud HPC platform. Explore tutorials and benchmarks for molecular dynamics & materials modeling.