diff options
author | Sylvain Jeaugey <sjeaugey@nvidia.com> | 2016-01-20 22:18:25 +0300 |
---|---|---|
committer | Przemek Tredak <ptredak@nvidia.com> | 2016-01-28 23:56:36 +0300 |
commit | c05312f1517bab34586bb74a37bb60dedf097d30 (patch) | |
tree | b3dd59939d68217ba929c214a28770e222934b35 /Makefile | |
parent | 59663167711b70dabb52a426a9fca0d712e3cc95 (diff) |
Moved tests to separate dir and improved MPI test
test sources moved to test/ directory.
MPI test displays PASS/FAIL and returns code accordingly.
Change-Id: I058ebd1bd5202d8f38cc9787898b2480100c102b
Reviewed-on: http://git-master/r/936086
Reviewed-by: Przemek Tredak <ptredak@nvidia.com>
Tested-by: Przemek Tredak <ptredak@nvidia.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -1,5 +1,5 @@ # -# Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. +# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -49,6 +49,7 @@ endif LDFLAGS := -L$(CUDA_HOME)/lib64 -lcudart MPIFLAGS := -I$(MPI_HOME)/include -L$(MPI_HOME)/lib -lmpi +TSTINC := -Ibuild/include -Itest/include .PHONY : lib clean test mpitest install .DEFAULT : lib @@ -65,8 +66,8 @@ MPITESTS := mpi_test INCDIR := $(BUILDDIR)/include LIBDIR := $(BUILDDIR)/lib OBJDIR := $(BUILDDIR)/obj -TSTDIR := $(BUILDDIR)/test -MPITSTDIR := $(BUILDDIR)/mpitest +TSTDIR := $(BUILDDIR)/test/single +MPITSTDIR := $(BUILDDIR)/test/mpi INCTARGETS := $(patsubst %, $(INCDIR)/%, $(INCEXPORTS)) LIBSONAME := $(patsubst %,%.$(VER_MAJOR),$(LIBNAME)) @@ -108,11 +109,11 @@ clean : test : lib $(TESTBINS) -$(TSTDIR)/% : src/%.cu lib +$(TSTDIR)/% : test/single/%.cu lib @printf "Building %-25s > %-24s\n" $< $@ @mkdir -p $(TSTDIR) - @$(NVCC) -Ibuild/include $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" -o $@ $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) -lcuda -lcurand -lnvToolsExt - @$(NVCC) -M -Ibuild/include $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) -lcuda -lcurand -lnvToolsExt > $(@:%=%.d.tmp) + @$(NVCC) $(TSTINC) $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" -o $@ $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) -lcuda -lcurand -lnvToolsExt + @$(NVCC) -M $(TSTINC) $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) -lcuda -lcurand -lnvToolsExt > $(@:%=%.d.tmp) @sed "0,/^.*:/s//$(subst /,\/,$@):/" $(@:%=%.d.tmp) > $(@:%=%.d) @sed -e 's/.*://' -e 's/\\$$//' < $(@:%=%.d.tmp) | fmt -1 | \ sed -e 's/^ *//' -e 's/$$/:/' >> $(@:%=%.d) @@ -120,11 +121,11 @@ $(TSTDIR)/% : src/%.cu lib mpitest : lib $(MPITESTBINS) -$(MPITSTDIR)/% : src/%.cu lib +$(MPITSTDIR)/% : test/mpi/%.cu lib @printf "Building %-25s > %-24s\n" $< $@ @mkdir -p $(MPITSTDIR) - @$(NVCC) $(MPIFLAGS) -Ibuild/include $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" -o $@ $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) - @$(NVCC) $(MPIFLAGS) -M -Ibuild/include $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) > $(@:%=%.d.tmp) + @$(NVCC) $(MPIFLAGS) $(TSTINC) $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" -o $@ $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) + @$(NVCC) $(MPIFLAGS) -M $(TSTINC) $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) > $(@:%=%.d.tmp) @sed "0,/^.*:/s//$(subst /,\/,$@):/" $(@:%=%.d.tmp) > $(@:%=%.d) @sed -e 's/.*://' -e 's/\\$$//' < $(@:%=%.d.tmp) | fmt -1 | \ sed -e 's/^ *//' -e 's/$$/:/' >> $(@:%=%.d) |