The compiler ( gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0) gives an error for the compilation of the current forestclaw master (e861b56ee35da5b82f7337075423bc99bcbefe0e) and develop (14ae9be1071abe2af8ba54ea9a9f0c18677ecf3d) branch.
The output of the compiler:
In file included from ../forestclaw/src/fclaw_base.h:43:0,
from ../forestclaw/src/forestclaw2d.h:29,
from ../forestclaw/src/patches/clawpatch/fort_user/../fclaw3dx_clawpatch.h:31,
from ../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:21,
from ../forestclaw/src/patches/clawpatch/fort_user/fclaw3dx_clawpatch_exceeds_threshold.c:29:
../forestclaw/src/patches/clawpatch/fort_user/../fclaw2d_clawpatch_fort.h:584:34: error: conflicting types for ‘user_exceeds_th_’
FCLAW_F77_FUNC(user_exceeds_th, \
^
./src/fclaw_config.h:174:35: note: in definition of macro ‘FCLAW_F77_FUNC’
#define FCLAW_F77_FUNC(name,NAME) name ## _
^~~~
../forestclaw/src/patches/clawpatch/fort_user/../fclaw2d_clawpatch_fort.h:588:5: note: in expansion of macro ‘USER_EXCEEDS_TH’
int USER_EXCEEDS_TH(const int *blockno,
^~~~~~~~~~~~~~~
../forestclaw/src/patches/clawpatch/fclaw3dx_clawpatch_fort.h:713:40: note: previous declaration of ‘user_exceeds_th_’ was here
#define USER_EXCEEDS_TH FCLAW_F77_FUNC(user_exceeds_th, \
^
./src/fclaw_config.h:174:35: note: in definition of macro ‘FCLAW_F77_FUNC’
#define FCLAW_F77_FUNC(name,NAME) name ## _
^~~~
../forestclaw/src/patches/clawpatch/fclaw3dx_clawpatch_fort.h:717:5: note: in expansion of macro ‘USER_EXCEEDS_TH’
int USER_EXCEEDS_TH(const int *blockno,
^~~~~~~~~~~~~~~
In file included from ../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:27:0,
from ../forestclaw/src/patches/clawpatch/fort_user/fclaw3dx_clawpatch_exceeds_threshold.c:29:
../forestclaw/src/_fclaw2d_to_fclaw3dx.h:72:0: warning: "FCLAW2D_CLAWPATCH_GET_REFINEMENT_CRITERIA" redefined
#define FCLAW2D_CLAWPATCH_GET_REFINEMENT_CRITERIA FCLAW3DX_CLAWPATCH_GET_REFINEMENT_CRITERIA
In file included from ../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:24:0,
from ../forestclaw/src/patches/clawpatch/fort_user/fclaw3dx_clawpatch_exceeds_threshold.c:29:
../forestclaw/src/patches/clawpatch/fort_user/../fclaw2d_clawpatch_fort.h:456:0: note: this is the location of the previous definition
#define FCLAW2D_CLAWPATCH_GET_REFINEMENT_CRITERIA \
In file included from ../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:27:0,
from ../forestclaw/src/patches/clawpatch/fort_user/fclaw3dx_clawpatch_exceeds_threshold.c:29:
../forestclaw/src/_fclaw2d_to_fclaw3dx.h:73:0: warning: "FCLAW2D_CLAWPATCH_EXCEEDS_THRESHOLD" redefined
#define FCLAW2D_CLAWPATCH_EXCEEDS_THRESHOLD FCLAW3DX_CLAWPATCH_EXCEEDS_THRESHOLD
In file included from ../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:24:0,
from ../forestclaw/src/patches/clawpatch/fort_user/fclaw3dx_clawpatch_exceeds_threshold.c:29:
../forestclaw/src/patches/clawpatch/fort_user/../fclaw2d_clawpatch_fort.h:466:0: note: this is the location of the previous definition
#define FCLAW2D_CLAWPATCH_EXCEEDS_THRESHOLD \
FC src/patches/clawpatch/fort3_4.6/fclaw3dx_clawpatch46_local_ghost_pack.lo
In file included from ../forestclaw/src/fclaw_base.h:43:0,
from ../forestclaw/src/forestclaw2d.h:29,
from ../forestclaw/src/patches/clawpatch/fort_user/../fclaw3dx_clawpatch.h:31,
from ../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:21,
from ../forestclaw/src/patches/clawpatch/fort_user/fclaw3dx_clawpatch_exceeds_threshold.c:29:
../forestclaw/src/patches/clawpatch/fclaw3dx_clawpatch_fort.h:586:34: error: conflicting types for ‘fclaw3dx_clawpatch_exceeds_threshold_’
FCLAW_F77_FUNC(fclaw3dx_clawpatch_exceeds_threshold, \
^
./src/fclaw_config.h:174:35: note: in definition of macro ‘FCLAW_F77_FUNC’
#define FCLAW_F77_FUNC(name,NAME) name ## _
^~~~
../forestclaw/src/_fclaw2d_to_fclaw3dx.h:73:45: note: in expansion of macro ‘FCLAW3DX_CLAWPATCH_EXCEEDS_THRESHOLD’
#define FCLAW2D_CLAWPATCH_EXCEEDS_THRESHOLD FCLAW3DX_CLAWPATCH_EXCEEDS_THRESHOLD
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:34:5: note: in expansion of macro ‘FCLAW2D_CLAWPATCH_EXCEEDS_THRESHOLD’
int FCLAW2D_CLAWPATCH_EXCEEDS_THRESHOLD(const int* blockno,
^
../forestclaw/src/patches/clawpatch/fclaw3dx_clawpatch_fort.h:586:34: note: previous declaration of ‘fclaw3dx_clawpatch_exceeds_threshold_’ was here
FCLAW_F77_FUNC(fclaw3dx_clawpatch_exceeds_threshold, \
^
./src/fclaw_config.h:174:35: note: in definition of macro ‘FCLAW_F77_FUNC’
#define FCLAW_F77_FUNC(name,NAME) name ## _
^~~~
../forestclaw/src/patches/clawpatch/fclaw3dx_clawpatch_fort.h:604:5: note: in expansion of macro ‘FCLAW3DX_CLAWPATCH_EXCEEDS_THRESHOLD’
int FCLAW3DX_CLAWPATCH_EXCEEDS_THRESHOLD(const int *blockno,
^
In file included from ../forestclaw/src/patches/clawpatch/fort_user/fclaw3dx_clawpatch_exceeds_threshold.c:29:0:
../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c: In function ‘fclaw3dx_clawpatch_exceeds_threshold_’:
../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:90:63: warning: passing argument 11 of ‘user_exceeds_threshold’ from incompatible pointer type [-Wincompatible-pointer-types]
tag_threshold,init_flag, is_ghost);
^~~~~~~~~
../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:90:63: note: expected ‘const double *’ but argument is of type ‘const int *’
../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:90:74: warning: passing argument 12 of ‘user_exceeds_threshold’ from incompatible pointer type [-Wincompatible-pointer-types]
tag_threshold,init_flag, is_ghost);
^~~~~~~~
../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:90:74: note: expected ‘const double *’ but argument is of type ‘const int *’
../forestclaw/src/patches/clawpatch/fort_user/fclaw2d_clawpatch_exceeds_threshold.c:88:26: error: too few arguments to function ‘user_exceeds_threshold’
exceeds_th = user_exceeds_threshold(blockno, qval,qmin,qmax,quad,
^~~~~~~~~~~~~~~~~~~~~~
Makefile:10480: recipe for target 'src/patches/clawpatch/fort_user/src_patches_clawpatch_libclawpatch_la-fclaw3dx_clawpatch_exceeds_threshold.lo' failed
Going back to 0e1c2acc55cdaeccc28c8c99fc6c7ce612fa644f solves the compliling problem. However, the configuration works only with an additional LIBS="-lgfortran" in the configure command showed above. In this case one test fails due to a floating point overflow. The test-suite.log is shown below. In particular, the older commit reverts parts of feature_2d3druntime and since the compiler error above is about multiple function declarations in the context of 2d and 3d functions the compiler errors may be related to this branch.
Description
The compiler ( gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0) gives an error for the compilation of the current forestclaw master (
e861b56ee35da5b82f7337075423bc99bcbefe0e
) and develop (14ae9be1071abe2af8ba54ea9a9f0c18677ecf3d
) branch.The output of the compiler:
Configuration
Further Observations
Going back to
0e1c2acc55cdaeccc28c8c99fc6c7ce612fa644f
solves the compliling problem. However, the configuration works only with an additionalLIBS="-lgfortran"
in the configure command showed above. In this case one test fails due to a floating point overflow. The test-suite.log is shown below. In particular, the older commit reverts parts of feature_2d3druntime and since the compiler error above is about multiple function declarations in the context of 2d and 3d functions the compiler errors may be related to this branch.Test Suite