Still juggling simulations between two machines and a prayer? Scale up in minutes with Inductiva.
Before diving into tutorials and benchmarks, let's ensure that your Inductiva Python package is properly set up. To confirm everything is working as expected, simply run a quick FUNWAVE simulation — it only takes a few seconds!
example.py on your Desktop (or in your preferred directory)."""FUNWAVE example."""
import inductiva
# Instantiate machine group
cloud_machine = inductiva.resources.MachineGroup( \
provider="GCP",
machine_type="c2d-highcpu-4",
spot=True)
# Download input files and store them in a directory
input_dir = inductiva.utils.download_from_url(
"https://storage.googleapis.com/inductiva-api-demo-files/"
"funwave-input-example.zip",
unzip=True)
# Initialize the Simulator
funwave = inductiva.simulators.FUNWAVE( \
version="3.6")
# Run simulation
task = funwave.run( \
input_dir=input_dir,
sim_config_filename="input.txt",
on=cloud_machine)
# Wait for the simulation to finish and download the results
task.wait()
cloud_machine.terminate()
task.download_outputs()
task.print_summary()
cd ~/Desktop
python example.py
Note: On some systems, you might need to use
python3instead ofpython.
All the necessary simulation artifacts and configuration files will be automatically downloaded to your computer. The FUNWAVE simulation will then be sent to a cloud machine for execution.
After the simulation completes, a task summary will be displayed in your terminal, as shown below.
Task status: Success
Timeline:
Waiting for Input at 25/09, 10:46:34 0.887 s
In Queue at 25/09, 10:46:35 33.676 s
Preparing to Compute at 25/09, 10:47:09 4.119 s
In Progress at 25/09, 10:47:13 50.9 s
├> 1.081 s cp /FUNWAVE-TVD-Version_3.6/Makefile .
├> 11.084 s make
├> 36.113 s /opt/openmpi/4.1.6/bin/mpirun --use-hwthread-cpus funwave-work/compiled_funwave input.txt
├> 1.091 s rm -r funwave-work
└> 1.088 s rm Makefile
Finalizing at 25/09, 10:48:04 0.555 s
Success at 25/09, 10:48:04
Data:
Size of zipped output: 4.45 MB
Size of unzipped output: 25.79 MB
Number of output files: 220
Total estimated cost (US$): 0.01036 US$
Estimated computation cost (US$): 0.00036 US$
Task orchestration fee (US$): 0.010 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/basics/how-much-does-it-cost
If the task status shows Success, congratulations! You've successfully run a FUNWAVE simulation.
This simple example tested your installation on a small machine with just 4 virtual CPUs. Inductiva offers far more powerful options to supercharge your simulations.
If you encounter any issues or need further assistance, don't hesitate to Contact Us. We're here to help!