1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
|
<html><head><title>[Alnuth] 4 Installation</title></head>
<body text="#000000" bgcolor="#ffffff">
[<a href = "chapters.htm">Up</a>] [<a href ="CHAP003.htm">Previous</a>] [<a href = "theindex.htm">Index</a>]
<h1>4 Installation</h1><p>
<P>
<H3>Sections</H3>
<oL>
<li> <A HREF="CHAP004.htm#SECT001">Installing Alnuth</a>
<li> <A HREF="CHAP004.htm#SECT002">Getting PARI/GP</a>
<li> <A HREF="CHAP004.htm#SECT003">Adjust the path of the executable for GP</a>
<li> <A HREF="CHAP004.htm#SECT004">Loading and testing the package</a>
</ol><p>
<p>
This package provides an interface between <font face="Gill Sans,Helvetica,Arial">GAP</font> and PARI/GP.
PARI/GP itself is not part of this package. It has to be obtained and
installed independently of this package. <font face="Gill Sans,Helvetica,Arial">Alnuth</font> works with PARI/GP
Version 2.5 or higher.
<p>
<p>
<h2><a name="SECT001">4.1 Installing Alnuth</a></h2>
<p><p>
The package <font face="Gill Sans,Helvetica,Arial">Alnuth</font> is part of the standard distribution of <font face="Gill Sans,Helvetica,Arial">GAP</font> so that
in most cases there is no need to install it separately. To use <font face="Gill Sans,Helvetica,Arial">Alnuth</font>
you need to have PARI/GP installed. See the following section for
information on PARI/GP.
<p>
In case you want to update <font face="Gill Sans,Helvetica,Arial">Alnuth</font> independently of your main <font face="Gill Sans,Helvetica,Arial">GAP</font>
installation or if you are interested in an old version of <font face="Gill Sans,Helvetica,Arial">Alnuth</font>
interfacing to KANT/KASH you can find all released versions of <font face="Gill Sans,Helvetica,Arial">Alnuth</font>
in the form of gzipped tar-archives at
<a href="https://github.com/gap-packages/alnuth/releases">https://github.com/gap-packages/alnuth/releases</a>
<p>
There are two ways of installing a <font face="Gill Sans,Helvetica,Arial">GAP</font> package. If you have
permission to add files to the installation of <font face="Gill Sans,Helvetica,Arial">GAP</font> on your system
you may install <font face="Gill Sans,Helvetica,Arial">Alnuth</font> into the <code>pkg</code> subdirectory of the <font face="Gill Sans,Helvetica,Arial">GAP</font>
installation tree. Otherwise you may install <font face="Gill Sans,Helvetica,Arial">Alnuth</font> in a private
<code>pkg</code> directory (for details see Subsections <a href="../../../doc/ref/chap76.html#X82473E4B8756C6CD">Installing a GAP Package</a> and <a href="../../../doc/ref/chap9.html#X7A4973627A5DB27D">GAP Root Directories</a> in the <font face="Gill Sans,Helvetica,Arial">GAP</font> reference manual).
<p>
To install the latest version of <font face="Gill Sans,Helvetica,Arial">Alnuth</font> download one of
the archives <code>alnuth.tar.gz</code>, move it to the
directory <code>pkg</code> in which you want to install, and unpack the
archive. If you are using the command line you can unpack with the
command <code>tar xzf alnuth.tar.gz</code>.
<p>
<p>
<h2><a name="SECT002">4.2 Getting PARI/GP</a></h2>
<p><p>
Using <font face="Gill Sans,Helvetica,Arial">Alnuth</font> requires an installation of PARI/GP in Version 2.5 or
higher. The software PARI/GP is freely available at
<a href="https://pari.math.u-bordeaux.fr/">https://pari.math.u-bordeaux.fr/</a>
<p>
Note that the place where PARI/GP is located in your system is
independent of the place where <font face="Gill Sans,Helvetica,Arial">Alnuth</font> is installed.
<p>
<dl compact>
<dt>(a)<dd>
<strong>Installing under Linux</strong>
<p>
In many Linux distributions PARI/GP can be installed via the software
package manager, but this might sometimes be an older version which
cannot be used together with <font face="Gill Sans,Helvetica,Arial">Alnuth</font>. (Starting GP from the command line
with the option <code>--version-short</code> will show you the version number.)
<p>
If you install PARI/GP from source make sure you install with GMP
support for better performance and complete the installation with
<code>make install</code> so that you can start GP by just calling <code>gp</code> from the
command line.
<p>
<dt>(b)<dd>
<strong>Installing under Windows</strong>
<p>
For Windows it is sufficient to get the basic GP binary which can be found at
<a href="https://pari.math.u-bordeaux.fr/download.html">https://pari.math.u-bordeaux.fr/download.html</a>
</dl>
<p>
<p>
<h2><a name="SECT003">4.3 Adjust the path of the executable for GP</a></h2>
<p><p>
This package needs to know where the executable for GP is. In the
default setting <font face="Gill Sans,Helvetica,Arial">Alnuth</font> looks for an executable program named <code>gp</code> in
the search paths of the system. More precisely, for a file <code>gp</code> inside
one of the directories in the list returned by
<code>DirectoriesSystemPrograms()</code> (called in a <font face="Gill Sans,Helvetica,Arial">GAP</font> session).
<p>
Under Linux the default setting should work with a standard
installation of PARI/GP.
<p>
For the default setting to work under Windows the downloaded
executable file, for example <code>gp-2-5-0.exe</code> has to be renamed to
<code>gp.exe</code> and moved to one of the directories listed by
<code>DirectoriesSystemPrograms()</code> (Ignore the leading <code>cygdrive</code> in each
path name and note that the single letter specifies the drive, for
example <code>/cygdrive/c/Windows/</code> denotes the folder <code>Windows</code> on drive
<code>C:</code>).
<p>
To check whether an executable of GP in Version 2.5 or higher is
available with the default setting, you can use the function
<a name = "SSEC003.1"></a>
<li><code>PariVersion( )</code>
<p>
which prints the verion number, if the global variable <code>AL_EXECUTABLE</code>
is bound to the file name of a GP executable.
<p>
If you cannot use the default setting for you purpose, you have
two options to specify a new place and name for the GP executable.
<p>
If you are able to edit the file <code>defs.g</code> in the main directory of
<font face="Gill Sans,Helvetica,Arial">Alnuth</font>, then you can change the line
<pre>
BindGlobal("AL_EXECUTABLE", Filename(DirectoriesSystemPrograms(), "gp"));
</pre>
to something like
<pre>
BindGlobal("AL_EXECUTABLE", "/home/my/pari-2.5.0/gp");
</pre>
under Linux or
<pre>
BindGlobal("AL_EXECUTABLE", "/cygdrive/c/Users/my/Downloads/gp-2-5-0");
</pre>
under Windows, where the second argument gives the path to the GP
executable you want to use (Change the strings given above to reflect
the actual path on your system.). Please note that in case of a new
installation of <font face="Gill Sans,Helvetica,Arial">Alnuth</font> you will have to change <code>defs.g</code> again.
<p>
Alternatively you can also change your personal <code>gaprc</code> file (see
the Subsection <a href="../../../doc/ref/chap3.html#X84D4CF587D437C00">The gaprc file</a> in the <font face="Gill Sans,Helvetica,Arial">GAP</font> reference manual)
for setting the variable AL_EXECUTABLE to a proper value. To do this
add the appropriate line from above with the <code>BindGlobal</code> command to
<code>gaprc</code>.
<p>
The third possibility is to change the path to the GP executable from
within <font face="Gill Sans,Helvetica,Arial">GAP</font> using one of the following two functions. To do this you
first have to load the package (see Section <a href="CHAP004.htm#SECT004">Loading and testing the package</a>).
<a name = "SSEC003.2"></a>
<li><code>SetAlnuthExternalExecutable( </code><var>path</var><code> )</code>
<p>
adjusts the global variable <code>AL_EXECUTABLE</code> for the current <font face="Gill Sans,Helvetica,Arial">GAP</font>
session. Depending on your installation of PARI/GP and your operating
system the string <var>path</var> has to be either the command to start GP in a
terminal (for example <code>gp</code>) or the complete path to the executable of GP
(for example <code>/cygwindrive/c/windows/gp</code>). The function returns <code>fail</code>
if <var>path</var> does not execute GP in Version 2.5.0 or higher.
<p>
To make the change take effect for all of your <font face="Gill Sans,Helvetica,Arial">GAP</font> sessions, you can
add <code>SetKantExecutable</code> with the path to the GP executable as argument
to your personal <code>gaprc</code> file (see the Subsection <a href="../../../doc/ref/chap3.html#X84D4CF587D437C00">The gaprc file</a>
in the <font face="Gill Sans,Helvetica,Arial">GAP</font> reference manual).
<p>
If you want the change to affect all <font face="Gill Sans,Helvetica,Arial">GAP</font> session of all users of the
<font face="Gill Sans,Helvetica,Arial">GAP</font> installation you can use the following function:
<a name = "SSEC003.3"></a>
<li><code>SetAlnuthExternalExecutablePermanently( </code><var>path</var><code> )</code>
<p>
does the same as <code>SetAlnuthExternalExecutable</code> and in addition trys to
change the file <code>defs.g</code> accordingly in the currently loaded version
of <font face="Gill Sans,Helvetica,Arial">Alnuth</font>. A warning is issued if there is no write access to <code>defs.g</code>
from the current <font face="Gill Sans,Helvetica,Arial">GAP</font> session.
<p>
<a name = "SSEC003.4"></a>
<li><code>RestoreAlnuthExternalExecutable( )</code>
<p>
trys to restore the original content of the file <code>defs.g</code> in the
directory corresponding to the loaded version of <font face="Gill Sans,Helvetica,Arial">Alnuth</font>. The function
returns <code>fail</code> if there is no write access to <code>defs.g</code>
from the current <font face="Gill Sans,Helvetica,Arial">GAP</font> session.
<p>
<p>
<h2><a name="SECT004">4.4 Loading and testing the package</a></h2>
<p><p>
If <font face="Gill Sans,Helvetica,Arial">Alnuth</font> is not loaded when GAP is started you have to request it
explicitly to use it. This is done by calling <code>LoadPackage("Alnuth");</code>
in a GAP session. If <font face="Gill Sans,Helvetica,Arial">Alnuth</font> had not been loaded already a short
banner will be displayed.
<p>
<pre>
gap> LoadingPackage("alnuth");
Loading Alnuth 3.2.1 (Algebraic number theory and an interface to PARI/GP)
by Bjoern Assmann,
Andreas Distler (a.distler@tu-bs.de), and
Bettina Eick (http://www.iaa.tu-bs.de/beick).
maintained by:
The GAP Team (support@gap-system.org).
Homepage: https://gap-packages.github.io/alnuth
Report issues at https://github.com/gap-packages/alnuth/issues
true
gap>
</pre>
To load a certain version of Alnuth you can specify the version number as
second argument in the call to <code>LoadPackage</code>. (See <code>77.2 Loading a GAP
package</code> in the reference manual or type <code>?LoadPackage</code> within a GAP session).
<p>
Once the package is loaded, it is possible to check the correct installation
running a short test by calling <code>ReadPackage("Alnuth",
"tst/testinstall.tst");</code>.
<p>
<pre>
gap> ReadPackage("Alnuth", "tst/testinstall.g");
Architecture: aarch64-apple-darwin21.4.0-default64-kv8
testing: GAPROOT/pkg/alnuth/tst/ALNUTH.tst
66 ms (33 ms GC) and 11.0MB allocated for GAPROOT/pkg/alnuth/tst/ALNUTH.tst
testing: GAPROOT/pkg/alnuth/tst/version.tst
21 ms (21 ms GC) and 29.6KB allocated for GAPROOT/pkg/alnuth/tst/version.tst
-----------------------------------
total 87 ms (54 ms GC) and 11.0MB allocated
0 failures in 2 files
#I No errors detected while testing
gap>
</pre>
<p>
The architecture, timings and memory usage will usually differ; other
discrepancies in the output indicate some problem.
<p>
If the test suite runs into an error in the first part, which verifies the
availability of PARI/GP, check your installation of PARI/GP and consult the
last chapter of the documentation of Alnuth for more information.
<p>
If you find any bugs or have any suggestions or comments, we would very much
appreciate it if you would let us know by submitting an issue at the Alnuth
issue tracker on GitHub <a href="https://github.com/gap-packages/alnuth/issues">https://github.com/gap-packages/alnuth/issues</a>
<p>
or by writing an mail to <a href="mailto:support@gap-system.org">support@gap-system.org</a>.
<p>
[<a href = "chapters.htm">Up</a>] [<a href ="CHAP003.htm">Previous</a>] [<a href = "theindex.htm">Index</a>]
<P>
<address>Alnuth manual<br>April 2022
</address></body></html>
|