Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Singular doctest error on OpenSolaris #12687

Closed
jdemeyer opened this issue Mar 18, 2012 · 15 comments
Closed

Fix Singular doctest error on OpenSolaris #12687

jdemeyer opened this issue Mar 18, 2012 · 15 comments

Comments

@jdemeyer
Copy link

The following is caused by #10296. On hawk (OpenSolaris 06.2009-32):

sage -t  --long -force_lib devel/sage/sage/interfaces/expect.py
**********************************************************************
File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/devel/sage-main/sage/interfaces/expect.py", line 717:
    sage: singular._eval_line_using_file('def a=3;', restart_if_needed=False)
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: Singular terminated unexpectedly while reading in a large line
Got:
    Traceback (most recent call last):
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_15[8]>", line 1, in <module>
        singular._eval_line_using_file('def a=3;', restart_if_needed=False)###line 717:
    sage: singular._eval_line_using_file('def a=3;', restart_if_needed=False)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/lib/python/site-packages/sage/interfaces/expect.py", line 768, in _eval_line_using_file
        raise RuntimeError, '%s terminated unexpectedly while reading in a large line:\n%s'%(self,msg[0])
    RuntimeError: Singular terminated unexpectedly while reading in a large line:
    [Errno 22] Invalid argument
    Error evaluating < "/tmp/dot_so48.icq/temp/hawk/8451//interface//tmp8749"; in Singular
**********************************************************************
File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/devel/sage-main/sage/interfaces/expect.py", line 839:
    sage: singular._eval_line_using_file('def a=3;', restart_if_needed=False)
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: Singular terminated unexpectedly while reading in a large line
Got:
    Traceback (most recent call last):
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/ncadoctest.py", line 1231, in run_one_test
        self.run_one_example(test, example, filename, compileflags)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/sagedoctest.py", line 38, in run_one_example
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/bin/ncadoctest.py", line 1172, in run_one_example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_16[14]>", line 1, in <module>
        singular._eval_line_using_file('def a=3;', restart_if_needed=False)###line 839:
    sage: singular._eval_line_using_file('def a=3;', restart_if_needed=False)
      File "/export/home/buildbot/build/sage/hawk-1/hawk_full/build/sage-5.0.beta8/local/lib/python/site-packages/sage/interfaces/expect.py", line 768, in _eval_line_using_file
        raise RuntimeError, '%s terminated unexpectedly while reading in a large line:\n%s'%(self,msg[0])
    RuntimeError: Singular terminated unexpectedly while reading in a large line:
    [Errno 22] Invalid argument
    Error evaluating < "/tmp/dot_so48.icq/temp/hawk/8451//interface//tmp8806"; in Singular
**********************************************************************

CC: @simon-king-jena

Component: interfaces

Author: Jeroen Demeyer

Reviewer: Simon King

Merged: sage-5.0.beta11

Issue created by migration from https://trac.sagemath.org/ticket/12687

@simon-king-jena
Copy link
Member

comment:1

Can you remind me how I can access the skynet machines? t2 seems to be unavailable.

And what is needed to do in order to build Sage on OpenSolaris? IIRC, one needs to set some environment variables.

@williamstein
Copy link
Contributor

comment:2

Replying to @simon-king-jena:

Can you remind me how I can access the skynet machines? t2 seems to be unavailable.

We turned t2 off again because the UPS's in the math server room were dying after the power outage, and t2 draws quite a lot of power. They are still not happy. We probably won't be able to turn t2 on until we buy new UPS's. The sysadmins are working with a company (APS) to get an estimate done.

To connect to skynet, connect to sage.math or boxen.math then ssh to skynet, e.g.,

   ssh skynet

And what is needed to do in order to build Sage on OpenSolaris? IIRC, one needs to set some environment variables.

I don't think we have any OpenSolaris installs anywhere right now. ?

@simon-king-jena
Copy link
Member

comment:3

