AmesimKnowledge

Using the HPC feature with command line

Advanced example: Simcenter Amesim API and HPC submission

API and HPC submission

Starting from a Simcenter Amesim demo, this python script will create a batch run study using the Simcenter Amesim Batch API. Then the study is submitted to the job scheduler. The instructions to set up the script can be found in the header of the script.

The script can be used for both job scheduler Slurm and OpenLava.

Procedure

  1. Copy the script: demo_batch_api_hpc_job.py (available in $AME/scripting/python/hpc/demo)

  2. Follow the instructions in the header of the python file to set up the script.

  3. Start the python script: AMEPython demo_batch_api_hpc_job.pyor through a virtual x server: xvfb-run AMEPython demo_batch_api_hpc_job.py

    Command output: Copy`user@head-node:~/test$xvfb-run AMEPython demo_batch_api_hpc_job.py Information: GNU GCC version is 4.8.3 Starting Python ... Information: GNU GCC version is 4.8.3 cp $AME/demo/Tutorials/lnx/QuarterCar.ame /home/user/test/wdir/. ** Information **  AME API Welcome!  Version: 15 (24/03/16 19:03 - 53730-48763) 2016  Begin: 18/04/16 11:42.

** Warning **  "QuarterCar" circuit submodels may need update. Update model assistant may be necessary.

{'type': 'set', 'param': [{'set': ['10', '15', '25', '35'], 'type': 'real', 'name': 'mass@mass2port'}]} ** Information **  End: 18/04/16 11:42  AME API Bye!.

Batch job 102 has been submitted. batch scheduler job submission command: bsub -n2 -R span[ptile=1] $AME/scripting/python/hpc/ AMEHPCStudyStart --driver=LSF --dirmodel=/home/user/test/wdir/ --model=QuarterCar.ame --type=batch --wdir=/home/user/hpc_automatic_testing/wdir3/run/ --amepath=$AME --compiler=gcc64 --port-manager=40000 --save_as=/home/user/test/wdir//QuarterCar_simulated.ame --env=SC1D_LICENSING_TYPE=$SC1D_LICENSING_TYPE --env=SPLM_LICENSE_SERVER=$SPLM_LICENSE_SERVER user@head-node:~/test$`

Results

The job will produce a model QuarterCar_simulated.ame containing all the batch simulation results.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.HPC/xid1174702 · retrieved 2026-07-17