Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: tracking normal to find out where/why it is hanging
PostPosted: Mon Dec 08, 2014 9:36 pm 

Joined: Mon Jan 31, 2011 9:50 pm
Posts: 12
LIB "normal.lib";
ring r=2,(y,x),wp(37,31);
ideal i=y31+y12x17+x37;
list nor=normal(i);nor;

has been running for maybe 200 hours (3.7 GB),
on this problem that can almost be done by hand.
It takes my QthPower algorithm maybe 9 seconds in M2.
How can I rerun this and trace what is taking so much time?
[I assume it is a kernel computation, though it could be a GB computation.]


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: tracking normal to find out where/why it is hanging
PostPosted: Tue Dec 09, 2014 11:45 am 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
To find out where it is hanging: press ctrl-c and you will be asked
Code:
// ** Interrupt at cmd:`$INVALID$` in line:'        iwork=phi(iwork);'
abort after this command(a), abort immediately(r), print backtrace(b), continue(c) or quit Singular(q) ?

Answering with b presents the backtrace.
The problem here is that the routine simplifyIdeal from primdec.lib
does not work in char 2.
To fix it, substitute simplifyIdeal by
Code:
static proc simplifyIdeal(ideal i)
{
  ASSUME(1, hasFieldCoefficient(basering) );
  ASSUME(1, not isQuotientRing(basering) ) ;
  ASSUME(1, hasGlobalOrdering(basering) ) ;

  def r=basering;

  int j,k;
  map phi;
  poly p;

  ideal iwork=i;
  ideal imap1=maxideal(1);
  ideal imap2=maxideal(1);

  if (char(r)!=2)
  {
  for(j=1;j<=nvars(basering);j++)
  {
    for(k=1;k<=ncols(i);k++)
    {
      if(deg(iwork[k]/var(j))==0)
      {
        p=-1/leadcoef(iwork[k]/var(j))*iwork[k];
        imap1[j]=p+2*var(j);
        phi=r,imap1;
        iwork=phi(iwork);
        iwork=subst(iwork,var(j),0);
        iwork[k]=var(j);
        imap1=maxideal(1);
        imap2[j]=-p;
        break;
      }
    }
  }
  }
  return(iwork,imap2);
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: tracking normal to find out where/why it is hanging
PostPosted: Tue Dec 09, 2014 5:00 pm 

Joined: Mon Jan 31, 2011 9:50 pm
Posts: 12
Well I tried ctrl-c,
then ctrl-c ctrl-c gives me only the choices
(a)bort current command, (q)uit, (r)estart Singular or (c)ontinue?

Then I tried this in Singular instead of ESingular to finally get the print backtrace(b) option.

But this seems to be characteristic independent.

ring r=0,(y,x),dp;
ideal i=y31+y12x17-2y6x27+x37;
list nor=normal(i);nor;

seems to hang at the same command

iwork=phi(iwork)


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: tracking normal to find out where/why it is hanging
PostPosted: Thu Dec 11, 2014 5:59 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
True, the problem was that the simplification was using larger and larger maps
which led to huge computation times.
A re-ordering of the variables to consider for simplifications helps
(independend of characateristic).
Get a new primdec.lib from
[url]
https://github.com/Singular/Sources/blo ... rimdec.lib
[/url]


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: tracking normal to find out where/why it is hanging
PostPosted: Tue Dec 30, 2014 9:08 pm 

Joined: Mon Jan 31, 2011 9:50 pm
Posts: 12
Is there now a bug in primdec.lib with something such as changeordTo?
Try the example for given integralBasis to see if you get the same error I did.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: tracking normal to find out where/why it is hanging
PostPosted: Wed Dec 31, 2014 1:23 pm 

Joined: Wed May 25, 2005 4:16 pm
Posts: 275
The example given above does not lead to an error.
But the development continues: now the new primdec.lib requires also
the new version of ring.lib for changeordTo.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

It is currently Fri May 13, 2022 11:02 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group