Emmanuel ROYER on Thu, 28 Mar 2024 21:03:00 +0100


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

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