Dear AnyBody Support,
I would like to perform a large number of time-consuming simulations, so using AnyPyTools I have made a python script defining and executing appropriate macros. The models were loaded successfully and the simulations were started (I can see from log files, and saved output) - so everything seemed to be working properly.
However, none of my simulations was completed as they all got interrupted after 3600sec - I paste the timeout error message of an example simulation below. I know that my simulations typically take around 2 hours (my model uses FDK on many DOFs), so naturally I would like AnyBody console to keep on running the simulation for a time longer than those 3600 sec. Therefore, I would like to kindly ask for your advice how can I change this limit? I will be very grateful for your help!
(Laboratory for Orthopaedic Technology, Institute for Biomechanics, ETH Zurich)
['ERROR: Timeout after 3600 sec.ERROR: anybodycon.exe exited unexpectedly. ',
‘Return code: 1’],
'Motion Batch\FreePosture.Main.any” -def ID=“3”’,
This is easily solved. Just set the timeout option to higher value. The default is 3600 (one hour).
app = AnyPyProcess(..... , timeout = 10800)
You can find the documentation the AnyPyProcess object by typing the following:
mel@PC ~ $ from anypytools import AnyPyProcess
mel@PC ~ $ AnyPyProcess?
String form: <class 'anypytools.abcutils.AnyPyProcess'>
Init definition: (self, num_processes=4, anybodycon_path=None, timeout=3600, silent=False, ignore_errors=None, warnings_to_include=None, return_task_info=False, keep_logfiles=False, logfile_prefix=None, python_env=None, **kwargs)
Class for configuring batch process jobs of AnyBody models.
This is the main interface to control the AnyBody console application from
python. The class stores all the configuration about how AnyBody is run.
It has one important method `start_macro` which launches the AnyBody with
a given anyscript macro.
num_processes : int, optional
Number of anybody models to start in parallel.
This defaults to the number of logical CPU cores in the computer.
anybodycon_path : str, optional
Overwrite the default anybodycon.exe file to
use in batch processing. Defaults to what is found in the windows
timeout : int, optional
Maximum time (i seconds) a model can run until it is terminated.
Defaults to 1 hour (3600 sec)-
ignore_errors : list of str, optional
List of AnyBody Errors substrings to ignore when running the models.
return_task_info : bool, optional
Return the task status information when running macros. Defaults to False
Set to False to suppress output (deprecated)
silent : bool, optional
Set to True to suppres any output (progress bar and error messages).
warnings_to_include : list of str, optional
List of strings that are matched to warnings in the model
output. If a warning with that string is found the warning
is returned in the output.
app instance : AnyPyProcess :
An instance of the AnyPyProcess object for running batch processing,
parameter studies and pertubation jobs.
>>> app = AnyPyProcess(num_processes=8, return_task_info=True)
AnyPyProcess was not developed at Aalborg University. If you have other issues, you can ask questions on GitHub where it is hosted.