Skip to content
Snippets Groups Projects
Commit b4ea6bf9 authored by Rafael Ravedutti's avatar Rafael Ravedutti
Browse files

Update Makefile and do not use graphviz for now

parent 934909fd
No related branches found
No related tags found
No related merge requests found
.PHONY: all build clean .PHONY: all build clean
PYCMD=python3
CC=mpicxx
NVCC=nvcc
CUDA_PATH=/apps/SPACK/0.18.0/opt/linux-almalinux8-zen/gcc-8.5.0/cuda-11.6.2-mlkhyhqwqk7cyltlmvw7n4ofdui5ocup
all: clean build lj_cpu lj_gpu all: clean build lj_cpu lj_gpu
@echo "Everything was done!" @echo "Everything was done!"
build: build:
@echo "Building pairs package..." @echo "Building pairs package..."
python3 setup.py build && python3 setup.py install --user $(PYCMD) setup.py build && $(PYCMD) setup.py install --user
lj_ns.cpp: lj_ns.cpp:
@echo "Generating and compiling Lennard-Jones example for CPU..." @echo "Generating and compiling Lennard-Jones example for CPU..."
python3 examples/lj_func.py cpu $(PYCMD) examples/lj_func.py cpu
lj_ns.cu: lj_ns.cu:
@echo "Generating and compiling Lennard-Jones example for GPU..." @echo "Generating and compiling Lennard-Jones example for GPU..."
python3 examples/lj_func.py gpu $(PYCMD) examples/lj_func.py gpu
# Targets # Targets
lj_cpu: lj_ns.cpp lj_cpu: lj_ns.cpp
# g++ -o lj_cpu lj_ns.cpp -DDEBUG # g++ -o lj_cpu lj_ns.cpp -DDEBUG
mpic++ -O3 -o lj_cpu lj_ns.cpp runtime/pairs.cpp runtime/domain/regular_6d_stencil.cpp runtime/devices/dummy.cpp -DDEBUG $(CC) -O3 -o lj_cpu lj_ns.cpp runtime/pairs.cpp runtime/domain/regular_6d_stencil.cpp runtime/devices/dummy.cpp -DDEBUG
lj_gpu: lj_ns.cu lj_gpu: lj_ns.cu
mpic++ -c -o pairs.o runtime/pairs.cpp -DDEBUG $(CC) -c -o pairs.o runtime/pairs.cpp -DDEBUG
mpic++ -c -o regular_6d_stencil.o runtime/domain/regular_6d_stencil.cpp -DDEBUG $(CC) -c -o regular_6d_stencil.o runtime/domain/regular_6d_stencil.cpp -DDEBUG
nvcc -c -o cuda_runtime.o runtime/devices/cuda.cu -DDEBUG $(NVCC) -c -o cuda_runtime.o runtime/devices/cuda.cu -DDEBUG
nvcc -c -o lj_gpu.o lj_ns.cu -DDEBUG $(NVCC) -c -o lj_gpu.o lj_ns.cu -DDEBUG
mpic++ -o lj_gpu lj_gpu.o cuda_runtime.o pairs.o regular_6d_stencil.o -lcudart -L/usr/local/cuda/lib64 $(CC) -o lj_gpu lj_gpu.o cuda_runtime.o pairs.o regular_6d_stencil.o -lcudart -L$(CUDA_PATH)/lib64
clean: clean:
@echo "Cleaning..." @echo "Cleaning..."
......
...@@ -9,7 +9,7 @@ from pairs.ir.properties import Properties ...@@ -9,7 +9,7 @@ from pairs.ir.properties import Properties
from pairs.ir.symbols import Symbol from pairs.ir.symbols import Symbol
from pairs.ir.types import Types from pairs.ir.types import Types
from pairs.ir.variables import Variables from pairs.ir.variables import Variables
from pairs.graph.graphviz import ASTGraph #from pairs.graph.graphviz import ASTGraph
from pairs.mapping.funcs import compute from pairs.mapping.funcs import compute
from pairs.sim.arrays import ArraysDecl from pairs.sim.arrays import ArraysDecl
from pairs.sim.cell_lists import CellLists, CellListsBuild, CellListsStencilBuild from pairs.sim.cell_lists import CellLists, CellListsBuild, CellListsStencilBuild
...@@ -284,5 +284,5 @@ class Simulation: ...@@ -284,5 +284,5 @@ class Simulation:
# For this part on, all bin ops are generated without usage verification # For this part on, all bin ops are generated without usage verification
self.check_decl_usage = False self.check_decl_usage = False
ASTGraph(self.functions, "functions").render() #ASTGraph(self.functions, "functions").render()
self.code_gen.generate_program(program) self.code_gen.generate_program(program)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment