How Do I Save Solver Temporary Files to a Different File?

  • The solver writes several scratch files (.scr) during simulation. Depending on the problem size, these could occupy few GB of disc space.
  • Since these files are huge, the hard drive should be faster to perform I/O efficiently else simulation time will increase.
Follow steps below to redirect writing of these scratch files to faster hard drive/different folder.
  1. Open .hx file.
  2. Write "TmpFilesDir" pset parameter. Some example shown below.

    Example: For Windows

    #For Windows

    pset TmpFilesDir "D:/Simulation/TMP/run1"

    Example: For Linux

    #For Linux

    pset TmpFilesDir "/scratch/TMP/run1"

    Example: For folder relative to current working folder

    #For folder relative to current working folder

    pset TmpFilesDir "./TMP"

  3. Write this pset variable after environment variable at top of .hx file.