20.07.2015 Views

PhD Thesis - staffweb - University of Greenwich

PhD Thesis - staffweb - University of Greenwich

PhD Thesis - staffweb - University of Greenwich

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>PhD</strong> <strong>Thesis</strong> by John Ewer.3.6.2 Data access mechanismsThere was no use <strong>of</strong> dynamic memory allocation (compiler dependant additions) in the legacycode and no pseudo-allocation techniques were used (for example FORTRAN developers <strong>of</strong>tendeclare and use huge data arrays that are partitioned and passed down to subroutines as separatearguments). This meant that the legacy code <strong>of</strong>ten needed to be modified and recompiled fordifferent problem sizes. This can greatly limit portability <strong>of</strong> the s<strong>of</strong>tware and generally meansthat portions <strong>of</strong> the code had to be made available in source code form for re-compilation. Therewas also the problem that the legacy s<strong>of</strong>tware might not use memory in the most efficient waypossible for the particular problem being simulated.Standard FORTRAN array based storage was used for all data with each array named separatelyas a separate variable. The legacy code did not use so called "f-array" storage techniques as in,say, Phoenics [CHAM] - This technique declares a huge data array at the main program leveland passes down "chunks" <strong>of</strong> the array to sub-procedures. The use <strong>of</strong> simple array based storageand the naming conventions used in the legacy code mean that, other than the declared sizes,there was no clear indication <strong>of</strong> how differently named variables and arrays were related to oneother. Another problem that was encountered concerns the difficulty <strong>of</strong> developing additionalfunctionality that requires new variables. Generally speaking, the addition <strong>of</strong> a new variable, tosolve or calculate, will also require a large number <strong>of</strong> additional support or storage variables.This additional storage may be needed for temporary storage during calculations, for control <strong>of</strong>the solution, for reporting <strong>of</strong> status or for the storage <strong>of</strong> different historical versions <strong>of</strong> theparticular variable. This is a particular problem because the data dependencies in the legacy codeare unclear and it is thus difficult to ascertain how many and <strong>of</strong> what type the required newvariables should be.There is no use made <strong>of</strong> COMMON for passing data around the system between procedures.This means that all data is passed around the system as formal parameters in argument lists.Given the high degree <strong>of</strong> data dependency between most <strong>of</strong> the numerical routines there areconsiderable numbers <strong>of</strong> arguments. All variable names had to be limited to 6 characters to avoidexceeding the continuation line limits for some <strong>of</strong> the argument lists. The greatest problem posed3-44

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!