Launch a service#

To launch a Speos service you have several options:

  • Use python launch method to start it locally

  • Use Bash to start it yourself

  • Rely on Ansys PIM to start a service

Python launcher#

To launch a local Speos RPC server instance use:

from ansys.speos.core.launcher import launch_local_speos_rpc_server

speos = launch_local_speos_rpc_server(version='251')

You receive a Speos object in return that you then use as a Speos session. For more information you can look at the API Reference.

The launcher.py module

The session can be ended via the object Speos like this:

speos.close()

Launch a local service from the command line#

To launch the service, you need to use the following commands:

"%AWP_ROOT251%\Optical Products\SPEOS_RPC\SpeosRPC_Server.exe"
& "$env:AWP_ROOT251\Optical Products\SPEOS_RPC\SpeosRPC_Server.exe"
$AWP_ROOT251/OpticalProducts/SPEOS_RPC/SpeosRPC_Server.x

To stop the server you can use the following command line:

"%AWP_ROOT251%\Optical Products\SPEOS_RPC\SpeosRPC_Server.exe --stop portNumber"
& "$env:AWP_ROOT251\Optical Products\SPEOS_RPC\SpeosRPC_Server.exe --stop portNumber"
$AWP_ROOT251/OpticalProducts/SPEOS_RPC/SpeosRPC_Server.x --stop portNumber

To see all the command line parameters you can use the help flag:

"%AWP_ROOT251%\Optical Products\SPEOS_RPC\SpeosRPC_Server.exe --help"
& "$env:AWP_ROOT251\Optical Products\SPEOS_RPC\SpeosRPC_Server.exe --help"
$AWP_ROOT251/OpticalProducts/SPEOS_RPC/SpeosRPC_Server.x --help

Use PySpeos launcher with PIM#

If a remote server is running Ansys Release 2025 R1 or later and is also running PIM (Product Instance Manager), you can use PIM to start a SpeosRPC server Session that PySpeos can connect to.

A usage example of the remote service can be accessed via AnsysLAB.

Warning

This option is only available for Ansys employees.

Only Ansys employees with credentials to the Artifact Repository Browser can download ZIP files for PIM.

To launch a remote Speos service:

from ansys.speos.core import launcher

speos = launcher.launch_speos("251")

The preceding commands launch a remote Speos service (version 2025 R1). You receive a Speos object in return that you then use as a Speos session.

The session can be ended via the object Speos like this:

speos.close()

Go to Getting started