Re: Compiling with Modules



On Jan 10, 1:07 am, deadpickle <deadpic...@xxxxxxxxx> wrote:
I'm trying to compile a program that contains two modules; wind_module
and cell_module. I compile these module separate using the scheme:
ifort -module /mnt/share/mods -c /mnt/share/narr/wind1.f90 /mnt/share/
cell/ms1.f90
During the compile I get the remark:
remark: LOOP WAS VECTORIZED.
What does this mean and does it have any bad consequences?

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?

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
.



Relevant Pages

  • Re: glibc detected
    ... the version of gfortran that you are using. ... the program gets stuck in an endless loop. ... I also managed to get your code to compile and run by supplying ... the coefficients for Gauss-Laguerre integration are ...
    (comp.lang.fortran)
  • Re: Generating code which compiles to a jmphash
    ... (loop for i from 0 to 4 ... common data structures that are heavily used or require a great ... optimizing what you think may be the problem rarely gives ...
    (comp.lang.lisp)
  • Re: True, False, None (was re. Prusss manifesto)
    ... >Dreaded Grammar File, but as Python grammar tasks go this one seems ... >these steps is taken (this loop, of course, will only get ... >but that's the typical kind of job for a peephole optimizer, ... Thanks for showing me how to use compile() and dis. ...
    (comp.lang.python)
  • Vectors.Insert_Space bug?
    ... Testing.Length loop ... It seems as if the element located at the Before index is copied and inserted as the first new element, and only after that, does Insert_Space actually start inserting empty elements. ... I've tried to compile with two different compilers, and both exhibit this odd behavior: ... GNATMAKE GPL 2008 ...
    (comp.lang.ada)
  • Re: Feature Request: StrToUint64 NEEDED !!!
    ... Second of all if I have to wait for Borland to fucking fix it I'll be waiting another motherfucking year! ... It won't even compile, Jamie. ... Once you remember to make progress in the loop, you'll find that it crashes as soon as the result exceeds High, which is considerably less than what an unsigned 64-bit integer is expected to be able to hold. ... It will also overflow for values near High. ...
    (alt.comp.lang.borland-delphi)