updated argc before calling MPI_Init in case argc and argv do not agree.
[charm.git] / src / arch / net-linux-cell / special.sh
1 #!/bin/sh
2
3 ./gathertree ../../src/arch/cell .
4
5 # make links
6 test ! -f "../include/cell-api.h" && ./system_ln "../tmp/cell-api.h" ../include
7 for f in cell_lib/*.h
8 do
9   test ! -f "../include/$f" && ./system_ln "../tmp/$f" ../include
10 done
11
12 #make library
13 export CHARMINC=../include
14 . ./conv-config.sh
15 #%if test ! -f $CELL_SDK_DIR/sysroot/usr/include/libspe.h
16 #if test ! -f $CELL_SDK_DIR/sysroot/usr/include/libspe2.h
17 #then
18 #  echo "Please define CELL_SDK_DIR in charm/src/arch/net-linux-cell/conv-mach.sh!"
19 #  exit 1
20 #fi
21
22 cat > Makefile.cell << EOF
23 PPU_CC = $CMK_CC \$(OPTS)
24 PPU_CXX = $CMK_CXX \$(OPTS)
25 SPU_CC = $CMK_SPE_CC \$(OPTS)
26 SPU_CXX = $CMK_SPE_CXX \$(OPTS)
27 SPU_LD = $CMK_SPE_LD
28 SPU_LDXX = $CMK_SPE_LDXX
29 SPU_AR = $CMK_SPE_AR
30 PPU_EMBEDSPU = $CMK_PPU_EMBEDSPU
31 SPERT_LIBS = $CMK_SPERT_LIBS
32 EOF
33
34 # Compile and install the Offload API
35 cd cell_lib && make install && cd ..
36
37 # Create the empty stub library (i.e. no SPEs)
38 ../bin/charmc -c -o emptyRegisterAccelSPEFuncs.o emptyRegisterAccelSPEFuncs.c
39 $CMK_SPE_CC -I../include -L../lib -o emptySpertMain_spe emptyFuncLookup.c -lcellspu
40 $CMK_PPU_EMBEDSPU spert_main emptySpertMain_spe emptySpertMain.o
41 ../bin/charmc -o libnoAccelStub.a emptyRegisterAccelSPEFuncs.o emptySpertMain.o
42 cp libnoAccelStub.a ../lib
43