Differences between revisions 45 and 46
Revision 45 as of 2020-09-02 08:43:18
Size: 5951
Editor: davidsch
Comment:
Revision 46 as of 2020-09-02 09:08:00
Size: 5749
Editor: davidsch
Comment:
Deletions are marked like this. Additions are marked like this.
Line 17: Line 17:
=== Compiling OpenGL applications on Debian Linux ===
The Debian platform managed by the ISG.EE has a new directory layout for the OpenGL libraries and headers:
=== Compiling OpenGL/ NVidia CUDA-based applications on Debian Linux ===
The Debian platform managed by ISG.EE uses the following directory layout for the OpenGL libraries and headers:
Line 23: Line 23:
The /usr/lib/x86_64-linux-gnu/libGL* libraries are symbolic links to the hardware-specific libraries. There is a mechanism in the starup process of each client workstation which detects the accurate OpenGL library based on the information about the graphics card and the kernel driver. The /usr/lib/x86_64-linux-gnu/libGL*.so OpenGL libraries are symbolic links to the hardware-specific libraries. There is a mechanism in the starup process of each client workstation which detects the accurate OpenGL library based on the information about the graphics card and the kernel driver. The CUDA runtime libraries are found in the same directory.
Line 25: Line 25:
Line 28: Line 29:
1. For compatibility reasons, the default OpenGL headers (from the MESA package) are saved in their default location, i.e. /usr/X11R6/include/GL which points to the same directory as /usr/include/GL.
2. The extended OpenGL header files from Nvidia are stored in /usr/lib/nvidia/include/GL which have to be included in the compile path in order to use the extended Nvidia functions.
The OpenGL headers are found under /usr/include/GL. For NVidia programming, a CUDA toolkit that should work with
the installed NVidia graphics card is installed (CUDA headers in /usr/include).
Line 31: Line 32:
Line 32: Line 34:
{{{
No special CFLAGS/ CXXFLAGS and LDFLAGS must be set. The required headers and libraries are all found under the
standard system paths. If you use an own OpenGL/ CUDA toolkit, e.g. installed in your home, make sure it is
compatible with the graphics driver/ hardware installed on the system. Then set CFLAGS (standard C programming,
e.g. compiling with gcc) and/ or CXXFLAGS (C++ programming, e.g. compiling with g++) and LDFLAGS as follows:
Line 33: Line 40:
{{{
add to CFLAGS / CPPFLAGS / CXXFLAGS
`-I/usr/lib/nvidia/include/GL`
add to LDFLAGS ``
`-L/usr/lib/nvidia/lib` ` -Wl,-rpath -Wl,/usr/lib/nvidia/lib`
Assume you have installed the toolkit under /home/$USER/toolkit, then set the mentioned environment
variables in your Debian shell (bash, tcsh, ...) as follows, before you start compiling/ linking:

export CFLAGS="-I/home/$USER/toolkit/include"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-L/home/$USER/toolkit/lib -Wl,-rpath,/home/$USER/toolkit/lib"

$USER must of course be replaced with your ETH (login-) username.
Line 39: Line 49:
Remarks:
Line 41: Line 50:
{{{
If you are using the libGLU you will get the following linker warning: `/usr/bin/ld: warning: libstdc++.so.5, needed by /usr/bin/../lib/libGLU.so, may conflict with libstdc++.so.6`
This shouldn't affect your programs (the libGLU was linked against the old C++ standard library and most of the installed gnu compilers will link against the newer library).
If you have problems linking against `libGL.so` from `/usr/lib` it is possible to access symbols directly from the NVidia opengl library in `/usr/lib/nvidia/lib`:
remove `-L/usr/lib` and add instead `-L/usr/lib/nvidia/lib -lGL` to your `LDFLAGS` environment/ make variable.
}}}
Line 48: Line 52:
 * [[http://www.unix.org.ua/orelly/perl/learn/index.htm|Learning Perl]] A free O'Reilly book!
 * [[http://perl-seiten.homepage.t-online.de/|Perlkurs auf Deutsch]] A great introduction into the Perl programming language in German.
{{{
Note that our Perl interpreter is located in /usr/sepp/bin/perl. You might run into problems if you use the system's own perl interpreter (/usr/bin/perl). This is most often the reason for people complaining that they cannot find our perl modules.
}}}
 * Please use the default perl (/usr/bin/perl) that is installed on all Debian Linux computers.
 * If you use older perl interpreters from other directories, you should switch to the default perl interpreter.
 * A bunch of most-often used perl modules is installed with the default perl interpreter.
Line 55: Line 58:
Line 56: Line 60:


Programming

Programming language literature

On the free Ebook foundation website, you will find an overview of a bunch of programming e-books (PDF/ HTML) free of charge for almost any language in the areas of

  • Regular programming (e.g. C, C++, C#, Java, Go, MATLAB, PHP, Rust, Scala, ...)

  • Scripting (e.g. JavaScript, make, Perl, Python, R, Ruby, Unix/ Windows Shells, SQL, ...)

  • Document rendering (e.g. HTML, CSS, LaTeX, ...)

  • Multiprocessing/ parallel computing APIs (e.g. OpenMP, ...)

  • Programming related tools (e.g. Git, Subversion, Mercurial, Jenkins)

OpenGL

Compiling OpenGL/ NVidia CUDA-based applications on Debian Linux

The Debian platform managed by ISG.EE uses the following directory layout for the OpenGL libraries and headers:

Libraries:

The /usr/lib/x86_64-linux-gnu/libGL*.so OpenGL libraries are symbolic links to the hardware-specific libraries. There is a mechanism in the starup process of each client workstation which detects the accurate OpenGL library based on the information about the graphics card and the kernel driver. The CUDA runtime libraries are found in the same directory.

Header Files:

The OpenGL headers are found under /usr/include/GL. For NVidia programming, a CUDA toolkit that should work with
the installed NVidia graphics card is installed (CUDA headers in /usr/include).

Compiling sources and linking against the NVidia libraries:

No special CFLAGS/ CXXFLAGS and LDFLAGS must be set. The required headers and libraries are all found under the
standard system paths. If you use an own OpenGL/ CUDA toolkit, e.g. installed in your home, make sure it is
compatible with the graphics driver/ hardware installed on the system. Then set CFLAGS (standard C programming,
e.g. compiling with gcc) and/ or CXXFLAGS (C++ programming, e.g. compiling with g++) and LDFLAGS as follows:

Assume you have installed the toolkit under /home/$USER/toolkit, then set the mentioned environment
variables in your Debian shell (bash, tcsh, ...) as follows, before you start compiling/ linking:

export CFLAGS="-I/home/$USER/toolkit/include"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-L/home/$USER/toolkit/lib -Wl,-rpath,/home/$USER/toolkit/lib"

$USER must of course be replaced with your ETH (login-) username.

Perl

  • Please use the default perl (/usr/bin/perl) that is installed on all Debian Linux computers.
  • If you use older perl interpreters from other directories, you should switch to the default perl interpreter.
  • A bunch of most-often used perl modules is installed with the default perl interpreter.

Network Programming

X11

  • X11 Programming X is a graphical network based windows systems, it was developed from MIT in 1984. This system gives the basis for many Unix windows systems. Qt GUI Toolkit Qt is the C++ library which builds the base of KDE. Qt is the ideal starting point for your graphical unix applications. Qt is installed on Tardis. GTK+ GUI Toolkit GTK+ was initially developed for and used by the GIMP, the GNU Image Manipulation Program. Therefore, it is named "The GIMP Toolkit", so that the origins of the project are remembered. Today GTK+ is used by a large number of applications, and is the toolkit used by the GNU project's GNOME desktop.

Debugger

Unfortunately, it is difficult to write bug-free programs. A good debugger is very helpful tracking down errors. On the Tardis cluster we recommend to use the Data Display Debugger (DDD). DDD supports a variety of programming languages: Ada, C, C++, Chill, Fortran, Java, Modula, Pascal, Perl, Python.

For a current list go to the DDD manual (man ddd).

Database programming

If you want to learn about database design and programming you can get an account on our MySQL database server. Get in touch with us and let us know what your plans are. The address of our database server is remi.ee.ethz.ch where mysql runs on the default port (3306). For database configuration and setup tasks you can also make use of our phpMyAdmin setup.

  • Swiss MySQL mirror site MySQL is a true multi-user, multi-threaded SQL database server. SQL is the most popular database language in the world. MySQL is a client/server implementation that consists of a server daemon mysqld and many different client programs and libraries.


CategoryLXSW