Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Compiling with Modules

9 views
Skip to first unread message

deadpickle

unread,
Jan 10, 2009, 1:07:34 AM1/10/09
to
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?

Arjen Markus

unread,
Jan 10, 2009, 5:55:57 AM1/10/09
to
On 10 jan, 07:07, deadpickle <deadpic...@gmail.com> 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 doesithave 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 -checkall -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

jomar...@hotmail.com

unread,
Jan 12, 2009, 3:22:27 PM1/12/09
to

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

0 new messages