> Le 20 juin 2020 à 03:00, Antoine Monmayrant <amonm...@laas.fr> a écrit : > > Le Vendredi, Juin 19, 2020 15:59 CEST, Rafael Guerra > <jrafaelbgue...@hotmail.com> a écrit: > >> Script runs fine on Win10, Scilab 6.1, 64 GB RAM. >> But btw, the file a28.mat seems to have only 342MB. > > I suspect that it does work fine with 64GB of ram:
Not so sure. It crashes on a 128GB machine. S. > that's how I managed to work around my initial problem. > This script should be adapted to your available ram: you should try to > increase n. > But in your case, I think you have enough ram to reach scilab maximum > variable size (is it something like 2^31-1 maximum elements?) before > triggering this bug. > Ideally, this should be tested on a ram-limited hardware (~8GB). > The issue is that there might be some malloc() somewhere that fails, while > the code tries to use the memory without checking whether the malloc() was > successful or not. > If you have gazillion's of GB of available ram, you never face this problem. > > Antoine > >> >> >> -----Original Message----- >> From: users <users-boun...@lists.scilab.org> On Behalf Of Stéphane Mottelet >> Sent: Friday, June 19, 2020 10:15 AM >> To: users@lists.scilab.org >> Subject: Re: [Scilab-users] scilab 6.1 crashes when trying to load big >> matfile (loadmatfile) >> >> it's the loadmatfile that crashes (here on Scilab-branch-6.1 under OSX, >> with 16Gb ram) >> >> "savematfile('a28.mat','a28');" >> scilab-cli-bin(3310,0x115f1f5c0) malloc: can't allocate region >> *** mach_vm_map(size=18446744071562067968) failed (error code=3) >> scilab-cli-bin(3310,0x115f1f5c0) malloc: *** set a breakpoint in >> malloc_error_break to debug >> >> Same crash with Scilab-branch-6.1 under Ubuntu 18.04, with 128Gb ram: >> >> "a28=[1:2^28];" >> ATTENTION : Option -v7 ajoutée. >> >> "savematfile('a28.mat','a28');" >> Segmentation fault (core dumped) >> >> S. >> >>> Le 19/06/2020 à 08:57, Antoine Monmayrant a écrit : >>> Hello all, >>> >>> >>> Here is a small script that systematically crashes scilab on my machine: >>> >>> >>> //////////////////////////////// >>> >>> // on my machine with 8Gb or ram and usual workload, n=28 crashes scilab >>> n=[24,26,28]; >>> >>> for i=n >>> >>> disp('---- '+string(i)+' ----'); >>> execstr('a'+string(i)+'=[1:2^'+string(i)+'];') >>> disp('a'+string(i)+'=[1:2^'+string(i)+'];') >>> execstr("savematfile(''a"+string(i)+".mat'',''a"+string(i)+"'');") >>> disp("savematfile(''a"+string(i)+".mat'',''a"+string(i)+"'');") >>> execstr("loadmatfile(''a"+string(i)+".mat'');") >>> disp("loadmatfile(''a"+string(i)+".mat'');") >>> disp('---- OK ----'); >>> >>> end >>> >> >> _______________________________________________ >> users mailing list >> users@lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users >> > > _______________________________________________ > users mailing list > users@lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users