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

Problems with optimised maxima in the pool #24

Open
ggschmidt opened this issue Jun 29, 2017 · 3 comments
Open

Problems with optimised maxima in the pool #24

ggschmidt opened this issue Jun 29, 2017 · 3 comments

Comments

@ggschmidt
Copy link

Hello
I can not solve my problems with optimised-maxima

I build an optimised maxima-image with

load("/var/lib/maximapool/2016122100/maximalocal.mac");
load("/var/lib/maximapool/2016122100/maxima/stackmaxima.mac");
load(stats);
load(distrib);
load(descriptive);
:lisp (si::save-system "/var/lib/maxima-optimised")  

without error messages (installed gcc before)

The maxima-image is four time-sized to the normal one

(on ubuntu and also on debain, as there is a unsolved problem with loading stats-modul on ubuntu 16.04 and 17.04)
actual I talk about Debain (using also gcl for maxima)

I can start maxima with
/usr/lib/..../maxima -eval '(cl-user::run)'
but then I get the response
Warning :argument a not recognized
I can not get rid of (as in another thread here).
After that maxima or opimised maxima work correct. In optimised I can evaluate
ATAlgEquiv(x^2-1,(x-1)*(x+1)); so stack-modules are loaded.

But I am not sure if the pool takes care about this first-line message (finally it does not work), so I start maxima and maxima_opimised with the script located in /usr/bin/
I modified the script, so I am able to start maxima or the optimised image.

when I use
su tomcat8
I can start via script the maxima-optimised an then evaluate

I get

Maxima restarted.

an then the prompt

(%i5) (does the pool care about the number??)

load("/var/lib/maximapool/2016122100/maximalocal.mac"); --> is ok (even this is not necessary anymore as it is already loaded in the image)
1+1; --> is ok
concat("--COMPLETED--k","ill--PROCESS--"); --> is ok
ATAlgEquiv(x^2-1,(x-1)*(x+1)); --> is ok, stack modules are loaded

everything seems as with "normal maxima" (stack loaded via localmac)

But when I do this via the Maxima-Pool Health test

Executing command-line: max_v3 (this is the version loading otpimised image)

Waiting for target text: '(%i1)'

Maxima restarted. (where does this come from?)

(%i5)

Timeout!

When I start the normal image everything is ok. (both health test, evaluating strings etc.)

###############
To solve my problems I really tried a lot.

But for example I can not unterstand the meaning of these lines following
e.g. is %ix replaced with the output of maxima, compared, simply written?
In the normal maxima I can write nonsens like xxx or yyy and it works. They seem to be without any effect.

Input the load command after this, if defined.

#process.started = Maxima restarted.
#maxima.ready.for.use = (%i5)
maxima.ready.for.use = Maxima restarted.
#maxima.ready.for.load = (%i1)

The process has loaded when this appears. On old versions of STACK use the fi$

#maxima.ready.for.use = Stack-Maxima started
#maxima.ready.for.use = STACK-Maxima started
#maxima.ready.for.load = xxxx
#maxima.ready.for.use = yyyy

Here some command lines I tried.
I could not find good answer for
Warning :argument a not recognized
As all google for maxima start options/command line ... ends in Maxima interactive documentation.

#command.line = /var/lib/maximapool/%%VERSION%%/maxima-optimised
#command.line = /var/lib/maximapool/2016122100/maxima
#command.line = /var/lib/max_opti/max_optimised -eval '(cl-user::run)' -f -- "$@"
#command.line = /var/lib/max_opti/max_optimised -eval '(cl-user::run)'
#command.line = /usr/lib/maxima/5.38.1/binary-gcl/maxima -eval '(cl-user::run)'
command.line = max_v3

Thanks for any help

@aharjula
Copy link
Member

Based on those random parameter names you have in your description I am not even sure which version you are using. 'process.started' is not used in the same version as 'maxima.ready.for.use', but if 'command.line' works you are most likely using the current multiple-pools branch.

But some details:

  1. The pool does not care about the number in '(%i1)' it matches the whole string in the cases of the parameters process.started and process.ready. The pool does not care if you are running Maxima or any other tool so it just looks for raw strings from the streams.
  2. The 'Maxima restarted.' comes from the restoring of the image, it should be normal. It is what we expect from the output, but for clarity we should use the '(%i5)' that follows it as the signal for deciding when the process has started.

Based on what little I have understood about the situation, use that 'max_v3' with the following parameters, in addition to the others, just place these to the end of the process.conf file or replace existing ones:

# This comes out when the process has started. And ready to receive the optional load command.
process.started = (%i5)
# If you want to load something in you can do so by giving the argument to the load command here, but then you must make sure that process.ready matches... uncomment these if you wish, but it should work even without these.
# extra.file = "/var/lib/maximapool/2016122100/maximalocal.mac"
# process.ready = (%i6)
# If you do not uncomment those you need to comment all lines declaring those from the file.
command.line = max_v3

I have no idea what this means:

But for example I can not unterstand the meaning of these lines following
e.g. is %ix replaced with the output of maxima, compared, simply written?
In the normal maxima I can write nonsens like xxx or yyy and it works. They seem to be without any effect.

Also if you are using version 2016122100 of STACK you really should upgrade, a new version should be released very soon and a big version bump is coming, there is an security issue although using MaximaPool does mitigate that issue.

@ggschmidt
Copy link
Author

ggschmidt commented Jun 29, 2017 via email

@aharjula
Copy link
Member

aharjula commented Jun 30, 2017

Now I have to test, if this (%o5) line will lead to a problem with the plugin??

No the STACK code does not care about the number in that prompt. It can be anything you want and it often changes due to variations in the libraries and other stuff loaded, in your case the number changes because the load statements you use in in creation of the image end with ; instead of $.

Now I inserted process.started = (%i5) to my process.conf, but I also need these strings uncommented.
If not, I get a timeout as before. In my opinion, in the optimised image these file should be already loaded and should not be necessary anymore ??

Sorry, I forgot the order of logic for those configs... this is how the logic of starting processes works, so if you want to not have any files loaded you can do it like this:

# If extra.file is non existent or false the start up logic just looks for process.ready, if it has a a value then we first look for process.started then load that file and then look for process.ready
extra.file = false
process.ready = (%i5)

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

No branches or pull requests

2 participants