Merge remote branch 'origin/master'

Conflicts:
	mpimain.cpp
This commit is contained in:
Cotton Seed 2012-08-04 16:24:09 -04:00
commit 07d8513d5e

View File

@ -110,8 +110,11 @@ slave ()
sprintf (buf, "/scratch/network/cseed/incoming/K%d_%d.dat.gz",
desc.i, desc.j);
// desc = knot_desc (knot_desc::ROLFSEN, 3, 1);
struct stat stat_buf;
if (stat (buf, &stat_buf) != 0)
{
if (errno == ENOENT)
{
knot_diagram kd = desc.diagram ();
cube<Z2> c (kd);
@ -127,9 +130,18 @@ slave ()
assert (sq1.compose (sq1) == 0);
assert (sq2.compose (sq2) + sq1.compose (sq2).compose (sq1) == 0);
file_writer w (buf);
gzfile_writer w (buf);
write (w, sq1);
write (w, sq2);
}
else
{
stderror ("stat: %s", buf);
exit (EXIT_FAILURE);
}
}
else
printf ("skip %s: exists.\n", buf);
send_int (0, 0);
}