LoÃc Grenià on Fri, 19 Oct 2012 10:49:36 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: temporary files under win32 |
2012/10/19 Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>: > On Thu, Oct 18, 2012 at 11:49:37AM +0200, Bill Allombert wrote: >> Dear PARI developers, >> >> I get report that PARI support for temporary files on win32 is not reliable. >> In particular when running several instance of GP running factorisation. >> >> I would be glad if someone could review this code >> (in src/language/es.c) >> >> To debug under gp, do >> \gf2 >> factorint(2^251-1,14) > > So the first bug I found is that the directories are created in '.', not > in the system tmp directory (assuming this exist on windows). There are some... c:\temp, c:\windows\temp are frequently present... > The second is that there is a race condition of some sort. > If you create 4 directories, each with a copy of gp.exe and start each > of them in parallel, MPQS is much more reliable, so this suggest some race > condition. Indeed, get_files *is* racy. I'll try to implement getpid() and some sort of getuid() (maybe constant, maybe not). I've no native win32 compilers, so my tests will not be perfect. Thanks, LoÃc