-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (42 loc) · 1.8 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# Top level Makefile for running with docker
#
DOCKER_IMAGE_DIR=${PSANA_LEGION_DIR}/../docker
DOCKER_IMAGE_SOURCE=${DOCKER_IMAGE_DIR}/Dockerfile.psana-legion
DOCKER_IMAGE_ID_FILE=${PSANA_LEGION_DIR}/../.dockerid
ifeq "$(wildcard ${DOCKER_IMAGE_ID_FILE})" ""
DOCKER_IMAGE_ID=""
else
DOCKER_IMAGE_ID:="$(shell cat ${DOCKER_IMAGE_ID_FILE})"
endif
all: start
.PHONY: build
build: $(wildcard psana_legion/*.cc) $(wildcard psana_legion/*.py)
cd psana_legion ; FORCE_PYTHON=1 PYTHON_VERSION_MAJOR=2 PYTHON_LIB=/conda/lib/libpython2.7.so make
.PHONY: debug
debug:
@make execute LEVEL=1
.PHONY: run
run:
@make execute LEVEL=2
.PHONY: execute
execute:
EAGER=1 REALM_SYNTHETIC_CORE_MAP= mpirun -n 4 -x USE_GASNET=1 -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/aheirich/PSANA/psana-legion/psana_legion/ ~/PSANA/psana-legion/psana_legion/psana_legion -ll:py 1 -ll:io 1 -ll:csize 6000 -lg:window 50 -level task_pool_mapper=${LEVEL}
.PHONY: backtrace
backtrace:
EAGER=1 REALM_SYNTHETIC_CORE_MAP= mpirun -n 4 -x USE_GASNET=1 -x GASNET_BACKTRACE=1 -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/aheirich/PSANA/psana-legion/psana_legion/ ~/PSANA/psana-legion/psana_legion/psana_legion -ll:py 1 -ll:io 1 -ll:csize 6000 -lg:window 50 -level task_pool_mapper=1,mapper=1
.PHONY: docker_image
${DOCKER_IMAGE_ID_FILE}: ${DOCKER_IMAGE_SOURCE}
@echo === Building docker image ===
docker build -f ${DOCKER_IMAGE_SOURCE} --iidfile ${DOCKER_IMAGE_ID_FILE} .
docker_image_id: ${DOCKER_IMAGE_ID_FILE}
echo DOCKER_IMAGE_ID ${DOCKER_IMAGE_ID}
start: docker_image_id
@make start_
.PHONY: start_
start_:
@echo === Starting docker image ${DOCKER_IMAGE_ID} ===
docker run -ti --volume=${SIT_PSDM_DATA}:/reg/d/psdm --volume=${PSANA_LEGION_DIR}/..:/psana-legion-dev --volume=${LG_RT_DIR}/.. ${DOCKER_IMAGE_ID}
.PHONY: clean
clean:
rm -f ${DOCKER_IMAGE_ID_FILE}