Commit 1a283eba authored by Leonardo Solis's avatar Leonardo Solis

add datapar Makefile to build bin_hw

parent e0c024cb
Version compiled with Intel Altera Tools 16.1
Version compiled with Intel Altera Tools 16.0 (Quartus upgraded and patched)
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
**ofdock_datapar_xl**: data-parallel version
**ofdock_taskpar_xl**: task-parallel version
......@@ -25,6 +25,8 @@
# See http://www.altera.com/literature/hb/opencl-sdk/aocl_getting_started.pdf
# for more information on installing and configuring the Intel(R) FPGA SDK for OpenCL(TM).
VERBOSE = 1
ifeq ($(VERBOSE),1)
ECHO :=
else
......@@ -43,22 +45,11 @@ endif
AOCL_COMPILE_CONFIG := $(shell aocl compile-config )
AOCL_LINK_CONFIG := $(shell aocl link-config )
#= defines a recursively-expanded variable
#:= defines a simply-expanded variable
DEBUG=1
# Compilation flags
ifeq ($(DEBUG),1)
CXXFLAGS += -g
......@@ -69,10 +60,18 @@ endif
# Compiler
CXX := g++
# Target
# Target name
TARGET := host
# Target folder for host & emulation binaries
TARGET_DIR := bin
# Target folder for FPGA binary
TARGET_DIR_HW := bin_hw
# Target folder for FPGA binary instrumented with performance counters
TARGET_DIR_HW_PROF := bin_hw_profile
# Directories
#INC_DIRS := ../common/inc
INC_DIRS := ../common/inc opencl_lvs/inc host/inc ./
......@@ -168,10 +167,9 @@ else
K4 =
endif
ENABLE_KERNELS = $(K1) $(K2) $(K3) $(K4)
# =============================
# Make it all!
all : $(TARGET_DIR)/$(TARGET)
......@@ -189,9 +187,98 @@ $(TARGET_DIR)/$(TARGET) : Makefile $(SRCS) $(INCS) $(TARGET_DIR)
$(AOCL_COMPILE_CONFIG) $(SRCS) $(AOCL_LINK_CONFIG) \
$(foreach D,$(LIB_DIRS),-L$D) \
$(foreach L,$(LIBS),-l$L) \
-o $(TARGET_DIR)/$(TARGET) $(DOCK_DEBUG_FLAG) $(DEV) $(DOCK_PROG) $(K1) $(K2) $(K3) $(K4)
-o $(TARGET_DIR)/$(TARGET) $(DOCK_DEBUG_FLAG) $(DEV) $(DOCK_PROG) $(ENABLE_KERNELS)
@echo " "
@echo "================================"
@echo "INFO: host binary is under: bin/"
@echo "================================"
@echo " "
# Docking parameters
PDB := 1stp
NRUN := 10
NEV := 200000
# Device folder
# Device main kernel name
# Device main kernel source
DEV_DIRS := device
DEV_SRC := $(DEV_DIRS)/calc_initpop.cl
BOARD_HARP2 := bdw_fpga_v1.0
#keremu
#emu
#kerrpt
# Build hw (FPGA bitstream)
# NOT integrated yet in a multistep compilation
# Creates under bin_hw:
# "docking" folder
# docking.aoco
# docking.aocx
hw:
aoc --board $(BOARD_HARP2) $(DEV_SRC) -o $(TARGET_DIR_HW)/docking.aocx
@echo " "
@echo "==========================================================="
@echo "INFO: FPGA bitstream is under: bin_hw/docking(.aoco)(.aocx)"
@echo "==========================================================="
@echo " "
# Build hw (FPGA bitstream) instrumented with performance counters
# NOT integrated yet in a multistep compilation
# Creates under bin_hw_profile
# "docking" folder
# docking.aoco
# docking.aocx
hw_profile:
aoc --profile --board $(BOARD_HARP2) $(DEV_SRC) -o $(TARGET_DIR_HW_PROF)/docking.aocx
@echo " "
@echo "================================================================================"
@echo "INFO: instrumented FPGA bitstream is under: bin_hw_profile/docking(.aoco)(.aocx)"
@echo "================================================================================"
@echo " "
HARP2_DIR := copyharp2_datapar
HARP2_DIR_DOCK := ofdock_datapar_alt
# Delete an existing folder if previously created
# Create a folder $(HARP2_DIR) in the parent directory
# Copy binaries into $(HARP2_DIR) folder, avoiding the (innecesary) compilation intermediate files
# Copy source files into $(HARP2_DIR) as host is built in the HARP2 front-end
# Create a zip file out of the $(HARP2_DIR) folder
copyharp2: clean_copyharp2
mkdir ../$(HARP2_DIR)
mkdir ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)
mkdir ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/$(TARGET_DIR_HW)
mkdir ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/$(TARGET_DIR_HW_PROF)
cp $(TARGET_DIR_HW)/docking.* ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/$(TARGET_DIR_HW)/
cp $(TARGET_DIR_HW_PROF)/docking.* ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/$(TARGET_DIR_HW_PROF)/
cp Makefile ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/
cp defines.h ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/
cp -r device/ ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/
cp -r host/ ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/
cp -r input/ ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/
cp -r wrapcl/ ../$(HARP2_DIR)/$(HARP2_DIR_DOCK)/
cp -r ../common ../$(HARP2_DIR)/
cd ../; zip -r $(HARP2_DIR).zip $(HARP2_DIR)
@echo "================================================================================"
@echo "The next step is to transfer the .zip file to the HARP2 fron-end: "
@echo "> cd .."
@echo "> scp copyharp2.zip h2solis@fe-1.harp.pc2.uni-paderborn.de:~/ocladock/"
@echo "================================================================================"
@echo " "
clean_copyharp2:
rm -r ../$(HARP2_DIR)
$(TARGET_DIR) :
......
This diff is collapsed.
<?xml version="1.0" ?>
<result>
<clustering_histogram>
<cluster cluster_rank="1" lowest_binding_energy="-8.14" run="1" mean_binding_energy="-8.14" num_in_clus="1" />
</clustering_histogram>
<rmsd_table>
<run rank="1" sub_rank="1" run="1" binding_energy="-8.14" cluster_rmsd="0.00" reference_rmsd="1.16" />
</rmsd_table>
</result>
This diff is collapsed.
[lvs@celebdil bin]$ CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 ./host -ffile ../input_data/1hvr_vegl.maps.fld -lfile ../input_data/1hvrl.pdbqt
Querying platform for info:
==========================
CL_PLATFORM_NAME = Intel(R) FPGA SDK for OpenCL(TM)
CL_PLATFORM_VENDOR = Altera Corporation
CL_PLATFORM_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 16.1
Querying device for info:
========================
CL_DEVICE_NAME = EmulatorDevice : Emulated Device
CL_DEVICE_VENDOR = Altera Corporation
CL_DEVICE_VENDOR_ID = 4466
CL_DEVICE_VERSION = OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version 16.1
CL_DRIVER_VERSION = 16.1
CL_DEVICE_ADDRESS_BITS = 64
CL_DEVICE_AVAILABLE = true
CL_DEVICE_ENDIAN_LITTLE = true
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 32768
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0
CL_DEVICE_GLOBAL_MEM_SIZE = 8589934592
CL_DEVICE_IMAGE_SUPPORT = true
CL_DEVICE_LOCAL_MEM_SIZE = 16384
CL_DEVICE_MAX_CLOCK_FREQUENCY = 1000
CL_DEVICE_MAX_COMPUTE_UNITS = 1
CL_DEVICE_MAX_CONSTANT_ARGS = 8
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 2147483648
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 3
CL_DEVICE_MEM_BASE_ADDR_ALIGN = 8192
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 1024
CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 4
CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 2
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0
Command queue out of order? = false
Command queue profiling enabled? = true
Using AOCX: docking.aocx
Init complete!
Executing docking runs:
20% 40% 60% 80% 100%
---------+---------+---------+---------+---------+
**************************************************
Program run time 7048.609 sec (CORRECTED, used for EVALUATION)
package require -exact qsys 12.1
set_validation_property AUTOMATIC_VALIDATION false
add_instance kernel_system kernel_system
add_connection board.kernel_clk kernel_system.clock_reset
add_connection board.kernel_clk2x kernel_system.clock_reset2x
add_connection board.kernel_reset kernel_system.clock_reset_reset
add_connection kernel_system.kernel_mem0 board.kernel_mem0
add_connection board.kernel_irq kernel_system.kernel_irq
add_connection board.kernel_cra kernel_system.kernel_cra
add_connection board.acl_internal_snoop kernel_system.cc_snoop
add_connection board.kernel_clk kernel_system.cc_snoop_clk
save_system
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0"?>
<board name="a10gx" vfabric="0" big_endian="0">
<global_mem_config name="DDR" mode="burst-interleaved"/>
<kernel name="calc_initpop" csr_addr="0" csr_size="256" work_group_invariant="0" vector_lanes="1" >
<work_group size_x="32" size_y="1" size_z="1" max_size="32"/>
<argument index="0" type="0" category="0" size="1" >
</argument>
<argument index="1" type="0" category="0" size="1" >
</argument>
<argument index="2" type="0" category="0" size="4" >
</argument>
<argument index="3" type="0" category="0" size="1" >
</argument>
<argument index="4" type="0" category="0" size="1" >
</argument>
<argument index="5" type="0" category="0" size="1" >
</argument>
<argument index="6" type="0" category="0" size="4" >
</argument>
<argument index="7" type="2" category="1" size="8" >
</argument>
<argument index="8" type="0" category="0" size="4" >
</argument>
<argument index="9" type="0" category="0" size="4" >
</argument>
<argument index="10" type="0" category="0" size="4" >
</argument>
<argument index="11" type="2" category="1" size="8" >
</argument>
<argument index="12" type="2" category="1" size="8" >
</argument>
<argument index="13" type="2" category="1" size="8" >
</argument>
<argument index="14" type="0" category="0" size="4" >
</argument>
<argument index="15" type="0" category="0" size="4" >
</argument>
<argument index="16" type="2" category="1" size="8" >
</argument>
<local_memory id="5" local_demand="256"/>
<local_memory id="6" local_demand="4"/>
<local_memory id="7" local_demand="128"/>
<local_memory id="8" local_demand="360"/>
<local_memory id="9" local_demand="360"/>
<local_memory id="10" local_demand="360"/>
</kernel>
<kernel name="gen_and_eval_newpops" csr_addr="256" csr_size="256" work_group_invariant="0" vector_lanes="1" >
<work_group size_x="32" size_y="1" size_z="1" max_size="32"/>
<argument index="0" type="0" category="0" size="1" >
</argument>
<argument index="1" type="0" category="0" size="1" >
</argument>
<argument index="2" type="0" category="0" size="4" >
</argument>
<argument index="3" type="0" category="0" size="1" >
</argument>
<argument index="4" type="0" category="0" size="1" >
</argument>
<argument index="5" type="0" category="0" size="1" >
</argument>
<argument index="6" type="0" category="0" size="4" >
</argument>
<argument index="7" type="2" category="1" size="8" >
</argument>
<argument index="8" type="0" category="0" size="4" >
</argument>
<argument index="9" type="0" category="0" size="4" >
</argument>
<argument index="10" type="0" category="0" size="4" >
</argument>
<argument index="11" type="2" category="1" size="8" >
</argument>
<argument index="12" type="2" category="1" size="8" >
</argument>
<argument index="13" type="2" category="1" size="8" >
</argument>
<argument index="14" type="2" category="1" size="8" >
</argument>
<argument index="15" type="2" category="1" size="8" >
</argument>
<argument index="16" type="2" category="1" size="8" >
</argument>
<argument index="17" type="0" category="0" size="4" >
</argument>
<argument index="18" type="0" category="0" size="4" >
</argument>
<argument index="19" type="0" category="0" size="4" >
</argument>
<argument index="20" type="0" category="0" size="4" >
</argument>
<argument index="21" type="0" category="0" size="4" >
</argument>
<argument index="22" type="0" category="0" size="4" >
</argument>
<argument index="23" type="0" category="0" size="4" >
</argument>
<argument index="24" type="0" category="0" size="4" >
</argument>
<argument index="25" type="2" category="1" size="8" >
</argument>
<local_memory id="14" local_demand="128"/>
<local_memory id="15" local_demand="128"/>
<local_memory id="16" local_demand="4"/>
<local_memory id="17" local_demand="40"/>
<local_memory id="18" local_demand="4"/>
<local_memory id="19" local_demand="16"/>
<local_memory id="20" local_demand="16"/>
<local_memory id="21" local_demand="8"/>
<local_memory id="22" local_demand="8"/>
<local_memory id="23" local_demand="152"/>
<local_memory id="24" local_demand="128"/>
<local_memory id="25" local_demand="360"/>
<local_memory id="26" local_demand="360"/>
<local_memory id="27" local_demand="360"/>
</kernel>
<kernel name="perform_ls" csr_addr="512" csr_size="256" work_group_invariant="0" vector_lanes="1" >
<work_group size_x="32" size_y="1" size_z="1" max_size="32"/>
<argument index="0" type="0" category="0" size="1" >
</argument>
<argument index="1" type="0" category="0" size="1" >
</argument>
<argument index="2" type="0" category="0" size="4" >
</argument>
<argument index="3" type="0" category="0" size="1" >
</argument>
<argument index="4" type="0" category="0" size="1" >
</argument>
<argument index="5" type="0" category="0" size="1" >
</argument>
<argument index="6" type="0" category="0" size="4" >
</argument>
<argument index="7" type="2" category="1" size="8" >
</argument>
<argument index="8" type="0" category="0" size="4" >
</argument>
<argument index="9" type="0" category="0" size="4" >
</argument>
<argument index="10" type="0" category="0" size="4" >
</argument>
<argument index="11" type="2" category="1" size="8" >
</argument>
<argument index="12" type="2" category="1" size="8" >
</argument>
<argument index="13" type="2" category="1" size="8" >
</argument>
<argument index="14" type="2" category="1" size="8" >
</argument>
<argument index="15" type="0" category="0" size="4" >
</argument>
<argument index="16" type="0" category="0" size="4" >
</argument>
<argument index="17" type="0" category="0" size="4" >
</argument>
<argument index="18" type="0" category="0" size="4" >
</argument>
<argument index="19" type="0" category="0" size="4" >
</argument>
<argument index="20" type="0" category="0" size="4" >
</argument>
<argument index="21" type="0" category="0" size="4" >
</argument>
<argument index="22" type="0" category="0" size="4" >
</argument>
<argument index="23" type="0" category="0" size="4" >
</argument>
<argument index="24" type="0" category="0" size="4" >
</argument>
<argument index="25" type="2" category="1" size="8" >
</argument>
<local_memory id="29" local_demand="4"/>
<local_memory id="30" local_demand="4"/>
<local_memory id="31" local_demand="4"/>
<local_memory id="32" local_demand="152"/>
<local_memory id="33" local_demand="152"/>
<local_memory id="34" local_demand="4"/>
<local_memory id="35" local_demand="4"/>
<local_memory id="36" local_demand="4"/>
<local_memory id="37" local_demand="4"/>
<local_memory id="38" local_demand="4"/>
<local_memory id="39" local_demand="152"/>
<local_memory id="40" local_demand="152"/>
<local_memory id="41" local_demand="128"/>
<local_memory id="42" local_demand="360"/>
<local_memory id="43" local_demand="360"/>
<local_memory id="44" local_demand="360"/>
<local_memory id="45" local_demand="4"/>
</kernel>
<kernel name="sum_evals" csr_addr="768" csr_size="128" work_group_invariant="0" vector_lanes="1" >
<work_group size_x="32" size_y="1" size_z="1" max_size="32"/>
<argument index="0" type="0" category="0" size="8" >
</argument>
<argument index="1" type="2" category="1" size="8" >
</argument>
<argument index="2" type="2" category="1" size="8" >
</argument>
<local_memory id="12" local_demand="128"/>
<local_memory id="13" local_demand="8192"/>
</kernel>
</board>
OpenCL Auto Migration Report
To disable auto migration compile with flag: --no-auto-migrate
Alternatively, you can enable/disable individual fixes
by adding them to the include/exclude field in board_spec.xml.
----------- Platform ---------
| Board a10gx with auto migration type a10_ref and
| board_spec version 16.1 has the following properties:
| family = ARRIA 10
| flow = QHD - Partial Reconfiguration
| host = PCIe
| name = a10_ref
| pgm = Partial Reconfiguration
| version = 16.1
------------------------------
----------- Fixes To Apply ---------
| none
------------------------------------
# (C) 1992-2016 Intel Corporation.
# Intel, the Intel logo, Intel, MegaCore, NIOS II, Quartus and TalkBack words