Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling fdtd-2d prog in the examples folder #37

Open
ThinhinaneIhadadene opened this issue Mar 15, 2019 · 1 comment
Open

Error compiling fdtd-2d prog in the examples folder #37

ThinhinaneIhadadene opened this issue Mar 15, 2019 · 1 comment

Comments

@ThinhinaneIhadadene
Copy link

ThinhinaneIhadadene commented Mar 15, 2019

I tried compiling the program fdtd-2d program which is in the examples folder, I only changed the sizes of matrices by setting the constants nx and ny 10240 and the compilation failed.
This doesn't occur when the problem size is small.

Also, in my case running the command
mpirun -np 16 -hostfile ../hosts ./dist
result in 16 executions with one rank each.

The command I used :

../../polycc fdtd-2d.c --distmem --timereport --nocommopt --tile    --isldep --lastwriter --indent  -o fdtd-2d.dist.c

OMPI_CC=gcc mpicc -D__MPI -O3 -march=native -mtune=native -ftree-vectorize -fopenmp -DTIME fdtd-2d.dist.c pi_fdtd-2d.dist.c sigma_fdtd-2d.dist.c \
		../../polyrt/polyrt.c -o dist -I ../../polyrt -lm

The error I got :

In file included from fdtd-2d.dist.c:4:0:
pi_defs.h:6:0: warning: "_UB_REPLACE_ME_DISTLOOG0t3" redefined [enabled by default]
 #define _UB_REPLACE_ME_DISTLOOG0t3 min(min(floord(tmax+ny-2,32),floord(32*t1+ny+30,64)),t1)
 ^
pi_defs.h:4:0: note: this is the location of the previous definition
 #define _UB_REPLACE_ME_DISTLOOG0t3 min(min(floord(tmax+ny-1,32),floord(32*t1+ny+31,64)),t1)
 ^
In file included from pi_fdtd-2d.dist.c:4:0:
pi_defs.h:6:0: warning: "_UB_REPLACE_ME_DISTLOOG0t3" redefined [enabled by default]
 #define _UB_REPLACE_ME_DISTLOOG0t3 min(min(floord(tmax+ny-2,32),floord(32*t1+ny+30,64)),t1)
 ^
pi_defs.h:4:0: note: this is the location of the previous definition
 #define _UB_REPLACE_ME_DISTLOOG0t3 min(min(floord(tmax+ny-1,32),floord(32*t1+ny+31,64)),t1)
 ^
/tmp/cc7wD9xO.o: In function `read_grid_size':
polyrt.c:(.text+0xa2): relocation truncated to fit: R_X86_64_32S against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
/tmp/cc7wD9xO.o: In function `polyrt_init_grid_size':
polyrt.c:(.text+0x459): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x463): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x46d): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x477): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x481): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x48b): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x495): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x49f): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x4a9): relocation truncated to fit: R_X86_64_PC32 against symbol `grid_size' defined in COMMON section in /tmp/cc7wD9xO.o
polyrt.c:(.text+0x4b3): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
make: *** [dist] Error 1
@bondhugula
Copy link
Owner

Sorry about the extreme delay in responding to this. The 'relocation truncated to fit' errors are due to excessive global variable storage sizes! You'll have to reduce the problem size or go with malloc'ed storage (array of pointers so that 2-d subscripted indexing is still used).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants