FDS Compilation with Visual Studio - firemodels/fds GitHub Wiki
These are notes for setting up a Visual Studio project on a Windows computer to build fds. This is a work in progress - not complete ie not working yet.
Preliminaries
username is your name (gforney in my case) in the following notes
- Download and install Visual Studio
- Download and install the Base and HPC oneAPI toolkits
- Clone the fds repo
Creating an FDS project
- Open Visual Studio, select
Create a New Project
button - Scroll down and select
Empty Project with Fortran Windows Desktop listed
. Then click onNext
- Name project fds in location
C:\users\username\fds_build
- Click on
Place solution and project in the same directory
checkbox - Click
Create
- Select
Project>Add Existing Item
menu item and select fds source files in the fds repo at fds\Source
Configuring the FDS project
- Select
Project>Properties
menu item - Select
Fortran>Preprocessor
tab and set Preprocess Source File to Yes . Then selectApply
- Select
Fortran>General
tab and setAdditional Include Directories
to the oneAPI mpi include file locations which on my computer is
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\include\mpi
- Select
Linker>General
tab and setAdditional Library Directories
to the oneAPI mpi library location which on my computer (and probably your) is
C:\Program Files (x86)\Intel\oneAPI\mpi\latest\lib\mpi\debug
- Select
Linker>Input
tab and setAdditional Dependencies
toimpi.lib
- Select
Linker>System
tab and setSubSystem
toConsole (/SUBSYSTEM:CONSOLE)
Building FDS
- Select the
Build>Build fds
menu item
Running FDS
- Select the
Configuration Properties>Debugging
tab - Set
Working Directory
to the directory containing your input file - Set
Command Arguments
to the name of the input file - Select
Debug>Start Debugging
menu item. Your case should start running now.