Download EDITOR USER MANUAL Version 2.2

Transcript
Installing EDITOR
47
*if def FCOMP
...
*endif FCOMP
using the other compiler options (CF77, GFORTRAN, etc.) as a template.
It may be that some of the compiler-dependent calls in edit22.GFORTRAN.f worked
just fine for your compiler. Find these by searching for “if def,GFORTRAN”, and add your
compiler name to the list of compilers in the “if def,” statements surrounding the segments of code that work for your compiler. Thus, change “if def,GFORTRAN” for “if
def,GFORTRAN.or.FCOMP”, etc.
Step 5: From the directory editor, open edit22.s (described in §9.2) and, for compilers
other than gfortran, replace gfortran in line 9 with the desired compiler. Then type:
csh -v edit22.s
which creates your final working version of xedit22 (replacing the temporary executable
created in step 1), and leaves it in the directory editor. You are now ready to go.
9.2
The script file edit22.s
The script file edit22.s used in the previous section to install EDITOR serves as a good
example of how the author uses EDITOR in practise. For the purposes of this discussion,
the file is reproduced below, with an electronic copy of the same file in the directory editor
of edit22.tar downloaded from http://www.ap.smu.ca/~dclarke/editor.
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
#---+----1----+----2----+----3----+--+----3----+----2----+----1----+---#
#============= SCRIPT FILE TO CREATE THE EDITOR EXECUTABLE ============#
#---------------------------------------------> Select FORTRAN compiler.
#
# Supported compilers include:
#
cf77 (Cray), f90 (Sun), g95 (Gnu), gfortran (Gnu), ifort (Intel),
#
pgf77 (Portland Group), xlf (IBM)
#
setenv FCOMP gfortran
#=======================================> Get files from home directory.
if(! -e ./libnmlst.a) cp ../nmlst/libnmlst.a .
#======================> If necessary, create the directory "editor2.2".
if(! -e ./editor2.2) mkdir ./editor2.2
#----------------------------------------------> Create the change deck.
rm -f ./chgedit
cat << EOF > ./chgedit
*define $FCOMP
*delete par.10,11
parameter
( k1=1000, k2=100000, k3=2000, k4=2000, k5=2000
1
, k6=128, k7=1000, k8=1000, k9=4000 )
EOF
#=======================> Create the input deck for EDITOR, and execute.
rm -f ./inedit
cat << EOF > ./inedit
\$editpar
inname=’edit22’, chgdk=’chgedit’, safety=0.4
, idump=1 ,job=3, ipre=1, inmlst=1, iupdate=1, iutask=0
, ext=’.f’, branch=’editor2.2’, xeq=’xedit22’