lattice-boltzmann-epiphany.git
9 years agod2q9: rename "timers" (name conflict with libc) master
Sebastian [Thu, 4 Dec 2014 14:13:14 +0000 (14:13 +0000)]
d2q9: rename "timers" (name conflict with libc)

9 years agod2q9: fix stupid bugs
Sebastian [Mon, 15 Sep 2014 19:07:31 +0000 (19:07 +0000)]
d2q9: fix stupid bugs

9 years agod2q9: consistent naming for 2D and 3D case
Sebastian [Mon, 15 Sep 2014 15:13:34 +0000 (15:13 +0000)]
d2q9: consistent naming for 2D and 3D case

9 years agod3q19: implement optimized bulk collision/stream
Sebastian [Tue, 2 Sep 2014 21:53:29 +0000 (21:53 +0000)]
d3q19: implement optimized bulk collision/stream

9 years agod3q19: remove libc, add stubs
Sebastian [Tue, 2 Sep 2014 12:10:04 +0000 (12:10 +0000)]
d3q19: remove libc, add stubs

Do not link against newlib anymore.
Add required stubs used by the startup code.
Add own (very slow!) implementations of memcpy() and memset().

This frees about 2k in SRAM bank 0.

9 years agod3q19: initial upload (no Zou/He)
Sebastian [Mon, 1 Sep 2014 19:28:36 +0000 (19:28 +0000)]
d3q19: initial upload (no Zou/He)

Will not compile with Zou/He boundaries due
to linker error. The code does not fit in Bank 0,
even with -Os.

9 years agohost: split write_image into GIF and MP4 (fails!)
Sebastian [Mon, 25 Aug 2014 16:51:52 +0000 (16:51 +0000)]
host: split write_image into GIF and MP4 (fails!)

split write_image() into convert_to_gif() (using ImageMagick 'convert')
and convert_to_mp4() (using FFMPEG) functions.

NOTE:
since the Parallella Ubuntu ships with libav instead of ffmpeg,
and the ffmpeg/avconv binaries don't support type globs, converting
to MP4 does not work - and fails without error message.

9 years agohost: split write_image for density/velocity, -lm
Sebastian [Mon, 25 Aug 2014 16:23:44 +0000 (16:23 +0000)]
host: split write_image for density/velocity, -lm

split write_image() into write_density() and
write_velocity().
velocity calculations needs square root, so include
<math.h> and link against libm.

9 years agod2q9: implement Zou/He boundaries on all sides
Sebastian [Mon, 25 Aug 2014 14:55:03 +0000 (14:55 +0000)]
d2q9: implement Zou/He boundaries on all sides

only the top wall can be imprinted with a velocity,
for the other sides the velocities are zero.

54 years agod2q9: fix processing of non-wrapping borders
Sebastian [Thu, 1 Jan 1970 00:04:59 +0000 (00:04 +0000)]
d2q9: fix processing of non-wrapping borders

9 years agod2q9: rename NUM_CORES to CORES
Sebastian [Wed, 13 Aug 2014 17:01:33 +0000 (17:01 +0000)]
d2q9: rename NUM_CORES to CORES

make naming consistent with CORES_{X,Y} and BLOCKS_{X,Y}

9 years agod2q9: rename BLOCK_{X,Y} to BLOCKS_{X,Y}
Sebastian [Wed, 13 Aug 2014 16:59:55 +0000 (16:59 +0000)]
d2q9: rename BLOCK_{X,Y} to BLOCKS_{X,Y}

makes naming consistent with CORES_{X,Y}

9 years agod2q9: replace attribute 'unused' with 'used'
Sebastian [Wed, 13 Aug 2014 14:28:07 +0000 (14:28 +0000)]
d2q9: replace attribute 'unused' with 'used'

While the attribute 'unused' only removes a warning, the
attribute 'used' actually prevents the linker from removing
the object. The objects in question are dummy objects to
prevent the linker from even trying to put anything else there.

Change the Makefile to remove the sections in question (banks 1/2/3)
from the SREC file, since they contain uninitialized data anyway.

9 years agod2q9: remove row, col, core from header
Sebastian [Wed, 13 Aug 2014 14:20:13 +0000 (14:20 +0000)]
d2q9: remove row, col, core from header

9 years agorename folder
Sebastian [Wed, 13 Aug 2014 14:15:43 +0000 (14:15 +0000)]
rename folder

