Makefile (40938ba6f79aa47e99b43cd8ad42ff61fc5d8d65) Makefile (2774d5cba221882c6b4100a2009c80f26d4c6f5c)
1# Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
2# Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
3# All Rights reserved. See files LICENSE and NOTICE for details.
4#
5# This file is part of CEED, a collection of benchmarks, miniapps, software
6# libraries and APIs for efficient high-order finite element and spectral
7# element discretizations for exascale applications. For more information and
8# source code availability see http://github.com/ceed.

--- 45 unchanged lines hidden (view full) ---

54ifneq ($(wildcard ../petsc/lib/libpetsc.*),)
55 PETSC_DIR ?= ../petsc
56endif
57
58# Warning: SANTIZ options still don't run with /gpu/occa
59# export LSAN_OPTIONS=suppressions=.asanignore
60AFLAGS = -fsanitize=address #-fsanitize=undefined -fno-omit-frame-pointer
61
1# Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
2# Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
3# All Rights reserved. See files LICENSE and NOTICE for details.
4#
5# This file is part of CEED, a collection of benchmarks, miniapps, software
6# libraries and APIs for efficient high-order finite element and spectral
7# element discretizations for exascale applications. For more information and
8# source code availability see http://github.com/ceed.

--- 45 unchanged lines hidden (view full) ---

54ifneq ($(wildcard ../petsc/lib/libpetsc.*),)
55 PETSC_DIR ?= ../petsc
56endif
57
58# Warning: SANTIZ options still don't run with /gpu/occa
59# export LSAN_OPTIONS=suppressions=.asanignore
60AFLAGS = -fsanitize=address #-fsanitize=undefined -fno-omit-frame-pointer
61
62OPT = -O -g -march=native -ffp-contract=fast
62OPT = -O -g -march=native -ffp-contract=fast -fopenmp-simd
63CFLAGS = -std=c99 $(OPT) -Wall -Wextra -Wno-unused-parameter -fPIC -MMD -MP
64NVCCFLAGS = -Xcompiler "$(OPT)" -Xcompiler -fPIC
65# If using the IBM XL Fortran (xlf) replace FFLAGS appropriately:
66ifneq ($(filter %xlf %xlf_r,$(FC)),)
67 FFLAGS = $(OPT) -ffree-form -qpreprocess -qextname -qpic -MMD
68else # gfortran/Intel-style options
69 FFLAGS = -cpp $(OPT) -Wall -Wextra -Wno-unused-parameter -Wno-unused-dummy-argument -fPIC -MMD -MP
70endif

--- 59 unchanged lines hidden (view full) ---

