Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

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

563574 views
1
2
7 Installing the ANUPQ Package
3
4
The ANU pq program is written in C and the package can be installed under
5
UNIX and in environments similar to UNIX. In particular it is known to work
6
on Linux and Mac OS X, and also on Windows equipped with cygwin.
7
8
The current version of the ANUPQ package requires GAP 4.8, and version 1.2
9
of the AutPGrp package. However, we recommend using at least GAP 4.6 and
10
AutPGrp 1.5.
11
12
To install the ANUPQ package, move the file anupq-XXX.tar.gz for some
13
version number XXX into the pkg directory in which you plan to install
14
ANUPQ. Usually, this will be the directory pkg in the hierarchy of your
15
version of GAP; it is however also possible to keep an additional pkg
16
directory in your private directories. The only essential difference with
17
installing ANUPQ in a pkg directory different to the GAP home directory is
18
that one must start GAP with the -l switch (see Section Reference: Command
19
Line Options), e.g. if your private pkg directory is a subdirectory of mygap
20
in your home directory you might type:
21
22

23
gap -l ";myhomedir/mygap"
24

25
26
where myhomedir is the path to your home directory, which may be replaced by
27
a tilde. The empty path before the semicolon is filled in by the default
28
path of the GAP home directory.
29
30
Then, in your chosen pkg directory, unpack anupq-XXX.tar.gz by
31
32

33
tar xf anupq-<XXX>.tar.gz
34

35
36
Change to the newly created anupq directory. Now you need to call configure.
37
If you installed ANUPQ into the main pkg directory, call
38
39

40
./configure
41

42
43
If you installed ANUPQ in another directory than the usual 'pkg'
44
subdirectory, instead call
45
46

47
./configure --with-gaproot=<path>
48

49
50
where path is the path to the GAP home directory. (You can also call
51
52

53
./configure --help
54

55
56
for further options.)
57
58
What this does is look for a file sysinfo.gap in the root directory of GAP
59
in order to determine an architecture name for the subdirectory of bin in
60
which to put the compiled pq binary. This only makes sense if GAP was
61
compiled for the same architecture that pq will be. If you have a shared
62
file system mounted across different architectures, then you should run
63
configure and make for ANUPQ for each architecture immediately after
64
compiling GAP on the same architecture.
65
66
If you had to install the package in your own directory but wish to use the
67
system GAP then you will need to find out what path is. To do this, start up
68
GAP and find out what GAP's root path is from finding the value of the
69
variable GAPInfo.RootPaths, e.g.
70
71
 Example 
72
gap> GAPInfo.RootPaths;
73
[ "/usr/local/lib/gap4r4/" ]
74

75
76
would tell you to use /usr/local/lib/gap4r4 for path.
77
78
The configure command will fetch the architecture type for which GAP has
79
been compiled last and create a Makefile. You can now simply call
80
81

82
make
83

84
85
to compile the binary and to install it in the appropriate place.
86
87
The path of GAP (see Note below) used by the pq binary (the value GAP is set
88
to in the make command) may be over-ridden by setting the environment
89
variable ANUPQ_GAP_EXEC. These values are only of interest when the pq
90
program is run as a standalone; however, the testPq script assumes you have
91
set one of these correctly (see Section 'Testing your ANUPQ installation').
92
When the pq program is started from GAP communication occurs via an
93
iostream, so that the pq binary does not actually need to know a valid path
94
for GAP is this case.
95
96
Note. By path of GAP we mean the path of the command used to invoke GAP
97
(which should be a script, e.g. the gap.sh script generated in the bin
98
directory for the version of GAP when GAP was compiled). The usual strategy
99
is to copy the gap.sh script to a standard location, e.g.
100
/usr/local/bin/gap. It is a mistake to copy the GAP executable gap (in a
101
directory with name of form bin/compile-platform) to the standard location,
102
since direct invocation of the executable results in GAP starting without
103
being able to find its own library (a fatal error).
104
105
106
7.1 Testing your ANUPQ installation
107
108
Now it is time to test the installation. After doing configure and make you
109
will have a testPq script. The script assumes that, if the environment
110
variable ANUPQ_GAP_EXEC is set, it is a correct path for GAP, or otherwise
111
that the make call that compiled the pq program set GAP to a correct path
112
for GAP (see Section 'Running the pq program as a standalone' for more
113
details). To run the tests, just type:
114
115

