"Fossies" - the Fresh Open Source Software Archive

Member "NetPIPE-3.7.2/makefile" (19 Aug 2010, 10734 Bytes) of package /linux/privat/old/NetPIPE-3.7.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "makefile": 4.x_vs_3.7.2.

    1 ########################################################################
    2 # This is the makefile for NetPipe
    3 # Simply type make with one of the following choices for environments:
    4 #
    5 #      mpi         : will use mpicc to compile
    6 #      mplite      : It will look for the MP_Lite library in $HOME/mplite
    7 #      tcp         : You start the receiver and transmitter manually
    8 #      paragon     : Uses MPI on the Paragon
    9 #      pvm         : Old version doesn't use pvm_spawn
   10 #                    Use 'NPpvm -r' on receiver and 'NPpvm' on transmitter
   11 #      tcgmsg      : Run directly on TCGMSG
   12 #      tcgmsg-mpich: Test TCGMSG layer on top of mpich
   13 #      lapi        : Test the LAPI interface on the IBM SP
   14 #      mx          : Directly measure MX / Open-MX
   15 #      gm          : Directly measure raw GM on Myrinet
   16 #                    Use 'NPgm -r' on receiver and 'NPgm -t -h ...' on trans
   17 #      shmem       : Directly measure SHMEM on Cray and SGI systems
   18 #      gpshmem     : Measure GPSHMEM on any other system using shmem.c
   19 #
   20 #      For more information, see the function printusage() in netpipe.c
   21 #
   22 ########################################################################
   23 
   24 CC         = cc
   25 CFLAGS     = -O -g
   26 SRC        = ./src
   27 
   28 # For MPI, mpicc will set up the proper include and library paths
   29 
   30 MPICC       = mpicc
   31 
   32 MP_Lite_home   = $(HOME)/MP_Lite
   33 
   34 PVM_HOME   = /usr/share/pvm3
   35 PVM_ARCH   = LINUX
   36 #PVM_ARCH   = LINUXALPHA
   37 
   38 TCGMSG_HOME = $(HOME)/np/packs/ga
   39 TCGMSG_LIB = $(TCGMSG_HOME)/lib/LINUX/libtcgmsg.a
   40 TCGMSG_INC = $(TCGMSG_HOME)/include
   41 
   42 TCGMSG_MPI_HOME= $(HOME)/np/ga
   43 TCGMSG_MPI_LIB = $(TCGMSG_MPI_HOME)/lib/LINUX/libtcgmsg-mpi.a
   44 TCGMSG_ARMCI_LIB = $(TCGMSG_MPI_HOME)/armci-1.0/lib/LINUX/libarmci.a
   45 TCGMSG_MPI_INC = $(TCGMSG_MPI_HOME)/include
   46 
   47 GM_HOME = /opt/gm
   48 GM_INC = $(GM_HOME)/include
   49 GM_LIB = -L $(GM_HOME)/lib -lgm
   50 GM_DRI = $(GM_HOME)/drivers/linux/gm
   51 
   52 MX_HOME = /opt/mx
   53 MX_INC = $(MX_HOME)/include
   54 MX_LIB = -L$(MX_HOME)/lib -lmyriexpress -lpthread
   55 
   56 GPSHMEM_LIB = $(HOME)/np/ga/gpshmem/lib/libgpshmem.a
   57 GPSHMEM_INC = $(HOME)/np/ga/gpshmem/include
   58 
   59 ARMCI_LIB   = $(HOME)/armci/lib/LINUX/libarmci.a -lm
   60 ARMCI_INC   = $(HOME)/armci/src
   61 
   62 # MTHOME should be defined in the environment
   63 #MTHOME=/usr/mellanox
   64 VAPI_INC    = $(MTHOME)/include
   65 VAPI_LIB    = $(MTHOME)/lib
   66 
   67 # Modify UDAPL_INC & UDAPL_LIB to match your uDAPL installation.
   68 # Currently defined for (OpenIB) 64-bit OFED 1.0
   69 UDAPL_INC   = /usr/local/ofed/include
   70 UDAPL_LIB   = /usr/local/ofed/lib64
   71 
   72 # If the MPI-2 implementation provides the mpicc compiler, then simply
   73 # set MPI2CC to mpicc, and set MPI2_LIB and MPI2_INC to nothing.
   74 # If mpicc is not included with the implementation, then set MPI2CC to
   75 # an appropriate compiler, and set the paths to the MPI-2 library and include
   76 # directory (library path should be absolute, e.g. MPI2_LIB = 
   77 # $(HOME)/mpi/libmpi.a)
   78 
   79 MPI2CC   = mpicc
   80 MPI2_LIB =
   81 MPI2_INC =
   82 
   83 all:tcp 
   84 
   85 clean:
   86 	rm -f *.o NP* np.out
   87 
   88 #
   89 # This section of the Makefile is for compiling the binaries
   90 #
   91 
   92 
   93 tcp: $(SRC)/tcp.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
   94 	$(CC) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/tcp.c -DTCP -o NPtcp -I$(SRC)
   95 
   96 tcp6: $(SRC)/tcp.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
   97 	$(CC) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/tcp6.c -DTCP6 \
   98 		-o NPtcp6 -I$(SRC)
   99 
  100 sctp: $(SRC)/sctp.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  101 	$(CC) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/sctp.c -DSCTP \
  102 		-o NPsctp -I$(SRC)
  103 
  104 sctp6: $(SRC)/sctp6.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  105 	$(CC) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/sctp6.c -DSCTP6 \
  106 		-o NPsctp6 -I$(SRC)
  107 
  108 ipx: $(SRC)/ipx.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  109 	$(CC) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/ipx.c -DIPX \
  110 		-o NPipx -I$(SRC) -lipx
  111 
  112 memcpy: $(SRC)/memcpy.c $(SRC)/netpipe.c $(SRC)/netpipe.h
  113 	$(CC) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/memcpy.c \
  114               -DMEMCPY -o NPmemcpy -I$(SRC)
  115 
  116 MP_memcpy: $(SRC)/memcpy.c $(SRC)/netpipe.c $(SRC)/netpipe.h $(SRC)/MP_memcpy.c
  117 	$(CC) $(CFLAGS) -mmmx -msse $(SRC)/netpipe.c $(SRC)/memcpy.c \
  118               $(SRC)/MP_memcpy.c -DMEMCPY -DUSE_MP_MEMCPY -o NPmemcpy -I$(SRC)
  119 
  120 disk: $(SRC)/disk.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  121 	$(CC) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/disk.c -DDISK -o NPdisk -I$(SRC)
  122 
  123 sync: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  124 	( cd ~/mplite; make clean; make sync; )
  125 	$(CC) $(CFLAGS) -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c -o NPmplite \
  126          -I$(SRC) -I$(MP_Lite_home) $(MP_Lite_home)/libmplite.a
  127 
  128 debug2: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  129 	( cd ~/mplite; make debug2; )
  130 	$(CC) $(CFLAGS) -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c -o NPmplite \
  131          -I$(SRC) -I$(MP_Lite_home) $(MP_Lite_home)/libmplite.a
  132 
  133 mpi: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  134 	$(MPICC) $(CFLAGS) -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c -o NPmpi -I$(SRC)
  135 	@ rm -f netpipe.o mpi.o
  136 
  137 mpipro: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  138 	mpicc $(CFLAGS) -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c \
  139             -o NPmpipro -I$(SRC)
  140 	@ rm -f netpipe.o mpi.o
  141 
  142 mpipro-gm: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  143 	cc -O -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c \
  144             /usr/lib/libmpipro_tg_i386.a \
  145             -o NPmpipro-gm -I./src -I/usr/include \
  146             -L $HOME/np/packs/gm/binary/lib -lgm -lm -lpthread
  147 
  148 mpich: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  149 	mpichcc $(CFLAGS) -DMPI $(SRC)/netpipe.c \
  150             $(SRC)/mpi.c -o NPmpich -I$(SRC)
  151 	@ rm -f netpipe.o mpi.o
  152 
  153 mpich-trace: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  154 	mpichcc $(CFLAGS) -mpitrace -DMPI $(SRC)/netpipe.c \
  155             $(SRC)/mpi.c -o NPmpich -I$(SRC)
  156 	@ rm -f netpipe.o mpi.o
  157 
  158 mpich-log: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h  
  159 	mpichcc $(CFLAGS) -mpilog -DMPI $(SRC)/netpipe.c \
  160             $(SRC)/mpi.c -o NPmpich -I$(SRC)
  161 	@ rm -f netpipe.o mpi.o
  162 
  163 mpich-gm: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  164 	mpichgmcc $(CFLAGS) -DMPI $(SRC)/netpipe.c \
  165             $(SRC)/mpi.c -o NPmpich-gm -I$(SRC)
  166 	@ rm -f netpipe.o mpi.o
  167 
  168 mx: $(SRC)/mx.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  169 	$(CC) $(CFLAGS) -DMX $(SRC)/netpipe.c $(SRC)/mx.c \
  170             -o NPmx -I$(SRC) -I$(MX_INC) \
  171             $(MX_LIB) -static
  172 
  173 gm: $(SRC)/gm.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  174 	$(CC) $(CFLAGS) -DGM $(SRC)/netpipe.c $(SRC)/gm.c \
  175             -o NPgm -I$(SRC) -I$(GM_INC) -I$(GM_DRI) \
  176             $(GM_LIB) -static
  177 
  178 mvich: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  179 	mvichcc $(CFLAGS) -DMPI $(SRC)/netpipe.c \
  180             $(SRC)/mpi.c -o NPmvich -I$(SRC) -lvipl
  181 	@ rm -f netpipe.o mpi.o
  182 
  183 mvich-gn: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  184 	mvichcc $(CFLAGS) -DMPI $(SRC)/netpipe.c \
  185             $(SRC)/mpi.c -o NPmvich-gn -I$(SRC) -lgnivipl
  186 	@ rm -f netpipe.o mpi.o
  187 
  188 mplite MP_Lite sigio: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  189 	( cd $(MP_Lite_home); make; )
  190 	$(CC) $(CFLAGS) -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c \
  191             -o NPmplite -I$(SRC) -I$(MP_Lite_home) $(MP_Lite_home)/libmplite.a
  192 
  193 mplite-mvia: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  194 	( cd ~/mplite; make mvia; )
  195 	$(CC) $(CFLAGS) -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c \
  196              -o NPmplite-mvia -I$(SRC) -I$(MP_Lite_home) \
  197              $(MP_Lite_home)/libmplite.a -lvipl -lpthread
  198 
  199 mplite-gn: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  200 	( cd ~/mplite; make giganet; )
  201 	$(CC) $(CFLAGS) -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c \
  202             -o NPmplite-gn -I$(SRC) -I$(MP_Lite_home) \
  203             $(MP_Lite_home)/libmplite.a -lgnivipl -lpthread
  204 
  205 mplite-ib: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  206 	( cd $(MP_Lite_home); make ib; )
  207 	$(CC) $(CFLAGS) -g -DMPI $(SRC)/netpipe.c $(SRC)/mpi.c \
  208             -o NPmplite-ib -I$(SRC) -I$(MP_Lite_home) \
  209             $(MP_Lite_home)/libmplite.a -L/usr/mellanox/lib \
  210             -lmpga -lvapi -lpthread
  211 
  212 pvm: $(SRC)/pvm.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  213 	$(CC) $(CFLAGS) -DPVM $(SRC)/netpipe.c $(SRC)/pvm.c \
  214            -o NPpvm -I$(SRC) -I$(PVM_HOME)/include \
  215            -L $(PVM_HOME)/lib/$(PVM_ARCH)/ -lpvm3 -lgpvm3
  216 
  217 tcgmsg: $(SRC)/tcgmsg.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  218 	$(CC) $(CFLAGS) -DTCGMSG $(SRC)/netpipe.c \
  219            $(SRC)/tcgmsg.c -o NPtcgmsg -I$(SRC) -I$(TCGMSG_INC) $(TCGMSG_LIB) 
  220 
  221 tcgmsg-mpich: $(SRC)/tcgmsg.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  222 	mpichcc $(CFLAGS) -DTCGMSG $(SRC)/netpipe.c \
  223            $(SRC)/tcgmsg.c -o NPtcgmsg.mpich -I$(SRC) -I$(TCGMSG_MPI_INC) \
  224            $(TCGMSG_MPI_LIB) $(TCGMSG_ARMCI_LIB)
  225 
  226 lapi: $(SRC)/lapi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  227 	mpcc_r $(CFLAGS) -DLAPI $(SRC)/netpipe.c \
  228            $(SRC)/lapi.c -o NPlapi
  229 
  230 t3e: $(SRC)/shmem.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  231 	$(CC) $(CFLAGS) -DSHMEM $(SRC)/netpipe.c \
  232            $(SRC)/shmem.c -o NPshmem
  233 
  234 shmem: $(SRC)/shmem.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  235 	$(CC) $(CFLAGS) -DSHMEM $(SRC)/netpipe.c \
  236            $(SRC)/shmem.c -o NPshmem -lsma
  237 
  238 gpshmem: $(SRC)/gpshmem.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  239 	mpichcc $(CFLAGS) -DGPSHMEM -DSHMEM $(SRC)/netpipe.c \
  240            $(SRC)/gpshmem.c -I$(GPSHMEM_INC) -o NPgpshmem $(GPSHMEM_LIB) \
  241            $(ARMCI_LIB)
  242 	@ rm -f netpipe.o gpshmem.o
  243 
  244 paragon: $(SRC)/mpi.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  245 	$(CC) -nx $(CFLAGS) -DMPI $(SRC)/netpipe.c \
  246            $(SRC)/mpi.c -o NPparagon -I$(SRC) -lmpi
  247 	@ echo "On the Paragon, the buffer alignment does not work."
  248 	@ echo "Run using NPparagon -A 0."
  249 
  250 armci: $(SRC)/armci.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  251 	$(MPICC) $(CFLAGS) -DARMCI $(SRC)/netpipe.c \
  252            $(SRC)/armci.c -o NParmci -I$(ARMCI_INC) $(ARMCI_LIB) 
  253 
  254 mpi2: $(SRC)/mpi2.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  255 	$(MPI2CC) $(CFLAGS) -DMPI -DMPI2 $(SRC)/netpipe.c \
  256            $(SRC)/mpi2.c -o NPmpi2 -I$(MPI2_INC) $(MPI2_LIB)
  257 
  258 ib: $(SRC)/ib.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  259 	$(CC) $(CFLAGS) $(SRC)/ib.c $(SRC)/netpipe.c -o NPib \
  260         -DINFINIBAND -DTCP -I $(VAPI_INC) -L $(VAPI_LIB) \
  261         -lmpga -lvapi -lpthread
  262 
  263 ibv: $(SRC)/ibv.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  264 	$(CC) $(CFLAGS) $(SRC)/ibv.c $(SRC)/netpipe.c -o NPibv \
  265         -DOPENIB -DTCP -I $(IBV_INC) -L $(IBV_LIB) -libverbs
  266 
  267 atoll: $(SRC)/atoll.c $(SRC)/netpipe.c $(SRC)/netpipe.h
  268 	$(CC) $(CFLAGS) -DATOLL $(SRC)/netpipe.c \
  269         $(SRC)/atoll.c -o NPatoll \
  270         -I$(PALMS_PATH)/include -L$(PALMS_PATH)/lib -latoll
  271 
  272 udapl: $(SRC)/udapl.c $(SRC)/netpipe.c $(SRC)/netpipe.h 
  273 	$(CC) $(CFLAGS) $(SRC)/udapl.c $(SRC)/netpipe.c -o NPudapl \
  274         -DDAT -DTCP -DUSE_VOLATILE_RPTR -I $(UDAPL_INC) -L $(UDAPL_LIB) \
  275         -ldat -lpthread
  276 
  277 vmsplice: $(SRC)/vmsplice.c $(SRC)/netpipe.c $(SRC)/netpipe.h
  278 	$(CC) $(CPPFLAGS) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/vmsplice.c \
  279               -DVMSPLICE -o NPvmsplice -I$(SRC)
  280 
  281 knem: $(SRC)/knem.c $(SRC)/netpipe.c $(SRC)/netpipe.h
  282 	$(CC) $(CPPFLAGS) $(CFLAGS) $(SRC)/netpipe.c $(SRC)/knem.c \
  283               -DKNEM -o NPknem -I$(SRC)