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

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 on Next
  • 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 select Apply
  • Select Fortran>General tab and set Additional 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 set Additional 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 set Additional Dependencies to impi.lib
  • Select Linker>System tab and set SubSystem to Console (/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.