Difference between revisions of "Compiling with IFC 11"
From MohidWiki
(→Build Solution in x64) |
|||
Line 22: | Line 22: | ||
# Open a new instance of Visual Studio 2008. Then select ''Tools --> Options --> Intel Visual Fortran --> Compilers --> Platforms''. If the installation went ok, you should see a ''x64'' platform. Select it and then click ''ok''. You are now able to select and compile any configuration of Intel Fortran projects with the x64 platform. [[Image:Verifying-x64-architecture-is-available-IFC-VS2008.PNG|600px|thumb|center|Verifying the x64 architecture in Visual Studio project is available]]. | # Open a new instance of Visual Studio 2008. Then select ''Tools --> Options --> Intel Visual Fortran --> Compilers --> Platforms''. If the installation went ok, you should see a ''x64'' platform. Select it and then click ''ok''. You are now able to select and compile any configuration of Intel Fortran projects with the x64 platform. [[Image:Verifying-x64-architecture-is-available-IFC-VS2008.PNG|600px|thumb|center|Verifying the x64 architecture in Visual Studio project is available]]. | ||
− | ===Building Solution in x64 === | + | === Building Solution in x64 === |
# Select the configuration of choice (Debug, Release, Release Double, etc...). | # Select the configuration of choice (Debug, Release, Release Double, etc...). | ||
# Select the platform x64. [[Image:X64-platform-in-vs2008.PNG|600px|thumb|center|Selecting the x64 archicture in a Visual Studio project]] | # Select the platform x64. [[Image:X64-platform-in-vs2008.PNG|600px|thumb|center|Selecting the x64 archicture in a Visual Studio project]] | ||
# Select ''Build''... ''Build Solution''. | # Select ''Build''... ''Build Solution''. | ||
+ | |||
+ | ==== Manually configuring a project configuration to build with x64 Hdf5 1.8.6 libraries. ==== | ||
+ | The configuration is made for MohidWater, but the same steps can reproduced for MohidLand and MohidRiver. | ||
+ | * MohidBase1: ''Solution Explorer --> MohidBase1 (right-click) --> Properties --> Fortran --> Additional Include Directories''. Input '''..\..\..\..\ExternalLibs\HDF5_1.8.6_x64\include\fortran; ..\..\..\..\ExternalLibs\Proj4\Include'''. | ||
+ | * MohidBase2: ''Solution Explorer --> MohidBase2 (right-click) --> Properties --> Fortran --> Additional Include Directories''. Input '''..\..\..\..\Solutions\VisualStudio2008_IntelFortran11\MOHIDNumerics\MOHIDBase1\x64\Release'''. | ||
+ | * MohidWater | ||
+ | |||
+ | === Present limitations of x64 architecture in Windows === | ||
+ | * Currently, only the Hdf5 1.8.6 libraries in 64bits are available in the codeplex. The [[Proj4]] and the [[netcdf]] libraries in 64bits are currently unavailable. | ||
== Optional compilation settings == | == Optional compilation settings == |
Revision as of 11:17, 18 February 2011
Please follow these instructions step by step and until the end:
Contents
Creating a new project
- Make sure you have installed in your computer Microsoft Visual Studio 2008 and Intel Fortran Compiler 11.0. If you don’t have both installed, please install them.
- Make sure you have downloaded the last version of the code and solutions from codeplex (http://mohid.codeplex.com) for example via tortoise software.
- Your folder structure will look like this after the download:
- Open Microsoft Visual Studio 2008.
- Open the solution from the CODEPLEX structure above under folder > Solutions > VisualStudio2008_IntelFortran11
- All the setting are already done.
Build Solution
- Select "Build...Build Solution"
Build Solution in x64
Pre-requisite
If it is the firt time you build for the x64 architecture, then you must first install the x64 platform on Visual Studio 2008.
- Close any opened instance of Visual Studio 2008.
- Load the dvd iso file of Visual Studio 2008 (found in \\kepler\Software\VS2008\VisualStudio_Pro_2008_Eng.iso) with the Daemon Tools utility. This will install a "virtual" dvd drive with Visual Studio 2008 loaded in your system files.
- Go to Control Panel --> Uninstall or change a program --> Microsoft Visual Studio 2008 Professional Edition --> Double click(win 7)|Add/Repair(win xp).
- Install the x64 Compiler tools from the Visual Studio 2008 dvd.
- Open a new instance of Visual Studio 2008. Then select Tools --> Options --> Intel Visual Fortran --> Compilers --> Platforms. If the installation went ok, you should see a x64 platform. Select it and then click ok. You are now able to select and compile any configuration of Intel Fortran projects with the x64 platform. .
Building Solution in x64
- Select the configuration of choice (Debug, Release, Release Double, etc...).
- Select the platform x64.
- Select Build... Build Solution.
Manually configuring a project configuration to build with x64 Hdf5 1.8.6 libraries.
The configuration is made for MohidWater, but the same steps can reproduced for MohidLand and MohidRiver.
- MohidBase1: Solution Explorer --> MohidBase1 (right-click) --> Properties --> Fortran --> Additional Include Directories. Input ..\..\..\..\ExternalLibs\HDF5_1.8.6_x64\include\fortran; ..\..\..\..\ExternalLibs\Proj4\Include.
- MohidBase2: Solution Explorer --> MohidBase2 (right-click) --> Properties --> Fortran --> Additional Include Directories. Input ..\..\..\..\Solutions\VisualStudio2008_IntelFortran11\MOHIDNumerics\MOHIDBase1\x64\Release.
- MohidWater
Present limitations of x64 architecture in Windows
- Currently, only the Hdf5 1.8.6 libraries in 64bits are available in the codeplex. The Proj4 and the netcdf libraries in 64bits are currently unavailable.
Optional compilation settings
- To perform optional compilation, just add the compilation pre-processor keywords in "Properties...Fortran...PreProcessor", in the "Preprocessor Definitions" text box.
Exclude modules
Some modules can be completely excluded from compilation. If your simulations do not use these modules you can use this pre-processor keywords.
_LAGRANGIAN_ excludes Modules Lagrangian + Jet + Oil _AIR_ excludes Modules InterfaceWaterAir + Atmosphere _WAVES_ excludes Module Waves _SEDIMENT_ excludes Modules SedimentProperties + Consolidation
Other options
Other keywords can also be used.
_USE_MPI includes MPI code _SHORT_LINE_LENGTH sets line_length = 64 (default line_length is 256) _LONG_LINE_LENGTH sets line_length = 1024(default line_length is 256) _GUI_ includes GUI code