Swati, NoFirstName on Fri, 29 Mar 2024 00:52:38 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Error in gp/code


Dear Professor,
Yes, it works. But you pointed out rightly, it doesn’t help save time for larger values of a and p. 
Thanks, 
Swati

Get Outlook for iOS

From: Emmanuel ROYER <emmanuel.royer@uca.fr>
Sent: Thursday, March 28, 2024 4:02:58 PM
To: Swati, NoFirstName <S10@email.sc.edu>
Cc: pari-users <pari-users@pari.math.u-bordeaux.fr>
Subject: Re: Error in gp/code
 
Dear Swati,

I am very far for being an expert in parallel computation. Hove you tried:

comppar(a,p,m) = {
  my(mf = mfpow(mfDelta(), a));
  my(mf1 = mfinit(mf));
  my(H = mfhecke(mf1, mf, p));
  my(B=vector(a));
  B=parvector(a,i,mfcoef(H, i) % m);
  return(B);
}
}

Emmanuel


Emmanuel Royer
Professeur à l'Université Clermont Auvergne
https://royer.perso.math.cnrs.fr
----
Institut CNRS-Pauli
IRL2842
CNRS & Wolfgang Pauli Institut


De: "Swati, NoFirstName" <S10@email.sc.edu>
À: "pari-users" <pari-users@pari.math.u-bordeaux.fr>
Envoyé: Jeudi 28 Mars 2024 19:13:45
Objet: Error in gp/code

Hello,

I am trying to compute the coefficients of \Delta^{a} \mid T_{p} modulo an integer m, store them as a column vector, and return the same (Values of a and p are quite large). I tried writing the code for it but getting an error. 

// parfor: mt: attempt to change the value of the exported variable B.) 

I am not sure how to fix this. Could someone help in this regard?

Here is my code:

comp(a,p, m) = { 
mf = mfpow(mfDelta(), a); 
mf1 = mfinit(mf); 
B = Col(0,a); 
H = mfhecke(mf1, mf, p); 
export(B, H); 
parfor(i = 1, a, B[i] = mfcoef(H, i) % m); 
return(B);

Thanks,
Swati