Skip to content

Commit

Permalink
Update FAQ.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperSnoek committed May 13, 2014
1 parent 2de5cd4 commit 5e469ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ Another way to avoid this is running main.py directly (i.e. `python main.py ...`

**Question**: Quite often I would like to stop and restart spearmint. Sometimes I can Ctrl-C spearmint and restart it. Other times it seems to block and do nothing when restarted. Is there anything I can do except cleanup the directory and start from scratch again? Also Ctrl-C only seems to break me out of spearmint, a spearmint process is still running in the background (which I kill manually). Is this expected?
**Answer**: Spearmint uses a file `expt_grid.pkl` to maintains state. All the jobs spawned by spearmint write to this file as well as spearmint itself. This enables spearmint to spawn jobs on multiple nodes in a cluster. Of course, the writes to this file must be atomic. When you kill spearmint, the jobs it has spawned will keep running (this is the intended behavior - the assumption is that jobs are expensive, so something that kills spearmint hopefully wouldn't stop the running jobs). There is a caveat that spearmint may die when it is holding the lock to this `expt_grid.pkl`. If you find that you restart spearmint and it is perpetually "waiting to lock grid..." you can safely remove the lock by typing `rm <expt_dir>/expt_grid.pkl.lock`.

**Question**: Spearmint locks up after performing the first sampling computation.
**Answer**: Python's multiprocessing causes a deadlock on some platforms. You can pass in a command line argument '--method-args=multiprocessing=0' to turn off multiprocessing and do computations serially (this is a bit slower but works just as well).

0 comments on commit 5e469ce

Please sign in to comment.