How to Setup Regression Checks#
Regression checks are useful when updating or refactoring user subroutine code as a quick way of ensuring that code changes do not substantially alter the functionality of the code.
Regression checks in Abaci work very simply by calculating and displaying the RMS error in field output variables for all nodes/IPs/elements per frame and step.
Caution
Regression checks are recommended for small to medium Abaqus jobs only.
Large Abaqus jobs, with multi-gigabyte output databases, are not suitable for regression checks due to inefficiencies in the Abaqus Python odb interface. It is recommended that you write your own post-processing script for large jobs.
Configuration#
To use regression checks for a particular job file, that job must first be specified in the configuration file.
Example:
[[job]]
job-file = 'jobs/my-abaqus-job.inp'
name = 'job1'
tags = ['test','1elem']
Regression checks are enabled for a job by adding the following three fields to your job entry in the configuration file:
check.reference
- reference file to compare againstcheck.fields
- which field output variables to checkcheck.steps
- which job steps to check
Example: adding regression check options
[[job]]
job-file = 'jobs/my-abaqus-job.inp'
name = 'job1'
tags = ['test','1elem']
check.reference = 'jobs/my-abaqus-job-ref.pkl'
check.steps = ['Step-1']
check.fields = ['SDV1','SDV2']
In this example, we will store the reference result in a file called
jobs/my-abaqus-job-ref.pkl
and we will check the first two state
variables for the last frame in Step-1
.
Important
The chosen filename for check.reference
is unimportant; if this file
does not exist, then Abaci will create it the next time you run this
job. Subsequent runs will then compare against the reference data stored in
that file.
It is a good idea to store the reference file in the same location as the job file.
The reference file can be added to your Git version control, if not too big, so that other users can run regression checks against your results.
By default, Abaci will only check values in the last frame. To check values in all frames in the step, you can specify:
check.frames = 'all'
Alternatively, to check specific frames within a step, you can specify the frame numbers as a list of integers:
check.frames = [1,99,199]
Running Checks#
Once you have enabled regression checks for a particular job in the configuration file as described above, they will automatically run when you next run that job.
Remember that if the reference file does not yet exist, then it will be created on your next run. Subsequent runs will then compare against the reference data stored in that file.
Rerunning checks#
You can rerun regression checks for a completed job using the
abaci post
.
Given a completed Abaci job in the scratch/myjob_0
directory, then regression
checks can be rerun with:
abaci post scratch/myjob_0