20OCT23 |
The MORSE code is entirely self-contained; you don't need any other libraries.
MORSE is distributed as a compressed 'tar' file which can be unpacked by
moving it to a new folder and typing
There is a single program module morse.f90 and a number
of modules containing single subroutines *_sub.f90, functions
*_fnc.f90 and data *_dat.f90. Also a few 'generic' modules
*_gen.f90 containing different versions of subroutines or functions
for operating on different data types (real, double precision etc).
To compile
However, due to the nature of FORTRAN 90, modules cannot be compiled until all
the included
modules have also been compiled, so it will take about 10 or
so repeats of this command until everything is resolved.
The makefile
is currently set up to use the gfortran compiler together with
checks on array-bound errors (which slows down the code) as well as all
compilation warnings.
If you want your own options, edit the lines near the start of the file,
which are reproduced below:
For the simple compilation you can just place these in
the same directory as the other modules and recompile in the usual way.
With the makefile, if it is a direct replacement
of an existing module, just typing 'make' will work. On the other hand,
any new modules should be compiled individually
(as in 'gfortran newmod_sub.f90 -c') to ensure that the .mod file is created
before running 'make' (if you don't, 'make' will complain that it can't find
newmod_sub.mod).
Unpacking the MORSE tar file
This will expand into several hundred modules with the extension
.f90, and a 'makefile'.
Simple Compilation
Type, e.g.
This command runs a compiler (gfortran in this example,
[Web-page] ),
taking as input all files
in the local directory
with extension .f90,
and creates an executable program (-o) called morse
Compiling with the makefile
For a more systematic approach, the MORSE distribution also includes a
makefile
[More ...],
which is basically a set of instructions to ensure that
everything gets compiled in the right order, but also it means that if you
alter one module only the other modules which use this altered module
are recompiled rather than everything. To invoke this you simply type
and the makefile is executed.
At the end of this you should have an executable called morse
Patches
Occasionally there will be revised or new modules to fix various bugs.