-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
68 lines (47 loc) · 2.15 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
55
56
57
58
59
60
61
62
63
64
65
66
67
#Set MPI version and commands. These can be overloaded by command line options
#for mpt: make MOD="mpt mkl cuda gcc/8.4.0" MPICC=mpicc MPIFC=mpif90
#for intel: make MOD="intel-mpi/2020.1.217 mkl cuda" MPICC=mpiicc MPIFC=mpiifort
MOD=mpt mkl comp-intel cuda/10.2.89 gcc/8.4.0
MPICC=mpicc
MPIFC=mpif90
FC=ifort
#MOD=intel-mpi/2020.1.217 mkl cuda
#MPICC=mpiicc
#MPIFC=mpiifort
#set the module and call make again
recurse:
#source $$MODULESHOME/init/bash ; ml $(MOD) ; export MPIF90_F90=gfortran ; export MPICC_CC=gcc ; $(MAKE) -f $(firstword $(MAKEFILE_LIST)) programs
source $$MODULESHOME/init/bash ; ml $(MOD) ; export MPIF90_F90=ifort ; export MPICC_CC=icc ; $(MAKE) -f $(firstword $(MAKEFILE_LIST)) programs
#here we list the real targets
programs: phostone stf_01 f_ex02 c_ex02 mpigpu slowinvert purempi afile invertc in_list
phostone: phostone.c
$(MPICC) -fopenmp phostone.c -o phostone
invertc: invertc.c
gcc -fopenmp invertc.c -o invertc
purempi: phostone.c
$(MPICC) -DSTUBS phostone.c -o purempi
stf_01: stf_01.f90
$(MPIFC) stf_01.f90 -o stf_01
f_ex02: f_ex02.f90
$(MPIFC) f_ex02.f90 -o f_ex02
slowinvert: slowinvert.f90
$(FC) -mkl -O3 -fopenmp slowinvert.f90 -o slowinvert
c_ex02: c_ex02.c
$(MPICC) c_ex02.c -o c_ex02
in_list:
./doarray.py
mpigpu: hysub.cu hymain.c
nvcc -c hysub.cu
$(MPICC) hymain.c hysub.o -lcudart -lstdc++ -o mpigpu
afile:
echo line1 > afile
echo line2 >> afile
clean:
rm -rf in_list afile phostone stf_01 f_ex02 c_ex02 mpigpu *mod slowinvert hysub.o purempi build invertc
install: recurse
cp in_list afile phostone stf_01 f_ex02 c_ex02 mpigpu doarray.py report.py slowinvert tymer purempi invertc st.in ..
dist-clean: clean
rm -rf ../in_list ../afile ../phostone ../stf_01 ../f_ex02 ../c_ex02 ../mpigpu ../doarray.py ../report.py ../tymer ../slowinvert ../purempi ../invertc ../slurm.tgz ../st.in
backup:
cd .. ; tar -czf slurm.tgz affinity.sh CHAIN.sh FAN.sh fromenv.sh gpucpu.sh hostname.sh hybrid.sh local.sh mpmd2.sh mpmd.sh multimax.sh multinode-task-per-core.sh multi.sh newdir.sh old_new.sh openmp.sh README.md redirect.sh simple.sh source testit uselist.sh st.in ; cd source
#.PHONY: afile