The main code and the underlying data structures are too different
to bother building a 2D and a 3D simulation from the same code base.

9 years agosimple full bounce-back borders
Sebastian [Tue, 12 Aug 2014 20:53:21 +0000 (20:53 +0000)]
simple full bounce-back borders

9 years agoremove useless delay(), since ping-pong works now
Sebastian [Tue, 12 Aug 2014 20:47:45 +0000 (20:47 +0000)]
remove useless delay(), since ping-pong works now

9 years agoMakefile: don't print $(EOBJS) in help screen
Sebastian [Tue, 12 Aug 2014 20:47:22 +0000 (20:47 +0000)]
Makefile: don't print $(EOBJS) in help screen

9 years agoshared: don't pack shm_t, but align it instead
Sebastian [Wed, 30 Jul 2014 18:46:05 +0000 (18:46 +0000)]
shared: don't pack shm_t, but align it instead

Accesses to the poll flag or the iteration counter do not
result in four byte-accesses anymore. Sigh.

9 years agoall: new polling architecture
Sebastian [Mon, 28 Jul 2014 15:33:49 +0000 (15:33 +0000)]
all: new polling architecture

Replaces states[][] with pollflag+iteration.
The host communicates to the target when it is done reading shared
memory. No need for delay() on the target anymore. Only core 0
writes the iteration counter, reducing traffic to shared memory.
Writing populations is still slow. But no data loss anymore.

9 years agotarget: fail build on too small sizes
Sebastian [Mon, 28 Jul 2014 14:35:05 +0000 (14:35 +0000)]
target: fail build on too small sizes

at least 1x1 cores and 3x3 blocks, please.

9 years agohost: fix write_populations().
Sebastian [Mon, 28 Jul 2014 14:33:53 +0000 (14:33 +0000)]
host: fix write_populations().

9 years agotimers: save timer values to timers.dat
Sebastian [Fri, 25 Jul 2014 20:45:11 +0000 (20:45 +0000)]
timers: save timer values to timers.dat

it is reasonably impossible to calculate the standard inside epiphany,
since there is no 128 bit datatype (as needed for storing the squares).
the required sqrtf will already overflow the internal code memory, adding
bignum stuff won't help. even float ceils.

so put the burden of statistics on the host.

9 years agoall: begin of time measurement infrastructure
Sebastian [Fri, 25 Jul 2014 14:27:29 +0000 (14:27 +0000)]
all: begin of time measurement infrastructure

measure time differences, write them to shm, print them on the host

9 years agohost: cleanup
Sebastian [Fri, 25 Jul 2014 14:22:00 +0000 (14:22 +0000)]
host: cleanup

9 years agoMakefile: run everything internally with float
Sebastian [Fri, 25 Jul 2014 14:07:09 +0000 (14:07 +0000)]
Makefile: run everything internally with float

- treat floating point constants as single precision
  (this removes all dependencies for double)
- use internal.ldf linker script
  (puts libc functions in local memory)

speedup is immense. running code from external memory
is extremely slow, especially when all cores fight for it.

9 years agoinner borders
Sebastian [Mon, 30 Jun 2014 22:08:10 +0000 (22:08 +0000)]
inner borders

- implement inner borders, still wrap-around the outer borders
- shm_t uses CORES_X, CORES_Y instead of linearized numbers
- change index order to be [y][x] everywhere
- maximum size now 104x104 (using 26x26 blocks in a 4x4 grid)
- compile-time bombs for anything larger
- finally supports non-square block and grid sizes

9 years agoallow blocks of up to 24 KB (three banks)
Sebastian [Thu, 26 Jun 2014 01:44:39 +0000 (01:44 +0000)]
allow blocks of up to 24 KB (three banks)

9 years agoadd compile-time error for oversized grids
Sebastian [Thu, 26 Jun 2014 01:43:21 +0000 (01:43 +0000)]
add compile-time error for oversized grids

9 years agolb: D2Q9 working, single bank, single core
Sebastian [Wed, 25 Jun 2014 22:05:27 +0000 (22:05 +0000)]
lb: D2Q9 working, single bank, single core

limited to 10x10 (double precision) or 15x15 (single precision)

9 years agoinitial commit
Sebastian [Tue, 17 Jun 2014 16:17:28 +0000 (16:17 +0000)]
initial commit