Compilation problems - Cygwin and ifort

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
csherwood
Posts: 39
Joined: Fri Apr 02, 2004 4:46 pm
Location: USGS, Woods Hole, USA

Compilation problems - Cygwin and ifort

#1 Unread post by csherwood »

[rant]
Downloaded the new CSTM trunk, and tried to build it on Cygwin with ifort. The first problem I encountered looked like:
...
mod_strings.f90(85) : Error: This name does not have a type, and must have an explicit type. [IA32]
character (len=80) :: my_fc = ""/cygdrive/c/Program Files/Intel/Compiler/Fortran/10.1.014/Ia32/Bin/ifort""
...
The space in the compiler path name was screwing things up,
which I fixed by commenting out line 130 in /Compilers/Cygwin-ifort.mk
# FC := "$(shell which ${FC})"
Since "which ifort" points to the correct binary, I dont think this is needed. (This would probably be better done by either specifying the path in the .bashrc file or using the cygpath utility).

Anyway, another apparent path problem has me stumped:
ifort /align /G7 /MD /Ox Build/esmf_roms.o Build/master.o Build/ocean_control.o Build/ocean_coupler.o Bu
ild/propagator.o Build/roms_export.o Build/roms_import.o -o oceanS.exe Build/libNLM.a Build/libANA.a Bu
ild/libUTIL.a Build/libMODS.a "$(cygpath --windows /usr/local/lib/libnetcdf.a)" "c:\cygwin\lib\gcc\i686-
pc-mingw32\3.4.4\libgcc.a" /link /stack:67108864
Intel(R) Visual Fortran Compiler for applications running on IA-32, Version 10.1 Build 20080112 Packa
ge ID: w_fc_p_10.1.014
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.
ifort: command line warning #10161: unrecognized source type 'Build/esmf_roms.o'; object file assumed
ifort: command line warning #10161: unrecognized source type 'Build/master.o'; object file assumed
...
and so on. I think this is all happening in ./Build, so shouldn't the paths be ./esmf_roms.o ? I can't figure out where this is being specified, or if it is my fault.

I also have problems with build.bash, but that is the subject of a different rant.
[/rant]
Chris Sherwood, USGS
1 508 457 2269

csherwood
Posts: 39
Joined: Fri Apr 02, 2004 4:46 pm
Location: USGS, Woods Hole, USA

Re: Compilation problems - Cygwin and ifort

#2 Unread post by csherwood »

Nevermind.

It had nothing to do with the paths, or at least not the paths of the object files. I needed mspdb80.dll on the path. I am so lame, I can't even figure out how to ensure the .dll is on the path when the linker is invoked, so I put a copy right in the top directory with the makefile. (I am not alone in this kludge...no names).
Chris Sherwood, USGS
1 508 457 2269

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Compilation problems - Cygwin and ifort

#3 Unread post by m.hadfield »

Regarding the space in the compiler name, a handy way to fix this (and other such problems in Cygwin) is to add a Cygwin mount point, eg, by issuing the command

Code: Select all

mount 'C:\Program Files' /progs
The shell would then return your full compiler name as:

/progs/Intel/Compiler/Fortran/10.1.014/Ia32/Bin/ifort

The quotation marks around the compiler name in CYGWIN-ifort.mk were added in an attempt to avoid problems caused by spaces in the compiler name--you'll see they're not there in the other platform make files--but this hasn't been completely successful.

Post Reply