Added stat to mpimain so computation of 15 crossing mutants is
restartable.
This commit is contained in:
parent
ca8c47cc5b
commit
e5b96e80ab
27
mpimain.cpp
27
mpimain.cpp
@ -133,15 +133,26 @@ slave ()
|
|||||||
printf ("[% 2d] CMD_DO %s\n", rank, desc.name ().c_str ());
|
printf ("[% 2d] CMD_DO %s\n", rank, desc.name ().c_str ());
|
||||||
|
|
||||||
char buf[1000];
|
char buf[1000];
|
||||||
sprintf (buf, "incoming/K%d_%d.dat", desc.i, desc.j);
|
sprintf (buf, "/scratch/network/cseed/incoming/K%d_%d.dat", desc.i, desc.j);
|
||||||
|
|
||||||
pair<mod_map<Z2>, mod_map<Z2> > p = compute_kh_sq (knot_kh_sq, desc);
|
struct stat stat_buf;
|
||||||
|
if (stat (buf, &stat_buf) != 0)
|
||||||
{
|
{
|
||||||
writer w (buf);
|
if (errno == ENOENT)
|
||||||
write (w, p.first);
|
{
|
||||||
write (w, p.second);
|
pair<mod_map<Z2>, mod_map<Z2> > p = compute_kh_sq (knot_kh_sq, desc);
|
||||||
}
|
writer w (buf);
|
||||||
|
write (w, p.first);
|
||||||
|
write (w, p.second);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stderror ("stat: %s", buf);
|
||||||
|
exit (EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
printf ("skip %s: exists.\n", buf);
|
||||||
|
|
||||||
send_int (0, 0);
|
send_int (0, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user