1 |
jlec 10/11/25 13:35:42 |
2 |
|
3 |
Added: cns_solve_env_sh-1.3_p3 1.3_p3-delete.patch |
4 |
1.3_p3-gentoo.patch |
5 |
Removed: 1.3-delete.patch 1.3-gentoo.patch |
6 |
cns_solve_env_sh-1.3 |
7 |
Log: |
8 |
Version Bump, thanks alexxy telling me this; fix for correct linking |
9 |
|
10 |
(Portage version: 2.2.0_alpha5/cvs/Linux x86_64) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 sci-chemistry/cns/files/cns_solve_env_sh-1.3_p3 |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/files/cns_solve_env_sh-1.3_p3?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/files/cns_solve_env_sh-1.3_p3?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: cns_solve_env_sh-1.3_p3 |
19 |
=================================================================== |
20 |
#!/bin/sh |
21 |
# |
22 |
# This file sets up the appropriate environmental variables and paths |
23 |
# for CNSsolve. In the case of the same machines with different versions |
24 |
# of the OS, backward compatibility is assumed - ie. a later version will |
25 |
# be setup for a previous version of the OS if nothing else is available. |
26 |
# |
27 |
# written by: Paul Adams |
28 |
# |
29 |
# copyright Yale University |
30 |
# |
31 |
# ========================================================================== |
32 |
# |
33 |
# >>>>>> Important: define the location of the CNSsolve directory <<<<<< |
34 |
# |
35 |
# CHANGE THE NEXT LINE TO POINT TO THE LOCATION OF THE CNSsolve DIRECTORY |
36 |
|
37 |
CNS_SOLVE=_CNSsolve_location_ |
38 |
|
39 |
# |
40 |
# ========================================================================== |
41 |
# |
42 |
# full expansion of the CNS_SOLVE variable prior to use. |
43 |
# |
44 |
export CNS_SOLVE; CNS_SOLVE=$CNS_SOLVE |
45 |
# |
46 |
# ========================================================================== |
47 |
# |
48 |
# get the machine architecture |
49 |
# |
50 |
if [ -d $CNS_SOLVE ]; then |
51 |
if [ ! "$CNS_ARCH" ]; then |
52 |
export CNS_ARCH; CNS_ARCH=`$CNS_SOLVE/bin/getarch` |
53 |
fi |
54 |
else |
55 |
export CNS_ARCH; CNS_ARCH='unknown' |
56 |
fi |
57 |
# |
58 |
# ========================================================================== |
59 |
# |
60 |
# system variables for OpenMP |
61 |
# |
62 |
# The default stack sizes are usually insufficient, especially when |
63 |
# CNS is compiled using OpenMP. If the stack sizes are too |
64 |
# small segfaults may occur. Recommended setting for "stacksize": |
65 |
limit stacksize unlimited |
66 |
# |
67 |
# KMP_STACKSIZE is specific for Intel ifort, icc: |
68 |
##setenv KMP_STACKSIZE 256m |
69 |
# |
70 |
# OMP_STACKSIZE is used by all compilers: |
71 |
setenv OMP_STACKSIZE 256m |
72 |
# |
73 |
# Uncomment the following line and change as appropriate to set the number |
74 |
# of processors (threads) to use. |
75 |
###setenv OMP_NUM_THREADS 4 |
76 |
# |
77 |
# ========================================================================== |
78 |
# |
79 |
# general environmental variables |
80 |
# |
81 |
export CNS_LIB; CNS_LIB=$CNS_SOLVE/libraries |
82 |
export CNS_MODULE; CNS_MODULE=$CNS_SOLVE/modules |
83 |
export CNS_TOPPAR; CNS_TOPPAR=$CNS_LIB/toppar |
84 |
export CNS_CONFDB; CNS_CONFDB=$CNS_LIB/confdb |
85 |
export CNS_XTALLIB; CNS_XTALLIB=$CNS_LIB/xtal |
86 |
export CNS_NMRLIB; CNS_NMRLIB=$CNS_LIB/nmr |
87 |
export CNS_XRAYLIB; CNS_XRAYLIB=$CNS_LIB/xray |
88 |
export CNS_XTALMODULE; CNS_XTALMODULE=$CNS_MODULE/xtal |
89 |
export CNS_NMRMODULE; CNS_NMRMODULE=$CNS_MODULE/nmr |
90 |
export CNS_HELPLIB; CNS_HELPLIB=$CNS_SOLVE/helplib |
91 |
# |
92 |
# general user aliases |
93 |
# |
94 |
cns_web () { $CNS_SOLVE/bin/cns_web; } |
95 |
cns_header () { $CNS_SOLVE/bin/cns_header; } |
96 |
cns_info () { cat $CNS_SOLVE/bin/cns_info; } |
97 |
cns_transfer () { $CNS_SOLVE/bin/cns_transfer; } |
98 |
if [ -x $CNS_SOLVE/bin/cns_edit_local ]; then |
99 |
cns_edit () { $CNS_SOLVE/bin/cns_edit_local; } |
100 |
else |
101 |
cns_edit () { $CNS_SOLVE/bin/cns_edit; } |
102 |
fi |
103 |
# |
104 |
# g77 compilation and use |
105 |
# |
106 |
g77on () { CNS_G77=ON; . $CNS_SOLVE/.cns_solve_env_sh; } |
107 |
g77off () { unset CNS_G77; . $CNS_SOLVE/.cns_solve_env_sh; } |
108 |
# |
109 |
# developer aliases |
110 |
# |
111 |
run_tests () { $CNS_SOLVE/bin/run_tests; } |
112 |
run_diffs () { $CNS_SOLVE/bin/run_diffs; } |
113 |
maketar () { $CNS_SOLVE/bin/maketar; } |
114 |
create_patch () { $CNS_SOLVE/bin/create_patch; } |
115 |
# |
116 |
# |
117 |
# ========================================================================== |
118 |
# |
119 |
# to do expansions - unset noglob just in case user has it otherwise |
120 |
# |
121 |
set +f |
122 |
# |
123 |
# try to set up appropriate path |
124 |
# |
125 |
# first strip off any trailing information (eg. _g77) |
126 |
# |
127 |
CNS_ARCH=`echo ${CNS_ARCH} | sed -e 's/_g77//g'` |
128 |
# |
129 |
cns_vendor=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $1}'` |
130 |
cns_cpu=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $2}'` |
131 |
cns_os=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $3}'` |
132 |
cns_major=`echo $CNS_ARCH | awk 'BEGIN{FS="-"}{print $4}'` |
133 |
cns_minor=`echo $cns_major | sed -e 's/\./ /g'` |
134 |
# |
135 |
# if we are looking for a specific type of setup then limit search |
136 |
# |
137 |
cns_dirs="" |
138 |
if [ ! "$CNS_G77" ]; then |
139 |
if /bin/ls -d $CNS_SOLVE/$cns_vendor-* >/dev/null 2>&1 ; then |
140 |
cns_dirs="`/bin/ls -d $CNS_SOLVE/$cns_vendor-* 2>&1 | awk 'BEGIN{FS="/"}{print $NF}' | sort -t\- -n -r -k 3 -k 4`" |
141 |
fi |
142 |
else |
143 |
CNS_ARCH="${CNS_ARCH}_g77" |
144 |
if /bin/ls -d $CNS_SOLVE/$cns_vendor-*_g77 >/dev/null 2>&1 ; then |
145 |
cns_dirs="`/bin/ls -d $CNS_SOLVE/$cns_vendor-*_g77 2>&1 | awk 'BEGIN{FS="/"}{print $NF}' | sort -t\- -n -r -k 3 -k 4`" |
146 |
fi |
147 |
fi |
148 |
# |
149 |
# first look for an exact match (with os version) |
150 |
# |
151 |
# |
152 |
cns_found=0 |
153 |
if [ -n "$cns_dirs" ]; then |
154 |
for cns_dir in $cns_dirs ; do |
155 |
cns_tmp_major=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $4}'` |
156 |
if [ -f $CNS_SOLVE/$cns_dir/bin/cns_solve ]; then |
157 |
if [ $cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os}-${cns_major} -o \ |
158 |
$cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os}-${cns_major}_g77 ]; then |
159 |
cns_archenv=$cns_dir |
160 |
cns_found=1 |
161 |
fi |
162 |
fi |
163 |
done |
164 |
# |
165 |
# |
166 |
# now look for an exact match (without os version) |
167 |
# |
168 |
if [ $cns_found -eq 0 ]; then |
169 |
for cns_dir in $cns_dirs ; do |
170 |
if [ -f $CNS_SOLVE/$cns_dir/bin/cns_solve ]; then |
171 |
if [ $cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os} -o \ |
172 |
$cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os}_g77 ]; then |
173 |
cns_archenv=$cns_dir |
174 |
cns_found=1 |
175 |
fi |
176 |
fi |
177 |
done |
178 |
fi |
179 |
# |
180 |
# now look for a backwards compatible match (with os version major/minor) |
181 |
# |
182 |
if [ $cns_found -eq 0 ]; then |
183 |
for cns_dir in $cns_dirs ; do |
184 |
if [ $cns_found -eq 0 ]; then |
185 |
cns_tmp_major=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $4}' | sed 's/_g77//g'` |
186 |
if [ -f $CNS_SOLVE/$cns_dir/bin/cns_solve ]; then |
187 |
if [ $cns_dir = ${cns_vendor}-${cns_cpu}-${cns_os}-* ]; then |
188 |
osv_test=`echo $cns_major $cns_tmp_major | awk '{if ($1 > $2) print 1}'` |
189 |
if [ $osv_test -eq 1 ]; then |
190 |
cns_archenv=$cns_dir |
191 |
cns_found=1 |
192 |
fi |
193 |
fi |
194 |
fi |
195 |
fi |
196 |
done |
197 |
fi |
198 |
# |
199 |
# now look for a wildcard match on cpu |
200 |
# |
201 |
if [ $cns_found -eq 0 ]; then |
202 |
cpu_cpu=`echo $cns_cpu | sed 's/[0-9]*\.*[0-9]*$//'` |
203 |
cpu_ver=`echo $cns_cpu | sed 's/[A-Za-z]*//'` |
204 |
for cns_dir in $cns_dirs ; do |
205 |
if [ $cns_found -eq 0 ]; then |
206 |
cns_tmp_cpu=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $2}' | sed 's/[0-9]*\.*[0-9]*$//'` |
207 |
cns_tmp_ver=`echo $cns_dir | awk 'BEGIN{FS="-"}{print $2}' | sed 's/[A-Za-z]*//'` |
208 |
if [ -f $CNS_SOLVE/$cns_dir/bin/cns_solve ]; then |
209 |
if [ $cns_dir = ${cns_vendor}-${cpu_cpu}*-${cns_os}-${cns_major} -o \ |
210 |
$cns_dir = ${cns_vendor}-${cpu_cpu}*-${cns_os}-${cns_major}_g77 ]; then |
211 |
cpu_test=`echo $cpu_ver $cns_tmp_ver | awk '{if ($1 > $2) print 1}'` |
212 |
if [ $cpu_test -eq 1 ]; then |
213 |
cns_archenv=$cns_dir |
214 |
cns_found=1 |
215 |
fi |
216 |
fi |
217 |
fi |
218 |
fi |
219 |
done |
220 |
fi |
221 |
fi |
222 |
# |
223 |
# if found set environment |
224 |
# |
225 |
if [ $cns_found -eq 1 ]; then |
226 |
# |
227 |
# set installation and source directory |
228 |
# |
229 |
export CNS_INST; CNS_INST=$CNS_SOLVE/$cns_archenv |
230 |
export CNS_SOURCE; CNS_SOURCE=$CNS_INST/source |
231 |
# |
232 |
# path for CNSsolve utility programs |
233 |
# |
234 |
if [ -d $CNS_SOLVE/$cns_archenv/utils ]; then |
235 |
export PATH; PATH=`$CNS_SOLVE/bin/modify_path -sh $CNS_SOLVE/$cns_archenv/utils` |
236 |
fi |
237 |
# |
238 |
# path for CNSsolve executable if installed |
239 |
# |
240 |
if [ -d $CNS_SOLVE/$cns_archenv/bin ]; then |
241 |
export PATH; PATH=`$CNS_SOLVE/bin/modify_path -sh $CNS_SOLVE/$cns_archenv/bin` |
242 |
fi |
243 |
fi |
244 |
# |
245 |
unset cns_vendor cns_cpu cns_os cns_major cns_minor cns_tmp_major cns_tmp_minor |
246 |
unset cns_dir cns_dirs cns_found cns_archenv cns_diff cns_count cns_same |
247 |
unset cpu_cpu cpu_ver cns_tmp_cpu cns_tmp_ver cpu_test osv_test |
248 |
# |
249 |
|
250 |
|
251 |
|
252 |
1.1 sci-chemistry/cns/files/1.3_p3-delete.patch |
253 |
|
254 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/files/1.3_p3-delete.patch?rev=1.1&view=markup |
255 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/files/1.3_p3-delete.patch?rev=1.1&content-type=text/plain |
256 |
|
257 |
Index: 1.3_p3-delete.patch |
258 |
=================================================================== |
259 |
diff --git a/utils/cluster_struc.cpp b/utils/cluster_struc.cpp |
260 |
index b64467a..5f727db 100644 |
261 |
--- a/utils/cluster_struc.cpp |
262 |
+++ b/utils/cluster_struc.cpp |
263 |
@@ -173,7 +173,7 @@ int main(int argc, char *argv[]) { |
264 |
for (int i = 0; i < nrstruc; i++) { |
265 |
delete[] neighbor[i]; |
266 |
} |
267 |
- delete[] neighbor, neighborcount; |
268 |
+ delete[] neighbor, delete[] neighborcount; |
269 |
return 5; |
270 |
} |
271 |
if (rmsd < cutoff) { |
272 |
|
273 |
|
274 |
|
275 |
1.1 sci-chemistry/cns/files/1.3_p3-gentoo.patch |
276 |
|
277 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/files/1.3_p3-gentoo.patch?rev=1.1&view=markup |
278 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/cns/files/1.3_p3-gentoo.patch?rev=1.1&content-type=text/plain |
279 |
|
280 |
Index: 1.3_p3-gentoo.patch |
281 |
=================================================================== |
282 |
diff --git a/instlib/source/Makefile.proto b/instlib/source/Makefile.proto |
283 |
index 0d0dd3e..dd4b680 100644 |
284 |
--- a/instlib/source/Makefile.proto |
285 |
+++ b/instlib/source/Makefile.proto |
286 |
@@ -11,6 +11,8 @@ |
287 |
|
288 |
SHELL=/bin/sh |
289 |
|
290 |
+cns_string=`date "+%y%m%d%H%M"` |
291 |
+ |
292 |
# commands |
293 |
RM = /bin/rm |
294 |
|
295 |
@@ -19,32 +21,26 @@ DEPENDS = $(OBJS) dmemory.o machine_c.o |
296 |
|
297 |
# the default is to make the cns executable |
298 |
cns_solve: |
299 |
- @ make -k printflags F77BUG="$(debug)" DEBUG="$(debug)" |
300 |
- @ make -k ../bin/cns_solve F77BUG="$(debug)" DEBUG="$(debug)" |
301 |
- @ make -k exepurge |
302 |
+ @ make printflags F77BUG="$(debug)" DEBUG="$(debug)" |
303 |
+ @ make ${MAKEOPTS} ../bin/cns_solve F77BUG="$(debug)" DEBUG="$(debug)" |
304 |
+ @ make exepurge |
305 |
|
306 |
# rule for the fortran routines |
307 |
$(OBJS): |
308 |
- @ echo "compiling: $(@:.o=.f)"; \ |
309 |
- $(F77) -c $(F77FLAGS) $(@:.o=.f) |
310 |
+ $(F77) -c $(F77FLAGS) $(@:.o=.f) |
311 |
|
312 |
# rule for the dynamic memory allocation C routines |
313 |
dmemory.o: dmemory.c |
314 |
- @ echo ; echo "compiling: $?" |
315 |
- @ $(CC) -c $(CCFLAGS) $? |
316 |
+ $(CC) -c $(CCFLAGS) $? |
317 |
|
318 |
# rule for the machine specific C routines |
319 |
machine_c.o: machine_c.c |
320 |
- @ echo ; echo "compiling: $?" |
321 |
- @ $(CC) -c $(CCFLAGS) $? |
322 |
+ $(CC) -c $(CCFLAGS) $? |
323 |
|
324 |
# rule for the executable itself |
325 |
../bin/cns_solve: $(DEPENDS) |
326 |
- @ echo ; echo "linking: cns_solve"; echo |
327 |
- @ cns_string=`date "+%y%m%d%H%M"`; \ |
328 |
- $(LD) -o cns_solve-$$cns_string.exe $(OBJS) dmemory.o machine_c.o \ |
329 |
- $(LDFLAGS) \ |
330 |
- $(CNS_FFTDIR) $(CNS_FFTLIB); \ |
331 |
+ $(LD) $(LDFLAGS) -o cns_solve-$$cns_string.exe $(OBJS) dmemory.o machine_c.o \ |
332 |
+ $(CNS_FFTDIR) $(CNS_FFTLIB) $(OMPLIB); \ |
333 |
if [ -x cns_solve-$$cns_string.exe ]; \ |
334 |
then echo "created executable file cns_solve-$$cns_string.exe"; \ |
335 |
echo ""; cd ../bin; $(RM) -f cns_solve; $(RM) -f cns; \ |
336 |
@@ -59,7 +55,7 @@ printflags: |
337 |
@ echo; echo "flags:"; \ |
338 |
echo " fortran -> [$(F77)] $(F77FLAGS)"; \ |
339 |
echo " c -> [$(CC)] $(CCFLAGS)"; \ |
340 |
- echo " link -> [$(LD)] $(LDFLAGS) $(CNS_FFTDIR) $(CNS_FFTLIB)"; \ |
341 |
+ echo " link -> [$(LD)] $(LDFLAGS) $(CNS_FFTDIR) $(CNS_FFTLIB) $(OMP_LIB)"; \ |
342 |
echo |
343 |
|
344 |
# regenerate makefiles |
345 |
diff --git a/instlib/utils/Makefile b/instlib/utils/Makefile |
346 |
index 98de84f..4f32b34 100644 |
347 |
--- a/instlib/utils/Makefile |
348 |
+++ b/instlib/utils/Makefile |
349 |
@@ -22,17 +22,17 @@ utils: |
350 |
make clean |
351 |
|
352 |
.f: |
353 |
- $(F77) -o $@ $(F77FLAGS) $(@).f $(F77LINK) |
354 |
+ $(F77) $(LDFLAGS) -o $@ $(F77FLAGS) $(@).f $(F77LINK) |
355 |
|
356 |
.c: |
357 |
- $(CC) -o $@ $(CCFLAGS) $(@).c $(CCLINK) |
358 |
+ $(CC) $(LDFLAGS) -o $@ $(CCFLAGS) $(@).c $(CCLINK) |
359 |
|
360 |
.cpp: |
361 |
- $(CPP) -o $@ $(CCFLAGS) $(@).cpp $(CCLINK) |
362 |
+ $(CXX) $(LDFLAGS) -o $@ $(CXXFLAGS) $(@).cpp $(CCLINK) |
363 |
|
364 |
.l: |
365 |
lex $(@).l |
366 |
- $(CC) $(CCFLAGS) -o $@ lex.yy.c $(CCLINK) -l$(LEXLIB) |
367 |
+ $(CC) $(LDFLAGS) $(CCFLAGS) -o $@ lex.yy.c $(CCLINK) -l$(LEXLIB) |
368 |
|
369 |
relink: |
370 |
@ cd $(CNS_INST)/utils; touch x; rm -f x `ls * | grep -v Makefile` |