[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ESPResSo-users] Chain jobs, checkpointing

From: Vincent Ustach
Subject: [ESPResSo-users] Chain jobs, checkpointing
Date: Tue, 18 Jun 2013 13:13:57 -0700

Hello everyone,

I am currently limited walltime per job on the cluster I am currently using. I therefore need to build a chain of jobs. Eventually I will make the job submission automated but first I need to have correct checkpointing from simulation to simulation.

I pulled the following from the Espresso User's Guide:

set out [open "|gzip -c - > endofrun_checkpoint1.block.gz" "w"]
blockfile $out write variable all
blockfile $out write interactions
blockfile $out write random
blockfile $out write bitrandom
blockfile $out write particles "id pos type q v f" all
blockfile $out write bonds all
blockfile $out write configs

blockfile $out write start "run"
puts $out "{$run}"
blockfile $out write end

close $out

The last bit was a hope to add variables that I have defined and I would like to carry on to the next simulation. Run is one example. That way each followup .tcl script will automatically tailor itself to the original .tcl script. I thought this would be the equivalent of declaring the variable run and setting it to the previous value.

here is the script to open the checkpoint:

set in [open "|gzip -cd endofrun_checkpoint1.block.gz" "r"]
while { [blockfile $in read auto] != "eof" } {}
close $in

and the next line is
set run [expr $run + 1]

Here is my error message:
 49 can't read "run": no such variable
 50     while executing
 51 "expr $run + 1"
 52     invoked from within
 53 "set run [expr $run + 1]"
 54     (file "next.tcl" line 48)

Has anyone seen this before?

--Vincent Ustach
  University of California, Davis

reply via email to

[Prev in Thread] Current Thread [Next in Thread]