Skip to content

Commit

Permalink
Fix warnings for DPCPP (AMReX-Codes#1579)
Browse files Browse the repository at this point in the history
Fix unused variable.  Do not pass `-fsycl-unnamed-lambda` to `mpiicpx` for linking to get rid of warning on unknown argument.
  • Loading branch information
WeiqunZhang authored Nov 30, 2020
1 parent 07afa8e commit d9af9ab
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Src/Base/AMReX_FBI.H
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ fab_to_fab (Vector<Array4CopyTag<T> > const& copy_tags, int scomp, int dcomp, in
detail::ParallelFor_doit(copy_tags,
[=] AMREX_GPU_DEVICE (
#ifdef AMREX_USE_DPCPP
sycl::nd_item<1> const& item,
sycl::nd_item<1> const& /*item*/,
#endif
int icell, int ncells, int i, int j, int k, Array4CopyTag<T> const tag) noexcept
{
Expand Down
2 changes: 1 addition & 1 deletion Tools/GNUMake/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ ifeq ($(USE_DPCPP),TRUE)
FC = mpiifx
F90 = mpiifx
# current version of mpiicpx does not have this on by default
CXXFLAGS += -fsycl-unnamed-lambda
EXTRACXXFLAGS += -fsycl-unnamed-lambda
endif

else ifeq ($(USE_HIP),TRUE)
Expand Down
1 change: 1 addition & 0 deletions Tools/GNUMake/Make.rules
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ifndef LINKFLAGS
ifeq ($(LINK_WITH_FORTRAN_COMPILER),TRUE)
LINKFLAGS = $(F90FLAGS) $(FMODULES)
else
# $(EXTRACXXFLAGS) does not go into LINKFLAGS
LINKFLAGS = $(CXXFLAGS)
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion Tutorials/GPU/CNS/Source/CNS.H
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public:
// Cleanup data descriptors at end of run.
static void variableCleanUp ();

static int numGrow() { return NUM_GROW; };
static int numGrow() { return NUM_GROW; }

#if !defined(AMREX_USE_CUDA)
protected:
Expand Down

0 comments on commit d9af9ab

Please sign in to comment.