cilkpride

Experimental package that passively runs cilksan in the background for Cilk projects.

Sakawa

82

0

0.1.8

MIT

GitHub

This package consumes the following services:

Cilkpride package (beta)

This package is designed to help programmers using the Cilk threading library keep track of their code as they are writing code in Atom. Currently, the plugin automatically runs cilksan in the background and report the results to the users, notifying them if race conditions appear. Results are refreshed every time a file is modified, so that users are told immediately if race conditions exist, and can take the appropriate steps to correct the error.

There are also some added features designed for MIT's 6.172 class, allowing students to edit code locally but evaluate their applications remotely on Athena.

Setting up the package

In order to notify the package that you are writing a project with Cilk, you must place a configuration file cilkpride-conf.json in the top-level directory of the project. The configuration file should have a few settings:

{
  "username": "Username for SSH login, usually your Athena login",
  "remoteBaseDir": "full directory path of the project directory on the remote instance",
  "cilksanCommand": "Enter a Make command that will compile (with cilksan enabled) and run the executable.",

  "sshEnabled": true,
  "hostname": "Hostname for running cilk on a remote server - usually athena.dialup.mit.edu",
  "port": 22,
  "launchInstance": "boolean: only true if you want to use 6.172's Azure VM",
  "localBaseDir": "Full directory path of the project directory on your local computer (ie C:/Users/me/Desktop/my-project)",
  "remoteBaseDir": "Full directory path of the project directory on the remote instance (ie /afs/athena.mit.edu/user/g/c/gchau/my-project)",
  "syncIgnoreFile": ["/cilkpride-conf.json", "other files to ignore"],
  "syncIgnoreDir": ["/.git", "/log.awsrun", "/log.cqrun", "other directories to ignore"]
}

You can automatically generate a template configuration file in a folder by pressing "Register Cilk project" on the status bar, located to the bottom-left of the Atom window. Once this is done, the package will periodically run cilksan on the executable generated by the command specified in cilksanCommand - make sure that this command both makes an cilksan-enabled executable and runs it. The status bar icon will show the package status for the current file open.

Note: If you are using SSH (which you probably are), every time a file is modified, the plugin will upload it to the remote server and try to recompile it. You can also sync local -> remote by pressing CTRL+ALT+G, while syncing remote -> local can be done by pressing CTRL+ALT+J. Beware as these commands will overwrite your files and there is no confirmation before doing so.