Building PHOENIX - Schumacher-Group-UPB/PHOENIX GitHub Wiki

Build Process for PHOENIX

After completing the preparation steps and installing SFML if rendering is desired, you can now build PHOENIX using the provided Makefile. The procedure is the same for both Linux and Windows.


Download PHOENIX

You can download the PHOENIX repository in one of two ways:

  1. Manually via the "Download ZIP" option.
  2. Using the command line:
    git clone --recursive https://github.com/Schumacher-Group-UPB/PHOENIX
    

Make sure to include the --recursive flag to fetch the SFML submodule if SFML rendering is required.


Building PHOENIX

  1. Open a Terminal
    Navigate to the PHOENIX directory in a terminal or command line. On Windows, you can navigate into the PHOENIX directory, right-click, and choose "Open Terminal Here."

  2. Build PHOENIX
    Use the Makefile to compile the program. In the terminal, type:

    make [options]
    

    Press enter to start the build process. Below are the available options for customizing the build:

    Build Options

    • Single or Double Precision
      Control whether the simulation uses 32-bit or 64-bit floating point precision:

      FP32=TRUE (default) / FP32=FALSE
      
    • CUDA Architecture
      Specify a target compute capability for the build. If omitted, all supported architectures are included:

      ARCH=XX / ARCH=NONE (default)
      

      For example, ARCH=75 would limit the compilation to architecture sm_75.

    • Compiler
      Specify the compiler to use. By default, nvcc is used. For CPU builds, using g++ or another CPU-optimized compiler is recommended:

      COMPILER=nvcc (default) / COMPILER=g++
      
    • CPU Support
      Build PHOENIX as a CPU-only version if no NVIDIA GPU is available:

      CPU=TRUE / CPU=FALSE (default)
      
    • Output Target
      Change the name or path of the resulting binary:

      TARGET=phoenix.exe[.o] (default)
      
    • SFML Rendering
      Enable live graphical rendering using SFML. This requires a valid SFML installation:

      SFML=TRUE / SFML=FALSE (default)
      

      If SFML is enabled, specify the path to your SFML installation:

      SFML_PATH=external/SFML/ (default)
      
    • Command Line Formatting
      Enable formatted output for terminals that support it. If using cmd.exe on Windows, leave this disabled:

      PRETTYCMD=TRUE / PRETTYCMD=FALSE (default)
      

    Example Build Command

    To compile PHOENIX with all options explicitly set:

    make COMPILER=nvcc TARGET=phoenix.exe FP32=TRUE CPU=FALSE SFML=TRUE SFML_PATH=path/to/downloaded/sfml/ PRETTYCMD=TRUE
    

    Note: Parameters with default values can be omitted. For instance, if you're using the default settings, you can simply run:

    make
    

Verify Installation

To confirm that PHOENIX was successfully built, run the following command in the terminal:

./phoenix.exe[.o]

If the installation is successful, PHOENIX will perform a brief simulation and display a summary output. If this does not happen, please revisit the steps above to ensure all dependencies are correctly installed, and the Makefile options are properly configured.

For additional troubleshooting, consult the troubleshooting guide.