F90 Notes

Arthur Olin 8/9/99

Mofia 2.0 has been developed and is running on the DEC alpha platform. We have not significantly changed the code which is largely common to E787 and deals with event handling, skimming, run control and I/Oassignments, CFM, and YBOS initializations. This is the code found in the main/ subdirectory. It has had many years of testing and debugging, so there is little to be gained from changing it. Procedures that are unique to E614 such as read_det_geom and begin_run have had USE statments added to give them access to the f90 procedures, and setup_geometry has been rewritten to use the new data types and moved from main/. The BLOCK DATA routine kdata.F will be used only for initialization of the common blocks filled in the main/ directory-it may be convenient in future to use a module instead for this purpose so that it can be loaded from a library. The namelists are also implemented in main/ and contain both E787 and E614-specific code. All of this code remains in fixed format with extension .F

Common blocks and parameter definitions are implemented through include directives using cpp. Many of these are required outside of main/. The include files have therefore been modified to be compatible with both fixed and free source formats by removing continuation lines and using ! to delimit comment lines. For commons extending over several lines

I have tried to develop a convenient style based on O-O concepts and abstracting from f90 code examples, and then described the result in module-coding-rules. These certainly require some discussion as alternatives such as using modules for data only (ie direct replacement for commons) and subroutines in their own files exist. Please look at some examples: tdc_mod.f90 and det_geom_mod.f90.

Mofia 2.0 also compiles on linux using the Absoft compiler. The YBOS, BRU, CFM, and GPLOT libraries have been modified to compile under f90 and link properly. The step remaining in order to test the linux version is to build an Absoft f90 version of the CERN libraries.

Caution about putting functions in modules

DEC ladebug experience