https://wiki.archlinux.org/api.php?action=feedcontributions&user=Kralyk&feedformat=atomArchWiki - User contributions [en]2024-03-29T07:26:09ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Distcc&diff=581911Distcc2019-09-10T10:45:21Z<p>Kralyk: Add the Compile / With CMake subsection</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Distributed computing]]<br />
[[Category:Development]]<br />
[[Category:Package development]]<br />
[[it:Distcc]]<br />
[[ja:Distcc]]<br />
[[zh-hans:Distcc]]<br />
[[ru:Distcc]]<br />
{{Related articles start}}<br />
{{Related|TORQUE}}<br />
{{Related|Slurm}}<br />
{{Related articles end}}<br />
<br />
[[Wikipedia:distcc|distcc]] is a program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network to speed up building. It should always generate the same results as a local build, is simple to install and use, and is usually much faster than a local compile. Further, one can use it together with native Arch build tools such as makepkg.<br />
<br />
== Terms ==<br />
<br />
; client: The client is the computer initiating the compilation.<br />
; volunteer: The volunteer is the computer accepting compilation requests send by the client. One can setup multiple volunteers or just a single one.<br />
<br />
== Getting started ==<br />
<br />
[[Install]] the {{pkg|distcc}} package on all participating PCs in the distcc cluster. For other distros, or even operating systems including Windows through using Cygwin, refer to the [http://distcc.samba.org/doc.html distcc docs]. Be sure to allow traffic on the port on which distcc runs (the default is 3632/tcp), see [[:Category:Firewalls]] and {{man|1|distcc}}.<br />
<br />
== Configuration ==<br />
<br />
=== Volunteers ===<br />
<br />
The configuration for the volunteer is stored in {{ic|/etc/conf.d/distccd}}. At a minimum, configure the allowed address ranges in [[wikipedia:Classless_Inter-Domain_Routing|CIDR]] format:<br />
<br />
DISTCC_ARGS="--allow 192.168.10.0/24"<br />
<br />
A nice tool for converting address ranges to CIDR format can be found here: [http://www.ipaddressguide.com/cidr CIDR Utility Tool]. Other commandline options can be defined as well. Refer to {{man|1|distcc}}. <br />
<br />
[[Start]] {{ic|distccd.service}} on every participating volunteer. To have {{ic|distccd.service}} start at boot-up, [[enable]] it.<br />
<br />
=== Client ===<br />
==== For use with makepkg ====<br />
<br />
Edit {{ic|/etc/makepkg.conf}} in the following sections:<br />
<br />
# The BUILDENV array will need to have ''distcc'' unbanged i.e. list it without exclamation point.<br />
# Uncomment the ''DISTCC_HOSTS'' line and add the host name or IP addresses of the volunteers. Optionally, follow this with a forward slash and the max number of threads they are to use. The subsequent nodes should be separated by a white space. This list should be ordered from most powerful to least powerful (processing power).<br />
# Adjust the MAKEFLAGS variable to correspond to the number of sum of the number of individual values specified for the max threads per server. In the example below, this is 5+3+3=11.<br />
<br />
Example using relevant lines:<br />
<br />
BUILDENV=(distcc fakeroot color !ccache check !sign)<br />
MAKEFLAGS="-j11"<br />
DISTCC_HOSTS="192.168.10.2/5 192.168.10.3/3 192.168.10.4/3"<br />
<br />
{{Warning|The {{ic|1=-march=native}} flag cannot be used in the {{ic|CFLAGS}} and {{ic|CXXFLAGS}} variables, otherwise distccd will not distribute work to other machines.}}<br />
<br />
==== For use without makepkg ====<br />
<br />
The minimal configuration for distcc on the client includes the setting of the available volunteers. This can either be done by setting the addresses in the environment variable {{ic|DISTCC_HOSTS}} or in either of the configuration files {{ic|$DISTCC_HOSTS}}, {{ic|$DISTCC_DIR/hosts}}, {{ic|~/.distcc/hosts}} or {{ic|/etc/distcc/hosts}}.<br />
<br />
Example for setting the volunteer address using {{ic|DISTCC_HOSTS}}:<br />
<br />
$ export DISTCC_HOSTS="192.168.10.3,lzo,cpp 192.168.10.4,lzo,cpp"<br />
<br />
{{Note|This is a white space separated list.}}<br />
<br />
Example for setting the volunteer addresses in the hosts configuration file:<br />
<br />
{{hc|~/.distcc/hosts|<br />
192.168.10.3,lzo,cpp 192.168.10.4,lzo,cpp<br />
}}<br />
<br />
Instead of explicitly listing the server addresses one can also use the avahi zeroconf mode. To use this mode {{ic|+zeroconf}} must be in place instead of the server addresses and the distcc daemons on the volunteers have to be started using the {{ic|--zeroconf}} option. Note that this option does not support the pump mode!<br />
<br />
The examples add the following options to the address:<br />
<br />
* {{ic|lzo}}: Enables LZO compression for this TCP or SSH host (volunteer).<br />
* {{ic|cpp}}: Enables distcc-pump mode for this host (volunteer). Note: the build command must be wrapped in the pump script in order to start the include server.<br />
<br />
A description for the pump mode can be found here: [http://google-opensource.blogspot.de/2008/08/distccs-pump-mode-new-design-for.html distcc's pump mode: A New Design for Distributed C/C++ Compilation ]<br />
<br />
To use distcc-pump mode for a volunteer, users must start the compilation using the pump script otherwise the compilation will fail.<br />
<br />
== Compile ==<br />
=== With makepkg ===<br />
<br />
Compile via makepkg as normal.<br />
<br />
=== Without makepkg ===<br />
<br />
To compile a source file using the distcc pump mode, use the following command:<br />
<br />
$ pump distcc g++ -c hello_world.cpp<br />
<br />
In this case the pump script will execute distcc which in turn calls g++ with "-c hello_world.cpp" as parameter.<br />
<br />
To compile a Makefile project, first find out which variables are set by the compiler. For example in gzip-1.6, one can find the following line in the Makefile: {{ic|1=CC = gcc -std=gnu99}}. Normally the variables are called {{ic|CC}} for C projects and {{ic|CXX}} for C++ projects. To compile the project using distcc it would look like this:<br />
<br />
$ wget ftp://ftp.gnu.org/pub/gnu/gzip/gzip-1.6.tar.xz<br />
$ tar xf gzip-1.6.tar.xz<br />
$ cd gzip-1.6<br />
$ ./configure<br />
$ pump make -j2 CC="distcc gcc -std=gnu99"<br />
<br />
This example would compile gzip using distcc's pump mode with two compile threads. For the correct {{ic|-j}} setting have a look at [https://cdn.rawgit.com/distcc/distcc/master/doc/web/faq.html What -j level to use?]<br />
<br />
=== With CMake ===<br />
<br />
Use the following CMake options to build a CMake-based project with distcc:<br />
<br />
$ cmake -DCMAKE_C_COMPILER_LAUNCHER=distcc -DCMAKE_CXX_COMPILER_LAUNCHER=distcc ...<br />
<br />
To enable pump mode, use:<br />
<br />
$ cmake -DCMAKE_C_COMPILER_LAUNCHER=pump\;distcc -DCMAKE_CXX_COMPILER_LAUNCHER=pump\;distcc ...<br />
<br />
== Monitoring progress ==<br />
{{Pkg|distcc}} ships with a cli monitor {{ic|distccmon-text}} and a gtk monitor {{ic|distccmon-gnome}} one can use to check on compilation status.<br />
<br />
The cli monitor can run continuously by appending a space followed by integer to the command which corresponds to the number of sec to wait for a repeat query:<br />
<br />
{{bc|$ distccmon-text 3<br />
29291 Preprocess probe_64.c 192.168.10.2[0]<br />
30954 Compile apic_noop.c 192.168.10.2[0]<br />
30932 Preprocess kfifo.c 192.168.10.2[0]<br />
30919 Compile blk-core.c 192.168.10.2[1]<br />
30969 Compile i915_gem_debug.c 192.168.10.2[3]<br />
30444 Compile block_dev.c 192.168.10.3[1]<br />
30904 Compile compat.c 192.168.10.3[2]<br />
30891 Compile hugetlb.c 192.168.10.3[3]<br />
30458 Compile catalog.c 192.168.10.4[0]<br />
30496 Compile ulpqueue.c 192.168.10.4[2]<br />
30506 Compile alloc.c 192.168.10.4[0]<br />
}}<br />
<br />
== Cross Compiling with distcc ==<br />
One can use distcc to help cross compile. <br />
* A machine running the target architecture should be used as the client.<br />
* Non-native architecture volunteers will help compile but they require the corresponding toolchain to be installed and their distcc to point to it. <br />
<br />
=== Arch Linux ARM ===<br />
==== Volunteers ====<br />
The developers ''highly'' recommend using the official project [https://archlinuxarm.org/wiki/Distcc_Cross-Compiling toolchains] which should be installed on the x86_64 volunteer(s). Rather than manually managing these, the [[AUR]] provides all four toolchains as well as simple systemd service units:<br />
* {{AUR|distccd-alarm-armv5}}<br />
* {{AUR|distccd-alarm-armv6h}}<br />
* {{AUR|distccd-alarm-armv7h}}<br />
* {{AUR|distccd-alarm-armv8}}<br />
<br />
Setup on the volunteer containing the toolchain is identical to [[#Volunteers]] except that the name of the configuration and systemd service file matches that of the respective package. For example, for armv7h the config file is {{ic|/etc/conf.d/distccd-armv7h}} and the systemd service unit is {{ic|distccd-armv7h.service}}.<br />
<br />
Note that each of the toolchains runs on a unique port thus allowing them to co-exist on the volunteer if needed. Be sure to allow traffic to the port on which distcc runs see [[:Category:Firewalls]] and {{man|1|distcc}}.<br />
<br />
{| class="wikitable" align="center"<br />
|-<br />
! Target architecture !! Distcc Port<br />
|-<br />
| ''armv5'' || 3633<br />
|- <br />
| ''armv6h'' || 3634<br />
|- <br />
| ''armv7h'' || 3635<br />
|- <br />
| ''armv8h/aarch64'' || 3636<br />
|- <br />
|}<br />
<br />
==== Client ====<br />
Setup of the client is identical to [[#Client]] except, one needs to modify the following two files to define the now non-standard port the volunteers are expected to use. Refer to the table above if using the AUR package.<br />
# {{ic|/etc/conf.d/distcc}}: example on an armv7h machine: {{ic|1=DISTCC_ARGS="--allow 127.0.0.1 --allow 192.168.10.0/24 --port 3635}}<br />
# {{ic|/etc/makepkg.conf}}: example on an armv7h machine: {{ic|1=DISTCC_HOSTS="192.168.10.2/5:3635 192.168.10.3/5:3635"}}<br />
<br />
Alternatively, the {{AUR|distccd-arch-arm}} package will provide the needed systemd service files to enable distccd compilation.<br />
<br />
=== Additional toolchains ===<br />
* [https://embtoolkit.org/ EmbToolkit]: Tool for creating cross compilation tool chain; supports ARM and MIPS architectures; supports building of an LLVM based tool chain<br />
* [http://crosstool-ng.org/ crosstool-ng]: Similar to EmbToolkit; supports more architectures (see website for more information)<br />
* [https://www.linaro.org/downloads/ Linaro]: Provides tool chains for ARM development<br />
<br />
The {{ic|EmbToolkit}} provides a nice graphical configuration menu ({{ic|make xconfig}}) for configuring the tool chain.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Journalctl ===<br />
<br />
Use {{ic|journalctl}} to find out what was going wrong:<br />
<br />
$ journalctl $(which distccd) -e --since "5 min ago"<br />
<br />
=== Adjust log level ===<br />
<br />
By default, distcc will log to {{ic|/var/log/messages.log}} as it goes along. One trick (actually recommended in the distccd manpage) is to log to an alternative file directly. Again, one can locate this in RAM via /tmp. Another trick is to lower to log level of minimum severity of error that will be included in the log file. Useful if only wanting to see error messages rather than an entry for each connection. LEVEL can be any of the standard syslog levels, and in particular critical, error, warning, notice, info, or debug.<br />
<br />
Either call distcc with the arguments mentioned here on the client or appended it to DISTCC_ARGS in {{ic|/etc/conf.d/distccd}} on the volunteers:<br />
<br />
DISTCC_ARGS="--allow 192.168.10.0/24 --log-level error --log-file /tmp/distccd.log"<br />
<br />
=== Limit HDD/SSD usage by relocating $HOME/.distcc ===<br />
<br />
By default, distcc creates {{ic|$HOME/.distcc}} which stores transient relevant info as it serves up work for nodes to compile. This will avoid needless HDD read/writes and is particularly important for SSDs.<br />
<br />
$ export DISTCC_DIR=/tmp/distcc<br />
<br />
=== For distccd-alarm ===<br />
==== No such file or directory ====<br />
Errors similar to the following indicate that the user is mistakenly running the distccd service provided by {{pkg|distcc}} and NOT provided by the distccd-alarm packages (ie {{AUR|distccd-alarm-armv5}}, {{AUR|distccd-alarm-armv6h}}, {{AUR|distccd-alarm-armv7h}}, or {{AUR|distccd-alarm-armv8}}.)<br />
<br />
Be sure to start the correct service for the target architecture.<br />
<br />
{{bc|distcc[25479] (dcc_execvp) ERROR: failed to exec armv7l-unknown-linux-gnueabihf-g++: No such file or directory<br />
}}<br />
<br />
==== Monitoring does not work ====<br />
Since the distccd-alarm-arm* services use the {{ic|nobody}} user, {{ic|/usr/bin/distccmon-text}} does not work to monitor compilation. One can inspect the output of the actually distcc log to troubleshoot if needed, {{ic|tail -f /tmp/distccd-armv7h.log}} for example.<br />
<br />
== See also ==<br />
<br />
* https://github.com/distcc/distcc<br />
<br />
* {{AUR|icecream}} - An easier to configure fork of distcc that some find brings notably better results and improved utilisation of available cores.</div>Kralykhttps://wiki.archlinux.org/index.php?title=Talk:GPGPU&diff=478010Talk:GPGPU2017-05-22T08:37:42Z<p>Kralyk: Comment</p>
<hr />
<div>== video hardware decoding ==<br />
<br />
Is it worth mentioning video hardware decoding with cuda (through mpv) ? [[User:Ivanoff|Ivanoff]] ([[User talk:Ivanoff|talk]]) 07:21, 21 May 2017 (UTC)<br />
<br />
:I'd say no, that kind of stuff belongs to [[Hardware video acceleration]], though we might want to add that to Related articles kralyk 08:31, 21 May 2017 (UTC)<br />
::what about the '''List of OpenCL and CUDA accelerated software''' section [[User:Ivanoff|Ivanoff]] ([[User talk:Ivanoff|talk]]) 09:12, 21 May 2017 (UTC)<br />
:::That wouldn't be right, video decoding acceleration is not built on top of OpenCL or CUDA, it is a native feature of the GPU. I have added a link to related articles, that should do it. | kralyk 10:05, 21 May 2017 (UTC)<br />
::::Understood. I mainly talked abount the option of mpv with the option '''--hwdec=cuda (Any platform CUDA is available)''' , which uses cuda directly instead of vdpau. I admit, slightly off topic. Just saying. Regards [[User:Ivanoff|Ivanoff]] ([[User talk:Ivanoff|talk]]) 12:08, 21 May 2017 (UTC)<br />
:::::Ah, so it ''is'' actually CUDA-based, that's a different story. Sorry, I didn't understand you right. Okay, in that case I suppose it could go the '''List of OpenCL and CUDA accelerated software''' | kralyk 08:37, 22 May 2017 (UTC)</div>Kralykhttps://wiki.archlinux.org/index.php?title=Talk:GPGPU&diff=477925Talk:GPGPU2017-05-21T10:05:48Z<p>Kralyk: typo</p>
<hr />
<div>== video hardware decoding ==<br />
<br />
Is it worth mentioning video hardware decoding with cuda (through mpv) ? [[User:Ivanoff|Ivanoff]] ([[User talk:Ivanoff|talk]]) 07:21, 21 May 2017 (UTC)<br />
<br />
:I'd say no, that kind of stuff belongs to [[Hardware video acceleration]], though we might want to add that to Related articles kralyk 08:31, 21 May 2017 (UTC)<br />
::what about the '''List of OpenCL and CUDA accelerated software''' section [[User:Ivanoff|Ivanoff]] ([[User talk:Ivanoff|talk]]) 09:12, 21 May 2017 (UTC)<br />
:::That wouldn't be right, video decoding acceleration is not built on top of OpenCL or CUDA, it is a native feature of the GPU. I have added a link to related articles, that should do it. | kralyk 10:05, 21 May 2017 (UTC)</div>Kralykhttps://wiki.archlinux.org/index.php?title=Talk:GPGPU&diff=477924Talk:GPGPU2017-05-21T10:05:29Z<p>Kralyk: comment</p>
<hr />
<div>== video hardware decoding ==<br />
<br />
Is it worth mentioning video hardware decoding with cuda (through mpv) ? [[User:Ivanoff|Ivanoff]] ([[User talk:Ivanoff|talk]]) 07:21, 21 May 2017 (UTC)<br />
<br />
:I'd say no, that kind of stuff belongs to [[Hardware video acceleration]], though we might want to add that to Related articles kralyk 08:31, 21 May 2017 (UTC)<br />
::what about the '''List of OpenCL and CUDA accelerated software''' section [[User:Ivanoff|Ivanoff]] ([[User talk:Ivanoff|talk]]) 09:12, 21 May 2017 (UTC)<br />
:::That would be right, video decoding acceleration is not built on top of OpenCL or CUDA, it is a native feature of the GPU. I have added a link to related articles, that should do it. | kralyk 10:05, 21 May 2017 (UTC)</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=477906GPGPU2017-05-21T08:33:18Z<p>Kralyk: Add Hardware video acceleration to related articles</p>
<hr />
<div>[[Category:Development]]<br />
[[Category:Graphics]]<br />
[[ja:GPGPU]]<br />
{{Related articles start}}<br />
{{Related|Catalyst}}<br />
{{Related|Nvidia}}<br />
{{Related|Hardware video acceleration}}<br />
{{Related articles end}}<br />
<br />
GPGPU stands for [[Wikipedia:GPGPU|General-purpose computing on graphics processing units]].<br />
In Linux, there are currently two major GPGPU frameworks: [[Wikipedia:OpenCL|OpenCL]] and [[Wikipedia:CUDA|CUDA]]<br />
<br />
==OpenCL==<br />
<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming specification developed by the Khronos Group, a non-profit consortium.<br />
<br />
The OpenCL specification describes a programming language, a general environment that is required to be present, and a C API to enable programmers to call into this environment.<br />
<br />
===OpenCL Runtime===<br />
To '''execute''' programs that use OpenCL, a compatible hardware runtime needs to be installed.<br />
<br />
====AMD/ATI====<br />
* {{Pkg|opencl-mesa}}: free runtime for [[AMDGPU]] and [[Radeon]]<br />
* {{AUR|opencl-amd}}: proprietary standalone runtime for [[AMDGPU]]<br />
* {{AUR|amdgpu-pro-opencl}}: proprietary runtime for [[AMDGPU PRO]]<br />
* {{AUR|opencl-catalyst}}: AMD proprietary runtime, soon to be deprecated in favor of [[AMDGPU]]<br />
* {{AUR|amdapp-sdk}}: AMD CPU runtime<br />
<br />
====NVIDIA====<br />
* {{Pkg|opencl-nvidia}}: official [[NVIDIA]] runtime<br />
<br />
====Intel====<br />
* {{AUR|intel-opencl-runtime}}: official Intel CPU runtime, also supports non-Intel CPUs<br />
* {{pkg|beignet}}: open-source implementation for Intel IvyBridge+ iGPUs<br />
<br />
====Others====<br />
* {{AUR|pocl}}: LLVM-based OpenCL implementation<br />
<br />
===OpenCL ICD loader (libOpenCL.so)===<br />
<br />
The OpenCL ICD loader is supposed to be a platform-agnostic library that provides the means to load device-specific drivers through the OpenCL API.<br />
Most OpenCL vendors provide their own implementation of an OpenCL ICD loader, and these should all work with the other vendors' OpenCL implementations.<br />
Unfortunately, most vendors do not provide completely up-to-date ICD loaders, and therefore Arch Linux has decided to provide this library from a separate project ({{Pkg|ocl-icd}}) which currently provides a functioning implementation of the current OpenCL API.<br />
<br />
The other ICD loader libraries are installed as part of each vendor's SDK. If you want to ensure the ICD loader from the {{Pkg|ocl-icd}} package is used, you can create a file in {{ic|/etc/ld.so.conf.d}} which adds {{ic|/usr/lib}} to the dynamic program loader's search directories:<br />
<br />
{{hc|/etc/ld.so.conf.d/00-usrlib.conf|2=<nowiki><br />
/usr/lib</nowiki>}}<br />
<br />
This is necessary because all the SDKs add their runtime's lib directories to the search path through {{ic|ld.so.conf.d}} files.<br />
<br />
The available packages containing various OpenCL ICDs are:<br />
* {{Pkg|ocl-icd}}: recommended, most up-to-date<br />
* {{AUR|libopencl}} by AMD. Provides OpenCL 2.0. It is distributed by AMD under a restrictive license and therefore cannot be included into the official repositories.<br />
* {{AUR|intel-opencl}} by Intel. Provides OpenCL 2.0.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to identify each loader, it is otherwise completely irrelevant. ICD loaders are vendor-agnostic and may be used interchangeably (as long as they are implemented correctly).}}<br />
<br />
===OpenCL Development===<br />
For OpenCL '''development''', the bare minimum additional packages required, are:<br />
* {{Pkg|ocl-icd}}: OpenCL ICD loader implementation, up to date with the latest OpenCL specification.<br />
* {{Pkg|opencl-headers}}: OpenCL C/C++ API headers.<br />
<br />
The vendors' SDKs provide a multitude of tools and support libraries:<br />
* {{AUR|intel-opencl-sdk}}: [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK] (old version, new OpenCL SDKs are included in the INDE and Intel Media Server Studio)<br />
* {{AUR|amdapp-sdk}}: This package is installed as {{ic|/opt/AMDAPP}} and apart from SDK files it also contains a number of code samples ({{ic|/opt/AMDAPP/SDK/samples/}}). It also provides the {{ic|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them. As [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK] itself contains CPU OpenCL driver, no extra driver is needed to execute OpenCL on CPU devices (regardless of its vendor). GPU OpenCL drivers are provided by the {{AUR|catalyst}} package (an optional dependency).<br />
* {{Pkg|cuda}}: Nvidia's GPU SDK which includes support for OpenCL 1.1.<br />
<br />
===Implementations===<br />
To see which OpenCL implementations are currently active on your system, use the following command:<br />
$ ls /etc/OpenCL/vendors<br />
<br />
====Language bindings====<br />
* '''JavaScript/HTML5''': [http://www.khronos.org/webcl/ WebCL]<br />
* '''[[Python]]''': {{pkg|python-pyopencl}}<br />
* '''[[D]]''': [https://bitbucket.org/trass3r/cl4d/wiki/Home cl4d]<br />
* '''[[Haskell]]''': OpenCLRaw: {{AUR|haskell-openclraw-git}}{{Broken package link|{{aur-mirror|haskell-openclraw-git}}}}<br />
* '''[[Java]]''': [http://jogamp.org/jocl/www/ JOCL] (a part of [http://jogamp.org/ JogAmp])<br />
* '''[[Mono|Mono/.NET]]''': [http://sourceforge.net/projects/opentk/ Open Toolkit]<br />
* '''[[Go]]''': [https://github.com/samuel/go-opencl OpenCL bindings for Go]<br />
* '''Racket''': Racket has a native interface [http://planet.racket-lang.org/display.ss?owner=jaymccarthy&package=opencl.plt on PLaneT] that can be installed via raco.<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[NVIDIA]]'s proprietary, closed-source parallel computing architecture and framework. It requires a Nvidia GPU. It consists of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{ic|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in {{Pkg|nvidia}} and {{Pkg|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in {{Pkg|cuda}}. The library is available [https://projects.archlinux.org/svntogit/community.git/commit/trunk?h=packages/cuda&id=1b62c8bcb9194b2de1b750bd62a8dce1e7e549f5 only in 64-bit version]. {{ic|cuda-gdb}} needs {{aur|ncurses5-compat-libs}} to be installed, see {{Bug|46598}}.<br />
<br />
===Development===<br />
<br />
The {{Pkg|cuda}} package installs all components in the directory {{ic|/opt/cuda}}. For compiling CUDA code, add {{ic|/opt/cuda/include}} to your include path in the compiler instructions. For example this can be accomplished by adding {{ic|-I/opt/cuda/include}} to the compiler flags/options. To use {{ic|nvcc}}, a {{ic|gcc}} wrapper provided by NVIDIA, just add {{ic|/opt/cuda/bin}} to your path.<br />
<br />
To find whether the installation was successful and if cuda is up and running, you can compile the samples installed on {{ic|/opt/cuda/samples}} (you can simply run {{ic|make}} inside the directory, altough is a good practice to copy the {{ic|/opt/cuda/samples}} directory to your home directory before compiling) and running the compiled examples. A nice way to check the installation is to run one of the examples, called {{ic|deviceQuery}}.<br />
<br />
{{Note|CUDA 8.0 is not compatible with GCC 6 (see {{Bug|49272}}). Therefore the {{Pkg|cuda}} package depends on {{Pkg|gcc5}} and creates symbolic links in {{ic|/opt/cuda/bin/}} for the older version to be picked up by {{ic|nvcc}}. You might also need to configure your build system to use the same GCC version for compiling host code.}}<br />
<br />
===Language bindings===<br />
* '''Fortran''': [http://www.pgroup.com/resources/cudafortran.htm PGI CUDA Fortran Compiler]<br />
* '''[[Haskell]]''': The [http://hackage.haskell.org/package/accelerate accelerate package] lists available CUDA backends <br />
* '''[[Java]]''': [http://www.jcuda.org/jcuda/JCuda.html JCuda]<br />
* '''[[Mathematica]]''': [http://reference.wolfram.com/mathematica/CUDALink/tutorial/Overview.html CUDAlink]<br />
* '''[[Mono|Mono/.NET]]''': [http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx CUDA.NET], [http://www.hybriddsp.com/ CUDAfy.NET]<br />
* '''Perl''': [http://psilambda.com/download/kappa-for-perl Kappa], [https://github.com/run4flat/perl-CUDA-Minimal CUDA-Minimal]<br />
* '''[[Python]]''': {{pkg|python-pycuda}} or [http://psilambda.com/download/kappa-for-python Kappa]<br />
* '''[[Ruby]]''', '''Lua''': [http://psilambda.com/products/kappa/ Kappa]<br />
<br />
===Driver issues===<br />
<br />
It might be necessary to use the legacy driver {{Pkg|nvidia-304xx}} or {{Pkg|nvidia-304xx-lts}} to resolve permissions issues when running CUDA programs on systems with multiple GPUs.<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
{{Expansion|More application may support OpenCL.}}<br />
* [[Bitcoin]]<br />
* [[HandBrake]]<br />
* [[GIMP]] (experimental - see [http://www.h-online.com/open/news/item/GIMP-2-8-RC-1-arrives-with-GPU-acceleration-1518417.html])<br />
* {{Pkg|opencv}}<br />
* {{Pkg|pyrit}}<br />
* {{Pkg|darktable}} - OpenCL feature requires at least 1 GB RAM on GPU and ''Image support'' (check output of clinfo command).<br />
* {{Pkg|aircrack-ng}}<br />
* {{AUR|cuda_memtest}} - a GPU memtest. Despite its name, is supports both CUDA and OpenCL<br />
* [[Blender]] - CUDA support for Nvidia GPUs and OpenCL support for AMD GPUs. More information [http://blender.org/manual/render/cycles/features.html#features here].<br />
* [[BOINC]]<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/appsdk AMD APP SDK homepage]<br />
* [https://developer.nvidia.com/cuda-toolkit CUDA Toolkit homepage]<br />
* [https://software.intel.com/en-us/intel-opencl Intel SDK for OpenCL Applications homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=Talk:GPGPU&diff=477905Talk:GPGPU2017-05-21T08:32:17Z<p>Kralyk: comment</p>
<hr />
<div>== video hardware decoding ==<br />
<br />
Is it worth mentioning video hardware decoding with cuda (through mpv) ? [[User:Ivanoff|Ivanoff]] ([[User talk:Ivanoff|talk]]) 07:21, 21 May 2017 (UTC)<br />
<br />
:I'd say no, that kind of stuff belongs to [[Hardware video acceleration]], though we might want to add that to Related articles kralyk 08:31, 21 May 2017 (UTC)</div>Kralykhttps://wiki.archlinux.org/index.php?title=WeeChat&diff=426333WeeChat2016-03-18T10:31:57Z<p>Kralyk: Adding info on desktop notifications</p>
<hr />
<div>[[Category:Internet Relay Chat]]<br />
[[ja:WeeChat]]<br />
{{Related articles start}}<br />
{{Related|IRC channels}}<br />
{{Related|IRC}}<br />
{{Related|irssi}}<br />
{{Related|HexChat}}<br />
{{Related articles end}}<br />
'''WeeChat''' is a highly extendable and feature rich IRC Client currently under heavy development.<br />
<br />
== Installing ==<br />
<br />
[[Install]] {{Pkg|weechat}} from the [[official repositories]]. The development version {{AUR|weechat-git}} is available in the [[AUR]].<br />
<br />
== Running WeeChat==<br />
<br />
WeeChat is going to have multiple interfaces at some point, run '''weechat-[interface]''' to start WeeChat. <br />
<br />
As WeeChat currently only has an Ncurses interface. The command to start WeeChat is:<br />
<br />
$ weechat<br />
<br />
== Configuration ==<br />
<br />
You can configure WeeChat in 3 ways: using WeeChat's internal commands; using '''iset'''; or by editing the .conf files directly. WeeChat will automatically save settings on exit or when you run {{ic|/save}}, so if you are editing a .conf file in an editor, be sure to run {{ic|/reload}} from the console before exiting, otherwise your changes will be lost.<br />
<br />
=== Internal commands ===<br />
<br />
The {{ic|/set}} command follows this structure:<br />
{{ic|/set [file.name].[section].[directive]}}<br />
<br />
You can get a list of all configurable options by typing {{ic|/set}} in the '''weechat''' buffer window. Since there are nearly 600 default configurable options, you can search through them with a wildcard syntax: {{ic|/set irc.server.*}} or {{ic|/set *server*}} as an example. You can get help on each option with the {{ic|/help}} command: <br />
<br />
/help irc.server.freenode.autoconnect<br />
<br />
=== Internal menu-based ===<br />
<br />
For a more convenient method, install the '''iset''' script. If you have weechat 0.3.9 or newer, run:<br />
<br />
/script install iset.pl<br />
<br />
In older versions, use {{ic|/weeget install iset}}, or download [http://www.weechat.org/scripts/source/stable/iset.pl.html/ iset.pl] into your {{ic|~/.weechat/perl/autoload}} directory manually.<br />
<br />
Afterwards, run<br />
<br />
/iset<br />
<br />
to get a buffer with all configuration options.<br />
<br />
=== Configuration Files ===<br />
<br />
The .conf files for WeeChat are saved to {{ic|~/.weechat}}. These files are not commented. Detailed information can be found within the program itself (see '''Internally''' above), or WeeChat's [http://www.weechat.org/files/doc/stable/weechat_user.en.html user guide].<br />
<br />
{{Tip|in case you want to move {{ic|.weechat}} directory somewhere else (like in your ''''$XDG_CONFIG_HOME'''), use this option : {{ic|$weechat -d $XDG_CONFIG_HOME/weechat}}}}<br />
<br />
== Connecting to a server ==<br />
<br />
{{Note| Using '''/connect''' to connect to a temporary server is disabled by default if you're using 1.1+ [https://weechat.org/files/releasenotes/ReleaseNotes-devel.html#_temporary_servers_disabled_by_default_with_connect Release Note]<br />
<br />
Enable by '''/set irc.look.temporary_servers on'''<br />
<br />
}}<br />
<br />
You can connect to a IRC server by using '''/connect'''.<br />
<br />
/connect chat.freenode.net<br />
<br />
Or if there is already a '''Server''' setup you can use:<br />
<br />
/connect freenode<br />
<br />
== Creating a Server profile ==<br />
<br />
If you plan on connecting to a server more than once it may be beneficial to create a '''Server'''.<br />
<br />
/server add example irc.example.net/6667<br />
<br />
Would create the server '''example''' which would connect to '''irc.example.net''' on port '''6667'''<br />
<br />
See the WeeChat documentation and '''/help server''' for more information.<br />
<br />
== Configuring SSL ==<br />
<br />
Many IRC servers, including [https://freenode.net/ freenode] where [[IRC channel|#archlinux]] is, support SSL.<br />
<br />
If you're making a server with '''/server''', add the SSL port (usually 6697) and '''-ssl''' to the end of the line. For example:<br />
<br />
/server add freenode chat.freenode.net/6697 -ssl<br />
<br />
You can do the same thing if using '''/connect'''.<br />
<br />
/connect chat.freenode.net/6697 -ssl<br />
<br />
{{Warning|Some servers need the '''ssl_dhkey_size''' value changed to something lower. For example, if you're using freenode you'll need to set '''/set irc.server.freenode.ssl_dhkey_size 1024''' or '''/set irc.server.chat.freenode.net.ssl_dhkey_size 1024''' (see the server log)}}<br />
<br />
{{Note|Different servers may have a different port than 6697 - this is server specific.}}<br />
<br />
You may also want to change the location where WeeChat looks for trusted authorities (the default value is {{ic|%h/ssl/CAs.pem}} which translates to {{ic|~/.weechat/ssl/CAs.pem)}}:<br />
<br />
/set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt"<br />
<br />
=== OFTC ===<br />
<br />
If you wish to connect to [http://oftc.net OFTC] you will need to install their certificate:<br />
<br />
# wget http://www.spi-inc.org/ca/spi-cacert.crt -O /etc/ca-certificates/trust-source/anchors/spi-cacert.crt<br />
# trust update-compat<br />
<br />
== Tips and Tricks ==<br />
<br />
=== Upgrading ===<br />
<br />
WeeChat can be upgraded without disconnecting from the IRC servers (non-SSL connections only):<br />
<br />
/upgrade<br />
<br />
This will load the new WeeChat binary and reload the current configuration.<br />
<br />
=== Aliases ===<br />
<br />
Aliases can be created to simplify commonly executed commands. A nice example is Wraithan's '''smart filter''' alias:<br />
<br />
'''Smart Filter'''<br />
<br />
First, we need to enable smart filters:<br />
<br />
/set irc.look.smart_filter "on"<br />
<br />
Next, we will create the '''sfilter''' alias:<br />
<br />
/alias add sfilter filter add irc_smart_$server_$channel irc.$server.$channel irc_smart_filter *<br />
<br />
We can now type<br />
<br />
/sfilter<br />
<br />
in any buffer, and the smart filter will only be enabled for that buffer.<br />
<br />
The following alias will remove a previously enabled smart filter in the current buffer. Add the alias:<br />
<br />
/alias add rmsfilter filter del irc_smart_$server_$channel<br />
<br />
and execute it by<br />
<br />
/rmsfilter<br />
<br />
=== Exec command ===<br />
A new plugin called "exec" has been added, with command {{ic|/exec}}. It will execute external command and can display output to the current buffer with the '''-o''' option or locally (default).<br />
<br />
=== Key Bindings ===<br />
<br />
Some helpful bindings:<br />
<br />
To use ctrl-left/right arrow keys to jump to next/previous words on the input line:<br />
<br />
/key bind meta2-1;5D /input move_previous_word<br />
/key bind meta2-1;5C /input move_next_word<br />
<br />
=== SSH connection lost when idle ===<br />
<br />
If you're connecting to your WeeChat through a remote shell using SSH, for example running it in [[screen]] or [[tmux]] you might experience getting disconnected after a while when idle. There are multiple factors in play why this might happen, but the easiest way to change this is to force the connection to be kept alive by appending this to your SSH-configuration on the remote shell.<br />
<br />
This has nothing to do with WeeChat itself, but losing connection when idle won't happen with it's alternative [[irssi]] by default, and thus is a common situation for those converting to WeeChat. <br />
<br />
{{hc|# /etc/ssh/sshd_config|2=<br />
ClientAliveInterval 300}}<br />
<br />
Or have a look at [http://mosh.mit.edu/ Mosh].<br />
<br />
=== OTR ===<br />
<br />
Install {{AUR|python2-potr}} and enable the script '''otr.py'''. Then:<br />
<br />
/query <nick><br />
/otr start<br />
<br />
Get help on the plugin with:<br />
<br />
/help otr<br />
<br />
=== Slack IRC gateway ===<br />
<br />
[https://slack.com/ Slack] is a platform for team communication; an IRC on steroids. Thanks to its open API, it is possible to connect to your slack team using weechat.<br />
<br />
Once weechat is running, all you have to is add a new server this way:<br />
<br />
{{ic|<nowiki>/server add NAME HOST/6667 -autoconnect -ssl -ssl_dhkey_size=512 -password=PASSWORD -username=USERNAME -nicks=NICK</nowiki>}}<br />
<br />
where:<br />
<br />
* '''NAME''' is the name you want to give to the server<br />
* '''HOST''' is the the Host as provided on the Gateways page of your slack team<br />
* '''PASSWORD''' is the Pass as provided on the Gateways page of your slack team<br />
* '''USERNAME''' is the User as provided on the Gateways page of your slack team<br />
* '''NICK''' is your Slack username.<br />
<br />
==== Upload file ====<br />
<br />
To upload a file, run this following command from your shell :<br />
<br />
{{ic|<nowiki>curl -F file=@/path/to/file -F channels=CHAN -F token=XXX https://slack.com/api/files.upload</nowiki>}}<br />
<br />
where:<br />
<br />
* '''CHAN''' is the channel ID as provided on the Gateways page of your slack team<br />
* '''XXX''' is the team token as provided on the Gateways page of your slack team<br />
<br />
=== Desktop notifications ===<br />
<br />
To receive desktop notifications for mentions or private messages, the [https://github.com/s3rvac/weechat-notify-send weechat-notify-send] script by Petr Zemek can be used.<br />
<br />
To install, use:<br />
<br />
cd ~/.weechat/python<br />
curl -O https://raw.githubusercontent.com/s3rvac/weechat-notify-send/master/notify_send.py<br />
ln -s ../notify_send.py autoload/<br />
<br />
The script uses {{Pkg|libnotify}} and is known to work with both KDE and Gnome.<br />
<br />
== Troubleshooting ==<br />
<br />
=== Errors loading plugins ===<br />
<br />
You may see output like the following in the main window after starting '''weechat''':<br />
<br />
12:29:37 =!= | Error: unable to load plugin "/usr/lib/weechat/plugins/'''tcl.so'''": libtcl8.6.so: cannot open shared object file: No such file or directory<br />
12:29:37 =!= | If you're trying to load a script and not a C plugin, try command to load scripts (/perl, /python, ...)<br />
12:29:37 =!= | Error: unable to load plugin "/usr/lib/weechat/plugins/'''ruby.so'''": libruby.so.2.0: cannot open shared object file: No such file or directory<br />
12:29:37 =!= | If you're trying to load a script and not a C plugin, try command to load scripts (/perl, /python, ...)<br />
12:29:37 | Plugins loaded: alias, aspell, charset, fifo, guile, irc, logger, lua, perl, python, relay, rmodifier, script, xfer<br />
<br />
The default configuration for weechat attempts to load all plugins found in /usr/lib/weechat/plugins which in this case includes both tcl and ruby. These packages are not required by the weechat package and may not be installed on your machine. There are two options if these errors bother you:<br />
<br />
# [[Packages|Install]] [https://www.archlinux.org/packages/?name=tcl tcl], [https://www.archlinux.org/packages/?name=ruby ruby] from the [[official repositories]].<br />
# Or, run {{ic|/set weechat.plugin.autoload "*,!tcl,!ruby"}} which will prevent loading those plugins with a bang (!) prefix.<br />
<br />
== Getting Help ==<br />
<br />
To access WeeChat's built-in help, simply type<br />
<br />
/help<br />
<br />
and the help will be displayed in the main buffer (usually buffer 1).<br />
<br />
== See also ==<br />
<br />
* [http://www.weechat.org Home Page]<br />
* [http://www.weechat.org/doc/ WeeChat Documentation]<br />
* [http://www.weechat.org/scripts/ WeeChat Scripts]<br />
* [http://dev.weechat.org/ WeeChat Development Blog]<br />
<br />
=== Guides ===<br />
<br />
* [http://fixato.org/guides/setting_up_weechat.html FiXato's guide to WeeChat]<br />
* [http://pascalpoitras.com/2013/06/29/weechat-my-favorites-scripts/ Pascalpoitras: Favorite scripts]<br />
* [http://pascalpoitras.com/ Pascalpoitras Weechat Tips]<br />
* [http://robots.thoughtbot.com/weechat-for-slacks-irc-gateway Thoughtbot article on weechat and slack]</div>Kralykhttps://wiki.archlinux.org/index.php?title=File_systems&diff=396468File systems2015-08-29T17:11:40Z<p>Kralyk: Updated exfat support info</p>
<hr />
<div>[[Category:File systems]]<br />
[[es:File systems]]<br />
[[hu:File systems]]<br />
[[it:File systems]]<br />
[[ja:ファイルシステム]]<br />
[[pl:File systems]]<br />
[[zh-cn:File systems]]<br />
{{Related articles start}}<br />
{{Related|Mount}}<br />
{{Related|Partitioning}}<br />
{{Related articles end}}<br />
<br />
From [[Wikipedia:File system|Wikipedia]]:<br />
:''A file system (or filesystem) is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device(s) which contain it. A file system organizes data in an efficient manner and is tuned to the specific characteristics of the device.''<br />
<br />
Individual drive partitions can be setup using one of the many different available filesystems. Each has its own advantages, disadvantages, and unique idiosyncrasies. A brief overview of supported filesystems follows; the links are to wikipedia pages that provide much more information.<br />
<br />
Before being formatted, a drive should be [[Partitioning|partitioned]].<br />
<br />
== Types of file systems ==<br />
<br />
* [[Btrfs]] — Also known as "Better FS", is a '''new filesystem with powerful features similar to Sun/Oracle's excellent ZFS'''. These include snapshots, multi-disk striping and mirroring (software RAID without mdadm), checksums, incremental backup, and on-the-fly compression that can give a significant performance boost as well as save space. Although it has been merged into the mainline kernel, as of April 2014, Btrfs is not considered stable, with an experimental status. Btrfs appears to be the future of GNU/Linux filesystems and is offered as a root filesystem option in all major distribution installers.<br />
* '''exFAT''' — '''Microsoft file system optimized for flash drives'''. Like NTFS, exFAT can pre-allocate disk space for a file by just marking arbitrary space on disk as 'allocated'.<br />
* [[Wikipedia:ext2|ext2]] — '''Second Extended Filesystem''' is an established, mature GNU/Linux filesystem that is very stable. A drawback is that it does not have journaling support or barriers. Lack of journaling can result in data loss in the event of a power failure or system crash. It may also be '''not''' convenient for root ({{ic|/}}) and {{ic|/home}} partitions because file-system checks can take a long time. An ext2 filesystem can be [[Convert_ext2_to_ext3|converted to ext3]].<br />
* [[ext3]] — '''Third Extended Filesystem''' is essentially the ext2 system with journaling support and write barriers. It is backward compatible with ext2, well tested, and extremely stable.<br />
* [[ext4]] — '''Fourth Extended Filesystem''' is a newer filesystem that is also compatible with ext2 and ext3. It provides support for volumes with sizes up to 1 exabyte (i.e. 1,048,576 terabytes) and files sizes up to 16 terabytes. It increases the 32,000 subdirectory limit in ext3 to unlimited. It also offers online defragmentation capability.<br />
* [[F2FS]] — '''Flash-Friendly File System''' is a flash file system created by Kim Jaegeuk (Hangul: 김재극) at Samsung for the Linux operating system kernel. The motivation for F2FS was to build a file system that from the start takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which have been widely being used in computer systems ranging from mobile devices to servers.<br />
* [[JFS]] — IBM's '''Journaled File System''' was the first filesystem to offer journaling. It had many years of development in the IBM AIX® operating system before being ported to GNU/Linux. JFS makes the smallest demand on CPU resources of any GNU/Linux filesystem. It is very fast at formatting, mounting, and filesystem checks (fsck). JFS offers very good all-around performance especially in conjunction with the deadline I/O scheduler. It is not as widely supported as the ext series or ReiserFS, but still very mature and stable.<br />
* [[Wikipedia:NILFS|NILFS2]] — '''New Implementation of a Log-structured File System''' was developed by NTT. It records all data in a continuous log-like format that is only appended to and never overwritten. It is designed to reduce seek times and minimize the type of data loss that occurs after a crash with conventional Linux filesystems.<br />
* [[NTFS]] — '''File system used by Windows'''. NTFS has several technical improvements over FAT and HPFS (High Performance File System), such as improved support for metadata, and the use of advanced data structures to improve performance, reliability, and disk space utilization, plus additional extensions, such as security access control lists (ACL) and file system journaling.<br />
* [[Reiser4]] — '''Successor to the ReiserFS file system''', developed from scratch by Namesys and sponsored by DARPA as well as Linspire, it uses B*-trees in conjunction with the dancing tree balancing approach, in which underpopulated nodes will not be merged until a flush to disk except under memory pressure or when a transaction completes. Such a system also allows Reiser4 to create files and directories without having to waste time and space through fixed blocks.<br />
* [[Wikipedia:ReiserFS|ReiserFS]] — '''Hans Reiser's high-performance journaling FS (v3)''' uses a very interesting method of data throughput based on an unconventional and creative algorithm. ReiserFS is touted as very fast, especially when dealing with many small files. ReiserFS is fast at formatting, yet comparatively slow at mounting. Quite mature and stable. ReiserFSv3 is not being actively developed at this time. Generally regarded as a good choice for {{ic|/var}}.<br />
* [[Wikipedia:File Allocation Table#VFAT|VFAT]] — '''Virtual File Allocation Table''' is technically simple and supported by virtually all existing operating systems. This makes it a useful format for solid-state memory cards and a convenient way to share data between operating systems. VFAT supports long file names.<br />
* [[XFS]] — '''Early journaling filesystem originally developed by Silicon Graphics''' for the IRIX operating system and ported to GNU/Linux. It provides very fast throughput on large files and filesystems and is very fast at formatting and mounting. Comparative benchmark testing has shown it to be slower when dealing with many small files. XFS is very mature and offers online defragmentation capability.<br />
* [[ZFS]] — '''Combined file system and logical volume manager designed by Sun Microsystems'''. The features of ZFS include protection against data corruption, support for high storage capacities, integration of the concepts of filesystem and volume management, snapshots and copy-on-write clones, continuous integrity checking and automatic repair, RAID-Z and native NFSv4 ACLs.<br />
<br />
=== Journaling ===<br />
<br />
All the above filesystems with the exception of ext2, FAT16/32, use [[Wikipedia:Journaling_file_system|journaling]]. Journaling provides fault-resilience by logging changes before they are committed to the filesystem. In the event of a system crash or power failure, such file systems are faster to bring back online and less likely to become corrupted. The logging takes place in a dedicated area of the filesystem.<br />
<br />
Not all journaling techniques are the same. Only ext3 and ext4 offer data-mode journaling, which logs both data and meta-data. Data-mode journaling comes with a speed penalty and is not enabled by default. The other filesystems provide ordered-mode journaling, which only logs meta-data. While all journaling will return a filesystem to a valid state after a crash, data-mode journaling offers the greatest protection against corruption and data loss. There is a compromise in system performance, however, because data-mode journaling does two write operations: first to the journal and then to the disk. The trade-off between system speed and data safety should be considered when choosing the filesystem type.<br />
<br />
=== Arch Linux support ===<br />
<br />
* {{App|btrfs-progs|[[Btrfs]] support.|http://btrfs.wiki.kernel.org/|{{Pkg|btrfs-progs}}}}<br />
* {{App|dosfstools|VFAT support.|http://www.daniel-baumann.ch/software/dosfstools/|{{Pkg|dosfstools}}}}<br />
* {{App|exfat-utils|exFAT support.|https://github.com/relan/exfat|{{Pkg|fuse-exfat}}, {{Pkg|exfat-utils}}}}<br />
* {{App|f2fs-tools|[[F2FS]] support.|https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git|{{Pkg|f2fs-tools}}}}<br />
* {{App|e2fsprogs|ext2, [[ext3]], [[ext4]] support.|http://e2fsprogs.sourceforge.net|{{Pkg|e2fsprogs}}}}<br />
* {{App|jfsutils|[[JFS]] support.|http://jfs.sourceforge.net|{{Pkg|jfsutils}}}}<br />
* {{App|nilfs-utils|NILFS support.|http://nilfs.sourceforge.net/|{{Pkg|nilfs-utils}}}}<br />
* {{App|ntfs-3g|[[NTFS]] support.|http://www.tuxera.com/community/ntfs-3g-download/|{{Pkg|ntfs-3g}}}}<br />
* {{App|reiser4progs|[[Reiser4|ReiserFSv4]] support.|http://sourceforge.net/projects/reiser4/|{{AUR|reiser4progs}}}}<br />
* {{App|reiserfsprogs|ReiserFSv3 support.|https://www.kernel.org/|{{Pkg|reiserfsprogs}}}}<br />
* {{App|xfsprogs|[[XFS]] support.|http://oss.sgi.com/projects/xfs/|{{Pkg|xfsprogs}}}}<br />
* {{App|zfs|[[ZFS]] support.|http://zfsonlinux.org/|{{AUR|zfs-git}}}}<br />
<br />
=== FUSE-based file systems ===<br />
<br />
[[Wikipedia:Filesystem in Userspace|Filesystem in Userspace]] (FUSE) is a mechanism for Unix-like operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in ''user space'', while the FUSE kernel module provides only a "bridge" to the actual kernel interfaces.<br />
<br />
Some notable FUSE-based file systems:<br />
<br />
{{Poor writing|Some descriptions are really poor, also some packages may not meet the "notable" requirement.}}<br />
<br />
* {{App|acd-fuse|Mount Amazon cloud drives.|https://github.com/handyman5/acd_fuse|{{AUR|acdfuse-git}}{{Broken package link|{{aur-mirror|acdfuse-git}}}}}}<br />
* {{App|adbfs-git|Mount an Android device filesystem.|http://collectskin.com/adbfs/|{{AUR|adbfs-git}}}}<br />
* {{App|cddfs|Mount audio CDs.|http://castet.matthieu.free.fr/|{{AUR|cddfs}}{{Broken package link|{{aur-mirror|cddfs}}}}}}<br />
* {{App|fuse-exfat|exFAT mount support.|http://code.google.com/p/exfat/|{{Pkg|fuse-exfat}}}}<br />
* {{App|fuseiso|Mount an ISO as a regular user.|http://sourceforge.net/projects/fuseiso/|{{Pkg|fuseiso}}}}<br />
* {{App|vdfuse|Mounting VirtualBox disk images (VDI/VMDK/VHD).|https://github.com/muflone/virtualbox-includes|{{AUR|vdfuse}}}}<br />
* {{App|wiifuse|Mount a Gamecube or Wii DVD disc image read-only.|http://wiibrew.org/wiki/Wiifuse|{{AUR|wiifuse}}{{Broken package link|{{aur-mirror|wiifuse}}}}}}<br />
* {{App|xbfuse-git|Mount an Xbox (360) ISO.|http://multimedia.cx/xbfuse/|{{AUR|xbfuse-git}}{{Broken package link|{{aur-mirror|xbfuse-git}}}}}}<br />
* {{App|xmlfs|Mount XML files as directory tree.|https://github.com/halhen/xmlfs|{{AUR|xmlfs}}}}<br />
* {{App|zfs-fuse|[[ZFS_on_FUSE|ZFS support via FUSE]].|http://zfs-fuse.net/|{{AUR|zfs-fuse}}{{Broken package link|{{aur-mirror|zfs-fuse}}}}}}<br />
<br />
See [[Wikipedia:Filesystem in Userspace#Example uses]] for more.<br />
<br />
== Create a filesystem ==<br />
<br />
{{Note|<br />
* If you want to change the partition layout, see [[Partitioning]].<br />
* If you want to create a swap partition, see [[Swap]].<br />
}}<br />
<br />
Before starting, you need to know which name Linux gave to your device. Hard drives and USB sticks show up as {{ic|/dev/sd''x''}}, where ''x'' is a lowercase letter, while partitions show up as {{ic|/dev/sd''xY''}}, where ''Y'' is a number.<br />
<br />
Usually filesystems are created on a partition, but they can also be created inside of logical containers like [[LVM]], [[RAID]], or [[dm-crypt]].<br />
<br />
To create a new filesystem on a partition, the existing filesystem located on the partition must not be mounted.<br />
<br />
If the partition you want to format contains a mounted filesystem, it will show up in the ''MOUNTPOINT'' column of lsblk.<br />
<br />
$ lsblk<br />
<br />
To unmount it, you can use ''umount'' on the directory where the filesystem was mounted to:<br />
<br />
# umount /mountpoint<br />
<br />
To create a new file system of type ext4 on a partition do:<br />
<br />
{{Warning|After creating a new filesystem, data previously stored on this partition can likely not be recovered. Make a backup of any data you want to keep.}}<br />
<br />
# mkfs.ext4 /dev/''partition''<br />
<br />
Alternatively, you can use {{ic|mkfs}} which is just a unified front-end for the different {{ic|mkfs.''fstype''}} tools.<br />
<br />
# mkfs -t ext4 /dev/''partition''<br />
<br />
== See also ==<br />
<br />
* [[wikipedia:Comparison of file systems]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=HiDPI&diff=356736HiDPI2015-01-16T13:34:06Z<p>Kralyk: Clenaup in Firefox paragraph</p>
<hr />
<div>[[Category:Graphics]]<br />
[[ja:HiDPI]]<br />
'''HiDPI''' (High Dots Per Inch) displays, also known by Apple's "[[wikipedia:Retina Display|Retina Display]]" marketing name, are screens with a high resolution in a relatively small format. They are mostly found in Apple products or high-end "ultrabooks", as well as in 4K (Ultra HD) or even 5K monitors.<br />
<br />
Not all software behaves well in high-resolution mode yet. Here are listed most common tweaks which make work on a HiDPI screen more pleasant.<br />
<br />
== Desktop environments ==<br />
<br />
=== GNOME ===<br />
<br />
To enable HiDPI, use gsettings:<br />
<br />
gsettings set org.gnome.desktop.interface scaling-factor 2<br />
<br />
=== KDE ===<br />
{{Out of date|Needs to be updated for KDE 5.}}<br />
KDE still has its share of HiDPI [https://community.kde.org/KDE/High-dpi_issues issues] but HiDPI support can be improved by changing the below settings:<br />
<br />
# Increase font dpi (System Settings → Application Appearance → Fonts → Force font dpi, enter a number such as 125, 144 or 150 etc)<br />
# Increase icon sizes (System Settings → Application Appearance → Icons → Advanced, here choose a higher icon size for all icons, eg. just increase each icon type by one step) <br />
<br />
=== Xfce ===<br />
<br />
Go to Settings Editor (you can find it in Settings Manager), and change the DPI parameter in {{ic|xsettings}} → {{ic|Xft}}. The value of 180 seems to work well on Retina screens.<br />
<br />
To enlarge icons in system tray, right-click on it (aim for empty space / top pixels / bottom pixels, so that you will not activate icons themselves) → “Properties” → set “Maximum icon size” to 32, 48 or 64.<br />
<br />
=== Cinnamon ===<br />
<br />
Supports HiDPI since 2.2. Even without rebuilding GTK3, the support is pretty good (e.g. window borders are correctly sized, which isn't the case under Xfce).<br />
<br />
=== Enlightenment ===<br />
<br />
For E18, go to the E Setting panel. In Look → Scaling, you can control the UI scaling ratios. A ratio of 1.2 seems to work well for the native resolution of the MBPr 15" screen.<br />
<br />
== X Resources ==<br />
<br />
If you are not using a desktop environment such as GNOME, KDE, Xfce, or other that manipulates the X settings for you, you can set the desired Xft DPI setting manually in {{ic|~/.Xresources}}:<br />
<br />
{{hc|~/.Xresources|<nowiki><br />
Xft.dpi: 180<br />
Xft.autohint: 0<br />
Xft.lcdfilter: lcddefault<br />
Xft.hintstyle: hintfull<br />
Xft.hinting: 1<br />
Xft.antialias: 1<br />
Xft.rgba: rgb<br />
</nowiki>}}<br />
<br />
Make sure the settings are loaded properly when X starts, for instance in your {{ic|~/.xinitrc`}} with {{ic|xrdb -merge ~/.Xresources}} (see [[Xresources]] for more information).<br />
<br />
This will make the font render properly in most toolkits and applications, it will however not affect things such as icon size!<br />
<br />
== Browsers ==<br />
<br />
=== Firefox ===<br />
<br />
Open Firefox advanced preferences page ({{ic|about:config}}) and set parameter {{ic|layout.css.devPixelsPerPx}} to {{ic|2}} (or find the one that suits you better; {{ic|2}} is a good choice for Retina screens).<br />
<br />
If you use a HiDPI monitor such as Retina display together with another monitor, you can use [https://addons.mozilla.org/en-US/firefox/addon/autohidpi/ AutoHiDPI] add-on in order to automatically adjust {{ic|layout.css.devPixelsPerPx}} setting for the active screen.<br />
<br />
=== Chromium / Google Chrome ===<br />
<br />
No official support yet. Watch this thread: https://code.google.com/p/chromium/issues/detail?id=143619. In the meantime try setting default page zoom level to 200% (although it is not the most elegant solution).<br />
<br />
For more adventurous users, Chromium can be recompiled using the {{ic|1=-Denable_hidpi=1}} flag to use experimental HiDPI scaling. Use the [[Arch Build System|ABS]] to download the {{Pkg|chromium}} package source, then edit the [[PKGBUILD]] file to add the flag. Note that this option will partially break context menus, but will optimize the interface and all webpages.<br />
<br />
Additionally, using current Chrome packages from AUR, and possibly chromium packages as well (not tested) the browser can be launched with the command line flag {{ic|--force-device-scale-factor}} and a scaling value. This will scale all content and ui, including tab and font size. For example:<br />
<br />
{{bc|1=google-chrome --force-device-scale-factor=2}}<br />
<br />
Using this option, a scaling factor of 1 would be normal scaling. Floating point values can be used. Note that this currently (as of chrome 39) breaks the UI somewhat in terms of menus and forms. A bug report has been filed on the issue: https://code.google.com/p/chromium/issues/detail?id=400837<br />
<br />
=== Opera ===<br />
<br />
Since version 24 one can alter Opera's DPI by starting it with the {{ic|1=--alt-high-dpi-setting=X}} command line option, where X is the desired DPI. For example, with {{ic|1=--alt-high-dpi-setting=144}} Opera will asume that DPI is 144.<br />
<br />
== Mail clients ==<br />
<br />
=== Thunderbird ===<br />
<br />
See [[HiDPI#Firefox|Firefox]]. To access {{ic|about:config}}, go to Edit → Preferences → Advanced → Config editor.<br />
<br />
== Skype ==<br />
<br />
Skype is a Qt program, and needs to be configured separately. You cannot change the DPI setting for it, but at least you can change font size. Install {{Pkg|qt4}} and run {{ic|qtconfig-qt4}} to do it.<br />
<br />
== GUI Toolkits ==<br />
<br />
=== Qt 5 ===<br />
<br />
Qt5 applications can often be run at higher dpi by setting the QT_DEVICE_PIXEL_RATIO environment variable. Note that the variable has to be set to a whole integer, so setting it to 1.5 won't work.<br />
<br />
This can for instance be enabled by creating a file {{ic|/etc/profile.d/qt-hidpi.sh}}<br />
<br />
export QT_DEVICE_PIXEL_RATIO=2<br />
<br />
And set the executable bit on it.<br />
<br />
== External displays ==<br />
The HiDPI setting is desktop-wide so that non-HiDPI external displays show everything too large. One workaround is to using [[xrandr]]'s scale option. To have a non-HiDPI monitor (on DP1) right of an internal HiDPI display (eDP1), one could run:<br />
<br />
xrandr --output eDP1 --auto --output DP1 --auto --scale 2x2 --right-of eDP1<br />
<br />
When extending above the internal display, you may see part of the internal display on the external monitor. In that case, specify the position manually, e.g. using [https://gist.github.com/wvengen/178642bbc8236c1bdb67 this script].<br />
<br />
You may run into problems with your mouse not being able to reach the whole screen. That's a [https://bugs.freedesktop.org/show_bug.cgi?id=39949 known bug] with an xserver-org patch (or try the panning option, but that might cause other problems).<br />
<br />
== Console ==<br />
<br />
The default console font will be very small on hidpi displays, the largest font is {{ic|sun12x22}}, to enable it (temporarily):<br />
<br />
$ setfont sun12x22<br />
<br />
See [[Fonts#Console_fonts]] for more.<br />
<br />
== See also ==<br />
<br />
* [http://www.phoronix.com/scan.php?page=article&item=linux_uhd4k_gpus Ultra HD 4K Linux Graphics Card Testing] (Nov 2013)<br />
* [[Font_configuration]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=Systemd&diff=215635Systemd2012-07-30T13:54:54Z<p>Kralyk: Added link to the console fonts article/section</p>
<hr />
<div>{{Lowercase title}}<br />
[[Category:Daemons and system services]]<br />
[[Category:Boot process]]<br />
[[fr:Systemd]]<br />
[[it:Systemd]]<br />
[[ru:Systemd]]<br />
[[zh-CN:Systemd]]<br />
{{Article summary start}}<br />
{{Article summary text|'''systemd''' is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and [[D-Bus]] activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux [[cgroups]], supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.}}<br />
<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Systemd/Services}}<br />
{{Article summary end}}<br />
<br />
See [http://0pointer.de/blog/projects/systemd.html Lennart's blog story] for a longer introduction, the three [http://0pointer.de/blog/projects/systemd-update.html status] [http://0pointer.de/blog/projects/systemd-update-2.html updates] [http://0pointer.de/blog/projects/systemd-update-3.html since] then, and the [http://0pointer.de/blog/projects/why.html most recent summary]. Also see the [http://en.wikipedia.org/wiki/Systemd Wikipedia article] and the [http://freedesktop.org/wiki/Software/systemd project web page].<br />
<br />
== Installation ==<br />
Systemd can be installed side-by-side with the regular Arch Linux initscripts, and they can be toggled by adding/removing the {{Ic|1=init=/bin/systemd}} kernel parameter. To try out systemd on Arch you need to:<br />
<br />
# Install {{Pkg|systemd}} (and its dependencies) from [core]<br />
# Add {{Ic|1=init=/bin/systemd}} to [[Kernel parameters]] in your bootloader. See [[Kernel parameters]] for more info.<br />
# (Optional) If you want a pure systemd setup you can remove {{Pkg|initscripts}} and {{Pkg|sysvinit}}, and install {{Pkg|systemd-sysvcompat}} which provides symlinks for {{ic|init}}, {{ic|reboot}} etc. You will then not have to specify the {{ic|1=init=}} parameter on your kernel cmdline.<br />
# Systemd use some configuration files which are different from Arch's classic configuration. Users are recommended to create or update systemd configuration files as shown in [[#Native systemd configuration files]]. If you still want to use rc.conf as the main configuration file, integration with Arch's classic configuration can be accomplished via the {{Pkg|initscripts-systemd}} package. See [[#Arch integration]] below.<br />
# To take advantage of the systemd way of starting services, you might also want to install the {{Pkg|systemd-arch-units}} package.<br />
# Start services from old rc.conf/DAEMON array. Systemd will not automatically start services there. See [[#Systemd commands]] below for commands to list services and start them automatically.<br />
<br />
{{Warning|udev and many other pieces of software expect {{ic|/usr}} to be mounted and available at bootup. If your {{Ic|/usr}} is on a separate partition, you will need to make accommodations to mount it from the initramfs and unmount it from a pivoted root on shutdown. See [[Mkinitcpio#/usr_as_a_separate_partition|the mkinitcpio wiki page]] and [http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken freedesktop.org#separate-usr-is-broken]}}<br />
<br />
== Native systemd configuration files ==<br />
{{Pkg|systemd}} will use {{ic|/etc/rc.conf}} if these files are absent (Note this is temporary and not a long-term solution. It is strongly advised to use the systemd configuration files on any system, since initscripts can use them).<br />
{{Note|You may need to create these files.}}<br />
=== Hostname ===<br />
{{hc|/etc/hostname|myhostname}}<br />
<br />
=== Console and keymap ===<br />
The {{ic|/etc/vconsole.conf}} file configures the virtual console, i.e. keyboard mapping and console font.<br />
{{hc|/etc/vconsole.conf|<nowiki><br />
KEYMAP=us<br />
FONT=lat9w-16<br />
FONT_MAP=8859-1_to_uni</nowiki>}}<br />
<br />
For more info see: [[Fonts#Console_fonts|Console fonts]]<br />
<br />
=== Locale ===<br />
Read {{ic|man locale.conf}} for more options <br />
{{hc|/etc/locale.conf|<nowiki><br />
LANG=en_US.UTF-8<br />
LC_COLLATE=C</nowiki>}}<br />
<br />
=== Timezone ===<br />
Read {{ic|man 5 timezone}} for more options <br />
{{hc|/etc/timezone|Europe/Minsk}}<br />
{{Note|This file does not obviate the need for {{ic|/etc/localtime}}.}}<br />
<br />
=== Hardware clock time ===<br />
Systemd will use UTC for the hardware clock by default and this is recommended. Dealing with daylight saving time is messy. If the DST changes when your computer is off, your clock will be wrong on next boot ([http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html there is a lot more to it]). Recent kernels set the system time from the RTC directly on boot without using {{ic|hwclock}}, the kernel will always assume that the RTC is in UTC. This means that if the RTC is in local time, the the system time will first be set up wrongly and then corrected shortly afterwards on every boot. This is possibly the reason for certain weird bugs (time going backwards is rarely a good thing).<br />
<br />
The reason for allowing the RTC to be in local time is to allow dual boot with Windows ([http://blogs.msdn.com/b/oldnewthing/archive/2004/09/02/224672.aspx who uses localtime]). Windows is able to deal with the RTC being in UTC by setting the following DWORD registry key to {{ic|1}}:<br />
{{bc|HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal}}<br />
<br />
{{Warning|On recent systems (Windows 7, Vista SP2) this setting prevents Windows from being able to update the system clock at all, and earlier versions do not work correctly when [http://social.msdn.microsoft.com/forums/en-US/tabletandtouch/thread/0b872d8a-69e9-40a6-a71f-45de90c6e243/ resuming from suspend or hibernate]. In addition, recent systems [http://support.microsoft.com/kb/2687252 may become unresponsive during Daylight Saving Time (DST) changeover] if RealTimeIsUniversal is set.}}<br />
<br />
If you run into issues on dual boot with Windows, you can set the hardware clock to local time. Contrary to popular belief, systemd supports this:<br />
{{hc|/etc/adjtime|<nowiki> <br />
0.0 0.0 0.0<br />
0<br />
LOCAL</nowiki>}}<br />
{{Note|The other parameters are still needed but are ignored by systemd.}}<br />
{{Note|It is generally advised to have a [[NTP|Network Time Protocol daemon]] running to keep the hardware clock synchronized with the system time.}}<br />
<br />
=== Kernel modules loaded during boot ===<br />
systemd uses {{ic|/etc/modules-load.d/}} to configure kernel modules to load during boot in a static list. Each configuration file is named in the style of {{ic|/etc/modules-load.d/<program>.conf}}. The configuration files should simply contain a list of kernel module names to load, separated by newlines. Empty lines and lines whose first non-whitespace character is {{ic|#}} or {{ic|;}} are ignored. Example:<br />
{{hc|/etc/modules-load.d/virtio-net.conf|<nowiki><br />
# Load virtio-net.ko at boot<br />
virtio-net</nowiki>}}<br />
See also [[Modprobe#Options]]<br />
<br />
=== Kernel modules blacklist ===<br />
Module blacklisting works the same way as with {{Pkg|initscripts}} since it is actually handled by {{Pkg|kmod}}, see [[Kernel_modules#Blacklisting|Module Blacklisting]] for details.<br />
<br />
=== Temporary files ===<br />
Systemd-tmpfiles uses the configuration files in {{ic|/etc/tmpfiles.d/}} to describe the creation, cleaning and removal of volatile and temporary files and directories which usually reside in directories such as {{ic|/run}} or {{ic|/tmp}}. Each configuration file is named in the style of {{ic|/etc/tmpfiles.d/<program>.conf}}. This will also override any files in {{ic|/usr/lib/tmpfiles.d/}} with the same name.<br />
<br />
tmpfiles are usually provided together with service files to create directories which are expected to exist by certain daemons. For example the [[Samba]] daemon expects the directory {{ic|/var/run/samba}} to exist and to have the correct permissions. The corresponding tmpfile looks like this:<br />
{{hc|/usr/lib/tmpfiles.d/samba.conf|<br />
D /var/run/samba 0755 root root<br />
}}<br />
<br />
However, tmpfiles may also be used to write values into certain files on boot. For example, if you use {{ic|/etc/rc.local}} to disable wakeup from USB devices with {{ic|echo USBE > /proc/acpi/wakeup}}, you may use the following tmpfile instead:<br />
{{hc|/etc/tmpfiles.d/disable-usb-wake.conf|<br />
w /proc/acpi/wakeup - - - - USBE<br />
}}<br />
The tmpfiles method is recommended in this case since systemd doesn't actually support {{ic|/etc/rc.local}}.<br />
<br />
See {{ic|man tmpfiles.d}} for details.<br />
<br />
=== Remote filesystem mounts ===<br />
systemd automatically makes sure that remote filesystem mounts like [[NFS]] or [[Samba]] are only started after the network has been set up. Therefore remote filesystem mounts specified in {{ic|/etc/fstab}} should work out of the box.<br />
<br />
You may however want to use [[#Automount|Automount]] for remote filesystem mounts to mount them only when there are being accessed. Furthermore you can use the {{ic|1=x-systemd.device-timeout=#}} option in {{ic|/etc/fstab}} to specify a timeout in case the network resource is not available.<br />
<br />
See {{ic|man systemd.mount}} for details.<br />
<br />
=== Replacing acpid with systemd ===<br />
Systemd can handle some power-related ACPI events. This is configured via the following options in {{ic|/etc/systemd/logind.conf}}:<br />
* {{ic|HandlePowerKey}} : Power off the system when the power button is pressed<br />
* {{ic|HandleSleepKey}} : Suspend the system when the sleep key is pressed<br />
* {{ic|HandleLidSwitch}} : Suspend the system when the laptop lid is closed<br />
Depending on the value of these options, these events may for example only be triggered when no user is logged in ({{ic|no-session}}) or when only a single user session is active ({{ic|any-session}}). See {{ic|man logind.conf}} for details.<br />
<br />
These options should not be used on desktop environments like [[Gnome]] and [[XFCE]] since these handle ACPI events by themselves. However, on systems which run no graphical setup or only a simple window manager like [[i3]] or [[awesome]], this may replace the [[acpid]] daemon which is usually used to react to these ACPI events.<br />
<br />
=== Sleep hooks ===<br />
Systemd does not use [[pm-utils]] to put the machine to sleep when using {{ic|systemctl suspend}} or {{ic|systemctl hibernate}}. Therefore any [[Pm-utils#Creating_your_own_hooks|custom hooks]] you may have created will not be run. However, systemd provides a similiar mechanism to run custom scripts on these events. Systemd will run all executables in {{ic|/usr/lib/systemd/system-sleep/}} and pass two arguments to it:<br />
* argument 1: either {{ic|pre}} or {{ic|post}}, depending on whether the machine is going to sleep or waking up<br />
* argument 2: either {{ic|suspend}} or {{ic|hibernate}}<br />
<br />
The output of your script will be logged by {{ic|systemd-suspend.service}} or {{ic|systemd-hibernate.service}} so you can see its output in the [[Systemd#Systemd Journal|journal]].<br />
<br />
Note that you can also use {{ic|sleep.target}}, {{ic|suspend.target}} or {{ic|hibernate.target}} to hook units into the sleep state logic instead of using scripts.<br />
<br />
See {{ic|man systemd.special}} and {{ic|man systemd-sleep}} for more information.<br />
<br />
=== Unit ===<br />
A unit configuration file encodes information about a service, a socket, a device, a mount point, an automount point, a swap file or partition, a start-up target, a file system path or a timer controlled and supervised by systemd. The syntax is inspired by XDG Desktop Entry Specification .desktop files, which are in turn inspired by Microsoft Windows .ini files. See {{ic|man systemd.unit}} for more info.<br />
<br />
== Systemd commands ==<br />
<br />
*{{ic|systemctl}}: used to introspect and control the state of the systemd system and service manager.<br />
*{{ic|systemd-cgls}}: recursively shows the contents of the selected Linux control group hierarchy in a tree<br />
*{{ic|systemadm}}: a graphical frontend for the systemd system and service manager that allows introspection and control of systemd (avaiable via the {{AUR|systemd-ui-git}} package from the [[AUR]]).<br />
<br />
View the man pages for more details. <br />
<br />
{{Tip|You can use all of the following {{ic|systemctl}} commands with the {{ic|-H <user>@<host>}} switch to control a systemd instance on a remote machine. This will use [[SSH]] to connect to the remote systemd instance.}}<br />
<br />
=== Analyzing the system state ===<br />
<br />
List running units:<br />
<br />
{{bc|$ systemctl}}<br />
<br />
or:<br />
<br />
{{bc|$ systemctl list-units}}<br />
<br />
List failed units:<br />
<br />
{{bc|$ systemctl --failed}}<br />
<br />
The available unit files can be seen in {{ic|/usr/lib/systemd/system/}} and {{ic|/etc/systemd/system/}} (the latter takes precedence).<br />
<br />
=== Using Units ===<br />
<br />
Units can be services ({{ic|.service}}), mount points ({{ic|.mount}}) or sockets ({{ic|.sockets}}). When using {{ic|systemctl}}, you always have to specify the complete name of the unit file, including its suffix, for example {{ic|netcfg.service}}. See {{ic|man systemd.unit}} for details.<br />
<br />
Activate a unit immediately:<br />
<br />
{{bc|# systemctl start <unit>}}<br />
<br />
Deactivate a unit immediately:<br />
<br />
{{bc|# systemctl stop <unit>}}<br />
<br />
Restart a unit:<br />
<br />
{{bc|# systemctl restart <unit>}}<br />
<br />
Ask a unit to reload its configuration:<br />
<br />
{{bc|# systemctl reload <unit>}}<br />
<br />
Show the status of a unit, including whether it is running or not:<br />
<br />
{{bc|$ systemctl status <unit>}}<br />
<br />
Check whether a unit is already enabled or not:<br />
<br />
{{bc|$ systemctl is-enabled <unit>}}<br />
<br />
Enable a unit to be started on bootup:<br />
<br />
{{bc|# systemctl enable <unit>}}<br />
<br />
{{Note| Services not having an Install section have to be installed manually too.<br />
<br />
{{bc|# ln -s /usr/lib/systemd/system/foo.service /etc/systemd/system/graphical.target.wants/}}<br />
<br />
}}<br />
<br />
Disable a unit to not start during bootup:<br />
<br />
{{bc|# systemctl disable <unit>}}<br />
<br />
Show the manual page associated with a unit (this has to be supported by the unit file):<br />
<br />
{{bc|$ systemctl help <unit>}}<br />
<br />
=== Power Management ===<br />
<br />
If you are in a local user session and no other session is active, the following commands will work without root privileges. If not, systemd will automatically ask you for the root password.<br />
<br />
Shut down and reboot the system:<br />
<br />
{{bc|$ systemctl reboot}}<br />
<br />
Shut down and power-off the system:<br />
<br />
{{bc|$ systemctl poweroff}}<br />
<br />
Shut down and halt the system:<br />
<br />
{{bc|$ systemctl halt}}<br />
<br />
Suspend the system:<br />
<br />
{{bc|$ systemctl suspend}}<br />
<br />
Hibernate the system:<br />
<br />
{{bc|$ systemctl hibernate}}<br />
<br />
== Runlevels/targets ==<br />
Runlevels is a legacy concept in systemd. Systemd uses ''targets'' which serve a similar purpose as runlevels but act a little different. Each ''target'' is named instead of numbered and is intended to serve a specific purpose with the possibility of having multiple ones active at the same time. Some ''targets'' are implemented by inheriting all of the services of another ''target'' and adding additional services to it. There are systemd ''target''s that mimic the common SystemVinit runlevels so you can still switch ''target''s using the familiar {{ic|telinit RUNLEVEL}} command. <br />
<br />
=== Get current runlevel/targets ===<br />
The following should be used under systemd instead of {{ic|runlevel}}:<br />
{{bc|1=# systemctl list-units --type=target}}<br />
<br />
=== Create custom target ===<br />
The runlevels that are assigned a specific purpose on vanilla Fedora installs; 0, 1, 3, 5, and 6; have a 1:1 mapping with a specific systemd ''target''. Unfortunately, there is no good way to do the same for the user-defined runlevels like 2 and 4. If you make use of those it is suggested that you make a new named systemd ''target'' as {{ic|/etc/systemd/system/<your target>}} that takes one of the existing runlevels as a base (you can look at {{ic|/usr/lib/systemd/system/graphical.target}} as an example), make a directory {{ic|/etc/systemd/system/<your target>.wants}}, and then symlink the additional services from {{ic|/usr/lib/systemd/system/}} that you wish to enable.<br />
<br />
=== Targets table ===<br />
{| border="1"<br />
!SysV Runlevel!!Systemd Target!!Notes<br />
|-<br />
| 0 || runlevel0.target, poweroff.target || Halt the system.<br />
|-<br />
| 1, s, single || runlevel1.target, rescue.target || Single user mode.<br />
|-<br />
| 2, 4 || runlevel2.target, runlevel4.target, multi-user.target || User-defined/Site-specific runlevels. By default, identical to 3.<br />
|-<br />
| 3 || runlevel3.target, multi-user.target || Multi-user, non-graphical. Users can usually login via multiple consoles or via the network.<br />
|-<br />
| 5 || runlevel5.target, graphical.target || Multi-user, graphical. Usually has all the services of runlevel 3 plus a graphical login.<br />
|-<br />
| 6 || runlevel6.target, reboot.target || Reboot<br />
|-<br />
| emergency || emergency.target || Emergency shell<br />
|-<br />
|}<br />
<br />
=== Change current runlevels ===<br />
In systemd runlevels are exposed via "target units". You can change them like this:<br />
{{bc|# systemctl isolate graphical.target}}<br />
This will only change the current runlevel, and has no effect on the next boot. This is equivalent to commands such as {{ic|telinit 3}} or {{ic|telinit 5}} in Sysvinit.<br />
<br />
=== Change default runlevel/target to boot into ===<br />
The standard target is {{ic|default.target}}, which is aliased by default to {{ic|graphical.target}} (which roughly corresponds to the old runlevel 5). To change the default target at boot-time, append one of the following kernel parameters to your bootloader:<br />
* {{ic|1=systemd.unit=multi-user.target}} (which roughly corresponds to the old runlevel 3),<br />
* {{ic|1=systemd.unit=rescue.target}} (which roughly corresponds to the old runlevel 1).<br />
<br />
Alternatively, you may leave the bootloader alone and change {{ic|default.target}}. This can be done using {{ic|systemctl}}:<br />
{{bc|# systemctl enable multi-user.target}}<br />
<br />
The effect of this command is outputted by {{ic|systemctl}}; a symlink to the new default target is made at {{ic|/etc/systemd/system/default.target}}. This works if, and only if:<br />
[Install]<br />
Alias=default.target<br />
is in the target's configuration file. Currently, {{ic|multi-user.target}} and {{ic|graphical.target}} both have it.<br />
<br />
== Running DEs under systemd ==<br />
<br />
=== Using display manager ===<br />
To enable graphical login, run your preferred [[Display Manager]] daemon (e.g. [[KDM]]). At the moment, service files exist for [[GDM]], [[KDM]], [[SLiM]], [[XDM]] and [[LXDM]].<br />
<br />
{{bc|# systemctl enable kdm.service}}<br />
<br />
This should work out of the box. If not, you might have a {{ic|default.target}} set manually or from a older install:<br />
<br />
{{hc|# ls -l /etc/systemd/system/default.target|/etc/systemd/system/default.target -> /usr/lib/systemd/system/graphical.target}}<br />
<br />
Simply delete the symlink and systemd will use its stock {{ic|default.target}} (i.e. {{ic|graphical.target}}).<br />
<br />
{{bc|# rm /etc/systemd/system/default.target}}<br />
<br />
If {{ic|/etc/locale.conf}} is used for setting the locale, add an entry to {{ic|/etc/environment}}:<br />
{{hc|/etc/environment|<nowiki><br />
LANG=en_US.utf8</nowiki>}}<br />
<br />
=== Using service file ===<br />
{{Note|Using this method there will be no PAM session created for your user. Therefore ConsoleKit (which gives you access to shutdown/reboot, audio devices etc.) will not work properly. For the recommended way, see: [[Automatic_login_to_virtual_console#With_systemd]].}}<br />
If you are only looking for a simple way to start X directly without a display manager, you can create a service file similar to this:<br />
<br />
{{hc|/etc/systemd/system/graphical.target.wants/xinit.service|<nowiki><br />
[Unit]<br />
Description=Direct login to X<br />
After=systemd-user-sessions.service<br />
<br />
[Service]<br />
ExecStart=/bin/su <username> -l -c "/bin/bash --login -c xinit"<br />
<br />
[Install]<br />
WantedBy=graphical.target<br />
</nowiki>}}<br />
<br />
== Systemd Journal ==<br />
Since version 38 systemd has an own logging system, the journal.<br />
<br />
By default, running a syslog daemon is no longer required. To read the log, use:<br />
{{bc|# journalctl}}<br />
The journal writes to {{ic|/run/systemd/journal}}, meaning logs will be lost on reboot. For non-volatile logs, create {{ic|/var/log/journal/}}:<br />
{{bc|# mkdir /var/log/journal/}}<br />
<br />
=== Filtering output ===<br />
<br />
{{ic|journalctl}} allows you to filter the output by specific fields.<br />
<br />
Examples:<br />
<br />
Show all messages by a specific executable:<br />
{{bc|# journalctl /usr/lib/systemd/systemd}}<br />
<br />
Show all messages by a specific process:<br />
{{bc|1=# journalctl _PID=1}}<br />
<br />
Show all messages by a specific unit:<br />
{{bc|1=# journalctl _SYSTEMD_UNIT=netcfg.service}}<br />
<br />
See {{ic|man journalctl}} and {{ic|systemd.journal-fields}} for details.<br />
<br />
=== journal size limit ===<br />
<br />
If the journal is made non-volatile, its size limit is set to a default value of 10% of the size of the respective file system. E.g. with {{ic|/var/log/journal}} located on a 50GiB root partition this would lead to 5GiB of journal data. The maximum size of the persistent journal can be controlled by {{ic|SystemMaxUse}} in {{ic|/etc/systemd/journald.conf}}, so to limit it for example to 50MiB uncomment and edit the corresponding line to:<br />
{{bc|1=SystemMaxUse=50M}}<br />
Look at {{ic|man journald.conf}} for more info.<br />
<br />
===Journald in conjunction with a classic syslog daemon===<br />
Compatibility with classic syslog implementations is provided via a<br />
socket {{ic|/run/systemd/journal/syslog}}, to which all messages are forwarded.<br />
To make the syslog daemon work with the journal, it has to bind to this socket instead of {{ic|/dev/log}} ([http://lwn.net/Articles/474968/ official announcement]). For syslog-ng change {{ic|/etc/syslog-ng/syslog-ng.conf}} source section to:<br />
{{bc|<nowiki><br />
source src {<br />
unix-dgram("/run/systemd/journal/syslog");<br />
internal();<br />
file("/proc/kmsg");<br />
};</nowiki>}}<br />
<br />
and enable (or reenable) syslog-ng:<br />
{{bc|# systemctl enable syslog-ng.service}}<br />
<br />
By default, journald is configured to read from {{ic|/proc/kmsg}}, but this will collide with a syslog implementation doing the same ([http://lists.freedesktop.org/archives/systemd-devel/2012-January/004310.html systemd-devel post]). Disable reading {{ic|/proc/kmsg}} by {{ic|systemd-journald}} in {{ic|/etc/systemd/journald.conf}}:<br />
ImportKernel=no<br />
<br />
== Network ==<br />
=== Dynamic (DHCP) ===<br />
If you simply want to use DHCP for your ethernet connection, you can use {{ic|dhcpcd@.service}} from the {{Pkg|systemd-arch-units}} package.<br />
To enable DHCP for {{ic|eth0}}, simply use:<br />
# systemctl start dhcpcd@eth0.service<br />
<br />
You can enable the service to automatically start at boot with:<br />
# systemctl enable dhcpcd@.service<br />
Note that this will enable the service for {{ic|eth0}} by default. If you want to use another interface, you have to create the symlink manually, e.g.:<br />
# ln -s '/usr/lib/systemd/system/dhcpcd@.service' '/etc/systemd/system/multi-user.target.wants/dhcpcd@eth1.service'<br />
<br />
=== Other configurations ===<br />
For static, wireless or advanced network configuration like bridging you can use [[netcfg]] or [[NetworkManager]] which both provide systemd service files.<br />
<br />
If you need a static ethernet configuration, but don't want to use [[netcfg]], there is a custom service file available on the [[Systemd/Services#Network|Systemd/Services page]].<br />
<br />
{{Note|If using [[NetworkManager]] enable {{ic|NetworkManager-wait-online.service}} to force units dependent on {{ic|network.target}} to wait for a network connection to be completed before starting.}}<br />
<br />
== Arch integration ==<br />
<br />
Integration with Arch's classic configuration is accomplished via the {{Pkg|initscripts-systemd}} package. This is an optional package containing unit files and scripts needed to emulate Arch's initscripts, which can be used to ease the transition from sysVinit to systemd.<br />
<br />
{{ic|/etc/inittab}} is not used at all.<br />
<br />
{{ic|/etc/rc.local}} and {{ic|/etc/rc.local.shutdown}} can be run at startup and shutdown by enabling {{ic|rc-local.service}} and {{ic|rc-local-shutdown.service}}.<br />
<br />
{{warning|Usage of this package is not recommended. In particular, {{ic|arch-load-modules.service}} and {{ic|arch-daemons.target}} are unsupported as a long-term solution and will be removed in the future. When ever possible, use native systemd configuration files instead.}}<br />
<br />
Most people will not need all (if any) of these units, and they can be easily disabled with:<br />
{{bc|# systemctl disable <unitfile>}}<br />
<br />
The plan is to remove most of the functionality from this package as soon as it is handled elsewhere (mostly in udev/systemd/kernel).<br />
<br />
=== rc.conf ===<br />
Some variables in {{ic|/etc/rc.conf}} are respected by this glue work. For a pure systemd setup it is recommended to use the [[Systemd#Native_systemd_configuration_files|native systemd configuration files]] which will take precedence over {{ic|/etc/rc.conf}}.<br />
<br />
Supported variables:<br />
* LOCALE<br />
* KEYMAP<br />
* CONSOLEFONT<br />
* CONSOLEMAP<br />
* HOSTNAME<br />
* MODULES<br />
* DAEMONS: Ordering and blacklisting is respected, if a native systemd service file by the same name as a daemon exists, it will take precedence, this logic can be disabled by {{ic|systemctl disable arch-daemons.target}}<br />
<br />
Not supported variables and systemd configuration:<br />
* TIMEZONE: Please symlink {{Ic|/etc/localtime}} to your zoneinfo file manually.<br />
* HARDWARECLOCK: See [[Systemd#Hardware clock time|Hardware clock time]].<br />
* USELVM: use {{ic|lvm.service}} provided by {{Pkg|systemd-arch-units}} instead.<br />
* USECOLOR<br />
<br />
The following is a brief description of the functionality of each of them. Alternative solutions are provided as a migration plan away from the functionality provided by this package.<br />
<br />
==== rc-local.service / rc-local-shutdown.service ====<br />
Runs {{ic|/etc/rc.local}} (resp., {{ic|/etc/rc.local.shutdown}}) on boot (resp., shutdown).<br />
<br />
==== arch-daemons.target ====<br />
Parses the {{ic|DAEMONS}} array in {{ic|/etc/rc.conf}} and starts the services. If a native systemd unit exists (by the same name) for a given daemon, this is used; otherwise, the script in {{ic|/etc/rc.d/}} is used to control the unit.<br />
<br />
Alternative: use native unit files from the {{Pkg|systemd-arch-units}} package.<br />
<br />
==== arch-modules-load.service ====<br />
Creates a list of modules to be loaded based on {{ic|/etc/rc.conf}} (see {{ic|/etc/modules-load.d/rc.conf}}). <br />
<br />
Alternative: create a {{ic|*.conf}} for your modules in [[Systemd#Configure_kernel_modules_to_load_during_boot|/etc/modules-load.d/]].<br />
<br />
== FAQ ==<br />
For an up-to-date list of known issues, look at the upstream [http://cgit.freedesktop.org/systemd/systemd/tree/TODO TODO].<br />
<br />
{{FAQ<br />
|question=Why are my console fonts ugly?<br />
|answer=If no font is set in {{ic|/etc/vconsole.conf}} (or alternatively {{ic|/etc/rc.conf}}), then a standard font will be used. The standard font is chosen due to it supporting a wide range of character sets. Set your preferred font to fix the issue.}}<br />
<br />
{{FAQ<br />
|question=Why do I get log messages on my console?<br />
|answer=You must set the kernel loglevel yourself. Historically, {{ic|/etc/rc.sysinit}} did this for us and set dmesg loglevel to {{ic|3}}, which was a reasonably quiet loglevel. Either add {{ic|1=loglevel=3}} or {{ic|quiet}} to your kernel cmdline.}}<br />
<br />
{{FAQ<br />
|question=How do I make a custom unit file?<br />
|answer=The unit files in {{ic|/etc/systemd/system/}} take precedence over the ones in {{ic|/usr/lib/systemd/system/}}. To make your own version of a unit (which will not be destroyed by an upgrade), copy the old unit file from {{ic|/usr/lib/}} to {{ic|/etc/}} and make your changes there. Alternatively you can use {{ic|.include}} to parse an existing service file and then add new options. For example, if you simply want to add an additional dependency to a service file, you may use:<br />
{{hc|/etc/systemd/system/<service-name>.service|<br />
<nowiki><br />
.include /usr/lib/systemd/system/<service-name>.service<br />
<br />
[Unit]<br />
Requires=<new dependency><br />
After=<new dependency><br />
</nowiki>}}<br />
}}<br />
{{FAQ<br />
|question=How do I change the number of gettys running by default?<br />
|answer=To add another getty:<br />
<br />
Simply place another symlink for instantiating another getty in the {{ic|/etc/systemd/system/getty.target.wants/}} directory:<br />
<br />
{{bc|<nowiki># ln -sf /usr/lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty9.service<br />
# systemctl daemon-reload<br />
# systemctl start getty@tty9.service</nowiki>}}<br />
<br />
To remove a getty:<br />
<br />
Simply remove the getty symlinks you want to get rid of in the {{ic|/etc/systemd/system/getty.target.wants/}} directory:<br />
<br />
{{bc|<nowiki># rm /etc/systemd/system/getty.target.wants/getty@tty5.service /etc/systemd/system/getty.target.wants/getty@tty6.service<br />
# systemctl daemon-reload<br />
# systemctl stop getty@tty5.service getty@tty6.service</nowiki>}}<br />
<br />
systemd does not use the {{ic|/etc/inittab}} file.<br />
<br />
{{Note|As of systemd 30, only 1 getty will be launched by default. If you switch to another tty, a getty will be launched there (socket-activation style). You can still force additional agetty processes to start using the above methods.}}}}<br />
<br />
{{FAQ<br />
|question=How do I get more verbose output during boot?<br />
|answer=If you see no output at all in console after the initram message, this means you have the {{ic|quiet}} parameter in your kernel line. It's best to remove it, at least the first time you boot with systemd, to see if everythin is ok. Then, You will see a list [ OK ] in green or [ FAILED ] in red.<br />
<br />
Any messages are logged to the system log and if you want to find out about the status of your system run {{ic|$ systemctl}} or look at the boot/system log with {{ic|journalctl}}.<br />
}}<br />
<br />
{{FAQ<br />
|question=How to avoid the console to be cleared after boot ?<br />
|answer=Create a custom getty@tty1.service file<br />
<br />
Copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/getty.target.wants/getty@tty1.service, and then edit the file:<br />
* add --noclear to the ExecStart line after agetty<br />
* switch TTYVTDisallocate to no<br />
}}<br />
<br />
{{FAQ<br />
|question=What kernel options do I need to enable in my kernel in case I do not use the official Arch kernel?<br />
|answer=Kernels prior to 2.6.39 are unsupported.<br />
<br />
This is a partial list of required/recommended options, there might be more:<br />
<br />
{{bc|<nowiki><br />
CONFIG_AUDIT=y (recommended)<br />
CONFIG_AUDIT_LOGINUID_IMMUTABLE=y (not required, may break sysvinit compat)<br />
CONFIG_CGROUPS=y<br />
CONFIG_IPV6=[y|m] (highly recommended)<br />
CONFIG_UEVENT_HELPER_PATH="" (if you don't use an initramfs)<br />
CONFIG_DEVTMPFS=y<br />
CONFIG_DEVTMPFS_MOUNT=y (recommended, if you don't use an initramfs)<br />
CONFIG_RTC_DRV_CMOS=y (highly recommended)<br />
CONFIG_FANOTIFY=y (required for readahead)<br />
CONFIG_AUTOFS4_FS=[y|m]<br />
CONFIG_TMPFS_POSIX_ACL=y (recommended, if you want to use pam_systemd.so)<br />
</nowiki>}}}}<br />
<br />
{{FAQ<br />
|question=What other units does a unit depend on?<br />
|answer=For example, if you want to figure out which services a target like {{ic|multi-user.target}} pulls in, use something like this: <br />
{{hc|$ systemctl show -p "Wants" multi-user.target|2=Wants=rc-local.service avahi-daemon.service rpcbind.service NetworkManager.service acpid.service dbus.service atd.service crond.service auditd.service ntpd.service udisks.service bluetooth.service cups.service wpa_supplicant.service getty.target modem-manager.service portreserve.service abrtd.service yum-updatesd.service upowerd.service test-first.service pcscd.service rsyslog.service haldaemon.service remote-fs.target plymouth-quit.service systemd-update-utmp-runlevel.service sendmail.service lvm2-monitor.service cpuspeed.service udev-post.service mdmonitor.service iscsid.service livesys.service livesys-late.service irqbalance.service iscsi.service netfs.service}}<br />
<br />
Instead of {{ic|Wants}} you might also try {{ic|WantedBy}}, {{ic|Requires}}, {{ic|RequiredBy}}, {{ic|Conflicts}}, {{ic|ConflictedBy}}, {{ic|Before}}, {{ic|After}} for the respective types of dependencies and their inverse.}}<br />
<br />
== Optimization ==<br />
=== systemd-analyze ===<br />
Systemd provides a tool called {{ic|systemd-analyze}} that allows you to analyze your boot process so you can see which unit files are causing your boot process to slow down. You can then optimize your system accordingly. You have to install {{Pkg|python-dbus}} and {{Pkg|python-cairo}} to use it.<br />
<br />
To see how much time was spent in kernel-/userspace on boot, simply use:<br />
systemd-analyze<br />
{{Tip|If you add the {{ic|timestamp}} hook to your {{ic|HOOKS}} array in {{ic|/etc/mkinitcpio.conf}} and rebuild your initramfs, {{ic|systemd-analyze}} will also be able to show you how much time was spent in the initramfs.}}<br />
<br />
To list the started unit files, sorted by the time each of them took to start up:<br />
systemd-analyze blame<br />
<br />
You can also create a SVG file which describes your boot process grapically, similiar to [[Bootchart]]:<br />
systemd-analyze plot > plot.svg<br />
<br />
====Enabling bootchart in conjunction with systemd====<br />
You can use a version of bootchart to visualize the boot sequence.<br />
Since you are not able to put a second init into the kernel cmdline you won't be able to use any of the standard bootchart setups. However the {{AUR|bootchart2}} package from [[AUR]] comes with an undocumented systemd service. After you've installed bootchart2 do:<br />
{{bc|# systemctl enable bootchart.service}}<br />
Read the [https://github.com/mmeeks/bootchart bootchart documentation] for further details on using this version of bootchart.<br />
<br />
=== Shell Shortcuts ===<br />
Systemd daemon management requires a bit more text entry to accomplish tasks such as start, stopped, enabling, checking status, etc. The following functions can be added one's {{ic|~/.bashrc}} to help streamline interactions with systemd and to improve the overall experience.<br />
<br />
<pre>if ! systemd-notify --booted; then # not using systemd<br />
start() {<br />
sudo rc.d start $1<br />
}<br />
<br />
restart() {<br />
sudo rc.d restart $1<br />
}<br />
<br />
stop() {<br />
sudo rc.d stop $1<br />
}<br />
else<br />
start() {<br />
sudo systemctl start $1.service<br />
}<br />
<br />
restart() {<br />
sudo systemctl restart $1.service<br />
}<br />
<br />
stop() {<br />
sudo systemctl stop $1.service<br />
}<br />
<br />
enable() {<br />
sudo systemctl enable $1.service<br />
}<br />
<br />
status() {<br />
sudo systemctl status $1.service<br />
}<br />
<br />
disable() {<br />
sudo systemctl disable $1.service<br />
}<br />
fi<br />
</pre><br />
<br />
=== Less output ===<br />
Change {{ic|verbose}} to {{ic|quiet}} on the kernel line in GRUB. For some systems, particularly those with an SSD, the slow performance of the TTY is actually a bottleneck, and so less output means faster booting.<br />
<br />
=== Early start ===<br />
One central feature of systemd is dbus and socket activation, this causes services to be started when they are first accessed, and is generally a good thing. However, if you know that a service (like console-kit) will always be started during boot, then the overall boot time might be reduced by starting it as early as possible. This can be achieved (if the service file is set up for it, which in most cases it is) by issuing:<br />
<br />
{{bc|# systemctl enable console-kit-daemon.service}}<br />
<br />
This will cause systemd to start console-kit as soon as possible, without causing races with the socket or dbus activation.<br />
<br />
=== Automount ===<br />
The default setup will fsck and mount all filesystems before starting most daemons and services. If you have a large {{ic|/home}} partition, it might be better to allow services that do not depend on {{ic|/home}} to start while {{ic|/home}} is being fsck'ed. This can be achieved by adding the following options to the fstab entry of your {{ic|/home}} partition:<br />
<br />
noauto,x-systemd.automount<br />
<br />
This will fsck and mount {{ic|/home}} when it is first accessed, and the kernel will buffer all file access to {{ic|/home}} until it is ready.<br />
<br />
If you have encrypted filesystems with keyfiles, you can also add the {{ic|noauto}} parameter to the corresponding entries in {{ic|/etc/crypttab}}. systemd will then not open the encrypted device on boot, but instead wait until it is actually accessed and then automatically open it with the specified keyfile before mounting it. This might save a few seconds on boot if you are using an encrypted RAID device for example, because systemd doesn't have to wait for the device to become available. For example:<br />
{{hc|/etc/crypttab|data /dev/md0 /root/key noauto}}<br />
<br />
=== Readahead ===<br />
systemd comes with its own readahead implementation, this should in principle improve boot time. However, depending on your kernel version and the type of your hard drive, your mileage may vary (i.e. it might be slower). To enable, do:<br />
<br />
{{bc|<nowiki># systemctl enable systemd-readahead-collect.service systemd-readahead-replay.service</nowiki>}}<br />
<br />
Remember that in order for the readahead to work its magic, you should reboot a couple of times.<br />
<br />
=== User sessions ===<br />
systemd can divide user sessions into cgroups. Add {{ic|session optional pam_systemd.so}} to your relevant {{ic|/etc/pam.d/}} files (e.g., {{ic|login}} for tty logins, {{ic|sshd}} for remote access, {{ic|kde}} for password kdm logins, {{ic|kde-np}} for automatic kdm logins).<br />
<br />
Before:<br />
{{hc|$ systemd-cgls systemd:/system/getty@.service|<br />
systemd:/system/getty@.service:<br />
├ tty5<br />
│ └ 904 /sbin/agetty tty5 38400<br />
├ tty2<br />
│ ├ 13312 /bin/login --<br />
│ └ 15765 -zsh<br />
[…]}}<br />
After:<br />
{{hc|$ systemd-cgls systemd:/user/example/|<br />
systemd:/user/example/:<br />
├ 4<br />
│ ├ 902 /bin/login --<br />
│ └ 16016 -zsh<br />
[…]}}<br />
<br />
Further, you can replace [[ConsoleKit]]'s functionality with systemd. To do this, {{Pkg|polkit}} needs to be rebuilt from [[ABS]] with systemd enabled ({{ic|--enable-systemd}}), and stuff like USB automounting will work without consolekit. DBus supports systemd since version 1.6.0, so there's no longer need to build it from Git.<br />
<br />
== Troubleshooting ==<br />
=== Shutdown/Reboot takes terribly long ===<br />
If the shutdown process takes a very long time (or seems to freeze) most likely a service not exiting is to blame. systemd waits some time for each service to exit before trying to kill it.<br />
To find out if you are affected see [http://freedesktop.org/wiki/Software/systemd/Debugging#Shutdown_Completes_Eventually this article].<br />
==== SLiM and xfce-session ====<br />
One setup that can produce a shutdown freeze is Xfce in conjunction with SLiM: Shutting down/rebooting using xfce-session will cause slim.service to hang for half a minute until systemd kills it the hard way.<br />
One workaround is to create a modified slim.service:<br />
{{hc|/etc/systemd/system/slim.service|<nowiki><br />
[Unit]<br />
Description=SLiM Simple Login Manager<br />
After=systemd-user-sessions.service<br />
<br />
[Service]<br />
Type=forking<br />
PIDFile=/var/lock/slim.lock<br />
ExecStart=/usr/bin/slim -d<br />
ExecStop=/bin/kill -9 $MAINPID<br />
ExecStopPost=/bin/rm /var/lock/slim.lock<br />
<br />
[Install]<br />
WantedBy=graphical.target</nowiki>}}<br />
This causes SLiM to be terminated using SIGKILL. Since the lock file is also removed this does not cause a problem.<br />
<br />
== See also==<br />
*[http://www.freedesktop.org/wiki/Software/systemd Official Web Site]<br />
*[http://0pointer.de/public/systemd-man/ Manual Pages]<br />
*[http://freedesktop.org/wiki/Software/systemd/Optimizations systemd Optimizations]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions FAQ]<br />
*[http://www.freedesktop.org/wiki/Software/systemd/TipsAndTricks Tips And Tricks]<br />
*[http://0pointer.de/public/systemd-ebook-psankar.pdf systemd for Administrators (PDF)]<br />
*[http://bbs.archlinux.org/viewtopic.php?pid=792280 Discussion on the bbs.archlinux.org]<br />
*[http://en.gentoo-wiki.com/wiki/Systemd About systemd in Gentoo Wiki]<br />
*[http://fedoraproject.org/wiki/Systemd About systemd on Fedora Project]<br />
*[http://fedoraproject.org/wiki/How_to_debug_Systemd_problems How to debug Systemd problems]<br />
*[https://docs.google.com/document/pub?id=1IC9yOXj7j6cdLLxWEBAGRL6wl97tFxgjLUEHIX3MSTs Background information about systemd journal]<br />
*[http://www.h-online.com/open/features/Booting-up-Tools-and-tips-for-systemd-1570630.html Booting up: Tools and tips for systemd, a Linux init tool. In The H]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=209962GPGPU2012-06-17T16:56:28Z<p>Kralyk: Out of date. Right now I don't have time to update :-/</p>
<hr />
<div>[[Category:Development]]<br />
[[Category:Graphics]]<br />
{{Out of date|With new versions of OpenCL, the things have changed a little bit.}}<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally consists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL ({{ic|libOpenCL.so}} in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL library===<br />
There are several choices for the libCL. In general case, installing {{Pkg|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Pkg|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. Its behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a separate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to identify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as its installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL implementations are currently active on your system, use the following command:<br />
{{bc|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{AUR|amdstream}}.<br />
This package is installed as {{ic|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{ic|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{ic|/opt/amdstream/samples/opencl}}). It also provides the {{ic|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of its vendor). GPU OpenCL drivers are provided by the {{AUR|catalyst}} package (an optional dependency), the open-source driver ({{Pkg|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Pkg|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Pkg|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Pkg|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs do not support OpenCL/GPGPU. Package is available in AUR: {{AUR|intel-opencl-sdk}}.<br />
<br />
===Development===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Pkg|opencl-headers}} package is needed. Link your code against {{ic|libOpenCL}}.<br />
<br />
====Language bindings====<br />
* '''C++''': A binding by Khronos is part of the official specs. It is included in {{Pkg|opencl-headers}}<br />
* '''C++/Qt''': An experimental binding named [http://qt.gitorious.org/qt-labs/opencl QtOpenCL] is in Qt Labs - see [http://labs.qt.nokia.com/2010/04/07/using-opencl-with-qt/ Blog entry] for more information<br />
* '''JavaScript/HTML5''': [http://www.khronos.org/webcl/ WebCL]<br />
* '''[[Python]]''': There are two bindings with the same name: PyOpenCL. One is in [extra]: {{Pkg|python2-pyopencl}}, for the other one see [http://sourceforge.net/projects/pyopencl/ sourceforge]<br />
* '''[[D]]''': [https://bitbucket.org/trass3r/cl4d/wiki/Home cl4d]<br />
* '''Haskell''': The OpenCLRaw package is available in AUR: {{AUR|haskell-openclraw}}<br />
* '''[[Java]]''': [http://jogamp.org/jocl/www/ JOCL] (a part of [http://jogamp.org/ JogAmp])<br />
* '''[[Mono|Mono/.NET]]''': [http://sourceforge.net/projects/opentk/ Open Toolkit]<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{ic|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Pkg|nvidia}} and extra/{{Pkg|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in community/{{Pkg|cuda-toolkit}}. The SDK has been packaged too ({{AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
===Language bindings===<br />
* '''Fortran''': [http://www.hoopoe-cloud.com/Solutions/Fortran/Default.aspx FORTRAN CUDA], [http://www.pgroup.com/resources/cudafortran.htm PGI CUDA Fortran Compiler]<br />
* '''[[Python]]''': In AUR: {{AUR|pycuda}}, also [http://psilambda.com/download/kappa-for-python Kappa]<br />
* '''Perl''': [http://psilambda.com/download/kappa-for-perl Kappa], [https://github.com/run4flat/perl-CUDA-Minimal CUDA-Minimal]<br />
* '''Haskell''': The CUDA package is available in AUR: {{AUR|haskell-cuda}}. There is also [http://hackage.haskell.org/package/accelerate The accelerate package]<br />
* '''Java''': [http://www.hoopoe-cloud.com/Solutions/jCUDA/Default.aspx jCUDA], [http://www.jcuda.org/jcuda/JCuda.html JCuda]<br />
* '''[[Mono|Mono/.NET]]''': [http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx CUDA.NET], [http://www.hybriddsp.com/ CUDAfy.NET]<br />
* '''[[Mathematica]]''': [http://reference.wolfram.com/mathematica/CUDALink/tutorial/Overview.html CUDAlink]<br />
* '''[[Ruby]]''', '''Lua''': [http://psilambda.com/products/kappa/ Kappa]<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
{{Expansion}}<br />
* [[Bitcoin]]<br />
* [[GIMP]] (development in progress - see [http://www.phoronix.com/scan.php?page=news_item&px=OTc5OQ this notice])<br />
* {{AUR|Pyrit}}<br />
* {{AUR|aircrack-ng}}<br />
* {{AUR|cuda_memtest}} - a GPU memtest. Despite its name, is supports both CUDA and OpenCL<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=153476GPGPU2011-08-26T14:33:43Z<p>Kralyk: adding info on gimp</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally consists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL library===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. Its behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a separate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to identify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as its installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL implementations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of its vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Development===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
====Language bindings====<br />
* '''C++''': A binding by Khronos is part of the official specs. It is included in {{Package Official|opencl-headers}}<br />
* '''C++/Qt''': An experimental binding named [http://qt.gitorious.org/qt-labs/opencl QtOpenCL] is in Qt Labs - see [http://labs.qt.nokia.com/2010/04/07/using-opencl-with-qt/ Blog entry] for more information<br />
* '''JavaScript/HTML5''': [http://www.khronos.org/webcl/ WebCL]<br />
* '''[[Python]]''': There are two bindings with the same name: PyOpenCL. One is in [extra]: {{Package Official|python2-pyopencl}}, for the other one see [http://sourceforge.net/projects/pyopencl/ sourceforge]<br />
* '''[[D]]''': [https://bitbucket.org/trass3r/cl4d/wiki/Home cl4d]<br />
* '''Haskell''': The OpenCLRaw package is available in AUR: {{Package AUR|haskell-openclraw}}<br />
* '''[[Java]]''': [http://jogamp.org/jocl/www/ JOCL] (a part of [http://jogamp.org/ JogAmp])<br />
* '''[[Mono|Mono/.NET]]''': [http://sourceforge.net/projects/opentk/ Open Toolkit]<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
===Language bindings===<br />
* '''Fortran''': [http://www.hoopoe-cloud.com/Solutions/Fortran/Default.aspx FORTRAN CUDA], [http://www.pgroup.com/resources/cudafortran.htm PGI CUDA Fortran Compiler]<br />
* '''[[Python]]''': In AUR: {{Package AUR|pycuda}}, also [http://psilambda.com/download/kappa-for-python Kappa]<br />
* '''Perl''': [http://psilambda.com/download/kappa-for-perl Kappa], [https://github.com/run4flat/perl-CUDA-Minimal CUDA-Minimal]<br />
* '''Haskell''': The CUDA package is available in AUR: {{Package AUR|haskell-cuda}}. There is also [http://hackage.haskell.org/package/accelerate The accelerate package]<br />
* '''Java''': [http://www.hoopoe-cloud.com/Solutions/jCUDA/Default.aspx jCUDA], [http://www.jcuda.org/jcuda/JCuda.html JCuda]<br />
* '''[[Mono|Mono/.NET]]''': [http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx CUDA.NET], [http://www.hybriddsp.com/ CUDAfy.NET]<br />
* '''[[Mathematica]]''': [http://reference.wolfram.com/mathematica/CUDALink/tutorial/Overview.html CUDAlink]<br />
* '''[[Ruby]]''', '''Lua''': [http://psilambda.com/products/kappa/ Kappa]<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
{{Expansion}}<br />
* [[Bitcoin]]<br />
* [[GIMP]] (development in progress - see [http://www.phoronix.com/scan.php?page=news_item&px=OTc5OQ this notice])<br />
* {{Package AUR|Pyrit}}<br />
* {{Package AUR|aircrack-ng}}<br />
* {{Package AUR|cuda_memtest}} - a GPU memtest. Despite its name, is supports both CUDA and OpenCL<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=User:Kralyk&diff=152722User:Kralyk2011-08-20T11:34:27Z<p>Kralyk: </p>
<hr />
<div>My stuff:<br />
* [[User:Kralyk/GPGPU|GPGPU]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151145GPGPU2011-08-09T23:01:53Z<p>Kralyk: Putting bindings back in place. I messed up, sorry...</p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL libraray===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
====Language bindings====<br />
* '''C++''': A binding by Khronos is part of the official specs. It is included in {{Package Official|opencl-headers}}<br />
* '''C++/Qt''': An experimental binding named [http://qt.gitorious.org/qt-labs/opencl QtOpenCL] is in Qt Labs - see [http://labs.qt.nokia.com/2010/04/07/using-opencl-with-qt/ Blog entry] for more information<br />
* '''JavaScript/HTML5''': [http://www.khronos.org/webcl/ WebCL]<br />
* '''[[Python]]''': There are two bindings with the same name: PyOpenCL. One is in [extra]: {{Package Official|python2-pyopencl}}, for the other one see [http://sourceforge.net/projects/pyopencl/ sourceforge]<br />
* '''[[D]]''': [https://bitbucket.org/trass3r/cl4d/wiki/Home cl4d]<br />
* '''Haskell''': The OpenCLRaw package is available in AUR: {{Package AUR|haskell-openclraw}}<br />
* '''[[Java]]''': [http://jogamp.org/jocl/www/ JOCL] (a part of [http://jogamp.org/ JogAmp])<br />
* '''[[Mono|Mono/.NET]]''': [http://sourceforge.net/projects/opentk/ Open Toolkit]<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
===Language bindings===<br />
* '''Fortran''': [http://www.hoopoe-cloud.com/Solutions/Fortran/Default.aspx FORTRAN CUDA], [http://www.pgroup.com/resources/cudafortran.htm PGI CUDA Fortran Compiler]<br />
* '''[[Python]]''': In AUR: {{Package AUR|pycuda}}, also [http://psilambda.com/download/kappa-for-python Kappa]<br />
* '''Perl''': [http://psilambda.com/download/kappa-for-perl Kappa], [https://github.com/run4flat/perl-CUDA-Minimal CUDA-Minimal]<br />
* '''Haskell''': The CUDA package is available in AUR: {{Package AUR|haskell-cuda}}. There is also [http://hackage.haskell.org/package/accelerate The accelerate package]<br />
* '''Java''': [http://www.hoopoe-cloud.com/Solutions/jCUDA/Default.aspx jCUDA], [http://www.jcuda.org/jcuda/JCuda.html JCuda]<br />
* '''[[Mono|Mono/.NET]]''': [http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx CUDA.NET], [http://www.hybriddsp.com/ CUDAfy.NET]<br />
* '''[[Mathematica]]''': [http://reference.wolfram.com/mathematica/CUDALink/tutorial/Overview.html CUDAlink]<br />
* '''[[Ruby]]''', '''Lua''': [http://psilambda.com/products/kappa/ Kappa]<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
{{Expansion}}<br />
* [[Bitcoin]]<br />
* {{Package AUR|Pyrit}}<br />
* {{Package AUR|aircrack-ng}}<br />
* {{Package AUR|cuda_memtest}} - a GPU memtest. Despite it's name, is supports both CUDA and OpenCL<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=CUDA&diff=151144CUDA2011-08-09T22:53:36Z<p>Kralyk: Redirected page to GPGPU</p>
<hr />
<div>#REDIRECT [[GPGPU]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=Opencl&diff=151143Opencl2011-08-09T22:52:40Z<p>Kralyk: moved Opencl to OpenCL: (typo)</p>
<hr />
<div>#REDIRECT [[OpenCL]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=OpenCL&diff=151142OpenCL2011-08-09T22:52:40Z<p>Kralyk: moved Opencl to OpenCL: (typo)</p>
<hr />
<div>#REDIRECT [[GPGPU]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=OpenCL&diff=151141OpenCL2011-08-09T22:52:17Z<p>Kralyk: Redirected page to GPGPU</p>
<hr />
<div>#REDIRECT [[GPGPU]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=User:Kralyk/GPGPU&diff=151140User:Kralyk/GPGPU2011-08-09T22:48:16Z<p>Kralyk: moved User:Kralyk/GPGPU to GPGPU</p>
<hr />
<div>#REDIRECT [[GPGPU]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151139GPGPU2011-08-09T22:48:16Z<p>Kralyk: moved User:Kralyk/GPGPU to GPGPU</p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL libraray===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151138GPGPU2011-08-09T22:48:08Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL libraray===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151137GPGPU2011-08-09T22:47:37Z<p>Kralyk: Adding categories</p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL libraray===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151128GPGPU2011-08-09T20:25:53Z<p>Kralyk: Adding some SW into the list...</p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL library===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
====Language bindings====<br />
* '''C++''': A binding by Khronos is part of the official specs. It is included in {{Package Official|opencl-headers}}<br />
* '''C++/Qt''': An experimental binding named [http://qt.gitorious.org/qt-labs/opencl QtOpenCL] is in Qt Labs - see [http://labs.qt.nokia.com/2010/04/07/using-opencl-with-qt/ Blog entry] for more information<br />
* '''JavaScript/HTML5''': [http://www.khronos.org/webcl/ WebCL]<br />
* '''[[Python]]''': There are two bindings with the same name: PyOpenCL. One is in [extra]: {{Package Official|python2-pyopencl}}, for the other one see [http://sourceforge.net/projects/pyopencl/ sourceforge]<br />
* '''[[D]]''': [https://bitbucket.org/trass3r/cl4d/wiki/Home cl4d]<br />
* '''Haskell''': The OpenCLRaw package is available in AUR: {{Package AUR|haskell-openclraw}}<br />
* '''[[Java]]''': [http://jogamp.org/jocl/www/ JOCL] (a part of [http://jogamp.org/ JogAmp])<br />
* '''[[Mono|Mono/.NET]]''': [http://sourceforge.net/projects/opentk/ Open Toolkit]<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
===Language bindings===<br />
* '''Fortran''': [http://www.hoopoe-cloud.com/Solutions/Fortran/Default.aspx FORTRAN CUDA], [http://www.pgroup.com/resources/cudafortran.htm PGI CUDA Fortran Compiler]<br />
* '''[[Python]]''': In AUR: {{Package AUR|pycuda}}, also [http://psilambda.com/download/kappa-for-python Kappa]<br />
* '''Perl''': [http://psilambda.com/download/kappa-for-perl Kappa], [https://github.com/run4flat/perl-CUDA-Minimal CUDA-Minimal]<br />
* '''Haskell''': The CUDA package is available in AUR: {{Package AUR|haskell-cuda}}. There is also [http://hackage.haskell.org/package/accelerate The accelerate package]<br />
* '''Java''': [http://www.hoopoe-cloud.com/Solutions/jCUDA/Default.aspx jCUDA], [http://www.jcuda.org/jcuda/JCuda.html JCuda]<br />
* '''[[Mono|Mono/.NET]]''': [http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx CUDA.NET], [http://www.hybriddsp.com/ CUDAfy.NET]<br />
* '''[[Mathematica]]''': [http://reference.wolfram.com/mathematica/CUDALink/tutorial/Overview.html CUDAlink]<br />
* '''[[Ruby]]''', '''Lua''': [http://psilambda.com/products/kappa/ Kappa]<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
{{Expansion}}<br />
* [[Bitcoin]]<br />
* {{Package AUR|Pyrit}}<br />
* {{Package AUR|aircrack-ng}}<br />
* {{Package AUR|cuda_memtest}} - a GPU memtest. Despite it's name, is supports both CUDA and OpenCL<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]<br />
* [irc://chat.freenode.org/conky #opencl] @ [[wikipedia:Freenode|freenode]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151126GPGPU2011-08-09T19:48:02Z<p>Kralyk: Adding CUDA bindings</p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL library===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
====Language bindings====<br />
* '''C++''': A binding by Khronos is part of the official specs. It is included in {{Package Official|opencl-headers}}<br />
* '''C++/Qt''': An experimental binding named [http://qt.gitorious.org/qt-labs/opencl QtOpenCL] is in Qt Labs - see [http://labs.qt.nokia.com/2010/04/07/using-opencl-with-qt/ Blog entry] for more information<br />
* '''JavaScript/HTML5''': [http://www.khronos.org/webcl/ WebCL]<br />
* '''[[Python]]''': There are two bindings with the same name: PyOpenCL. One is in [extra]: {{Package Official|python2-pyopencl}}, for the other one see [http://sourceforge.net/projects/pyopencl/ sourceforge]<br />
* '''[[D]]''': [https://bitbucket.org/trass3r/cl4d/wiki/Home cl4d]<br />
* '''Haskell''': The OpenCLRaw package is available in AUR: {{Package AUR|haskell-openclraw}}<br />
* '''[[Java]]''': [http://jogamp.org/jocl/www/ JOCL] (a part of [http://jogamp.org/ JogAmp])<br />
* '''[[Mono|Mono/.NET]]''': [http://sourceforge.net/projects/opentk/ Open Toolkit]<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
===Language bindings===<br />
* '''Fortran''': [http://www.hoopoe-cloud.com/Solutions/Fortran/Default.aspx FORTRAN CUDA], [http://www.pgroup.com/resources/cudafortran.htm PGI CUDA Fortran Compiler]<br />
* '''[[Python]]''': In AUR: {{Package AUR|pycuda}}, also [http://psilambda.com/download/kappa-for-python Kappa]<br />
* '''Perl''': [http://psilambda.com/download/kappa-for-perl Kappa], [https://github.com/run4flat/perl-CUDA-Minimal CUDA-Minimal]<br />
* '''Haskell''': The CUDA package is available in AUR: {{Package AUR|haskell-cuda}}. There is also [http://hackage.haskell.org/package/accelerate The accelerate package]<br />
* '''Java''': [http://www.hoopoe-cloud.com/Solutions/jCUDA/Default.aspx jCUDA], [http://www.jcuda.org/jcuda/JCuda.html JCuda]<br />
* '''[[Mono|Mono/.NET]]''': [http://www.hoopoe-cloud.com/Solutions/CUDA.NET/Default.aspx CUDA.NET], [http://www.hybriddsp.com/ CUDAfy.NET]<br />
* '''[[Mathematica]]''': [http://reference.wolfram.com/mathematica/CUDALink/tutorial/Overview.html CUDAlink]<br />
* '''[[Ruby]]''', '''Lua''': [http://psilambda.com/products/kappa/ Kappa]<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
* [[Bitcoin]]<br />
{{Expansion}}<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]<br />
* [irc://chat.freenode.org/conky #opencl] @ [[wikipedia:Freenode|freenode]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151120GPGPU2011-08-09T17:08:53Z<p>Kralyk: Adding IRC channel</p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL library===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
====Language bindings====<br />
* '''C++''': A binding by Khronos is part of the official specs. It is included in {{Package Official|opencl-headers}}<br />
* '''C++/Qt''': An experimental binding named [http://qt.gitorious.org/qt-labs/opencl QtOpenCL] is in Qt Labs - see [http://labs.qt.nokia.com/2010/04/07/using-opencl-with-qt/ Blog entry] for more information<br />
* '''JavaScript/HTML5''': See [http://www.khronos.org/webcl/ WebCL]<br />
* '''Python''': There are two bindings with the same name: PyOpenCL. One is in [extra]: {{Package Official|python2-pyopencl}}, for the other one, see [http://sourceforge.net/projects/pyopencl/ sourceforge]<br />
* '''D''': See [https://bitbucket.org/trass3r/cl4d/wiki/Home cl4d]<br />
* '''Haskell''': The OpenCLRaw package is available in AUR: {{Package AUR|haskell-openclraw}}<br />
* '''Java''': See [http://jogamp.org/jocl/www/ JOCL] (a part of [http://jogamp.org/ JogAmp])<br />
* '''Mono/.NET''': See [http://sourceforge.net/projects/opentk/ Open Toolkit]<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
===Language bindings===<br />
{{Expansion}}<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
* [[Bitcoin]]<br />
{{Expansion}}<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]<br />
* [irc://chat.freenode.org/conky #opencl] @ [[wikipedia:Freenode|freenode]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151119GPGPU2011-08-09T16:09:20Z<p>Kralyk: Adding OpenCL bindings</p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL library===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
====Language bindings====<br />
* '''C++''': A binding by Khronos is part of the official specs. It is included in {{Package Official|opencl-headers}}<br />
* '''C++/Qt''': An experimental binding named [http://qt.gitorious.org/qt-labs/opencl QtOpenCL] is in Qt Labs - see [http://labs.qt.nokia.com/2010/04/07/using-opencl-with-qt/ Blog entry] for more information<br />
* '''JavaScript/HTML5''': See [http://www.khronos.org/webcl/ WebCL]<br />
* '''Python''': There are two bindings with the same name: PyOpenCL. One is in [extra]: {{Package Official|python2-pyopencl}}, for the other one, see [http://sourceforge.net/projects/pyopencl/ sourceforge]<br />
* '''D''': See [https://bitbucket.org/trass3r/cl4d/wiki/Home cl4d]<br />
* '''Haskell''': The OpenCLRaw package is available in AUR: {{Package AUR|haskell-openclraw}}<br />
* '''Java''': See [http://jogamp.org/jocl/www/ JOCL] (a part of [http://jogamp.org/ JogAmp])<br />
* '''Mono/.NET''': See [http://sourceforge.net/projects/opentk/ Open Toolkit]<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
===Language bindings===<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
* [[Bitcoin]]<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151108GPGPU2011-08-09T14:59:04Z<p>Kralyk: Subsections for bindings and accelerated SW</p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL library===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
The Nvidia implementation is available in extra/{{Package Official|opencl-nvidia}}. It only supports Nvidia GPUs running the {{Package Official|nvidia}} kernel module (nouveau does not support OpenCL yet).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
====Language bindings====<br />
<br />
==CUDA==<br />
<br />
CUDA (Compute Unified Device Architecture) is [[Nvidia]]'s proprietary, closed-source parallel computing architecture and framework. It is made of several components:<br />
* required:<br />
** proprietary Nvidia kernel module<br />
** CUDA "driver" and "runtime" libraries<br />
* optional:<br />
** additional libraries: CUBLAS, CUFFT, CUSPARSE, etc.<br />
** CUDA toolkit, including the {{Filename|nvcc}} compiler<br />
** CUDA SDK, which contains many code samples and examples of CUDA and OpenCL programs<br />
<br />
The kernel module and CUDA "driver" library are shipped in extra/{{Package Official|nvidia}} and extra/{{Package Official|opencl-nvidia}}. The "runtime" library and the rest of the CUDA toolkit are available in unsupported/{{Package AUR|cuda-toolkit}}. The SDK has been packaged too ({{Package AUR|cuda-sdk}}), even if it is not required for developing in CUDA.<br />
<br />
===Language bindings===<br />
<br />
==List of OpenCL and CUDA accelerated software==<br />
* [[Bitcoin]]<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151042GPGPU2011-08-09T03:28:55Z<p>Kralyk: Clarifications...</p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br><br><br />
<br />
[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (<tt>libOpenCL.so</tt> in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler<br />
** SDK *<br />
* Header files *<br />
''* only needed for development''<br />
<br />
===OpenCL libraray===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} from [extra] should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
(There is also Intel's libCL, this one is currently not provided in a seperate package though.)<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD Loaders are vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Nvidia====<br />
{{Expansion}}<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
<br />
==CUDA==<br />
{{Expansion}}<br />
<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151041GPGPU2011-08-09T03:18:48Z<p>Kralyk: Undo revision 151040 by Kralyk (talk)</p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br><br><br />
<br />
[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
<br />
==OpenCL==<br />
<br />
===Overview===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====Nvidia====<br />
{{Expansion}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
<br />
==CUDA==<br />
{{Expansion}}<br />
<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151040GPGPU2011-08-09T03:18:11Z<p>Kralyk: </p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br><br><br />
<br />
[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==<br>OpenCL==<br />
<br />
===Overview===<br />
OpenCL (Open Computing Language) is an open, royalty-free parallel programming framework developed by the Khronos Group, a non-profit consortium.<br />
<br />
Distribution of the OpenCL framework generally constists of:<br />
* Library providing OpenCL API, known as libCL or libOpenCL (libOpenCL.so in linux)<br />
* OpenCL implementation(s), which contain:<br />
** Device drivers<br />
** OpenCL/C code compiler (<br />
** SDK*<br />
* Header files*<br />
''*-only needed for development''<br />
<br />
===OpenCL libraray===<br />
There are several choices for the libCL. In general case, installing {{Package Official|libcl}} should do :<br />
# pacman -S libcl<br />
However, there are situations when another libCL distribution is more suitable. The following paragraph covers this more advanced topic.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the libCL library which in fact imeplements ICD Loader.<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
Intel's libCL <br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====Nvidia====<br />
{{Expansion}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
<br />
==CUDA==<br />
{{Expansion}}<br />
<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151037GPGPU2011-08-09T02:41:25Z<p>Kralyk: Changing structure for better clarity</p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br><br><br />
<br />
[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
<br />
==OpenCL==<br />
<br />
===Overview===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
===The OpenCL ICD model===<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===Implementations===<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
====Nvidia====<br />
{{Expansion}}<br />
<br />
====AMD====<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
====Intel====<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
===Developement===<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
<br />
==CUDA==<br />
{{Expansion}}<br />
<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=User:Kralyk&diff=151030User:Kralyk2011-08-08T23:28:12Z<p>Kralyk: </p>
<hr />
<div>WIP: [[User:Kralyk/GPGPU|GPGPU]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151025GPGPU2011-08-08T23:02:39Z<p>Kralyk: </p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br><br><br />
<br />
[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==Installation==<br />
===OpenCL===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
====The OpenCL ICD model====<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===CUDA===<br />
{{Expansion}}<br />
<br />
==Implementations==<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
===Nvidia===<br />
{{Expansion}}<br />
<br />
===AMD===<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
===Intel===<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
==Developement==<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
==Links and references==<br />
* [http://www.khronos.org/opencl/ OpenCL official homepage]<br />
* [http://www.nvidia.com/object/cuda_home_new.html CUDA official homepage]<br />
* [http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]<br />
* [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK homepage]<br />
* [http://developer.nvidia.com/cuda-toolkit-40 CUDA Toolkit homepage]<br />
* [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK homepage]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151024GPGPU2011-08-08T22:37:16Z<p>Kralyk: </p>
<hr />
<div>{{Note|This article is a non-public work in progress as of yet}}<br />
<br><br><br />
<br />
[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==Installation==<br />
===OpenCL===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
====The OpenCL ICD model====<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===CUDA===<br />
{{Expansion}}<br />
<br />
==Implementations==<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
===Nvidia===<br />
{{Expansion}}<br />
<br />
===AMD===<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
===Intel===<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
==Developement==<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
==Links and references==<br />
[http://www.khronos.org/opencl/ OpenCL official website]<br />
[http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151023GPGPU2011-08-08T22:36:08Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
{{Article summary start}}<br />
{{Article summary text|Installation and usage of OpenCL and CUDA, the two major Linux GPGPU frameworks}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Catalyst}}<br />
{{Article summary wiki|Nvidia}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==Installation==<br />
===OpenCL===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
====The OpenCL ICD model====<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===CUDA===<br />
{{Expansion}}<br />
<br />
==Implementations==<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
===Nvidia===<br />
{{Expansion}}<br />
<br />
===AMD===<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency), the open-source driver ({{Package Official|xf86-video-ati}}) does ''not'' support OpenCL.<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
===Intel===<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
==Developement==<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
==Links and references==<br />
[http://www.khronos.org/opencl/ OpenCL official website]<br />
[http://www.khronos.org/registry/cl/extensions/khr/cl_khr_icd.txt The ICD extension specification]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151020GPGPU2011-08-08T22:21:15Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==Installation==<br />
===OpenCL===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
====The OpenCL ICD model====<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===CUDA===<br />
{{Expansion}}<br />
<br />
==Implementations==<br />
To see which OpenCL imeplentations are currently active on your system, use the following command:<br />
{{Cli|$ ls /etc/OpenCL/vendors}}<br />
<br />
===Nvidia===<br />
{{Expansion}}<br />
<br />
===AMD===<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency).<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
===Intel===<br />
The Intel implementation, named simply [http://software.intel.com/en-us/articles/opencl-sdk/ Intel OpenCL SDK], <br />
provides optimized OpenCL performance on Intel CPUs (mainly Core and Xeon) and CPUs only. There is no GPU support as Intel GPUs don't support OpenCL/GPGPU. Package is available in AUR: {{Package AUR|intel-opencl-sdk}}.<br />
<br />
==Developement==<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
==Links and references==</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151016GPGPU2011-08-08T20:48:10Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU frameworks: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br><br><br />
<br />
==Installation==<br />
===OpenCL===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
====The OpenCL ICD model====<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===CUDA===<br />
{{Expansion}}<br />
<br />
==Implementations==<br />
===Nvidia===<br />
{{Expansion}}<br />
<br />
===AMD===<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency).<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
===Intel===<br />
{{Lorem Ipsum}}<br />
<br />
==Developement==<br />
For development of OpenCL-capable applications, full installation of the OpenCL framework including implementation, drivers and compiler plus the {{Package Official|opencl-headers}} package is needed. Link your code against <tt>libOpenCL</tt>.<br />
<br />
==Links and references==</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=151010GPGPU2011-08-08T20:41:12Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
{{Article summary start}}<br />
{{Article summary text|-- TODO! ---}}<br />
{{Article summary heading|Related}}<br />
{{Article summary link|Archlinux.org|http://archlinux.org}}<br />
{{Article summary wiki|Arch Linux}}<br />
{{Article summary end}}<br />
<br />
GPGPU stands for [http://en.wikipedia.org/wiki/Gpgpu General-purpose computing on graphics processing units].<br />
In Linux, there are currently two major GPGPU framework: [http://en.wikipedia.org/wiki/OpenCL OpenCL] and [http://en.wikipedia.org/wiki/CUDA CUDA]<br />
<br />
==Installation==<br />
===OpenCL===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
====The OpenCL ICD model====<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===CUDA===<br />
{{Expansion}}<br />
<br />
==Implementations==<br />
===Nvidia===<br />
{{Expansion}}<br />
<br />
===AMD===<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency).<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
===Intel===<br />
{{Lorem Ipsum}}<br />
<br />
==Developement==<br />
{{Lorem Ipsum}}<br />
<br />
==Links and references==</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150995GPGPU2011-08-08T19:43:06Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
{{Lorem Ipsum}}<br />
<br />
==Installation==<br />
===OpenCL===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
====The OpenCL ICD model====<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
{{Note|ICD Loader's vendor is mentioned only to indetify each loader, it is otherwise completely irrelevant. ICD loaders are still vendor-agnostic and may be used interchangeably<br>(as long as they are implemented correctly)}}<br />
<br />
For basic usage, extra/libcl is recommended as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===CUDA===<br />
{{Expansion}}<br />
<br />
==Implementations==<br />
===Nvidia===<br />
{{Expansion}}<br />
<br />
===AMD===<br />
OpenCL implementation from AMD is known as [http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx AMD APP SDK], formerly also known as AMD Stream SDK or ATi Stream.<br />
<br />
For Arch Linux, AMD APP SDK is currently available in AUR as {{Package AUR|amdstream}}.<br />
This package is installed as {{Filename|/opt/amdstream}} and apart from SDK files it also contains a profiler ({{Filename|/opt/amdstream/bin/sprofile}}) and a number of code samples ({{Filename|/opt/amdstream/samples/opencl}}). It also provides the {{Filename|clinfo}} utility which lists OpenCL platforms and devices present in the system and displays detailed information about them.<br />
<br />
As AMD APP SDK itself contains CPU OpenCL driver, no extra driver is needed to use execute OpenCL on CPU devices (regardless of it's vendor). GPU OpenCL drivers are provided by the {{Package AUR|catalyst}} package (an optional dependency).<br />
<br />
Code is compiled using {{Package Official|llvm}} (dependency).<br />
<br />
===Intel===<br />
{{Lorem Ipsum}}<br />
<br />
==Developement==<br />
{{Lorem Ipsum}}<br />
<br />
==Links and references==</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150989GPGPU2011-08-08T18:35:57Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
{{Lorem Ipsum}}<br />
<br />
==Installation==<br />
===OpenCL===<br />
A distribution of the OpenCL framework generally constists of:<br />
* Library's shared object (libOpenCL.so, for detailed information [[#The OpenCL ICD model|see bellow]])<br />
* One or more vendor-specific OpenCL implementation packages<br />
* Device drivers<br />
<br />
For the OpenCL shared object, installing {{Package Official|libcl}} should do in general case:<br />
# pacman -S libcl<br />
<br />
See [[#Implementations|Implementations]] on how to install implementation and device driver packages.<br />
<br />
====The OpenCL ICD model====<br />
OpenCL offers the option to install multiple vendor-specific implementations on the same machine at the same time.<br />
In practice, this is implemented using the Installable Client Driver (ICD) model.<br />
The center point of this model is the ICD Loader (which on linux is in fact the libOpenCL.so object).<br />
Through the ICD Loader, an OpenCL application is able to access all platforms and all devices present in the system.<br />
<br />
Although itself vendor-agnostic, the ICD Loader still has to be provided by someone. In Archlinux, there are currently two options:<br />
* extra/{{Package Official|libcl}} by Nvidia. Provides OpenCL version 1.0 and is thus slightly outdated. It's behaviour with OpenCL 1.1 code has not been tested as of yet.<br />
* unsupported/{{Package AUR|libopencl}} by AMD. Provides up to date version 1.1 of OpenCL. It is currently distributed by AMD under a restrictive license and therefore could not have been pushed into official repo.<br />
<br />
For basic usage, extra/libcl is recommended, as it's installation and updating is convenient. For advanced usage, libopencl is recommended. Both libcl and libopencl should still work with all the implementations.<br />
<br />
===CUDA===<br />
{{Expansion}}<br />
<br />
==Implementations==<br />
===Nvidia===<br />
{{Expansion}}<br />
<br />
===AMD===<br />
{{Lorem Ipsum}}<br />
<br />
===Intel===<br />
{{Lorem Ipsum}}<br />
<br />
==Developement==<br />
{{Lorem Ipsum}}<br />
<br />
==Links and references==</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150978GPGPU2011-08-08T16:36:50Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
{{Lorem Ipsum}}<br />
<br />
==Installation==<br />
===OpenCL===<br />
{{Lorem Ipsum}}<br />
<br />
===CUDA===<br />
{{Lorem Ipsum}}<br />
<br />
==Implementations==<br />
===Nvidia===<br />
{{Lorem Ipsum}}<br />
<br />
===AMD===<br />
{{Lorem Ipsum}}<br />
<br />
===Intel===<br />
{{Lorem Ipsum}}<br />
<br />
==Developement==<br />
{{Lorem Ipsum}}</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150977GPGPU2011-08-08T16:36:14Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
{{Lorem Ipsum}}<br />
<br />
==Installation==<br />
===OpenCL===<br />
{{Lorem Ipsum}}<br />
<br />
===CUDA===<br />
{{Lorem Ipsum}}<br />
<br />
==Implementations==<br />
===Nvidia===<br />
{{Lorem Ipsum}}<br />
<br />
===AMD===<br />
{{Lorem Ipsum}}<br />
<br />
===Intel===<br />
{{Lorem Ipsum}}</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150976GPGPU2011-08-08T16:17:29Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
{{Lorem Ipsum}}<br />
<br />
==Introduction==<br />
{{Lorem Ipsum}}<br />
<br />
==Installation==<br />
{{Lorem Ipsum}}<br />
<br />
==Development==<br />
===Nvidia===<br />
{{Lorem Ipsum}}<br />
<br />
===AMD===<br />
{{Lorem Ipsum}}<br />
<br />
===Intel===<br />
{{Lorem Ipsum}}</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150975GPGPU2011-08-08T16:16:34Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
<br />
Article Introduction<br />
<br />
==Introduction==<br />
<br />
==Installation==<br />
<br />
==Development==<br />
===Nvidia===<br />
===AMD===<br />
===Intel===</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150974GPGPU2011-08-08T16:16:24Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Reminder|This article is a non-public work in progress as of yet}}<br />
<br />
<br />
<br />
Article Introduction<br />
<br />
==Introduction==<br />
<br />
==Installation==<br />
<br />
==Development==<br />
===Nvidia===<br />
===AMD===<br />
===Intel===</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150973GPGPU2011-08-08T16:15:06Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
{{Note|This article is a work in progress}}<br />
<br />
<br />
<br />
Article Introduction<br />
<br />
==Introduction==<br />
<br />
==Installation==<br />
<br />
==Development==<br />
===Nvidia===<br />
===AMD===<br />
===Intel===</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150972GPGPU2011-08-08T16:14:53Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
<br />
{{Note|This article is a work in progress}}<br />
<br />
Article Introduction<br />
<br />
==Introduction==<br />
<br />
==Installation==<br />
<br />
==Development==<br />
===Nvidia===<br />
===AMD===<br />
===Intel===</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150970GPGPU2011-08-08T16:01:18Z<p>Kralyk: </p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
<br />
{{Expansion}}<br />
<br />
Article Introduction<br />
<br />
==Introduction==<br />
<br />
==Installation==<br />
<br />
==Development==<br />
===Nvidia===<br />
===AMD===<br />
===Intel===</div>Kralykhttps://wiki.archlinux.org/index.php?title=User:Kralyk&diff=150969User:Kralyk2011-08-08T16:00:57Z<p>Kralyk: </p>
<hr />
<div>WIP: [[User:Kralyk/GPGPU]]</div>Kralykhttps://wiki.archlinux.org/index.php?title=GPGPU&diff=150968GPGPU2011-08-08T16:00:30Z<p>Kralyk: Created page with "Category:Category:Development (English) Category:Category:Graphics (English) {{Expansion}} Article Introduction ==Introduction== a ==Installation== ==Development== ==..."</p>
<hr />
<div>[[Category:Category:Development (English)]]<br />
[[Category:Category:Graphics (English)]]<br />
<br />
{{Expansion}}<br />
<br />
Article Introduction<br />
<br />
==Introduction==<br />
a<br />
==Installation==<br />
<br />
==Development==<br />
===Nvidia===<br />
===AMD===<br />
===Intel===</div>Kralyk