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
<Chapter Label="Installing-ANUPQ">
2
<Heading>Installing the ANUPQ Package</Heading>
3
4
The ANU <C>pq</C> program is written in C and the package can be installed
5
under UNIX and in environments similar to UNIX. In particular
6
it is known to work on Linux and Mac OS X, and also on Windows
7
equipped with cygwin.
8
<P/>
9
10
The current version of the &ANUPQ; package requires &GAP;&nbsp;4.8, and
11
version 1.2 of the &AutPGrp; package. However, we recommend using
12
at least &GAP;&nbsp;4.6 and &AutPGrp;&nbsp;1.5.
13
<P/>
14
15
To install the &ANUPQ; package, move the file <C>anupq-<A>XXX</A>.tar.gz</C>
16
for some version number <A>XXX</A> into the <C>pkg</C> directory in which you
17
plan to install &ANUPQ;. Usually, this will be the directory <C>pkg</C> in the
18
hierarchy of your version of &GAP;; it is however also possible to keep an
19
additional <C>pkg</C> directory in your private directories. The only
20
essential difference with installing &ANUPQ; in a <C>pkg</C> directory
21
different to the &GAP; home directory is that one must start &GAP;
22
with the <C>-l</C> switch (see
23
Section&nbsp;<Ref BookName="ref" Label="Command Line Options" Style="Text"/>),
24
e.g.&nbsp;if your private <C>pkg</C> directory is a subdirectory of
25
<C>mygap</C> in your home directory you might type:
26
27
<Listing><![CDATA[
28
gap -l ";myhomedir/mygap"
29
]]></Listing>
30
31
where <A>myhomedir</A> is the path to your home directory, which
32
may be replaced by a tilde. The empty path before the
33
semicolon is filled in by the default path of the &GAP; home
34
directory.
35
<P/>
36
37
Then, in your chosen <C>pkg</C> directory, unpack <C>anupq-<A>XXX</A>.tar.gz</C> by
38
39
<Listing><![CDATA[
40
tar xf anupq-<XXX>.tar.gz
41
]]></Listing>
42
43
Change to the newly created <C>anupq</C> directory. Now you need to call
44
<C>configure</C>. If you installed &ANUPQ; into the main <C>pkg</C> directory,
45
call
46
47
<Listing><![CDATA[
48
./configure
49
]]></Listing>
50
51
If you installed ANUPQ in another directory than the usual 'pkg'
52
subdirectory, instead call
53
54
<Listing><![CDATA[
55
./configure --with-gaproot=<path>
56
]]></Listing>
57
58
where <A>path</A> is the path to the &GAP; home directory. (You can also call
59
60
<Listing><![CDATA[
61
./configure --help
62
]]></Listing>
63
64
for further options.)
65
<P/>
66
67
What this does is look for a file <C>sysinfo.gap</C> in the root directory of
68
&GAP; in order to determine an architecture name for the subdirectory of
69
<C>bin</C> in which to put the compiled <C>pq</C> binary. This only makes sense if
70
&GAP; was compiled for the same architecture that <C>pq</C> will be. If you
71
have a shared file system mounted across different architectures, then
72
you should run <C>configure</C> and <C>make</C> for &ANUPQ; for each architecture
73
immediately after compiling &GAP; on the same architecture.
74
<P/>
75
76
If you had to install the package in your own directory but wish to use
77
the system &GAP; then you will need to find out what <A>path</A> is. To do
78
this, start up &GAP; and find out what &GAP;'s root path is from
79
finding the value of the variable <C>GAPInfo.RootPaths</C>, e.g.
80
81
<Log><![CDATA[
82
gap> GAPInfo.RootPaths;
83
[ "/usr/local/lib/gap4r4/" ]
84
]]></Log>
85
86
would tell you to use <C>/usr/local/lib/gap4r4</C> for <A>path</A>.
87
<P/>
88
89
The <C>configure</C> command will fetch the architecture type for which &GAP;
90
has been compiled last and create a <C>Makefile</C>. You can now
91
simply call
92
93
<Listing><![CDATA[
94
make
95
]]></Listing>
96
97
to compile the binary and to install it in the appropriate place.
98
<P/>
99
100
<Index Key="ANUPQ_GAP_EXEC" Subkey="environment variable"><C>ANUPQ_GAP_EXEC</C></Index>
101
The path of &GAP; (see <E>Note</E> below) used by the <C>pq</C> binary (the value
102
<C>GAP</C> is set to in the <C>make</C> command) may be over-ridden by setting the
103
environment variable <C>ANUPQ_GAP_EXEC</C>. These values are only of interest
104
when the <C>pq</C> program is run as a standalone; however, the <C>testPq</C>
105
script assumes you have set one of these correctly (see Section&nbsp;<Ref Sect="Testing your ANUPQ installation" Style="Text"/>). When the <C>pq</C> program is started from &GAP;
106
communication occurs via an iostream, so that the <C>pq</C> binary does not
107
actually need to know a valid path for &GAP; is this case.
108
<P/>
109
110
<E>Note.</E> By <Q>path of &GAP;</Q> we mean the path of the command used to
111
invoke &GAP; (which should be a script, e.g. the <C>gap.sh</C> script
112
generated in the <C>bin</C> directory for the version of &GAP; when &GAP;
113
was compiled). The usual strategy is to copy the <C>gap.sh</C> script to a
114
standard location, e.g. <C>/usr/local/bin/gap</C>. It is a mistake to copy the
115
&GAP; executable <C>gap</C> (in a directory with name of form
116
<C>bin/<A>compile-platform</A></C>) to the standard location, since direct
117
invocation of the executable results in &GAP; starting without being
118
able to find its own library (a fatal error).
119
120
<Section Label="Testing your ANUPQ installation">
121
<Heading>Testing your ANUPQ installation</Heading>
122
123
<Index Key="ANUPQ_GAP_EXEC" Subkey="environment variable"><C>ANUPQ_GAP_EXEC</C></Index>
124
Now it is time to test the installation. After doing <C>configure</C> and
125
<C>make</C> you will have a <C>testPq</C> script. The script assumes that, if the
126
environment variable <C>ANUPQ_GAP_EXEC</C> is set, it is a correct path for
127
&GAP;, or otherwise that the <C>make</C> call that compiled the <C>pq</C> program
128
set <C>GAP</C> to a correct path for &GAP; (see Section&nbsp;<Ref Sect="Running the pq program as a standalone" Style="Text"/> for more details). To run the tests, just type:
129
130
<Listing><![CDATA[
131
./testPq
132
]]></Listing>
133
134
Some of the tests the script runs take a while. Please be patient. The
135
script checks that you not only have a correct &GAP; (at least version
136
4.4) installation that includes the &AutPGrp; package, but that the
137
&ANUPQ; package and its <C>pq</C> binary interact correctly. You should see
138
something like the following output:
139
140
<Log><![CDATA[
141
Made dir: /tmp/testPq
142
Testing installation of ANUPQ Package (version 3.1)
143
144
The first two tests check that the pq C program compiled ok.
145
Testing the pq binary ... OK.
146
Testing the pq binary's stack size ... OK.
147
The pq C program compiled ok! We test it's the right one below.
148
149
The next tests check that you have the right version of GAP
150
for the ANUPQ package and that GAP is finding
151
the right versions of the ANUPQ and AutPGrp packages.
152
153
Checking GAP ...
154
pq binary made with GAP set to: /usr/local/bin/gap
155
Starting GAP to determine version and package availability ...
156
GAP version (4.6.5) ... OK.
157
GAP found ANUPQ package (version 3.1) ... good.
158
GAP found pq binary (version 1.9) ... good.
159
GAP found AutPGrp package (version 1.5) ... good.
160
GAP is OK.
161
162
Checking the link between the pq binary and GAP ... OK.
163
Testing the standard presentation part of the pq binary ... OK.
164
Doing p-group generation (final GAP/ANUPQ) test ... OK.
165
Tests complete.
166
Removed dir: /tmp/testPq
167
Enjoy using your functional ANUPQ package!
168
]]></Log>
169
170
</Section>
171
172
173
<Section Label="Running the pq program as a standalone">
174
<Heading>Running the pq program as a standalone</Heading>
175
176
<Index Key="ANUPQ_GAP_EXEC" Subkey="environment variable"><C>ANUPQ_GAP_EXEC</C></Index>
177
When the <C>pq</C> program is run as a standalone it sometimes needs to call
178
&GAP; to compute stabilisers of subgroups; in doing so, it first checks
179
the value of the environment variable <C>ANUPQ_GAP_EXEC</C>, and uses that, if
180
set, or otherwise the value of <C>GAP</C> it was compiled with, as the path
181
for &GAP;. If you ran <C>testPq</C> (see Section&nbsp;<Ref Sect="Testing your ANUPQ installation" Style="Text"/>) and you got both &GAP; is <C>OK</C> and the link between the
182
<C>pq</C> binary and &GAP; is <C>OK</C>, you should be fine. Otherwise heed the
183
recommendations of the error messages you get and run the <C>testPq</C> until
184
all tests are passed.
185
<P/>
186
187
It is especially important that the &GAP;, whose path you gave, should
188
know where to find the &ANUPQ; and &AutPGrp; packages. To ensure this
189
the path should be to a shell script that invokes &GAP;. If you needed
190
to install the needed packages in your own directory (because, say, you
191
are not a system administrator) then you should create your own shell
192
script that runs &GAP; with a correct setting of the <C>-l</C> option and set
193
the path used by the <C>pq</C> binary to the path of that script. To create
194
the script that runs &GAP; it is easiest to copy the system one and edit
195
it, e.g. start by executing the following UNIX commands (skip the second
196
step if you already have a <C>bin</C> directory; <C>you@unix></C> is your UNIX
197
prompt):
198
199
<Listing><![CDATA[
200
you@unix> cd
201
you@unix> mkdir bin
202
you@unix> cd bin
203
you@unix> which gap
204
/usr/local/bin/gap
205
you@unix> cp /usr/local/bin/gap mygap
206
you@unix> chmod +x mygap
207
]]></Listing>
208
209
At the second-last step use the path of &GAP; returned by <C>which gap</C>.
210
Now hopefully you will have a copy of the script that runs the system
211
&GAP; in <C>mygap</C>. Now use your favourite editor to edit the <C>-l</C> part of
212
the last line of <C>mygap</C> which should initially look something like:
213
214
<Listing><![CDATA[
215
exec $GAP_DIR/bin/$GAP_PRG -m $GAP_MEM -o 970m -l $GAP_DIR $*
216
]]></Listing>
217
218
so that it becomes (the tilde is a UNIX abbreviation for your home
219
directory):
220
221
<Listing><![CDATA[
222
exec $GAP_DIR/bin/$GAP_PRG -m $GAP_MEM -o 970m -l "$GAP_DIR;~/gapstuff" $*
223
]]></Listing>
224
225
assuming that your personal &GAP; <C>pkg</C> directory is a subdirectory of
226
<C>gapstuff</C> in your home directory. Finally, to let the <C>pq</C> program know
227
where &GAP; is and also know where your <C>pkg</C> directory is that contains
228
&ANUPQ;, set the environment variable <C>ANUPQ_GAP_EXEC</C> to the complete
229
(i.e. absolute) path of your <C>mygap</C> script (do not use the tilde
230
abbreviation).
231
232
</Section>
233
</Chapter>
234
235