130mfemexamples.cpp := $(sort $(wildcard examples/mfem/*.cpp))
131mfemexamples := $(mfemexamples.cpp:examples/mfem/%.cpp=$(OBJDIR)/mfem-%)
132#nekexamples
133nekexamples.usr := $(sort $(wildcard examples/nek5000/*.usr))
134nekexamples := $(nekexamples.usr:examples/nek5000/%.usr=nek-%)
135#petscexamples
136petscexamples.c := $(sort $(wildcard examples/petsc/*.c))
137petscexamples := $(petscexamples.c:examples/petsc/%.c=$(OBJDIR)/petsc-%)
63CFLAGS = -std=c99 $(OPT) -Wall -Wextra -Wno-unused-parameter -fPIC -MMD -MP
64NVCCFLAGS = -Xcompiler "$(OPT)" -Xcompiler -fPIC
65# If using the IBM XL Fortran (xlf) replace FFLAGS appropriately:
66ifneq ($(filter %xlf %xlf_r,$(FC)),)
67 FFLAGS = $(OPT) -ffree-form -qpreprocess -qextname -qpic -MMD
68else # gfortran/Intel-style options
69 FFLAGS = -cpp $(OPT) -Wall -Wextra -Wno-unused-parameter -Wno-unused-dummy-argument -fPIC -MMD -MP
70endif

--- 59 unchanged lines hidden (view full) ---

130mfemexamples.cpp := $(sort $(wildcard examples/mfem/*.cpp))
131mfemexamples := $(mfemexamples.cpp:examples/mfem/%.cpp=$(OBJDIR)/mfem-%)
132#nekexamples
133nekexamples.usr := $(sort $(wildcard examples/nek5000/*.usr))
134nekexamples := $(nekexamples.usr:examples/nek5000/%.usr=nek-%)
135#petscexamples
136petscexamples.c := $(sort $(wildcard examples/petsc/*.c))
137petscexamples := $(petscexamples.c:examples/petsc/%.c=$(OBJDIR)/petsc-%)
138#navierstokesexample
139navierstokesexample.c := $(sort $(wildcard examples/navier-stokes/*.c))
140navierstokesexample := $(navierstokesexample.c:examples/navier-stokes/%.c=$(OBJDIR)/navier-stokes-%)
138
139# backends/[ref, template, blocked, avx, occa, magma]
140ref.c := $(sort $(wildcard backends/ref/*.c))
141template.c := $(sort $(wildcard backends/template/*.c))
142cuda.c := $(sort $(wildcard backends/cuda/*.c))
143cuda.cu := $(sort $(wildcard backends/cuda/*.cu))
144cuda-reg.c := $(sort $(wildcard backends/cuda-reg/*.c))
145cuda-reg.cu:= $(sort $(wildcard backends/cuda-reg/*.cu))

--- 177 unchanged lines hidden (view full) ---

323 MFEM_DIR="$(abspath $(MFEM_DIR))" $*
324 mv examples/mfem/$* $@
325
326$(OBJDIR)/petsc-% : examples/petsc/%.c $(libceed) $(ceed.pc) | $$(@D)/.DIR
327 $(MAKE) -C examples/petsc CEED_DIR=`pwd` \
328 PETSC_DIR="$(abspath $(PETSC_DIR))" $*
329 mv examples/petsc/$* $@
330
141
142# backends/[ref, template, blocked, avx, occa, magma]
143ref.c := $(sort $(wildcard backends/ref/*.c))
144template.c := $(sort $(wildcard backends/template/*.c))
145cuda.c := $(sort $(wildcard backends/cuda/*.c))
146cuda.cu := $(sort $(wildcard backends/cuda/*.cu))
147cuda-reg.c := $(sort $(wildcard backends/cuda-reg/*.c))
148cuda-reg.cu:= $(sort $(wildcard backends/cuda-reg/*.cu))

--- 177 unchanged lines hidden (view full) ---

326 MFEM_DIR="$(abspath $(MFEM_DIR))" $*
327 mv examples/mfem/$* $@
328
329$(OBJDIR)/petsc-% : examples/petsc/%.c $(libceed) $(ceed.pc) | $$(@D)/.DIR
330 $(MAKE) -C examples/petsc CEED_DIR=`pwd` \
331 PETSC_DIR="$(abspath $(PETSC_DIR))" $*
332 mv examples/petsc/$* $@
333
334$(OBJDIR)/navier-stokes-% : examples/navier-stokes/%.c $(libceed) $(ceed.pc) | $$(@D)/.DIR
335 $(MAKE) -C examples/navier-stokes CEED_DIR=`pwd` \
336 PETSC_DIR="$(abspath $(PETSC_DIR))" $*
337 mv examples/navier-stokes/$* $@
338
331$(tests) $(examples) : $(libceed)
332$(tests) $(examples) : LDFLAGS += -Wl,-rpath,$(abspath $(LIBDIR)) -L$(LIBDIR)
333
334run-% : $(OBJDIR)/%
335 @tests/tap.sh $(<:$(OBJDIR)/%=%)
336# Test core libCEED
337test : $(tests:$(OBJDIR)/%=run-%) $(examples:$(OBJDIR)/%=run-%)
338

--- 57 unchanged lines hidden (view full) ---

396 $(INSTALL_DATA) $(libceed) "$(DESTDIR)$(libdir)/"
397 $(INSTALL_DATA) $(OBJDIR)/ceed.pc "$(DESTDIR)$(pkgconfigdir)/"
398 $(if $(OCCA_ON),$(INSTALL_DATA) $(OKL_KERNELS) "$(DESTDIR)$(okldir)/")
399
400.PHONY : cln clean doc lib install all print test tst prove prv prove-all junit examples style okl-cache okl-clear info info-backends
401
402cln clean :
403 $(RM) -r $(OBJDIR) $(LIBDIR)
339$(tests) $(examples) : $(libceed)
340$(tests) $(examples) : LDFLAGS += -Wl,-rpath,$(abspath $(LIBDIR)) -L$(LIBDIR)
341
342run-% : $(OBJDIR)/%
343 @tests/tap.sh $(<:$(OBJDIR)/%=%)
344# Test core libCEED
345test : $(tests:$(OBJDIR)/%=run-%) $(examples:$(OBJDIR)/%=run-%)
346

--- 57 unchanged lines hidden (view full) ---

404 $(INSTALL_DATA) $(libceed) "$(DESTDIR)$(libdir)/"
405 $(INSTALL_DATA) $(OBJDIR)/ceed.pc "$(DESTDIR)$(pkgconfigdir)/"
406 $(if $(OCCA_ON),$(INSTALL_DATA) $(OKL_KERNELS) "$(DESTDIR)$(okldir)/")
407
408.PHONY : cln clean doc lib install all print test tst prove prv prove-all junit examples style okl-cache okl-clear info info-backends
409
410cln clean :
411 $(RM) -r $(OBJDIR) $(LIBDIR)
404 $(MAKE) -C examples/ceed clean
405 $(MAKE) -C examples/mfem clean
406 $(MAKE) -C examples/petsc clean
407 (cd examples/nek5000 && bash make-nek-examples.sh clean)
412 $(MAKE) -C examples clean
408 $(RM) $(magma_tmp.c) $(magma_tmp.cu) backends/magma/*~ backends/magma/*.o
409 $(RM) -rf benchmarks/*output.txt
410
411distclean : clean
412 $(RM) -r doc/html
413
414doc :
415 doxygen Doxyfile

--- 19 unchanged lines hidden ---
413 $(RM) $(magma_tmp.c) $(magma_tmp.cu) backends/magma/*~ backends/magma/*.o
414 $(RM) -rf benchmarks/*output.txt
415
416distclean : clean
417 $(RM) -r doc/html
418
419doc :
420 doxygen Doxyfile

--- 19 unchanged lines hidden ---