1 gaskelld 1.1 09/11/2002: FD
2 For linking at Jlab, use one of the following CERN_ROOT variables:
3 CERN_ROOT=/apps/cernlib/i386_redhat72_egcs/2001
4 or
5 CERN_ROOT=/apps/cernlib/i386_redhat61/99
6
7 CERN_ROOT=/apps/cernlib/i386_redhat72/2001 (i.e. using gcc3)
8 doesn't seem to work so far (this is a cernlib problem, not a simc
9 or absoft problem)
10
11 07/11/2001: FD
12 I have ported Simc to Linux using the Absoft compiler. This
13 is a commercially available compiler which is installed at Jlab under
14 the ifarm machines.
15
16 ( Presumably any commercially or freely available Fortran compiler under
17 Linux would do, provided it supports compilation of structures and records
18 under Fortran. This, unfortunately, excludes the popular g77, it does
19 not support these features and according to its developers todo list, these
20 features do not have high priority on their list. )
21
22 gaskelld 1.1 The current version of the Absoft Fortran compiler at Jlab is
23 FORTRAN 77 Compiler 4.6, Copyright (c) 1987-1999, Absoft Corp.
24
25 Preparations:
26
27 You need to define the following Environment variable in your
28 .cshrc/.login or whereever you define environments:
29
30 setenv ABSOFT /apps/absoft/PRO/usr/absoft
31
32 or whereever your absoft compiler directory is located.
33
34
35 The only incompatibility is in the include file histogram_init.inc:
36 diff ./histograms_init.inc ../../Linux/SIMC_070701/histograms_init.inc
37 10c10
38 < real*8 buf(nHbins)/nHbins*0./
39 ---
40 > real*8 buf(nHbins)
41
42 The original code declares the array buf and initializes it on the fly.
43 gaskelld 1.1 The initialization takes place within the declaration of a structure.
44 This, apparently, is too complicated for the Absoft compiler. The
45 workaround is to drop the initialization and, since we use a flag to tell
46 the compiler to use static initialization of arrays, it doesn't matter
47 here, it initializes the array to contain 0.0.
48 Thus, you would most likely want to save the original file
49 cp histograms_init.inc histograms_init.inc.org
50 and make this change only for the Linux version.
51
52 There are few other general minor changes, which all result in the somewhat
53 poorer parsing capabilities of the Absoft compiler. These are all safe
54 to do in the general version and would not affect the behaviour of simc
55 und SunOS, OSF1 or Linux:
56
57 -- Generally, max, min intrinsic functions want to have arguments of type
58 double precision.
59 -- The compiler cannot resolve statements like
60 q22*-1e6
61 but can resolve
62 -q22*1e6, -1.*q22*1.e6 , q22*(-1.e6)
63 - The compiler is picky about the order of statements in the
64 gaskelld 1.1 declaration block, ie data statements in general need to be
65 placed at the end of the declaration block.
66
67
68 If John hasn't taken care of them yet, you need to change right now
69 in the version I downloaded on July 10th:
70
71 Makefile:
72 < INCLUDES=-I.,..,./sos,./hms,$(Csoft)/SRC/INCLUDE
73 ---
74 > INCLUDES=-I.,..,./sos,./hms,./hrsr,./hrsl,$(Csoft)/SRC/INCLUDE
75
76 simc.f:
77 diff ./simc.f ../../Linux/SIMC_070701/simc.f
78 668c668
79 < > (100.*ncontribute_no_rad_proton/max(float(ncontribute),0
80 .1))
81 ---
82 > > (100.*ncontribute_no_rad_proton/max(dble(ncontribut
83 e),0.1d0))
84
85 gaskelld 1.1 eekeek.f:
86 diff ./eekeek.f ../../Linux/SIMC_070701/eekeek.f
87 28c28
88 < q22=q22*-1.e+06
89 ---
90 > q22=-q22*1.e+06
91 161c161
92 < q22=q22*-1.e+06
93 ---
94 > q22=-q22*1.e+06
95
96 mt19937.f: move the data statements to the end of the declaration block
97
98 diff ./mt19937.f ../../Linux/SIMC_070701/mt19937.f
99 116,117d115
100 < data mti/N1/ !mti==N+1 means mt[N] is not initialized
101 <
102 119d116
103 < data mag01/0, MATA/
104 121d117
105 <
106 gaskelld 1.1 123a120,125
107 >
108 > data mti/N1/ !mti==N+1 means mt[N] is not initialized
109 >
110 > data mag01/0, MATA/
|