Remy Cano on Sun, 08 Jun 2014 05:55:12 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Bug in t_list under gp2c?
|
- To: pari-dev@pari.math.u-bordeaux1.fr
- Subject: Bug in t_list under gp2c?
- From: Remy Cano <reemmmyyyy@gmail.com>
- Date: Sat, 7 Jun 2014 23:25:04 -0430
- Delivery-date: Sun, 08 Jun 2014 05:55:12 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=vrkJphGJG+VeLawbMg2jUd26h1TzdT6qikawowCrwYU=; b=p9tH7WBox1a28FllmNgAsRK7reD/8mr8W14KMy9WU8/3+9o3FRYygxfJMOvbfqD90L 3tzOXcgm9i8FDHXS5k0j70bUHdayogRoV3hUKwwzBQHpHw9ezMJBMxSF42ceYTRRTXZh R91sWZXl60Q0C22zCQMgEnQ4ogLRxSbaYKb7pMJNxiEAl4aBj+aR7gP7mOKHSqkCnJLx 1bafbDAA68rmgyyTaulG53afTf0Aj+2VgT9Ad6cwrHgeydoW1PTMGxv2h4eD0SNAMIgr KTN4sHlDpZghn0Dw+S2hx3vyGmDKO09F69N4haIJ8KgdLVr4F6xzWQ1aa46BnIu86Zkr 5BpQ==
Greetings!.
First than all my sincere congratulations for such nice and formidable work you keep with PARI-GP.
Let me as something from my limited experience as scripter.
The first time I used gp2c for speeding up my scripts I forgot to call init.....()
after the installation procedure. It crashed talking about a bug and requesting to report.
Well, all fine. I found out and realized my own fault there.
This time this it is not the case. I install the dot "so" and call init.....(),
But gp still being crashed if I try to use the routine A080575byRows()
(Here in the attachment).
It is based on t_list and I know the no few problems and headaches that code written in C/C++ uses to imply.
I would like to have a better idea about what is happening there.
(Built-in Garbage collection failing... segmentation faults faked or not properly triggered... what, and if possible why?)
I love PARI-GP, and care and distress about this.
Also at purpose, without a gp2c translation the code works perfectly.
It is sure, I need more than moral support. A gun with a bullet in the chamber is not an alternative hehehe.
SOS!.
Cheers,
Remy (
https://oeis.org/wiki/User:R._J._Cano)
P.S.: The gp2cTroublemaker code is in the attached file.
/* R. J. Cano, Jun 6 2014 */
A080575byRows(m,seq=1)={
my(n=0,l0,l1,l2,l3);
l0=listcreate();
listput(l0,[1,vector(1)]);
l3=listcreate();
while(n++<=m,
l1=listcreate();
l2=listcreate();
for(k=1,#l0,listput(l1,[1,vector(n)]);listput(l2,[1,vector(n)]);l1[k][1]=l0[k][1];l2[k][1]=l0[k][1];for(j=1,n-1,l1[k][2][j+1]=l0[k][2][j];l2[k][2][j+1]=l0[k][2][j]));
l0=listcreate();
for(k=1,#l1,forstep(j=#l1[k][2],1,-1,if(l1[k][2][j],listput(l0,l1[k]);l0[#l0][1]*=l0[#l0][2][j];l0[#l0][2][j]--;if(j>1,l0[#l0][2][(j-1)]++)));l2[k][2][n]++;listput(l0,l2[k]));
for(u=1,#l0-1,forstep(w=#l0,u+1,-1,if(l0[u][2]==l0[w][2],l0[u][1]+=l0[w][1];l0[w]*=0)));
l1=l0;
l0=listcreate();
for(k=1,#l1,if(l1[k][1],listput(l0,l1[k])));
if(seq,for(k=1,#l0,listput(l3,l0[k][1])));
);
if(seq,l3,l0);
}
/* Note(s):
*
* If seq then #A080575byRows() will be: sum(k=1,m,numbpart(k)); Else it will be simply: numbpart(m);
*
*/