116
./testPq
117

118
119
Some of the tests the script runs take a while. Please be patient. The
120
script checks that you not only have a correct GAP (at least version 4.4)
121
installation that includes the AutPGrp package, but that the ANUPQ package
122
and its pq binary interact correctly. You should see something like the
123
following output:
124
125
 Example 
126
Made dir: /tmp/testPq
127
Testing installation of ANUPQ Package (version 3.1)
128
 
129
The first two tests check that the pq C program compiled ok.
130
Testing the pq binary ... OK.
131
Testing the pq binary's stack size ... OK.
132
The pq C program compiled ok! We test it's the right one below.
133
 
134
The next tests check that you have the right version of GAP
135
for the ANUPQ package and that GAP is finding
136
the right versions of the ANUPQ and AutPGrp packages.
137
 
138
Checking GAP ...
139
 pq binary made with GAP set to: /usr/local/bin/gap
140
 Starting GAP to determine version and package availability ...
141
 GAP version (4.6.5) ... OK.
142
 GAP found ANUPQ package (version 3.1) ... good.
143
 GAP found pq binary (version 1.9) ... good.
144
 GAP found AutPGrp package (version 1.5) ... good.
145
 GAP is OK.
146
 
147
Checking the link between the pq binary and GAP ... OK.
148
Testing the standard presentation part of the pq binary ... OK.
149
Doing p-group generation (final GAP/ANUPQ) test ... OK.
150
Tests complete.
151
Removed dir: /tmp/testPq
152
Enjoy using your functional ANUPQ package!
153

154
155
156
7.2 Running the pq program as a standalone
157
158
When the pq program is run as a standalone it sometimes needs to call GAP to
159
compute stabilisers of subgroups; in doing so, it first checks the value of
160
the environment variable ANUPQ_GAP_EXEC, and uses that, if set, or otherwise
161
the value of GAP it was compiled with, as the path for GAP. If you ran
162
testPq (see Section 'Testing your ANUPQ installation') and you got both GAP
163
is OK and the link between the pq binary and GAP is OK, you should be fine.
164
Otherwise heed the recommendations of the error messages you get and run the
165
testPq until all tests are passed.
166
167
It is especially important that the GAP, whose path you gave, should know
168
where to find the ANUPQ and AutPGrp packages. To ensure this the path should
169
be to a shell script that invokes GAP. If you needed to install the needed
170
packages in your own directory (because, say, you are not a system
171
administrator) then you should create your own shell script that runs GAP
172
with a correct setting of the -l option and set the path used by the pq
173
binary to the path of that script. To create the script that runs GAP it is
174
easiest to copy the system one and edit it, e.g. start by executing the
175
following UNIX commands (skip the second step if you already have a bin
176
directory; you@unix> is your UNIX prompt):
177
178

179
you@unix> cd
180
you@unix> mkdir bin
181
you@unix> cd bin
182
you@unix> which gap
183
/usr/local/bin/gap
184
you@unix> cp /usr/local/bin/gap mygap
185
you@unix> chmod +x mygap
186

187
188
At the second-last step use the path of GAP returned by which gap. Now
189
hopefully you will have a copy of the script that runs the system GAP in
190
mygap. Now use your favourite editor to edit the -l part of the last line of
191
mygap which should initially look something like:
192
193

194
exec $GAP_DIR/bin/$GAP_PRG -m $GAP_MEM -o 970m -l $GAP_DIR $*
195

196
197
so that it becomes (the tilde is a UNIX abbreviation for your home
198
directory):
199
200

201
exec $GAP_DIR/bin/$GAP_PRG -m $GAP_MEM -o 970m -l "$GAP_DIR;~/gapstuff" $*
202

203
204
assuming that your personal GAP pkg directory is a subdirectory of gapstuff
205
in your home directory. Finally, to let the pq program know where GAP is and
206
also know where your pkg directory is that contains ANUPQ, set the
207
environment variable ANUPQ_GAP_EXEC to the complete (i.e. absolute) path of
208
your mygap script (do not use the tilde abbreviation).
209
210
211