Call_Maxima.hpp File Reference

Plans for the components reponsible for calling Maxima. More...

Go to the source code of this file.

Detailed Description

Plans for the components reponsible for calling Maxima.

Improve locality
  • No interference with user installations:
    1. We need to make sure that if a user has his own Maxima installation, then there is no interference.
    2. DONE Thus all files used and all files created by Maxima (itself) must reside in the Maxima installation directory.
    3. DONE Currently this is handled by redefining HOME.
    4. It would be good if this could be replaced by using the (new) command line option "--userdir=", however at least under Ecl and CLisp the file .maxima_history is not ruled by userdir (but just by the home-directory), and so yet we can not switch.
    5. Notify the Maxima mailing list about this bug (this should be the responsibility of rmaxima).
  • Automatic runs of Maxima shouldn't change the history:
    1. It seems that the maxima-executable itself doesn't manage the history, but it is rmaxima which does that.
    2. The history file is Installation_dir/.maxima_history.
    3. DONE This placement is achieved by resetting HOME.
    4. DONE (it seems that running rmaxima in batch-mode doesn't change the history) Testsystem-runs, and also other runs produced by scripts shouldn't interfere with the standard history.
    5. Confirm on the Maxima mailing-list that batch-mode doesn't interact with the history.
    6. Shouldn't we use for the testruns and other script-runs just the maxima-executable ?! It seems that rmaxima here is of no use.
    7. So the Maxima configuration-file should have "maxima_call_okl", which actually calls *maxima*, and "rmaxima_call_okl", which call rmaxima.
  • No interference of different invocations:
    1. We need to make sure that we can start several Maxima sessions via "oklib --maxima" without interferences with themselves or with a run of the Maxima test system. And furthermore several simultaneous runs of the test system should be possible.
    2. And finally (most important for experimentation), we need to run in parallel Maxima in batch-mode.
    3. The culprit is maxima-init.mac, which is written and then possibly corrupted (in the interval between writing of the file, and Maxima actually reading it) by these processes.
    4. See below on how to possibly handle this.
  • Set userdir:
    1. One handle on this initialisation file maxima-init.mac is given by the maxima-option "--userdir=". This directory is the first directory where to search for the initialisation-file.
    2. So the possibility is to create for each "run" a new userdir-directory.
    3. An oklib-invocation would be one run, one testsystem-run would be one run (just a single run for the whole test-run), and one batchmode-invocation would be one run.
    4. In this temporary userdir-directory a symbolic link to the .maxima/binary directory must be placed, to avoid recompilation of some of the packages each time.
    5. So we need special Maxima-calls for
      • ordinary usage
      • testsystem-runs
      • batch-mode
      Especially for the batch-mode we need further support to make it more convenient. And the testsystem-runs all just use one common directory for all the runs (however different invocations of the testsystem create different such directories).
    6. As said above, also for ordinary usage different directories are created, however they all share the same history (different from the other forms of Maxima-calls, which don't change history).
    7. The directory names should indicate the type of call plus a time stamp, now finer than a second, however still human-readable.
    8. These temporary directories need to be removed after usage.
  • Set init-mac:
    1. Maxima 5.23.2 has the option "--init-mac=<file>".
    2. Hopefully <file> can be a full path.
    3. So perhaps for each invocation a new variant of maxima-init.mac is to be created, like "maxima-init_1234.mac".
    4. This should be better than redefining userdir for each invocation (see above).
    5. One problem is that unsuccesful invocation might leave garbage initialisation-files.
    6. Another problem is how to pass the temporary value for "$(maxima_init_okl)" to the make-target run_maxima.
  • If we ever can get rid off redefining HOME, then we need to remember that the link to .Xauthority should then no longer be created.
Setting userdir
  • The current setting "HOME=$(maxima_homedir_okl)" should likely be replaced by the option "--userdir=$(maxima_homedir_okl)".
  • With "maxima_homedir_okl ?= $(maxima_installation_dir_okl)/.maxima".
  • Compare "Improve locality" above.

Definition in file Call_Maxima.hpp.