Using gidpost library file in Multithreaded mode

Moderator: GiD Team

Post Reply
waseda
Posts: 13
Joined: Thu Dec 24, 2015 4:31 am
Location: Japan
Contact:

Using gidpost library file in Multithreaded mode

Post by waseda »

Dear All,

I'm trying to use gidpost (v2.7) for my simulation model and encountering some errors as shown in the attached file.
My computing environment is:

IDE: Visual Studio Community 2019
Compiler: Intel Fortran Compiler Classic 2021.1.1
Platform: X64

For testing, I tried to run an example file (gidpost.F90). It worked just fine when running the program on Runtime Library: Debug Multithread DLL mode via Linking gidpost.lib zlib.lib hdf5.lib which are located in binaries\win\vs2017 folder.

When running the program on Runtime Library: Debug Multithreaded (or Multithreaded) mode, I got several error messages saying "unresolved external symbol" as shown in the attached file.
2021-01-06 13-25-26.png
2021-01-06 13-25-26.png (136.73 KiB) Viewed 4012 times
Does this mean that the library files can't be statically-linked by default?

I would really appreciate if you can point me how to statically link these library files to a Fortran code or provide me static version of the library files as I'm not familiar with cMake stuff.

(My program uses the oneMKL version of Paradiso solver, which doesn't support dynamic linking on Windows...)

Thanks in advance,

Kenji
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Using gidpost library file in Multithreaded mode

Post by escolano »

In gitpost we provide some precompiled version for Windows, compile with some VS version and some settings, but is not possible to provide all combinations

But we provide the source code of gidpost: you can recompile as you need
(static /MD, static /MT, dynamic,...), with debug symbols or release, for Windows, Linux, or other platforms,...

I am not sure if the .lib files included today in the gidpost-2.7.zip file are compiled with /MT or /MD flag

Both are static libraries, not dynamic (there is not a gidpost.dll, but is possible do it compiling a dynamic library)
/MD ==Multithread DLL mode
/MT== Multithread mode
The difference is that with /MD the exe will al depends on some MSVC runtime libraries of the VS version used to compile
We prefer the /MT do not require these extra dlls

There are required two third part libraries:
zlib.lib
hdf5.lib
Can download its source code finding in Internet, and compile as you need.

In any case, to facilitate the tast without compile all these libraries I attach this extra .rar file
gidpost2.8_vs2017_MT.rar
(2.82 MiB) Downloaded 195 times
It has the libraries compiled with VS 2017 for Windows x32 and x64 and /MT flag
waseda
Posts: 13
Joined: Thu Dec 24, 2015 4:31 am
Location: Japan
Contact:

Re: Using gidpost library file in Multithreaded mode

Post by waseda »

Escolano,

Thank you so much for your prompt reply and providing the updated lib files. I was able to run the program with the updated library files successfully. :D

I guess I need to learn how to compile the source code for building library files in future.

Kindly Regards,

Kenji Furui
Post Reply