Re: Compiling with Modules
- From: jomarbueyes@xxxxxxxxxxx
- Date: Mon, 12 Jan 2009 12:22:27 -0800 (PST)
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
.
- References:
- Compiling with Modules
- From: deadpickle
- Compiling with Modules
- Prev by Date: Re: new be in Fortran
- Next by Date: Re: sequence points and the execution model
- Previous by thread: Re: Compiling with Modules
- Next by thread: Strange "Segmentation fault (core dumped)" error.
- Index(es):
Relevant Pages
|