Search code examples
repast-simphony

How can I modify the temporary file path used to support repast simphony batch runs?


I am running repast simphony on a local machine. I successfully set up repast simphony on this Linux machine already per https://repast.github.io/download.html#update-site-install. I am performing batch experimentation now. When doing so, I am getting a java.io.IOException error saying there is no space left on the device when trying to run batch experiments. I believe this is related to the 'tmp' folder on my machine being full. For complex reasons unrelated to repast, the 'tmp' folder on my machine is already very full and cannot be emptied without a great deal of time and effort that I would really like to avoid.

I would like to modify the location to which repast batch experiments' intermediate files are written to be a different folder on my machine. I am referring to files such as the .zip file and the simphony_model________ folder that the console mentions while batch experiments are being set up, as well as the 'working' folder (which has data copied to the 'tmp' folder and has all of my experimental input data). (I am assuming that these are the main reason for the 'tmp' folder needing so much space to support batch experiments.)

I tried looking through documentation such as https://repast.github.io/docs/RepastBatchRunsGettingStarted.pdf, where section 2.3.1 seems to mention files being written to a temporary folder during local runs, but I did not see a mention of any way to change that temporary folder's path. Is changing the path to hold these temporary files possible?


Solution

  • I think we are using this System.getProperty("java.io.tmpdir") to get the tmp directory, so changing it using java's -D argument might work

    -Djava.io.tmpdir=/path/to/tmpdir

    If you add that to the vm arguments (Run -> Run Configurations -> Arguments) in the launcher for a batch run that might do the trick.

    See also:

    Environment variable to control java.io.tmpdir?