Maestro fails to compile with latest AMReX
zingale opened this issue · 2 comments
zingale commented
We get the following errors when we try to compile Maestro (note, this also affects compiling the tools like fcompare
:
mpicxx -std=c++11 -Wall -g -O2 -ftree-vectorize -DBL_Linux -DFORTRAN_BOXLIB -DBL_FORT_USE_UNDERSCORE -I/home/zingale/development/AMReX//Src/Base -c -o t/Linux.gfortran.mpi/o/AMReX_CArena.o /home/zingale/development/AMReX//Src/Base/AMReX_CArena.cpp
In file included from /home/zingale/development/AMReX//Src/Base/AMReX_Array.H:6:0,
from /home/zingale/development/AMReX//Src/Base/AMReX_CArena.H:9,
from /home/zingale/development/AMReX//Src/Base/AMReX_CArena.cpp:5:
/home/zingale/development/AMReX//Src/Base/AMReX_SPACE.H:27:2: error: #error AMREX_SPACEDIM must be defined
#error AMREX_SPACEDIM must be defined
^~~~~
/home/zingale/development/AMReX//Src/Base/AMReX_SPACE.H:31:2: error: #error AMREX_SPACEDIM must be either 1, 2, or 3
#error AMREX_SPACEDIM must be either 1, 2, or 3
^~~~~
/home/zingale/development/AMReX//Src/Base/AMReX_SPACE.H:47:26: error: ‘AMREX_SPACEDIM’ was not declared in this scope
const int SpaceDim = AMREX_SPACEDIM;
^~~~~~~~~~~~~~
/home/zingale/development/AMReX//Src/Base/AMReX_SPACE.H:47:26: note: suggested alternative: ‘AMREX_SPACE_H’
const int SpaceDim = AMREX_SPACEDIM;
^~~~~~~~~~~~~~
AMREX_SPACE_H
In file included from /home/zingale/development/AMReX//Src/Base/AMReX_CArena.H:9:0,
from /home/zingale/development/AMReX//Src/Base/AMReX_CArena.cpp:5:
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:51:19: error: ‘AMREX_SPACEDIM’ was not declared in this scope
std::array<T*,AMREX_SPACEDIM> GetArrOfPtrs (std::array<T,AMREX_SPACEDIM>& a)
^~~~~~~~~~~~~~
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:51:19: note: suggested alternative: ‘AMREX_SPACE_H’
std::array<T*,AMREX_SPACEDIM> GetArrOfPtrs (std::array<T,AMREX_SPACEDIM>& a)
^~~~~~~~~~~~~~
AMREX_SPACE_H
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:51:33: error: template argument 2 is invalid
std::array<T*,AMREX_SPACEDIM> GetArrOfPtrs (std::array<T,AMREX_SPACEDIM>& a)
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:51:62: error: ‘AMREX_SPACEDIM’ was not declared in this scope
std::array<T*,AMREX_SPACEDIM> GetArrOfPtrs (std::array<T,AMREX_SPACEDIM>& a)
^~~~~~~~~~~~~~
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:51:62: note: suggested alternative: ‘AMREX_SPACE_H’
std::array<T*,AMREX_SPACEDIM> GetArrOfPtrs (std::array<T,AMREX_SPACEDIM>& a)
^~~~~~~~~~~~~~
AMREX_SPACE_H
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:51:76: error: template argument 2 is invalid
std::array<T*,AMREX_SPACEDIM> GetArrOfPtrs (std::array<T,AMREX_SPACEDIM>& a)
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H: In function ‘int amrex::GetArrOfPtrs(int&)’:
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:53:34: error: invalid types ‘int[int]’ for array subscript
return {AMREX_D_DECL(&a[0], &a[1], &a[2])};
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:53:41: error: invalid types ‘int[int]’ for array subscript
return {AMREX_D_DECL(&a[0], &a[1], &a[2])};
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:53:48: error: invalid types ‘int[int]’ for array subscript
return {AMREX_D_DECL(&a[0], &a[1], &a[2])};
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:53:17: error: there are no arguments to ‘AMREX_D_DECL’ that depend on a template parameter, so a declaration of ‘AMREX_D_DECL’ must be available [-fpermissive]
return {AMREX_D_DECL(&a[0], &a[1], &a[2])};
^~~~~~~~~~~~
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:53:17: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H: At global scope:
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:57:25: error: ‘AMREX_SPACEDIM’ was not declared in this scope
std::array<T const*,AMREX_SPACEDIM> GetArrOfConstPtrs (const std::array<T,AMREX_SPACEDIM>& a)
^~~~~~~~~~~~~~
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:57:25: note: suggested alternative: ‘AMREX_SPACE_H’
std::array<T const*,AMREX_SPACEDIM> GetArrOfConstPtrs (const std::array<T,AMREX_SPACEDIM>& a)
^~~~~~~~~~~~~~
AMREX_SPACE_H
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:57:39: error: template argument 2 is invalid
std::array<T const*,AMREX_SPACEDIM> GetArrOfConstPtrs (const std::array<T,AMREX_SPACEDIM>& a)
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:57:79: error: ‘AMREX_SPACEDIM’ was not declared in this scope
std::array<T const*,AMREX_SPACEDIM> GetArrOfConstPtrs (const std::array<T,AMREX_SPACEDIM>& a)
^~~~~~~~~~~~~~
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:57:79: note: suggested alternative: ‘AMREX_SPACE_H’
std::array<T const*,AMREX_SPACEDIM> GetArrOfConstPtrs (const std::array<T,AMREX_SPACEDIM>& a)
^~~~~~~~~~~~~~
AMREX_SPACE_H
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:57:93: error: template argument 2 is invalid
std::array<T const*,AMREX_SPACEDIM> GetArrOfConstPtrs (const std::array<T,AMREX_SPACEDIM>& a)
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H: In function ‘int amrex::GetArrOfConstPtrs(const int&)’:
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:59:34: error: invalid types ‘const int[int]’ for array subscript
return {AMREX_D_DECL(&a[0], &a[1], &a[2])};
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:59:41: error: invalid types ‘const int[int]’ for array subscript
return {AMREX_D_DECL(&a[0], &a[1], &a[2])};
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:59:48: error: invalid types ‘const int[int]’ for array subscript
return {AMREX_D_DECL(&a[0], &a[1], &a[2])};
^
/home/zingale/development/AMReX//Src/Base/AMReX_Array.H:59:17: error: there are no arguments to ‘AMREX_D_DECL’ that depend on a template parameter, so a declaration of ‘AMREX_D_DECL’ must be available [-fpermissive]
return {AMREX_D_DECL(&a[0], &a[1], &a[2])};
^~~~~~~~~~~~
make: *** [/home/zingale/development/AMReX//Tools/F_mk/GMakerules.mak:112: t/Linux.gfortran.mpi/o/AMReX_CArena.o] Error 1
zingale commented
perhaps something changed and we now need to define AMREX_SPACEDIM
for F90 AMReX codes?
WeiqunZhang commented
My fault. It is fixed now.