Running Structure in parallel using Jenkins slaves

Running Structure in parallel using Jenkins slaves

Jenkins will be responsible for spawning **multiple builds per K**. It expects you to provide value mainparams and extraparams files. You can also use an extra job to collect the output and call other programs (e.g.: structure harvester).

TL;DR

Screenshot

In order to use this plug-in, you'll need Structure version 2.3.4 or superior. The GUI version won't work, so grab the version without front end.

Now go to the main configuration page in Jenkins and add a Structure installation.

Screenshot

After this you can create a job in Jenkins to run Structure. A simple FreeStyle job is enough to run Structure in a single machine (local or remotely). But for running Structure in parallel across many nodes, you'll need a Multi-configuration job. Give it any name. We are using the Bodega tutorial on Structure data as example.

Screenshot

You will have to add an axis to your project. Name it K and add the desired values separated by space. Now add a build step to invoke Structure, and select the right installation.

Screenshot

Enter ${K} as the K value. This will be replaced by each value of K. You can enter the remaining parameters as necessary for your work. Finally, add the mainparam and extraparam files contents.

Screenshot

Screenshot

If you want to gather all the output files of your execution, add a post build action to archive the artifacts of your build. And if you have other jobs to run afterward, just add them in the post build actions section too.

Screenshot

Running your job

Click Build to trigger your job execution. You will notice in the console log that several sub-executions were triggered. One for each axis value. That's how Jenkins multi-configuration jobs work.

Screenshot

You can click in the axis values to open the sub-execution console log and see what is going on or what happened during this axis execution.

Screenshot

Screenshot

Once the job is finished, you'll be able to see the final results, access the console log again at any time, and download the build artifacts - which in our case are the Structure output files.

Screenshot

Furthermore, later you can compare your job total execution time after a few builds have completed. This is useful specially if you are responsible for tuning or managing large number of jobs.

Screenshot

Extra: aggregating output files into a single Zip file

The screenshots below contain information on how to create a job that can be triggered by the job you created in this tutorial to collect the output files and produce a single Zip file per build in Jenkins.

Screenshot

Screenshot

Screenshot