xref: /libCEED/examples/nek/Makefile (revision 86a4271f02baafab377de162285a9b890a25166a)
1*86a4271fSThilina Rathnayake# Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
2*86a4271fSThilina Rathnayake# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
3*86a4271fSThilina Rathnayake# reserved. See files LICENSE and NOTICE for details.
4*86a4271fSThilina Rathnayake#
5*86a4271fSThilina Rathnayake# This file is part of CEED, a collection of benchmarks, miniapps, software
6*86a4271fSThilina Rathnayake# libraries and APIs for efficient high-order finite element and spectral
7*86a4271fSThilina Rathnayake# element discretizations for exascale applications. For more information and
8*86a4271fSThilina Rathnayake# source code availability see http://github.com/ceed.
9*86a4271fSThilina Rathnayake#
10*86a4271fSThilina Rathnayake# The CEED research is supported by the Exascale Computing Project (17-SC-20-SC)
11*86a4271fSThilina Rathnayake# a collaborative effort of two U.S. Department of Energy organizations (Office
12*86a4271fSThilina Rathnayake# of Science and the National Nuclear Security Administration) responsible for
13*86a4271fSThilina Rathnayake# the planning and preparation of a capable exascale ecosystem, including
14*86a4271fSThilina Rathnayake# software, applications, hardware, advanced system engineering and early
15*86a4271fSThilina Rathnayake# testbed platforms, in support of the nation's exascale computing imperative.
16*86a4271fSThilina Rathnayake
17*86a4271fSThilina RathnayakeNEK5K_DIR ?= $(abspath ../../../Nek5000)
18*86a4271fSThilina RathnayakeMPI ?= 1
19*86a4271fSThilina Rathnayake
20*86a4271fSThilina Rathnayakeifeq ($(MPI),0)
21*86a4271fSThilina Rathnayake  ifeq (,$(filter-out undefined default,$(origin CC)))
22*86a4271fSThilina Rathnayake    CC = gcc
23*86a4271fSThilina Rathnayake  endif
24*86a4271fSThilina Rathnayake  ifeq (,$(filter-out undefined default,$(origin FC)))
25*86a4271fSThilina Rathnayake    FC = gfortran
26*86a4271fSThilina Rathnayake  endif
27*86a4271fSThilina Rathnayakeelse
28*86a4271fSThilina Rathnayake  FC = mpif77
29*86a4271fSThilina Rathnayake  CC = mpicc
30*86a4271fSThilina Rathnayakeendif
31*86a4271fSThilina Rathnayake
32*86a4271fSThilina RathnayakeCEED_DIR ?= $(abspath ../..)
33*86a4271fSThilina RathnayakeCEED_FLAGS ?= -I$(CEED_DIR)/include
34*86a4271fSThilina RathnayakeCEED_LIBS ?= -Wl,-rpath,$(CEED_DIR)/lib -L$(CEED_DIR)/lib -lceed
35*86a4271fSThilina Rathnayake
36*86a4271fSThilina Rathnayake.PHONY: all bps clean
37*86a4271fSThilina Rathnayake
38*86a4271fSThilina Rathnayakeall: bps
39*86a4271fSThilina Rathnayake
40*86a4271fSThilina Rathnayakebps: bps/bps.usr
41*86a4271fSThilina Rathnayake	FC=$(FC) CC=$(CC) MPI=$(MPI) NEK5K_DIR=$(NEK5K_DIR) CEED_DIR=$(CEED_DIR) && ./nek-examples.sh -m
42*86a4271fSThilina Rathnayake
43*86a4271fSThilina Rathnayakeclean:
44*86a4271fSThilina Rathnayake	NEK5K_DIR=$(NEK5K_DIR) && ./nek-examples.sh -clean
45