When I run your program on my system, I get 'out of memory', with no
crash but not before the screen has gone blank for a while. If you can
give me a testcase that will fail for me, I will fix it. I know that
would be hard for you to do, but likewise I don't want to chase a
problem that might well be in some other component of your system.
Henry Rich
On 2/8/2021 12:21 AM, Francesco Pedulla' wrote:
@Michael: I suspect we mean the same thing. Any amount of memory below what
J allocates causes some kind of error. It could be a failed malloc(), a
memory access error, a GUI freeze due to very slow paging or something
else. Whatever happens, there is something wrong going on: the application
should not crash, the GUI should not freeze.
Thanks,
Francesco
On Sun, Feb 7, 2021 at 9:04 PM 'Michael Day' via General <
[email protected]> wrote:
I don't think your problem was the spec of your pc, although 8GB is
pretty good.
Mine, with 16GB RAM, got stuck with taking all triples, seeming to need
~38GB,
and Raul's analysis also suggests 40GB .
Cheers,
Mike
On 07/02/2021 17:05, Francesco Pedulla' wrote:
Thanks to all that answered so quickly. In particular:
@Brian: yes, I was aware that a smaller case would work
@R.E.: your suggestion to skip the boxing seems to avoid the issue
altogether (see working code below)
@Michael: congrats for reading my code so well - in fact, I messed it up
while producing a slimmed down version to share; w.r.t. boxing, see my
answer to R.E.
Now the fixed code reads
perm =: i.@! A. i.
base10 =: 10&base
PanDigS =: (perm 10) from i.10
PanDigT =: 3 base10\"1 PanDigS
It does not break anymore (logical correctness is another story).
The fact that the new code completes without errors suggests that the
issue
lies with the boxing operation. It could be either directly or
indirectly,
e.g. by stressing the operating system memory management code (paging?).
Should someone investigate, I add that my machine is an old HP 280 with a
dual core Celeron CPU [email protected] and 8GB of RAM.
Best regards,
Francesco
---------- Forwarded message ---------
From: Francesco Pedulla' <[email protected]>
Date: Sun, Feb 7, 2021 at 12:32 PM
Subject: Bug in J807/J902
To: <[email protected]>
The following piece of code does not work on Ubuntu 20.04.
load 'primitives'
perm =: i.@! A. i.
PanDigS =: (perm 10) from (1 + i.10)
PanDigT =: 10 base"1 each 3 box\"1 PanDigS
The effect is variable: crash of the J interpreter, freeze of the Qt
interface or even of the whole system. It shows up both on J807 and J902.
The dataset is quite large:
7!:5 <'PanDigS'
5.36871e8
and the process crashes (or the system freezes) after several seconds.
Hence, I suspect an issue with memory management.
Any idea or suggestion on how to bypass the problem?
Thanks,
Francesco
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm