Compilation abort for latest github version

Submitted by jenslaube on Mon, 02/29/2016 - 11:37

Hi,

I tried to compile the latest Github version from today (Version 3.3.1, 29th of February) and receive the following Warning:

fix_check_timestep_gran.cpp(67): warning #47: incompatible redefinition of macro "BIG" (declared at line 49 of "../global_properties.h")
#define BIG 1000000.

with a subsequent compilation abort.
In comparison to the former versions, the line "#define BIG 1.0e20" was inserted into the file "global_properties.h".
Can you fix this or tell me how to avoid the Error? Thanks a lot!

Best wishes
Jens

Daniel Queteschiner | Tue, 03/01/2016 - 16:21

I can confirm that this gives a warning and should be fixed (like all other warnings!) but on Ubuntu 14.04 with gcc 5.3 still compiles fine.
What's your OS, compiler version, used make file?

PS: Anyone ever counted how many different definitions of BIG / SMALL there are in the code base? :-D

richti83's picture

richti83 | Thu, 03/03/2016 - 15:57


fgrep "#define BIG" *.cpp > all_big.txt
comm.cpp:#define BIG 1.0e20
compute.cpp:#define BIG 2000000000
compute_reduce.cpp:#define BIG 1.0e20
compute_reduce_region.cpp:#define BIG 1.0e20
create_atoms.cpp:#define BIG 1.0e30
domain.cpp:#define BIG 1.0e20
dump.cpp:#define BIG 1.0e20
dump_decomposition_vtk.cpp:#define BIG 1.0e30
dump_image.cpp:#define BIG 1.0e20
fix_ave_euler.cpp:#define BIG 1000000000
fix_ave_histo.cpp:#define BIG 1.0e20
fix_ave_spatial.cpp:#define BIG 1000000000
fix_check_timestep_gran.cpp:#define BIG 1000000.
fix_check_timestep_sph.cpp:#define BIG 1000000.
fix_dt_reset.cpp:#define BIG 1.0e20
fix_mesh_surface_stress_servo.cpp:#define BIG 1000000.
fix_template_multisphere.cpp:#define BIG 1.e20
fix_wall_sph.cpp:#define BIG 1.0e20
group.cpp:#define BIG 1.0e20
lattice.cpp:#define BIG 1.0e30
modify.cpp:#define BIG 1.0e20
neighbor.cpp:#define BIG 1.0e20
properties.cpp:#define BIG 1e20
region_block.cpp:#define BIG 1.0e20
region_cone.cpp:#define BIG 1.0e20
region_cylinder.cpp:#define BIG 1.0e20
region_mesh_tet.cpp:#define BIG 1.e20
region_prism.cpp:#define BIG 1.0e20
region_union.cpp:#define BIG 1.0e20
region_wedge.cpp:#define BIG 1.0e20
set.cpp:#define BIG INT_MAX
variable.cpp:#define BIG 1.0e20
#
fgrep "#define SMALL" *.cpp > all_small.txt
compute_group_group.cpp:#define SMALL 0.00001
domain.cpp:#define SMALL 1.0e-4
fix_fiber_spring_simple.cpp:#define SMALL 1.0e-10
fix_scalar_transport_equation.cpp:#define SMALL 1e-8
fix_spring.cpp:#define SMALL 1.0e-10
neighbor.cpp:#define SMALL 1.0e-6
properties.cpp:#define SMALL 1e-6
region.cpp:#define SMALL 1e-8
velocity.cpp:#define SMALL 0.001
#
fgrep "#define BIG" *.h
global_properties.h:#define BIG 1.0e20
#
fgrep "#define SMALL" *.h
fix_heat_gran.h:#define SMALL 1e-8

scnr

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact