This package allows the user to run a Macaulay2 function in a brand-new instance of Macaulay2, wait for the instance to finish, and automatically retrieve any results. This is primarily done with the runExternalM2 function.
One of the main purposes of this package is to allow the use of operating system features (e.g., ulimit on Unix-like systems) to restrict the resources (e.g., memory, running time) that the Macaulay2 function is allowed to use; see resource limits. This is particularly useful if you want a computation to give up after a certain amount of time, as an alternative to using alarm and try.
For example, suppose you want to find an example of an ideal that has a particular property, and the time required to check for this property can vary enormously. First write a Macaulay2 function foo() that generates a random ideal I and checks whether I has this property. Then use a loop to repeatedly call foo() using runExternalM2, with a time limit of 20 seconds, until such an ideal is found; now let it run overnight.
For examples, please see runExternalM2 or suggestions for using RunExternalM2.
This documentation describes version 0.83 of RunExternalM2.
The source code from which this documentation is derived is in the file RunExternalM2.m2.
The object RunExternalM2 is a package.