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!
Kind regards,
Dominika
(Laboratory for Orthopaedic Technology, Institute for Biomechanics, ETH Zurich)
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?
Type: type
String form: <class 'anypytools.abcutils.AnyPyProcess'>
File: c:\users\mel\anaconda3\lib\site-packages\anypytools-0.8.2-py3.5.egg\anypytools\abcutils.py
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)
Docstring:
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.
Parameters
----------
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
registry.
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
disp
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.
Returns
-------
app instance : AnyPyProcess :
An instance of the AnyPyProcess object for running batch processing,
parameter studies and pertubation jobs.
Examples
--------
>>> app = AnyPyProcess(num_processes=8, return_task_info=True)
anypytools.abcutils.AnyPyProcess
AnyPyProcess was not developed at Aalborg University. If you have other issues, you can ask questions on GitHub where it is hosted.