Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: silent mode
PostPosted: Thu Nov 22, 2012 10:19 pm 
I want to execute Singular with an online command in silent mode. I ran a test with an online command and it works out fine, but still can not manage to run it in silent mode.

Thanks in advance

Cheers


Report this post
Top
  
Reply with quote  
 Post subject: Re: silent mode
PostPosted: Fri Nov 23, 2012 4:06 pm 

Joined: Wed Mar 03, 2010 5:08 pm
Posts: 108
Location: Germany, Münster
Is it this what you want?
Quote:
Do not print the start-up banner and messages when loading libraries.

Then start Singular by
Code:
Singular -q

See: 3.1.6 Command line options
http://www.singular.uni-kl.de/Manual/la ... .htm#SEC26


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: silent mode
PostPosted: Thu Nov 29, 2012 3:52 am 
I do not think so. We need a command similar to the C command which uses & to run programs

with no interruption. We are using Plural in computing a rank matrix and we have been thrown off

many times with no answer; we suspect it is the time limitation imposed by our server. Our administrator

tells us this is not and we have also checked the CPU porcentage of use of our computation and this

does not exceed a 2 to 3 % of the CPU. It is also funny that in computing the matrix with polinomial

entries when saving the matrix computation and recalling it back to save computation time with the


WRITE command it actually takes longer than it we compute it right at the moment and use it in

the program interactively. We in fact one to compute the rank of this matrix.

B. regards,


Report this post
Top
  
Reply with quote  
 Post subject: Re: silent mode
PostPosted: Thu Nov 29, 2012 1:15 pm 

Joined: Wed Mar 03, 2010 5:08 pm
Posts: 108
Location: Germany, Münster
To get some help, provide an example.
Otherwise it is not comprehensible what the problems are.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: silent mode
PostPosted: Thu Nov 29, 2012 9:54 pm 
Dear Gorzel:

The following is a toy model.

LIB "nctools.lib";
LIB "central.lib";
LIB "ring.lib";
LIB "linalg.lib";

// Define the ring
ring r0 = complex,(x1,x2),dp;
ring r1 = (0,t), (y1,y2), dp;
matrix C[2][2];
matrix D[2][2];
C[1,2]=1;
def S=nc_algebra(C,D);
setring S;S;
ideal Basis = PBW_eqDeg(1);

// Define a matrix for a linear transformation.
matrix A[2][2];
A[1,1]=1; A[1,2]=t^2; A[2,1]=t^2; A[2,2]=t^4;

int rankA = mat_rk(A);
write (":w rankA.m", rankA);

// Now generate the ideal of images.

ring r2 = 0, (z1,z2), dp;

fetchall(S);

poly h(1)= A[1,1]*z1 + A[1,2]*z2;
poly h(2)= A[2,1]*z1 + A[2,2]*z2;

map F = r0, h(1..2);

ideal Image = h(1..2);
module M = linearMapKernel(Image); M;
ideal K = linearCombinations(Basis, M); K;
write (".w K.m", K);

exit;


Now, we want to do the same, but the matrix we are working with is 2100 X 1001, so it seems to require a lot of memory. The system administrator suggest us to either try to run Singular using the 8 Cores of the machine (i.e. a parallel process) and /or run Singular in silent mode. To achieve the last goal we wrote a file, called toy-model.m, with the same instructions as above, and try to run it as Singular toy-model.m &
hopping for it to run at the background, without showing anything, just writing the answer in a file, but we fail...

Thanks in advance for your help.

PS. You can also see a previous note of october 2, 2009, posted also by Nieto, called vectorspace and relations, answered by
Oleksandr


Report this post
Top
  
Reply with quote  
 Post subject: Re: silent mode
PostPosted: Thu Nov 29, 2012 10:44 pm 

Joined: Wed Mar 03, 2010 5:08 pm
Posts: 108
Location: Germany, Münster
It is not clear to me what you mean by
Quote:
we have been thrown off many times with no answer;
we suspect it is the time limitation imposed by our server

How long did the computation run?

As far as I understand, you see the problem that displaying a huge
amount of data to stdout (say on the screen) slows down the computation.
So you decided to let it run in background mode,
hoping that it would then run faster. But writing a lot of data as ASCII
always takes time, also when you write it to a file.

Instead of using & for the background job you should do the following.

1.) Write a the beginning of your script (called toy-model.m) the command
echo =1;
2.) Erase all those lines which only display unnecessary output
(or put a // in front)
3.) It will be useful to put some short commands like
" Starting Step 1 ";

" Step 3 finished";

Then start Singular as a nohup job (this means: 'do not hang up')
Code:
nohup Singular toy-model.m > toy-model.log

Now you can logout from the computer but the job will run forever
unless somebody switches the machine off, or you will kill the job.

You may always login on the machine where you have started the job.
Calling the unixcommand top you will see the time, CPU, memory, and process ID of the job.

Moreover you can inspect with less or tail the file toy-model.log and
you will see at which stage the computation is.

Hope this helps. For questions concerning Plural, I am not the right
person, there Oleksandr (malex) may help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: silent mode
PostPosted: Wed Dec 19, 2012 7:12 pm 
Thanks Gorzel, it seems to work :-)


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 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