(file) Return to readme.gfortran CVS log (file) (dir) Up to [HallC] / simc_gfortran

  1 gaskelld 1.1 1/22/2009
  2              
  3              README for gfortran version of SIMC.
  4              
  5              SIMC has been ported to use the gfortran compiler. This became necessary when
  6              the JLab computer center decided to no longer support the ABSOFT fortran
  7              compiler for Linux. Also, g77 is no longer actively supported - gfortran is the 
  8              new default.
  9              
 10 gaskelld 1.3 Because gfortran does NOT support classic fortran structures, but does support
 11 gaskelld 1.1 fortran 90 "types" (which are very similar to structures but with different
 12              syntax), a choice had to be made whether to to try and eradicate the structures
 13              completely (replacing with common blocks) or move to "types". For now we (I?)
 14              have decided to stick with types.
 15              
 16              The syntax for using and declaring types is very similar to that used for
 17              structures. For example, the variable vertex.e.xptar in the old version of simc
 18              becomes vertex%e%xptar.
 19              
 20              Definitions and declarations are also different - see below for some examples. One important
 21              point is that one cannot simultaneoulsy declare and define a "type" as one can
 22              with structures (see point 4 below). This has made some of the structure
 23              definition files a little confusing to read. Another detail is that type
 24              definitions cannot have the same name as a variable. For example, the structure
 25              definition "slop" is now a type called "sloptype", although the variable is still called
 26              "slop" (i.e. slop%MC%e%delta).
 27              
 28              
 29              This version of simc has been tested (to a limited extent) on the JLab Fedora
 30              and RedHat machines. We will try to help you get it running on other platforms if
 31              desired.
 32 gaskelld 1.1 
 33              Another change with this version is that the CTP library code will also be distributed
 34              with SIMC. 
 35              
 36 gaskelld 1.2 
 37 gaskelld 1.3 Finally - it's imortant to note that the input file must also change. Since the variable names
 38 gaskelld 1.2 are actually used in the input file, and the syntax for those names has changed, the variables
 39              must be renamed. I've written a script (convert_inputfile.sh) that brute-force replaces each variable.
 40              Use at your own risk.
 41              
 42              
 43              
 44              
 45 gaskelld 1.1 DJG Summer/Fall 2008
 46              
 47              Some notes on conversion to gfortran (fortran 90) (not complete)
 48              
 49              Mainly - replacing structure with types.
 50              
 51              0. Generic, easy stuff: cannot have Vax tab format for line continuation.
 52              
 53              
 54              1. Generically,
 55              
 56                     structure /Cartesian/
 57                              real*8          x,y,z
 58                      end structure
 59              
 60                  becomes
 61              
 62                     type Cartesian
 63                              sequence
 64                              real*8          x,y,z
 65                      end type
 66 gaskelld 1.1 
 67              2.  instead of recon.e.x for example, references using recon%e%x
 68              
 69              3. "sequence" is required if your vairable is used in common block. For now -
 70              just put in every type.
 71              
 72              4. Cannot simulatenously declare and define:
 73              
 74              
 75                      structure /double_arm/
 76                              structure /arm/ e
 77                                real*8                delta, yptar, xptar, z
 78                              end structure
 79                              structure /arm2/ p
 80                                real*8                delta, yptar, xptar, z
 81                              end structure
 82                      end structure
 83              
 84              becomes
 85              
 86              
 87 gaskelld 1.1         type arm
 88                              sequence
 89                              real*8          delta, yptar, xptar, z
 90                      end type                
 91              
 92                      type arm2
 93                              sequence
 94                              real*8          delta, yptar, xptar, z
 95                      end type                
 96              
 97              
 98                      type double_arm
 99                              sequence
100                              type(arm)::e
101                              type(arm2)::p
102                      end type
103              
104              
105              5. types cannot have same name as variable.
106              
107              
108 gaskelld 1.1 
109              
110              **Files not needing any changes**
111              enerloss_new.f
112              gauss1.f
113              loren.f
114              mt19937.f
115              trg_track.f --> removed 'simulate.inc'
116              NtupleClose.f
117              NtupleInit.f

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0