Next I want to compile the main program named ThOR. This program
contains:
wind_module
cell_module
parameters.h
netcdf.inc
libw3.a
libnetcdf.a
To do this I run the scheme:
ifort -check all -c thor1.f90 -I/mnt/share/mods
ifort -o /home/deadpickle/Desktop/thor1 thor1.o -L/usr/local/lib -
lnetcdf -lw3
When I run this I get the error:
thor1.o: In function `MAIN__':
thor1.f90:(.text+0x3e0): undefined reference to
`wind_module_mp_time_convert_'
thor1.f90:(.text+0x47e): undefined reference to
`cell_module_mp_pathcompute_'
thor1.f90:(.text+0x4b9): undefined reference to
`cell_module_mp_crefextract_'
thor1.f90:(.text+0x5db): undefined reference to
`cell_module_mp_tscell_'
thor1.f90:(.text+0x631): undefined reference to
`cell_module_mp_cellarray_'
thor1.f90:(.text+0x6e0): undefined reference to
`wind_module_mp_meanwind_'
Why am I recieving these errors? What can I do to get this to work?
The loop vectorisation remark is just a remark - the compiler seems to
be
capable of making that particular optimisation.
To get the second step working: add "windl.o" and "msl.o" to the link
statement
Regards,
Arjen
Regarding the "LOOP WAS VECTORIZED": The Intel Fortran compiler uses
this as an optimization that increases execution speed, usually, but
not always, without changing the results. A caveat with vectorization
is that if the program is moving elements within an array, e.g.
shifting the elements up as in
x(k) <- x(k-1) for k = N, N-1, N-2, ... 2.
the vectorized loop might be a problem. In a vectorized loop, an
element might be moved before you were expecting it to. For example,
the element k might be moved to k+1 before element k+1 has moved to k
+2. This would cause element k to move to locations k+1 and k+2. When
I have to do such an operation, I do it in a subroutine that is
compiled without optimization.
HTH
Jomar