Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Problem with Singular output for Maple 8 and later
Author Message
  Post subject:  A well working fix to this problem for Maple 8, 9, and 10  Reply with quote
Thank you to all for replying and suggesting a fix. I have found my own fix too: while Maple 8's "read" command produces the error I have described, Maple 8's "readline" command doesn't. So I am reading in output file Out.txt produced by Singular (both, 2-3-1 and 3-1-0) into Maple 8 without any problems now. It is read line by line and then put together.

I have now a very well working procedure that produces a link between Maple 8 - it also works in Maple 9, 9.5, and 10 - and either version of Singular for the purpose of computing Groebner basis in Singular and bringing it back into Maple. It is based somewhat on a similar procedure for connecting with Maple V in the "SINGULAR..." book. If anyone would be interested to try it, I would be glad to emila it or post it here, if it would be of interest to this group.

Thanks.

Rafal Ablamowicz
Post Posted: Mon Dec 19, 2005 4:40 pm
  Post subject:  fopen mode on windows  Reply with quote
Singular uses ftell/fseek,
so binary mode (unix line endings)
are needed for input files.
But for output files,
we will change the mode to
DOS-compatible in the next release.
Post Posted: Mon Dec 19, 2005 12:02 pm
  Post subject:   Reply with quote
You can use the tools

dos2unix and unix2dos

to change the line endings of files between the Windows and Unix ways.
Post Posted: Mon Dec 19, 2005 11:58 am
  Post subject:  Re: Problem with Singular output for Maple  Reply with quote
This is probably a problem with
line endings on Windows:
Windows uses control-m control-j (rn) as end of line.
Singular writes file in Unix mode:
control-j (n) as end of line
(it uses binary mode for opening files).
An explanation is given at:
http://cygwin.com/faq/faq.api.html#faq.api.cr-lf
Post Posted: Mon Dec 19, 2005 11:26 am
  Post subject:  Problem with Singular output for Maple 8 and later  Reply with quote
I am trying to call Singular 3-0-1 from Maple 8 and return result back to Maple 8. Problem is that when Singular writes to a text file that later will be read into Maple, it ends its output with a symbol that looks like [] in Notepad. Then, when using Maple's read command, Maple returns

on line 1, unexpected end of input

Error, while reading `C:/Maple8/Out.txt`

If I open my Out.txt file manually and replace that symbol with ; then Maple has no problem reading the file. I have written my version of SINGULARlink in maple 8 programming language based on a procedure from pages 546-547 in "A Singular Introduction to Commutative Algebra"

Does anyone have any suggestions how to get Singular to write ; instead of [] in its output file? I know very little how Singular works and would appreciate some suggestions how to modify its output.

Thanks.

Rafal Ablamowicz
[email protected]
Post Posted: Sat Dec 10, 2005 11:44 pm


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