Commit a717f220 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

add fpga build in Makefile + init_aoc_esa.sh


Former-commit-id: 558a3418
parent e19dfaa6
......@@ -2,7 +2,15 @@
PDBs/*
ofdock_taskpar_alt/Krnl_GA/*
ofdock_taskpar_alt/device/docking_fpga_leo/*
# Ignore FPGA binaries
ofdock_taskpar_alt/docking/*
ofdock_taskpar_alt/docking.aoco
ofdock_taskpar_alt/docking.aocx
# Ignore docking debug/tmp output
*~
final_population_run*
# ===================
# C gitignore
......
Version compiled with Intel Altera Tools 16.1
Source first: init_aoc_esa.sh
ofdock_datapar_xl: data parallel version for altera taken from feanor
Machine: feanor
Path: /home/wimi/lvs/altera/ofdock_altera/ofdock
ofdock_taskpar_xl: task parallel version for altera
......@@ -199,7 +199,6 @@ else
REP=
endif
# =============================
......@@ -220,38 +219,89 @@ $(TARGET_DIR)/$(TARGET) : Makefile $(SRCS) $(INCS) $(TARGET_DIR)
$(foreach D,$(LIB_DIRS),-L$D) \
$(foreach L,$(LIBS),-l$L) \
-o $(TARGET_DIR)/$(TARGET) $(DOCK_DEBUG_FLAG) $(DEV) $(DOCK_PROG) $(ENABLE_KERNELS) $(REP)
@echo " "
@echo "================================"
@echo "INFO: host binary is under: bin/"
@echo "================================"
@echo " "
# Docking parameters
PDB := 1stp
NRUN := 10
NEV := 200000
PDB := 3ptb
NRUN := 20
NEV := 300000
# Make it all: compilation (host & device) + run
# Notice, it switches automatically to /bin folder
emu: $(TARGET_DIR)/$(TARGET) keremu runemu
# Device folder
# Device main kernel name
# Device main kernel source
DEV_DIRS := device
DEV_SRC := $(DEV_DIRS)/Krnl_GA.cl
## Make it all: compilation (host & device) + run emulation
## Notice, it switches automatically to /bin folder
#emu: $(TARGET_DIR)/$(TARGET) keremu runemu
# Build kernel binary only for emulation
# Creates under bin:
# "docking" folder
# docking.aoco
# docking.aocx
keremu: $(DEV_SRC)
aoc -march=emulator -v --board a10gx $(DEV_SRC) -o $(TARGET_DIR)/docking.aocx $(REP)
runemu: $(TARGET)
@echo " "
@echo "=========================================================="
@echo "INFO: emulation files are under: bin/docking(.aoco)(.aocx)"
@echo "=========================================================="
@echo " "
# Run emulation
# Compilation (host & device) if not done previously
# The working directory is changed
# So .dlg file is written there
emu: $(TARGET_DIR)/$(TARGET) keremu
cd $(TARGET_DIR) && \
CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 ./$(TARGET) -ffile ../input/$(PDB)/derived/$(PDB)_protein.maps.fld -lfile ../input/$(PDB)/derived/$(PDB)_ligand.pdbqt -nev $(NEV) -nrun $(NRUN) -gfpop 1
@echo " "
@echo "========================================"
@echo "INFO: log file is under: bin/docking.dlg"
@echo "========================================"
@echo " "
# Reports are generated
# Could be used in multistep compilation
# Creates under bin:
# "docking" folder -> /reports/report.html, to see details
# docking.aoco
# No actual hardware is built (NO .aocx)
kerrpt: $(DEV_SRC)
aoc --board a10gx $(DEV_SRC) -o $(TARGET_DIR)/docking.aoco $(REP) -c --report
@echo " "
@echo "============================================================="
@echo "INFO: report files are under: bin/docking/reports/report.html"
@echo "============================================================="
@echo " "
# Build hw (FPGA bitstream)
# NOT integrated yet in a multistep compilation
# Creates under root folder:
# "docking" folder
# docking.aoco
# docking.aocx
hw:
aoc --board a10gx $(DEV_SRC) -o docking.aocx
@echo " "
@echo "================================="
@echo "INFO: FPGA bitstream is under: ./"
@echo "================================="
@echo " "
# CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 ./$(TARGET) -ffile ../input/3ptb/derived/3ptb_protein.maps.fld -lfile ../input/3ptb/derived/3ptb_ligand.pdbqt -nev 250000 -nrun 40
$(TARGET_DIR) :
$(ECHO)mkdir $(TARGET_DIR)
......
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" ?>
<result>
<clustering_histogram>
<cluster cluster_rank="1" lowest_binding_energy="-5.53" run="14" mean_binding_energy="1973785.53" num_in_clus="17" />
<cluster cluster_rank="2" lowest_binding_energy="-5.52" run="39" mean_binding_energy="2097147.46" num_in_clus="8" />
<cluster cluster_rank="3" lowest_binding_energy="-2.35" run="27" mean_binding_energy="-1.42" num_in_clus="6" />
<cluster cluster_rank="4" lowest_binding_energy="-1.90" run="13" mean_binding_energy="-0.55" num_in_clus="9" />
</clustering_histogram>
<rmsd_table>
<run rank="1" sub_rank="1" run="14" binding_energy="-5.53" cluster_rmsd="0.00" reference_rmsd="2.08" />
<run rank="1" sub_rank="2" run="4" binding_energy="-5.47" cluster_rmsd="0.73" reference_rmsd="2.03" />
<run rank="1" sub_rank="3" run="10" binding_energy="-5.45" cluster_rmsd="0.71" reference_rmsd="2.04" />
<run rank="1" sub_rank="4" run="2" binding_energy="-5.43" cluster_rmsd="0.70" reference_rmsd="2.04" />
<run rank="1" sub_rank="5" run="17" binding_energy="-5.42" cluster_rmsd="1.50" reference_rmsd="2.42" />
<run rank="1" sub_rank="6" run="15" binding_energy="-5.35" cluster_rmsd="0.76" reference_rmsd="2.08" />
<run rank="1" sub_rank="7" run="11" binding_energy="-5.35" cluster_rmsd="0.50" reference_rmsd="2.08" />
<run rank="1" sub_rank="8" run="7" binding_energy="-5.15" cluster_rmsd="1.36" reference_rmsd="2.48" />
<run rank="1" sub_rank="9" run="24" binding_energy="-5.01" cluster_rmsd="0.59" reference_rmsd="2.14" />
<run rank="1" sub_rank="10" run="30" binding_energy="-4.58" cluster_rmsd="1.56" reference_rmsd="2.53" />
<run rank="1" sub_rank="11" run="23" binding_energy="-4.50" cluster_rmsd="1.11" reference_rmsd="2.17" />
<run rank="1" sub_rank="12" run="38" binding_energy="-4.49" cluster_rmsd="1.50" reference_rmsd="2.47" />
<run rank="1" sub_rank="13" run="35" binding_energy="-4.48" cluster_rmsd="0.98" reference_rmsd="2.13" />
<run rank="1" sub_rank="14" run="16" binding_energy="-4.43" cluster_rmsd="1.06" reference_rmsd="2.15" />
<run rank="1" sub_rank="15" run="5" binding_energy="-4.31" cluster_rmsd="1.66" reference_rmsd="2.49" />
<run rank="1" sub_rank="16" run="34" binding_energy="-3.66" cluster_rmsd="1.90" reference_rmsd="2.64" />
<run rank="1" sub_rank="17" run="40" binding_energy="33554432.60" cluster_rmsd="1.19" reference_rmsd="2.18" />
<run rank="2" sub_rank="1" run="39" binding_energy="-5.52" cluster_rmsd="0.00" reference_rmsd="0.36" />
<run rank="2" sub_rank="2" run="33" binding_energy="-5.45" cluster_rmsd="1.50" reference_rmsd="1.52" />
<run rank="2" sub_rank="3" run="19" binding_energy="-5.43" cluster_rmsd="0.72" reference_rmsd="0.76" />
<run rank="2" sub_rank="4" run="12" binding_energy="-5.33" cluster_rmsd="1.49" reference_rmsd="1.50" />
<run rank="2" sub_rank="5" run="31" binding_energy="-4.49" cluster_rmsd="1.42" reference_rmsd="1.50" />
<run rank="2" sub_rank="6" run="18" binding_energy="-3.73" cluster_rmsd="1.57" reference_rmsd="1.61" />
<run rank="2" sub_rank="7" run="9" binding_energy="-2.95" cluster_rmsd="1.36" reference_rmsd="1.45" />
<run rank="2" sub_rank="8" run="29" binding_energy="16777212.60" cluster_rmsd="1.32" reference_rmsd="1.26" />
<run rank="3" sub_rank="1" run="27" binding_energy="-2.35" cluster_rmsd="0.00" reference_rmsd="4.31" />
<run rank="3" sub_rank="2" run="32" binding_energy="-1.85" cluster_rmsd="0.72" reference_rmsd="4.29" />
<run rank="3" sub_rank="3" run="28" binding_energy="-1.46" cluster_rmsd="1.61" reference_rmsd="4.39" />
<run rank="3" sub_rank="4" run="25" binding_energy="-1.37" cluster_rmsd="0.86" reference_rmsd="4.23" />
<run rank="3" sub_rank="5" run="36" binding_energy="-0.94" cluster_rmsd="1.51" reference_rmsd="4.49" />
<run rank="3" sub_rank="6" run="6" binding_energy="-0.56" cluster_rmsd="1.80" reference_rmsd="4.31" />
<run rank="4" sub_rank="1" run="13" binding_energy="-1.90" cluster_rmsd="0.00" reference_rmsd="3.83" />
<run rank="4" sub_rank="2" run="21" binding_energy="-1.89" cluster_rmsd="0.20" reference_rmsd="3.81" />
<run rank="4" sub_rank="3" run="37" binding_energy="-1.74" cluster_rmsd="1.35" reference_rmsd="4.01" />
<run rank="4" sub_rank="4" run="20" binding_energy="-1.74" cluster_rmsd="1.50" reference_rmsd="3.99" />
<run rank="4" sub_rank="5" run="8" binding_energy="-1.37" cluster_rmsd="1.49" reference_rmsd="3.99" />
<run rank="4" sub_rank="6" run="3" binding_energy="-1.07" cluster_rmsd="0.73" reference_rmsd="3.84" />
<run rank="4" sub_rank="7" run="26" binding_energy="-0.63" cluster_rmsd="0.81" reference_rmsd="3.85" />
<run rank="4" sub_rank="8" run="1" binding_energy="1.29" cluster_rmsd="0.77" reference_rmsd="3.85" />
<run rank="4" sub_rank="9" run="22" binding_energy="4.10" cluster_rmsd="1.52" reference_rmsd="3.83" />
</rmsd_table>
</result>
Compiler Command: aoc -march=emulator --fp-relaxed --fpc -v --board a10gx device/Krnl_GA.cl -o bin/docking.aocx
This diff is collapsed.
# This is created to automate the boring
# process of setting AOC in celebdil
# DO NOT FORGET to run it using:
# >source init_aoc_esa.sh
echo "======================================="
echo "Setting up Altera OpenCL SDK & Compiler"
echo "======================================="
echo ""
export ALTERAOCLSDKROOT=/opt/cad/altera/altera-16.1/hld
echo "ALTERAOCLSDKROOT: "
echo $ALTERAOCLSDKROOT
echo " "
source /opt/cad/altera/altera-16.1/hld/init_opencl.sh
echo " "
export LM_LICENSE_FILE=/opt/cad/keys/altera
echo "LM_LICENSE_FILE: "
echo $LM_LICENSE_FILE
echo " "
export PATH=/opt/cad/altera/altera-16.1/quartus/bin/:$PATH
echo "PATH: "
echo $PATH
echo " "
echo "Altera OpenCL SDK version: "
aocl version
echo " "
echo "Altera OpenCL Compiler version: "
aoc --version
echo " "
#echo $AOCL_BOARD_PACKAGE_ROOT
echo "List of available boards "
aoc --list-boards
echo " "
echo "Maybe we need to switch to another board?"
echo " "
export AOCL_BOARD_PACKAGE_ROOT=/opt/cad/altera/altera-16.1/hld/board/a10_ref
#echo $AOCL_BOARD_PACKAGE_ROOT
source /opt/cad/altera/altera-16.1/hld/init_opencl.sh
echo " "
echo "List of available boards "
aoc --list-boards
echo " "
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment