[Nauty-list] shortg with a large number of inputs

Brendan McKay bdm at cs.anu.edu.au
Sat Oct 13 17:49:56 EST 2007


Hi Ken,

I never heard of any such problem caused by pipes and doubt if
that is the correct explanation.  My theory is that the sort
process is running out of temporary disk space.

The usual behaviour of sort on unix-like systems is to create
temporary files in /tmp.  If /tmp has insufficient space left,
sort will crash (to check:  "df -m /tmp" answers in megabytes).

A proper fix to this problem would be to have an option on shortg
to specify the place to put temporary files.  This has been on my
list of things to do for a long time but I just moved it higher.

Meanwhile, you can try two things:
1. Define the environment variable TMPDIR before running shortg
   to be the name of a directory with enough space.  If such a
   directory is "dir" (use a full path), this is done by:
      In bash:    export TMPDIR=dir
      In tcsh:    setenv TMPDIR dir
   This method will of course only work if your sort program obeys
   the TMPDIR variable.
2. Modify shortg.c like this (about line 92):
#define SORTCOMMAND  SORTPROG,SORTPROG,"-T","dir","-u","+0","-1"
#define VSORTCOMMAND1  SORTPROG,SORTPROG,"-T","dir"
#define VSORTCOMMAND2  SORTPROG,SORTPROG,"-T","dir","+0","-1","+2"
where dir is as in choice #1.  Then remake it.

In both #1 and #2 you should be able to use the current directory
under the name '.' .

Please let me know if this proves to be the solution.

Brendan.


* Ken Ryan <kjryan at bgsu.edu> [071013 01:32]:
> 
> I observed that if a large set of graphs are given as an input shortg 
> crashes. shortg calls the unix sort utility and passes an input of graphs 
> in canonical form to the unix sort utility. If the number of graphs passed 
> to the unix sort utility is large then the unix sort utility crashes and 
> that causes shortg to crash. I was told by the system administrator that 
> there is a bottleneck due to the pipe being used to pass the input of 
> graphs to the unix sort utility. I was wondering if there is a fix to this 
> situation.  If needed, I will provide additional details ...
> 
> I really appreciate your time and help on my last few questions.
> 
> Regards,
> 
> Ken Ryan, Assistant Professor
> Applied Statistics and Operations Research
> Bowling Green State University
> Bowling Green, Ohio 43403-0267
> Phone: (419)372-2958
> Fax: (419)372-2875
> Email: kjryan at bgsu.edu
> Web: http://www.cba.bgsu.edu/faculty_staff/ryan/ 
> 
> 
> _______________________________________________
> Nauty-list mailing list
> Nauty-list at cs.anu.edu.au
> http://dcsmail.anu.edu.au/cgi-bin/mailman/listinfo/nauty-list




More information about the Nauty mailing list