Open zhaoli-IHEP opened 3 years ago
This seems to be a restriction of the operating system. Form does a call to the C function fopen and gets back the message that the file could not be opened. If Form would like to avoid this, it would mean opening and closing files each time an operation to a tablebase is done. That is very wasteful. Try to deal with the tablebases in such a way that you can finish with a number of them and close those before working with the other ones. Alternatively you could try to figure out how to raise this limit of open files in your operating system.
Sorry I cannot help you more.
Jos
On 11 Jul 2020, at 11:08, zhaoli-IHEP notifications@github.com wrote:
Here is the test script
-
symbol j; CFunction ff; Table,sparse,test_table;
Local expression = sum_(j,1,100,ff(j)); .sort
do idx = 1,1000
bracket ff; .sort fillexpression [test_table] = expression(ff); .sort TableBase "test
idx'_table.tbl" create; TableBase "test
idx'_table.tbl" addto [test_table]; .sortenddo
.end Then it stoped with the error "Could not create new file test510_table.tbl"
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vermaseren/form/issues/357, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJPCEUAGGWVJ4T22E4R6RDR3ATXHANCNFSM4OXG2LAQ.
This seems to be a restriction of the operating system. Form does a call to the C function fopen and gets back the message that the file could not be opened. If Form would like to avoid this, it would mean opening and closing files each time an operation to a tablebase is done. That is very wasteful. Try to deal with the tablebases in such a way that you can finish with a number of them and close those before working with the other ones. Alternatively you could try to figure out how to raise this limit of open files in your operating system. Sorry I cannot help you more. Jos …
Thank you for the explanation. But how to close the file. I tried the #close, but it does not work.
Now you mention it, there is indeed no command for that, because then you could not use its elements anymore. It would have to involve clearing out the complete table from the memory. There is somewhere in the operating system a parameter for the number of open files that a process can have. But it will probably need superuser status to change it and it may need rebooting. I remember from the past that it used to be much smaller.
Jos
On 11 Jul 2020, at 14:43, zhaoli-IHEP notifications@github.com wrote:
This seems to be a restriction of the operating system. Form does a call to the C function fopen and gets back the message that the file could not be opened. If Form would like to avoid this, it would mean opening and closing files each time an operation to a tablebase is done. That is very wasteful. Try to deal with the tablebases in such a way that you can finish with a number of them and close those before working with the other ones. Alternatively you could try to figure out how to raise this limit of open files in your operating system. Sorry I cannot help you more. Jos … <x-msg://42/#> Thank you for the explanation. But how to close the file. I tried the #close, but it does not work.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vermaseren/form/issues/357#issuecomment-657057566, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJPCETYVCT364Q67R3VOQTR3BM6FANCNFSM4OXG2LAQ.
Indeed, my distribution has a default max open file limit of 1024 (unlimit -a
to check). If I double it to 2048 (ulimit -n 2048
), I can run your example with no errors.
Here is the test script
Then it stoped with the error "Could not create new file test510_table.tbl"