CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
1
2
\Chapter{Installation}
3
4
This package provides an interface between {\GAP} and PARI/GP.
5
PARI/GP itself is not part of this package. It has to be obtained and
6
installed independently of this package. {\Alnuth} works with PARI/GP
7
Version 2.5 or higher.
8
9
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
\Section{Installing Alnuth}
11
12
The package {\Alnuth} is part of the standard distribution of {\GAP} so that
13
in most cases there is no need to install it separately. To use {\Alnuth}
14
you need to have PARI/GP installed. See the following section for
15
information on PARI/GP.
16
17
In case you want to update {\Alnuth} independently of your main {\GAP}
18
installation or if you are interested in an old version of {\Alnuth}
19
interfacing to KANT/KASH you can find all released versions of {\Alnuth}
20
at the package's homepage
21
\URL{http://www.icm.tu-bs.de/ag_algebra/software/Alnuth/}
22
23
in the form of gzipped tar-archives or as uncompressed tar-archives,
24
and starting with Version 3.0.0 also as zip archives for Windows. The
25
main page always contains the latest version of {\Alnuth}, while older
26
versions can be found under `Archives'.
27
28
There are two ways of installing a {\GAP} package. If you have
29
permission to add files to the installation of {\GAP} on your system
30
you may install {\Alnuth} into the `pkg' subdirectory of the {\GAP}
31
installation tree. Otherwise you may install {\Alnuth} in a private
32
`pkg' directory (for details see Subsections "ref:Installing a GAP
33
Package" and "ref:GAP Root Directories" in the {\GAP} reference manual).
34
35
To install the latest version of {\Alnuth} under Linux download one of
36
the archives `alnuth.tar' and `alnuth.tar.gz', move it to the
37
directory `pkg' in which you want to install, and unpack the
38
archive. If you are using the command line you can unpack the former
39
with the command `tar xf alnuth.tar', respectively `tar xzf
40
alnuth.tar.gz' for the gzipped tar-archive.
41
42
For installation under Windows download the archive `alnuth-win.zip',
43
move it to the `pkg' directory in which you want to install, and
44
extract the archive (If you right click on the archive there should
45
appear a menu containing the entry `Extract here'.).
46
47
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48
\Section{Getting PARI/GP}
49
50
Using {\Alnuth} requires an installation of PARI/GP in Version 2.5 or
51
higher. The software PARI/GP is freely available at
52
\URL{http://pari.math.u-bordeaux.fr/}
53
54
Note that the place where PARI/GP is located in your system is
55
independent of the place where {\Alnuth} is installed.
56
57
\beginlist
58
\item{\bf a.}
59
{\bf Installing under Linux}
60
61
In many Linux distributions PARI/GP can be installed via the software
62
package manager, but this might sometimes be an older version which
63
cannot be used together with {\Alnuth}. (Starting GP from the command line
64
with the option `--version-short' will show you the version number.)
65
66
If you install PARI/GP from source make sure you install with GMP
67
support for better performance and complete the installation with
68
`make install' so that you can start GP by just calling `gp' from the
69
command line.
70
71
\item{\bf b.}
72
{\bf Installing under Windows}
73
74
For Windows it is sufficient to get the basic GP binary which can be found at
75
\URL{http://pari.math.u-bordeaux.fr/download.html}
76
\endlist
77
78
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79
\Section{Adjust the path of the executable for GP}
80
81
This package needs to know where the executable for GP is. In the
82
default setting {\Alnuth} looks for an executable program named `gp' in
83
the search paths of the system. More precisely, for a file `gp' inside
84
one of the directories in the list returned by
85
`DirectoriesSystemPrograms()' (called in a {\GAP} session).
86
87
Under Linux the default setting should work with a standard
88
installation of PARI/GP.
89
90
For the default setting to work under Windows the downloaded
91
executable file, for example `gp-2-5-0.exe' has to be renamed to
92
`gp.exe' and moved to one of the directories listed by
93
`DirectoriesSystemPrograms()' (Ignore the leading `cygdrive' in each
94
path name and note that the single letter specifies the drive, for
95
example `/cygdrive/c/Windows/' denotes the folder `Windows' on drive
96
`C:').
97
98
To check whether an executable of GP in Version 2.5 or higher is
99
available with the default setting, you can use the function
100
\> PariVersion( )
101
102
which prints the verion number, if the global variable `AL_EXECUTABLE'
103
is bound to the file name of a GP executable.
104
105
If you cannot use the default setting for you purpose, you have
106
two options to specify a new place and name for the GP executable.
107
108
If you are able to edit the file `defs.g' in the main directory of
109
{\Alnuth}, then you can change the line
110
\beginexample
111
BindGlobal("AL_EXECUTABLE", Filename(DirectoriesSystemPrograms(), "gp"));
112
\endexample
113
to something like
114
\beginexample
115
BindGlobal("AL_EXECUTABLE", "/home/my/pari-2.5.0/gp");
116
\endexample
117
under Linux or
118
\beginexample
119
BindGlobal("AL_EXECUTABLE", "/cygdrive/c/Users/my/Downloads/gp-2-5-0");
120
\endexample
121
under Windows, where the second argument gives the path to the GP
122
executable you want to use (Change the strings given above to reflect
123
the actual path on your system.). Please note that in case of a new
124
installation of {\Alnuth} you will have to change `defs.g' again.
125
126
Alternatively you can also change your personal `gaprc' file (see
127
the Subsection "ref:The gaprc file" in the {\GAP} reference manual)
128
for setting the variable AL_EXECUTABLE to a proper value. To do this
129
add the appropriate line from above with the `BindGlobal' command to
130
`gaprc'.
131
132
The third possibility is to change the path to the GP executable from
133
within {\GAP} using one of the following two functions. To do this you
134
first have to load the package (see Section "Loading and testing the
135
package").
136
\> SetAlnuthExternalExecutable( <path> )
137
138
adjusts the global variable `AL_EXECUTABLE' for the current {\GAP}
139
session. Depending on your installation of PARI/GP and your operating
140
system the string <path> has to be either the command to start GP in a
141
terminal (for example `gp') or the complete path to the executable of GP
142
(for example `/cygwindrive/c/windows/gp'). The function returns `fail'
143
if <path> does not execute GP in Version 2.5.0 or higher.
144
145
To make the change take effect for all of your {\GAP} sessions, you can
146
add `SetKantExecutable' with the path to the GP executable as argument
147
to your personal `gaprc' file (see the Subsection "ref:The gaprc file"
148
in the {\GAP} reference manual).
149
150
If you want the change to affect all {\GAP} session of all users of the
151
{\GAP} installation you can use the following function:
152
\> SetAlnuthExternalExecutablePermanently( <path> )
153
154
does the same as `SetAlnuthExternalExecutable' and in addition trys to
155
change the file `defs.g' accordingly in the currently loaded version
156
of {\Alnuth}. A warning is issued if there is no write access to `defs.g'
157
from the current {\GAP} session.
158
159
\> RestoreAlnuthExternalExecutable( )
160
161
trys to restore the original content of the file `defs.g' in the
162
directory corresponding to the loaded version of {\Alnuth}. The function
163
returns `fail' if there is no write access to `defs.g'
164
from the current {\GAP} session.
165
166
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167
\Section{Loading and testing the package}
168
169
If {\Alnuth} is not loaded when GAP is started you have to request it
170
explicitly to use it. This is done by calling `LoadPackage("Alnuth");'
171
in a GAP session. If {\Alnuth} had not been loaded already a short
172
banner will be displayed.
173
174
\beginexample
175
gap> LoadingPackage("alnuth");
176
Loading Alnuth 3.0.0 ...
177
true
178
gap>
179
\endexample
180
To load a certain version of Alnuth you can specify the version number as
181
second argument in the call to `LoadPackage'. (See `77.2 Loading a GAP
182
package' in the reference manual or type `?LoadPackage' within a GAP session).
183
184
Once the package is loaded, it is possible to check the correct installation
185
running a short test by calling `ReadPackage("Alnuth",
186
"tst/testinstall.tst");'.
187
188
\beginexample
189
gap> ReadPackage("Alnuth", "tst/testinstall.g");
190
Line 5 :
191
+ Test availability and version of PARI/GP
192
Line 5 :
193
+ GAP4stones: 25000
194
Line 85 :
195
+ Installation test of Alnuth package
196
Line 85 :
197
+ GAP4stones: 609
198
true
199
gap>
200
\endexample
201
202
The number of GAP4stones will usually differ; other discrepancies in the
203
output indicate some problem.
204
205
If the test suite runs into an error in the first part, which verifies the
206
availability of PARI/GP, check your installation of PARI/GP and consult the
207
last chapter of the documentation of Alnuth for more information.
208
209
If you find any bugs or have any suggestions or comments, we would very much
210
appreciate it if you would let us know by writing to `a.distler(at)tu-bs.de'.
211
212