CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

CGNS fortran code compiling with intel visual fortran xe

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes
  • 1 Post By dokeun
  • 4 Post By dokeun

Reply
 
LinkBack Thread Tools Display Modes
Old   April 3, 2012, 11:26
Default CGNS fortran code compiling with intel visual fortran xe
  #1
Member
 
Dokeun, Hwang
Join Date: Apr 2010
Posts: 71
Rep Power: 7
dokeun is on a distinguished road
Dear ...

I compiled cgnslib_3.1.3 using CMake-gui(ver 2.8.7) with generator 'visual studio 9 2008' and there were some options as follows.

I'd like to know what other Names unchecked in Value colume are

Should I check ENABLE_FORTRAN in order to use fortran code for my program?

However, when I did configure & generate with this option, I couldn't build "cgns.sln"

Should I check BUILD_CGNSTOOLS in order to use cgnstools?
================================================== ============
Name __________________________________________________ Value
================================================== ============
BUILD_CGNSTOOLS___________________________________ ___ □
CGNS_BUILD_SHARED_________________________________ ___v
CGNS_USE_SHARED___________________________________ ___v
CMAKE_BUILD_Type__________________________________ ____Release
CMAKE_INSTALL_PREFIX______________________________ ____C:/Program files/cgns
ENABLE_FORTRAN____________________________________ ____□
ENABLE_HDF5_______________________________________ ____□
ENABLE_LEGACY_____________________________________ ____□
ENABLE_LFS________________________________________ ____□
ENABLE_SCOPING____________________________________ ___□
ENABLE_TESTS______________________________________ ____□
================================================== ============


With default option, I could build cgns.sln by MS visual studio and got some files as follows in debug folder

"cgns.idb, cgns.lib, cgns.pdb, cgnsdll.dll, cgnsdll.exp, cgnsdll.idb, cgnsdll.ilk, cgnsdll.lib, cgnsdll.pdb"

What should I do with these files in order to test fortran files described in CGNS User's Manual?
samurai_01 likes this.

Last edited by dokeun; April 4, 2012 at 13:25. Reason: Issue was changed.
dokeun is offline   Reply With Quote

Old   April 5, 2012, 21:01
Default got solved
  #2
Member
 
Dokeun, Hwang
Join Date: Apr 2010
Posts: 71
Rep Power: 7
dokeun is on a distinguished road
Hi there.
After few days of efforts, I somehow installed the library & cgnstools.
When I first tried to install it, I didn't even know what makefile, cmake mean.
And README and other explanation files included were not enough for me.
Even though this looks clumsy a little, it works.
So I'd like to share my experience hoping that it can be a help.
And I hope someone presents more refined solution.

PC environment is as follows..
OS : windows 7
Program : MS Visual Studio 2008, Intell Visual Fortran

[How to install cgns library and cgnstools]

1. Download lastest source file(ver. 3.1.3) from http://cgns.sourceforge.net/download.html

2. Download HDF5 from http://www.hdfgroup.org/HDF5/release...n5.html#obtain and install it.
=> I'm not sure if it is necessary but I followed an install guide in the cgns sources
=> I'm not sure waht you should install. But I choosed HDF5188-win32-static.zip

3. Download Tcl from http://www.activestate.com/activetcl/downloads and install it.
=> In my case, I installed it to c:\Program files\Tcl
=> Regist ...Tcl\include as include < environment variables
...Tcl\lib as lib < environment variables

4. Unzip cgnslib_3.1.3.tar. wherever you want
=>then some files and directories will be shown

5. Excute "Visual Studio 2008 Command Prompt" from Start>Miscrosoft Visual Stuio 2008>Visual Studio Tools
=>cmd won't work if you don't set path or something in environment configuration.

6. Go to the ...\src under the directory you unzipped cgnslib_3.1.3
=> ex) c:\Program files\CGNS\cgnslib_3.1.3\src>__

7. type
..\src>configure.bat -lfs -ifort -tcl [tcl directory] -install [install directory]
=> here, [tcl directory] is where the tcl is installed. ex)c:\Progra~1\Tcl
=> [install directory] is where a result will be installed. ex)c:\Progra~1\CGNS
=> Caution! There should not be any blanck when those directories are typed. Type "Progra~1" instead of "Program files".

8. type
..\src>nmake all
=> In my case two error messages were given but those didn't matter. I just typed this command one more.

9. type
..\src>namke install
=> Then 2 or 4 folders including files will be installed to [install directory]
=> If you have no problem, then there should be 4 directories.
include, bin, share, lib
=> In my case there were just 2 folders, include, lib. so I executed.
...src\sgnstools>cgconfig.bat
...src\sgnstools>nmake install
-------------------------------------------------------------------------------------------------------------------------------------------------------------
A. Regist following folders in MS Visual Studio>Tools>Options>Intel(r) VF>Compiler
...>CGNS>lib
...>CGNS>include
=> But, when I compiled fortran code from example codes, I had to include "..CGNS\lib\cgns.lib" as resource file in MS Visual IDE. Refer attached image.

B. Just execute batch files in the folder, ...CGNS>bin for cgnstools
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Attached Images
File Type: jpg resource.jpg (15.5 KB, 27 views)

Last edited by dokeun; April 9, 2012 at 08:12. Reason: error fixing
dokeun is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 00:52
CFD Code with Fortran murat Main CFD Forum 0 October 11, 2009 17:05
Intel Fortran and CFX 11.0 Rogerio Fernandes Brito CFX 4 November 11, 2008 01:27
visual fortran Monica Main CFD Forum 1 August 28, 2004 20:45
Error when compiling user fortran Mads Bang CFX 1 October 8, 2002 11:47


All times are GMT -4. The time now is 22:52.