I want to compile a procedure on Phi and CPU with MPI.
The following is CPU makefile.I compile it and get success.
1 CC=mpiicpc
2
3 SSE=-xhost
4
5 CFLAGS = -O3 -I. $(SSE) -pthread -mcmodel=medium -std=c++0x -D BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -I/work/02687/binren/threadpool -I/work/02687/binren/boost_1_56_0_cpu
6
7 LIBS = -L/work/02687/binren/boost_1_56_0_cpu/stage/lib -lboost_system -lpthread
8
9 LDFLAGS = $(SSE) $(LIBS)
10
11 SRCS = $(wildcard ./*.cpp) $(wildcard ./framework/*.cpp)
12
13 $(info $(SRCS))
14
15 OBJS = $(SRCS:.cpp=.o)
16
17 main.cpu: $(OBJS) $(wildcard ./*.h)
18 $(CC) $(LIBS) $(LDFLAGS) -o main.cpu $(OBJS)
19 %.o : %.cpp
20 $(CC) $(CFLAGS) -c $< -o $*.o
21
22 clean:
23 -rm main.cpu $(OBJS)
The following is Phi makefile,I compile it and get error information.
"x86_64-k1om-linux-ld: cannot find -lboost_system"
1 CC=mpiicpc
2
3 SSE=-mmic
4
5 CFLAGS = -O3 -I. $(SSE) -pthread -mcmodel=medium -std=c++0x -D MIC -D BOOST_NO_CXX11_ALLOCATOR -D BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTI ONS -I/work/02687/binren/threadpool -I/work/02687/binren/boost_1_56_0
6
7 LIBS = -L/work/02687/binren/boost_1_56_0/stage/lib -lboost_system -lpthread
8 #LIBS = -L/work/02687/binren/boost_1_56_0/stage/lib -lpthread
9
10 LDFLAGS = $(SSE) $(LIBS)
11
12 SRCS = $(wildcard ./*.cpp) $(wildcard ./framework/*.cpp)
13
14 $(info $(SRCS))
15
16 OBJS = $(SRCS:.cpp=.o)
17
18 main.mic: $(OBJS) $(wildcard ./*.h)
19 $(CC) $(LIBS) $(LDFLAGS) -o main.mic $(OBJS)
20 %.o : %.cpp
21 $(CC) $(CFLAGS) -c $< -o $*.o
22
23 clean:
24 -rm main.mic $(OBJS)