Trouble with batch processing

Dear forum

I am trying to run a batch process of around 2000 trials and have run into a rather peculiar problem. When I run the models individually, they work perfectly fine, but when I try to run the models as a batch I get an error message saying that the kinematic analysis has to be performed before inverse dynamics can be completed. I am using a script that has worked fine on previous batches.

I have attached the script that I am running from Spyder as well as an example of the error messages.

Script and error message.7z (2.2 KB)

It doesn't seem to matter whether I run the models in v. 7.2 or 7.3.

Thanks in advance for your assistance.

Kind regards

Sebastian Skals

Hi Sebastian,

I have looked at the script this seems to be ok.

We are wondering which AnyBodyCon version you are using, please try to use the newest one. There has been a change at some point which allows default data to be read into the model at load time. This allowed the sequences of the the analysis to run without a reload in between, if the AnyBodyCon you are using did not have this it could explain this behavior.

Best regards
Søren

Hi Søren

Thanks for your reply.

I am using AnyBodyCon v. 7.3.1. 8217 and Spyder 3.7.

If I run a batch on another, older dataset on the same server, there doesn't seem to be any problem with the analyses, so I do not think that the version of AnyBodyCon is the problem.

As I am writing to you now, I tried restarting a batch with only 12 trials where I had renamed the c3d.-filename as well as the TrialFileName in TrialSpecificData. Originally, I had a c3d-file with 4 trials of 1 condition and specified the TrialFileName and c3d.-file as e.g. S1-HL-30 with the 4 separate anybody-folders (one for each trial) all referring to the same c3d.-file with different start and end times. This time, I changed the c3d-filename to S1-HL-30-T1 and the TrialFileName to MOCAP_NAME_MAINFILEDIR and it works?!? Maybe this can lead you to the cause of the error.

Sebastian

Hi Sebastian,

The script says

                   anybodycon_path = os.path.join('C:\Program Files\AnyBody Technology\AnyBody.7.2','AnyBodyCon.exe'),
                   return_task_info=True)

So this is an older version this is also seen in the top of the log file.

Best regards
Søren

I changed the path to AnyBody.7.3 since I sent the file to you and the problem is still the same.

Sebastian

Ok, please also check the version it writes in log file.

Best regards
Søren

The log files show that Con v. 7.3.1 was used for the batch:

Script and error message....7z (2.5 KB)

Sebastian

Please verify that all output file has unique names...

You would see this behavior if any of the files was shared between trials unintentionally... then running 20 processes simultaneously would trigger this error, and you would not see it when just running one at the time.

So please ensure you have subject id, trial id etc. in all files names.

Best regards
Søren

This might be the thing. I see that the output files (both h5 and euler-angles.txt) are not unique in the sense that the only output that was succesfully produced during the batch were for a few whole c3d-files, e.g. S1-LW-10, and not the individual trials. As I mentioned before, it seems to work if I change the names of the c3d-files to e.g. S1-LW-10-T1, ...T2, ...T3 etc. and the TrialFileName to MOCAP_NAME_MAINFILEDIR. However, it seems odd to me that the other way would not work and it is gonna be quite time consuming to rename all the TrialFileNames and c3d.-files.

Can you perhaps take a quick look at the TrialSpecificData and let me know if anything should be wrong here before I start renaming files?

TrialSpecificData.7z (1.3 KB)

Sebastian

Hi Sebastian,

This is the problem for sure, you will need to ensure these files becomes unique.

There is a quick fix for this, the mocap model is prepared for this.

You will need to set the variable "MOCAP_OUTPUT_FILENAME_PREFIX"

This can be done with a define in each your trial specific files, this will add an additional identifier to all the files.

Please also see
https://anyscript.org/ammr-doc/anymocap/index.html#options-and-settings

Best regards
Søren

Thanks for your assistance, Søren.

Kind regards

Sebastian

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.