vortexgpgpu / vortex

https://vortex.cc.gatech.edu/
Apache License 2.0
1.22k stars 260 forks source link

Configure Script Does not Support FGPA Node OS #197

Open Udit8348 opened 6 days ago

Udit8348 commented 6 days ago

Summary

configure script which is responsible for setting $VORTEX_HOME env variable is not compatible with the CRNCH Rouges Gallery node which is used for FPGA synthesis. FPGA Node (flubber 9) lsb_release -a returns:

LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterprise
Description:    Red Hat Enterprise Linux release 8.10 (Ootpa)
Release:    8.10
Codename:   Ootpa

configure only supports the following OS:

# Function to detect current OS
detect_osversion() {
    local osversion="unsupported"
    if [ -f /etc/os-release ]; then
        . /etc/os-release  # Source the os-release file to get OS information
        case "$ID" in
            ubuntu)
                case "$VERSION_CODENAME" in
                    bionic) osversion="ubuntu/bionic";;
                    focal) osversion="ubuntu/focal";;
                    jammy) osversion="ubuntu/focal";;
                    noble) osversion="ubuntu/focal";;
                    # Add new versions as needed
                esac
                ;;
            centos)
                case "$VERSION_ID" in
                    7) osversion="centos/7";;
                    # Add new versions as needed
                esac
                ;;
        esac
    fi
    echo "$osversion"
}

The issue is, every Makefile in the repo depends on $VORTEX_HOME env variable being set, including FPGA synthesis Makefile (vortex/hw/syn/xilinx/xrt/Makefile). Therefore, there is no supported method of setting $VORTEX_HOME during FGPA synthesis process.

Temporary Solution

Developer needs to assign $VORTEX_HOME environment variable manually from vortex root before completing FPGA synthesis steps. For example:

cd /nethome/usubramanya3/USERSCRATCH/
export VORTEX_HOME="$(pwd)"

Proposal

Instead of changing configure script, I propose a new script in in the FPGA directories that sets up all the environment variables including $VORTEX_HOME and initial FPGA synthesis steps. For example:

export VORTEX_HOME="$(pwd)"
source /opt/xilinx/xrt/setup.sh
source /tools/reconfig/xilinx/Vitis/2023.1/settings64.sh
Udit8348 commented 6 days ago

Additionally, vortex/hw/syn/xilinx/xrt/Makefile depends on config.mk in project root, however only config.mk.in exists. It should be noted that config.mk can only be generated via configure script which as mentioned before cannot run on FPGA synthesis nodes. Still looking for a temp solution.