Replying to @williamstein:

To connect to skynet, connect to sage.math or boxen.math then ssh to skynet, e.g.,

   ssh skynet

Thank you!

I don't think we have any OpenSolaris installs anywhere right now. ?

Then how can it be claimed that #10296 results in a doctest error on OpenSolaris??

@williamstein
Copy link
Contributor

comment:4

Replying to @simon-king-jena:

I don't think we have any OpenSolaris installs anywhere right now. ?

Then how can it be claimed that #10296 results in a doctest error on OpenSolaris??

Sorry, by "we" I meant "I". The machine "hawk" is in David Kirkby's house, I think. It has nothing to do with skynet or the sage.math cluster.

@simon-king-jena
Copy link
Member

comment:5

Replying to @williamstein:

To connect to skynet, connect to sage.math or boxen.math then ssh to skynet, e.g.,

   ssh skynet

Too bad. I do have a skynet account (I have already built sage on some of the skynet machines), but apparently I can not recall my login data.

I am quite puzzled about that error. It seems to me that the patch does work, even on Solaris. Note that in the failing doc test, it is expected that a RuntimeError be raised with the error message Singular terminated unexpectedly while reading in a large line, and in fact it is raised.

However, on OpenSolaris, but apparently not on other machines, it seems that the underlying error in Singular is displayed as well. Any idea why?

@jdemeyer
Copy link
Author

comment:6

Well, #10296 has several code paths to raise the exception. In some cases, the singular error message is added, in other cases not. I don't think this is a big deal. I would be happy to solve this using "..."

@simon-king-jena
Copy link
Member

comment:7

Replying to @jdemeyer:

Well, #10296 has several code paths to raise the exception. In some cases, the singular error message is added, in other cases not. I don't think this is a big deal. I would be happy to solve this using "..."

You mean these lines?

sage/interfaces/expect.py

diff --git a/sage/interfaces/expect.py b/sage/interfaces/expect.py

 	735	            elif restart_if_needed==True: # the subprocess might have crashed 
 	736	                try: 
 	737	                    self._synchronize() 
 	738	                    return self._post_process_from_file(self._eval_line_using_file(line, restart_if_needed=False)) 
 	739	                except RuntimeError, msg: 
 	740	                    raise RuntimeError, '%s terminated unexpectedly while reading in a large line:\n%s'%(self,msg[0]) 
 	741	                except TypeError: 
 	742	                    pass 
659	743	            raise RuntimeError, '%s terminated unexpectedly while reading in a large line'%self 

That would mean: On some machines Singular raises a RuntimeError, while in the same setting on OpenSolaris it is raising a TypeError. Odd.

@simon-king-jena
Copy link
Member

comment:8

Replying to @simon-king-jena:

That would mean: On some machines Singular raises a RuntimeError, while in the same setting on OpenSolaris it is raising a TypeError. Odd.

The other way around, I mean.

@jdemeyer
Copy link
Author

Attachment: 12687_singular_opensolaris.patch.gz

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@simon-king-jena
Copy link
Member

comment:10

I can not test on openSolaris. But just for the record: The patch looks ok to me, as we have seen that the only difference was what kind of error Singular raises.

@jdemeyer
Copy link
Author

Reviewer: Simon King

@jdemeyer
Copy link
Author

comment:11

Replying to @simon-king-jena:

The patch looks ok to me, as we have seen that the only difference was what kind of error Singular raises.

So, positive_review then?

@simon-king-jena
Copy link
Member

comment:12

Replying to @jdemeyer:

Replying to @simon-king-jena:

The patch looks ok to me, as we have seen that the only difference was what kind of error Singular raises.

So, positive_review then?

Well, I can not test on openSolaris. From that perspective, I am not entitled to review it. I can only say that it looks ok. If the build bot does not complain, it is a positive review.

@jdemeyer
Copy link
Author

Merged: sage-5.0.beta11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants