Difference between revisions of "ApCoCoA-1:HowTo:Run ApCoCoA on a Computing Server"
Line 12: | Line 12: | ||
==Run ApCoCoA== | ==Run ApCoCoA== | ||
Go to the folder ApCoCoA-1.9.0. The contents in the folder are as follows. | Go to the folder ApCoCoA-1.9.0. The contents in the folder are as follows. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ===ApCoCoA with | + | [[Image:ApCoCoA_files.jpg]] |
+ | |||
+ | In the following, assume that you are working at the directory ApCoCoA-1.9.0/. | ||
+ | |||
+ | |||
+ | ===ApCoCoA with Text Interface=== | ||
Run the following command at terminal to start the ApCoCoA text interface. | Run the following command at terminal to start the ApCoCoA text interface. | ||
./apcocoa_text | ./apcocoa_text | ||
Line 43: | Line 27: | ||
[[Image:ApCoCoA_text1.jpg]] | [[Image:ApCoCoA_text1.jpg]] | ||
+ | |||
===ApCoCoAServer=== | ===ApCoCoAServer=== | ||
− | In many cases you also need to run the ApCoCoAServer. Here, | + | In many cases you also need to run the ApCoCoAServer. Here, assume that you have some terminal tools, like "screen", "tmux", etc., to create new terminal sessions, and that you are able to switch between terminal sessions without having to stop the running program. |
Create a new terminal session for the ApCoCoAServer and run the following command to start the ApCoCoAServer. | Create a new terminal session for the ApCoCoAServer and run the following command to start the ApCoCoAServer. | ||
Line 55: | Line 40: | ||
./ApCoCoAServer -p n | ./ApCoCoAServer -p n | ||
− | Now let us | + | Now let us switch to the terminal session for the ApCoCoA text interface again. Execute the following commands. |
+ | X:="xy"; | ||
+ | M:=["xxx","yxy","xyx"]; | ||
+ | NCo.IsFinite(X, M); -- Check whether <x,y>/<x^3,yxy,xyx> is finite | ||
+ | The function NCo.IsFinite uses the ApCoCoAServer. You will get the following result in the ApCoCoA text interface. | ||
+ | |||
+ | [[Image:ApCoCoA_text2.jpg]] | ||
+ | |||
+ | And you can see the following message in the terminal session for the ApCoCoAServer. | ||
+ | |||
+ | [[Image:ApCoCoA_Server1.jpg]] | ||
+ | |||
+ | |||
+ | ===ApCoCoA Program Files=== | ||
+ | If you want to reuse a long sequence of commands or some user-defined functions, it is convenient to put those commands and functions in some ApCoCoA program files as batch files and then ask ApCoCoA to process them when it starts. Here is how to do it. | ||
Revision as of 13:04, 19 June 2013
Introduction
This HowTo shows you how to run ApCoCoA on a Linux server with terminal.
Prerequisites
- Download ApCoCoA QT and unzip the file. (This HowTo takes ApCoCoA 1.9.0 as an example.)
wget http://www.apcocoa.org/download/apcocoa/linux-x86_64/apcocoa-1.9.0-QT-linux-x86_64.tgz tar xzvf apcocoa-1.9.0-QT-linux-x86_64.tgz
- Recommend to use a tool like "screen" (http://www.gnu.org/software/screen/screen.html) or "tmux" (http://tmux.sourceforge.net/) which allows you to run apcocoa(server) in the background, so that you can log off from the terminal session without having to stop the program.
Run ApCoCoA
Go to the folder ApCoCoA-1.9.0. The contents in the folder are as follows.
In the following, assume that you are working at the directory ApCoCoA-1.9.0/.
ApCoCoA with Text Interface
Run the following command at terminal to start the ApCoCoA text interface.
./apcocoa_text
You can run any (Ap)CoCoA command in this interface.
ApCoCoAServer
In many cases you also need to run the ApCoCoAServer. Here, assume that you have some terminal tools, like "screen", "tmux", etc., to create new terminal sessions, and that you are able to switch between terminal sessions without having to stop the running program.
Create a new terminal session for the ApCoCoAServer and run the following command to start the ApCoCoAServer.
./ApCoCoAServer
Observe that the ApCoCoAServer is running on the default port 49344 (0xc0c0). One can change the port number to n by using option -p as follows.
./ApCoCoAServer -p n
Now let us switch to the terminal session for the ApCoCoA text interface again. Execute the following commands.
X:="xy"; M:=["xxx","yxy","xyx"]; NCo.IsFinite(X, M); -- Check whether <x,y>/<x^3,yxy,xyx> is finite
The function NCo.IsFinite uses the ApCoCoAServer. You will get the following result in the ApCoCoA text interface.
And you can see the following message in the terminal session for the ApCoCoAServer.
ApCoCoA Program Files
If you want to reuse a long sequence of commands or some user-defined functions, it is convenient to put those commands and functions in some ApCoCoA program files as batch files and then ask ApCoCoA to process them when it starts. Here is how to do it.