Integration with AFS

To run parallel tasks spawned by ParaStation MPI on clusters using AFS, ParaStation MPI provides the scripts env2tok and tok2env.

On the frontend side, calling

  . tok2env

will create an environment variable AFS_TOKEN containing an encoded access token for AFS. This variable must be added to the list of exported variables


In addition, the variable


must be set. This will call the script env2tok before running the actual program on each node. Env2tok itself will decode the token and will setup the AFS environment.


The commands SetToken and GetToken, which are part of the AFS package, must be available on each node. Also, the commands uuencode and uudecode must be installed.

Script tok2env:

  IFS=" "
  export AFS_TOKEN=`GetToken | uuencode /dev/stdout`

Script env2tok:

  IFS=" "
  echo $AFS_TOKEN | uudecode | SetToken

  exec $*