Build Solution - Error

Information about Programming in the MOHID Framework
adrien.bonneu@gmail.com
MOHID Beginner
Posts: 8
Joined: Tue Oct 18, 2011 12:48

Build Solution - Error

Postby adrien.bonneu@gmail.com » Mon Jan 07, 2013 13:17

Hi Mohiders,

I would like adding a new module in MohidLand. I downloaded the last version of the code (mohid-84293.zip). I use Microsoft Visual Studio 2012 and Intel Visual Fortran Composer XE (2013.1.119) including the compiler. When I build solution of Mohid Land with the configuration "Debug_double", there is no error. But if I consider the configuration "Release_double", I have these 2 following errors:
"
1>------ Build started: Project: MOHIDLand, Configuration: Release Double Win32 ------
1>Compiling with Intel(R) Visual Fortran Compiler XE 13.0.1.119 [IA-32]...
1>MohidLand.f90
1>Linking...
1>libfproj4.lib(fort-proj.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>Generating code
1>Finished generating code
1>LIBCMT.lib(sin.obj) : error LNK2005: _sin already defined in libmmt.lib(sin_stub.obj)
1>Release Double\MOHIDLand_release_double.exe : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build log written to "file://C:\Users\ZHP\Documents\CodeplexMohidv84293\Solutions\VisualStudio2008_IntelFortran11\MOHIDNumerics\MOHIDLand\Release Double\BuildLog.htm"
1>MOHIDLand - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
"

It seems to be a library problem wich doesn't appear in the Debug configuration.
Does Anyone know about this ?
Thanks a lot.
Best regards,
Adrien

davidbrito
MOHID Advanced user
Posts: 189
Joined: Thu Jan 01, 1970 00:00

Re: Build Solution - Error

Postby davidbrito » Tue Jan 08, 2013 14:28

Hello Adrien,

You have a configuration different from {Visual Studio 2008 + Intel Fortran 11} that has already a project available and ready-to-use in codeplex, so these apects appear.

It seems that with Intel XE you have a new lib (libmmt.lib) that has same "functions" as one lib already being used.

Try to exclude one of these (LIBCMT.lib or libmmt.lib) in MOHID Land Proect properties -> Linker -> Input -> "Ignore Specific Library"

And send us the result.

David

adrien.bonneu@gmail.com
MOHID Beginner
Posts: 8
Joined: Tue Oct 18, 2011 12:48

Re: Build Solution - Error

Postby adrien.bonneu@gmail.com » Wed Jan 09, 2013 11:07

Hi David,

Thank you very much for your answer.
If I ignore the library libmmt.lib, some external symbols become unresolved:
-----------------------------------------------------------------------------------------------------------------------------------
1>------ Build started: Project: MOHIDLand, Configuration: Release Double Win32 ------
1>Compiling with Intel(R) Visual Fortran Compiler XE 13.0.1.119 [IA-32]...
1>MohidLand.f90
1>Linking...
1>libfproj4.lib(fort-proj.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>ModuleRunoffProperties.obj : error LNK2001: unresolved external symbol ___libm_sse2_cbrt
1>MOHIDBase1.lib(ModuleDrainageNetwork.obj) : error LNK2001: unresolved external symbol ___libm_sse2_cbrt
1>MOHIDBase1.lib(ModuleBivalve.obj) : error LNK2001: unresolved external symbol ___libm_sse2_cbrt
1>MOHIDBase2.lib(ModuleHorizontalGrid.obj) : error LNK2001: unresolved external symbol _sincos
1>libfproj4.lib(PJ_tpeqd.obj) : error LNK2001: unresolved external symbol _hypot
1>libifcoremt.lib(for_stop.obj) : error LNK2001: unresolved external symbol _fetestexcept
1>libifcoremt.lib(for_mi_int.obj) : error LNK2001: unresolved external symbol _truncf
1>libifcoremt.lib(for_mi_int.obj) : error LNK2001: unresolved external symbol _trunc
1>libifcoremt.lib(for_mi_int.obj) : error LNK2001: unresolved external symbol _lroundf
1>libifcoremt.lib(for_mi_int.obj) : error LNK2001: unresolved external symbol _llroundf
1>libifcoremt.lib(for_mi_int.obj) : error LNK2001: unresolved external symbol _lround
1>libifcoremt.lib(for_mi_int.obj) : error LNK2001: unresolved external symbol _llround
1>Release Double\MOHIDLand_release_double.exe : fatal error LNK1120: 10 unresolved externals
1>
1>Build log written to "file://C:\Users\ZHP\Documents\CodeplexMohidv84293_2\Solutions\VisualStudio2008_IntelFortran11\MOHIDNumerics\MOHIDLand\Release Double\BuildLog.htm"
1>MOHIDLand - 13 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========
-----------------------------------------------------------------------------------------------------------------------------------

If I ignore the other one (libcmt.lib), more than 800 errors appear (errors of the same type, i.e. unresolved external symbols).
We keep in touch.

Adrien

davidbrito
MOHID Advanced user
Posts: 189
Joined: Thu Jan 01, 1970 00:00

Re: Build Solution - Error

Postby davidbrito » Wed Jan 09, 2013 11:57

OK, you can not remove this libs because they are needed.
Just as a last chance can you remove msvcrt.lib that is a visual studio library?

If this does not work, we do not have the option to reproduce and test this error since we do not have Intel Visual Fortran XE 2013 or Visual Studio 2012 available for us.
And the libraries used in these systems or with the ones we compiled may be in conflict.

In the case it does not work do you have the option to downgrade to the configuration that we have in codeplex?
The project in codeplex work well with Visual Studio 2008 or 2010 and Intel Visual Fortran XE 2011 (12.1 Update 1). If you have the option to downgrade on any side to test wich one is giving you problems...

David

frank.maretec@ist.utl.pt
MOHID Guru
Posts: 151
Joined: Thu Jan 01, 1970 00:00
Location: Technical University of Lisbon
Contact:

Re: Build Solution - Error

Postby frank.maretec@ist.utl.pt » Wed Jan 09, 2013 12:13

Hello,

this most probably has to do with some multi thread options (and libraries) to use. This is always tricky, but surely resolvable...

Did you try to compile the configuration Release Double OpenMP?

Also try to check here:
http://software.intel.com/en-us/forums/topic/279258

Best regards,
Frank
In order to understand recursivity you must first understand recursivity.

adrien.bonneu@gmail.com
MOHID Beginner
Posts: 8
Joined: Tue Oct 18, 2011 12:48

Re: Build Solution - Error

Postby adrien.bonneu@gmail.com » Thu Jan 10, 2013 12:26

Hello,

Thanks Frank and David for your help.

Frank, I have already tried to compile the configuration Release Double OpenMP, but the same type of errors appears again:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
1>------ Build started: Project: MOHIDLand, Configuration: Release Double OpenMP x64 ------
1>Compiling with Intel(R) Visual Fortran Compiler XE 13.0.1.119 [Intel(R) 64]...
1>MohidLand.f90
1>Linking...
1>hdf5.lib(H5Omtime.obj) : error LNK2019: unresolved external symbol timezone referenced in function H5O_mtime_decode
1>OLDNAMES.lib(timezone.obj) : error LNK2001: unresolved external symbol timezone
1>OLDNAMES.lib(timezone.obj) : error LNK2001: unresolved external symbol _timezone
1>x64\Release Double OpenMP\MOHIDLand OpenMP Double.exe : fatal error LNK1120: 2 unresolved externals
1>
1>Build log written to "file://C:\Users\ZHP\Documents\CodeplexMohidv84293\Solutions\VisualStudio2008_IntelFortran11\MOHIDNumerics\MOHIDLand\x64\Release Double OpenMP\BuildLog.htm"
-----------------------------------------------------------------------------------------------------------------------------------------------------------

David, even if I remove msvcrt.lib, I still have compilation errors. I have downloaded the right version Intel Visual Fortran XE 2011 from the XE 2013 (it is possible to download older version when you have a licence). The problem is that this compiler can be openned with MVS 2010 and 2008 only. I have a trial version of MVS 2010. So I tested and, as expected, it worked with the right configurations.
We keep in touch if you solve the previous library problems for the recent versions.

Thanks again !
Best regards,

Adrien

davidbrito
MOHID Advanced user
Posts: 189
Joined: Thu Jan 01, 1970 00:00

Re: Build Solution - Error

Postby davidbrito » Thu Jan 10, 2013 18:43

You are too advanced :)

ok it works with MVS 2008 or 2010 and IVF XE 2011 as expected!

The libraries will have to be compiled. I do not have a date to a MVS 2012 configuration...

Best regards,
David

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: Build Solution - Error

Postby Jauch » Tue Oct 21, 2014 14:44

Hi,

I don't know if you managed to compile successfully, but I found a possible solution.
I was having the same problem (and error) because I was using the runtime dll's as dynamic instead of static.

So, set Properties->Fortran->Libraries->Runtime Library to Debug Multithreaded (/libs:static /threads /dbglibs)

This should solve the problem.

Regards,
Eduardo Jauch.


Return to “MOHID Programming”

Who is online

Users browsing this forum: No registered users and 1 guest