README.org
July 2, 2023 ยท View on GitHub
- emergence
[[/pub/demo.png]]
** About
Emergence is a visualiser and processor of a primordial particle system. The project is based on the article, "How a life-like system emerges from a simple particle motion law", by Schmickl et al.: https://www.nature.com/articles/srep37969.
Demo: https://youtu.be/aowMzix8mYg
** Build & Run
*** Dependencies
- clang++
12 - cmake
3.25 - glew
2.2 - glfw
3.3 - glm
0.9.9
/These versions only indicate what was used in the latest build./
ldd ./emergence:
#+BEGIN_SRC linux-vdso.so.1 /usr/lib/libGLEW.so.2.2 /usr/lib/libglfw.so.3 /usr/lib/libOpenGL.so.0 /usr/lib/libOpenCL.so.1 /usr/lib/libstdc++.so.6 /usr/lib/libm.so.6 /usr/lib/libgcc_s.so.1 /usr/lib/libc.so.6 /usr/lib/libGL.so.1 /usr/lib/libdl.so.2 /usr/lib/libX11.so.6 /usr/lib/libpthread.so.0 /usr/lib/libGLdispatch.so.0 /usr/lib64/ld-linux-x86-64.so.2 /usr/lib/libGLX.so.0 /usr/lib/libxcb.so.1 /usr/lib/libXau.so.6 /usr/lib/libXdmcp.so.6 #+END_SRC
**** Bundled with this repository (in =external/=)
- catch2
- fonts (Liberation Mono)
- glmConfig.cmake (at least one linux distribution lacks this file)
- imgui
- stb
**** Optional
- opencl c headers ("opencl2-headers")
>= 2023.02.06 - opencl c++ headers ("opencl-clhpp")
>= 2.0.15 - opencl loader ("ocl-icd")
>= 2.3.1 - opencl runtime
- Per your graphics card manufacturer, eg. [[https://software.intel.com/content/www/us/en/develop/articles/opencl-drivers.html][Intel]], [[https://developer.nvidia.com/opencl][Nvidia]], AMD ([[https://www.amd.com/en/search?keyword=amdgpu-pro][link]], [[https://stackoverflow.com/questions/53070673/download-opencl-amd-app-sdk-3-0-for-windows-and-linux][link]], [[https://wiki.archlinux.org/index.php/AMDGPU_PRO][link]]).
- This project has only been tested using [[https://software.intel.com/content/www/us/en/develop/articles/opencl-drivers.html][Intel Graphics Compute Runtime]] (aka. NEO) for OpenCL for Intel gen9 graphics on Linux.
*** Linux
-
If OpenCL is desired on Intel graphics, install NEO ::
-
Refer to https://github.com/intel/compute-runtime.
-
If possible, install the necessary packages via your distribution's package manager.
-
Otherwise:
- Download the =deb= assets from their [[https://github.com/intel/compute-runtime/releases][releases page]].
- Extract the libraries from the =deb= files, and place them under, say, =/usr/local=.
- Make sure =ld.so.conf= recognises the directory holding the new libraries, for instance =/usr/local/lib=.
- =sudo ldconfig=, substituting renamed copies of library files with symlinks if =ldconfig= complains.
- Make sure the path to the new OpenCL driver (eg. =/usr/local/lib/intel-opencl/libigdrcl.so=) is recognised under =/etc/OpenCL/vendors=.
- Check that your device is recognised and ready, using a program like =clinfo=.
-
Build ::
- Retrieve this repository from https://github.com/blobject/emergence.
cd emergence- Optionally configure =CL= (default =on=) in CMakeLists.txt.
rm -R build; mkdir build; cd buildcmake ..make
Note: If any OpenCL component was (un)installed after an invocation of =cmake=, make sure to remove =build/= and do a fresh =cmake= again.
- Run ::
cd emergence/build./emergence(append =-h= for usage help)
-
On Intel graphics, turn vsync off to get better performance:
vblank_mode=0 ./emergence -
Test ::
cd emergence/build./testemergence