Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29257 Discussions

Having Trouble recompiling model on a new machine

Blake_C_1
Beginner
882 Views

Hi There,

I recently migrated a model written in fortran to a new machine, from OSX to CentOS.  With this migration came a new version of ifort and icc and also a switch from using mpich2 to openmpi for the parallel compilation.  The problem is, with no changes to the code, the model won't compile on the new machine.  I have already compiled another model written in fortran in both serial and parallel, so I know the compilers are working properly.

I was hoping someone could help me figure out some possible compiler options, or point out some differences in the ifort versions that could lead to this difference.

Here is the version of Ifort on the Mac that was used previously that works for both serial and parallel (with mpich2)

Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.3.166 Build 20140415

and the new version on the CentOS server

Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 15.0.3.187 Build 20150407

and the error message from the new machine (this is in parallel with openmpi)

ifort: command line remark #10010: option '-vec-report0' is deprecated and will be removed in a future release. See '-help deprecated'

wqm_inputs.o: In function `inputs_':

wqm_inputs.f90:(.text+0x0): multiple definition of `inputs_'

wqm_inputs.o:wqm_inputs.f90:(.text+0x0): first defined here

wqm_inputs.o: In function `error_check_':

wqm_inputs.f90:(.text+0x2c890): multiple definition of `error_check_'

wqm_inputs.o:wqm_inputs.f90:(.text+0x2c890): first defined here

make: *** [wqm_dom2] Error 1

 

When I comment out subroutine ERROR_CHECK the error_check error doesn't occur, but I can't figure out the other one.

 

It also doesn't compile in serial... but the error is different.

 

Any help would be greatly appreciated, bare in mind I am an oceanographer not an engineer, so my knowledge of coding and compiling is very limited.

 

 

 

 

 

 

 

0 Kudos
5 Replies
Steven_L_Intel1
Employee
882 Views

Is "inputs" a function? It almost sounds as if there is more than one copy of the routine. It's also possible that "inputs" is a COMMON block that is being DATA initialized in more than one subroutine or function, but I usually see this with more than one object named in the error message. Can you attach the source of wqm_inputs.f90 for us to look at?

0 Kudos
Blake_C_1
Beginner
882 Views

Inputs is a subroutine that reads in all the input files for the model.  As far as I can tell it is only called once from the main program and is only defined in the wqm_inputs.f90 file.  Here is the source for wqm_inputs

0 Kudos
mecej4
Honored Contributor III
882 Views

I would look for a problem with the build commands (or makefile). The error messages suggest that the compiler driver may have been called with both the source (wqm_inputs.f90) and object(wqm_inputs.o) given as arguments.

0 Kudos
Blake_C_1
Beginner
882 Views

This issue has been resolved.  wqm_inputs.F was include twice in the makefile.  It is interesting, though, that the previous compiler didn't catch this.

 

Thank you for the help

0 Kudos
jimdempseyatthecove
Honored Contributor III
882 Views

Nice catch mecej4.

The newer compiler has multi-file inter-procedural optimizations enabled as default.

Jim Dempsey

0 Kudos
Reply