24 lines
778 B
Makefile
24 lines
778 B
Makefile
PATH+=:/usr/local/cuda/bin
|
|
USERNAME=frero
|
|
REMOTE=snotra.idi.ntnu.no
|
|
BASTION=login.stud.ntnu.no
|
|
.PHONY: all clean remote_run
|
|
all: remote_compile remote_copy_image show
|
|
mandel:
|
|
nvcc -o mandel mandel.cu -O3 -lm
|
|
mandel_c:
|
|
gcc -o mandel_c mandel_c.c -O3 -Wall -std=c99 -lm
|
|
clean:
|
|
-rm -f mandel_c mandel
|
|
show: mandel1.bmp
|
|
feh $<
|
|
remote_stop:
|
|
@ssh -J $(USERNAME)@$(BASTION) $(USERNAME)@$(REMOTE) "stop-jobs -f" || true
|
|
remote_copy_src:
|
|
@scp -J $(USERNAME)@$(BASTION) mandel.cu $(USERNAME)@$(REMOTE):~/ntnuhome/jobs
|
|
remote_compile: remote_stop remote_copy_src
|
|
@ssh -J $(USERNAME)@$(BASTION) $(USERNAME)@$(REMOTE) 'cd ntnuhome/jobs/ && ./run_mandel.sh'
|
|
remote_copy_image:
|
|
@scp -J $(USERNAME)@$(BASTION) $(USERNAME)@$(REMOTE):~/ntnuhome/jobs/mandel1.bmp .
|
|
|