Johannes Habichs Blog


22. December 2011

GETOPT for Windows

Johannes Habich, 11:47 Uhr in HPC, Tools, Windows HPC

The portability of programs between *nix und Windows is often limited not by the program itself but by certain helper tools. One of those is getopt which provides a fast and easy way to read in command line arguments.

Please find a windows version here:


You will find more other useful ports here as well.

16. December 2011

GIT: git show and git describe

Johannes Habich, 06:36 Uhr in Tools

You can easily have a look at a tag with

git show  mytag

Much more powerfull and showing you all sorts of realations between tags and commits is git describe:

10. November 2011

VirtualBox: ResizeHD

Johannes Habich, 06:14 Uhr in Allgemeines, Tools

In general the following should work:

VBoxManage modifyhd MYHD.vdi –resize 20000


Were 20000 is more or less 20 GB.

If the command fails several reasons could be the cause.

  • The virtual disk is already larger. Till now you cannot shrink drives that way. Take a close look in the VM whether you already use that space actually. In Windows this information is under Computer Management –> Storage –> Disk Management
  • The virtual disk has the wrong type. Issue the command:

 VBoxManage showhdinfo MYHD.vdi

If the result is not:

Format variant: dynamic default

you have to migrate your disk to that dynamic system. Since this is the default container for newer versions you can simply clone your HD file and then enlarge the new one:

VBoxManage clonehd MYHD.vdi MYNEWHD.vdi

  • I did not encounter other errors, please comment if you have any problem and/or solution




8. November 2011

WINDOWS: Build Boost for Visual Studio 2010

Johannes Habich, 12:04 Uhr in HPC, Windows HPC


If you are using headers only libraries, then all you need to do is to unarchive the boost download and set up the environment variables. The instruction below set the environment variables for Visual Studio only, and not across the system as a whole. Note you only have to do it once.

  1. Unarchive the latest version of boost (1.47.0 as of writing) into a directory of your choice (e.g.C:\boost_1_47_0).
  2. Create a new empty project in Visual Studio.
  3. Open the Property Manager and expand one of the configuration for the platform of your choice.
  4. Select & right click Microsoft.Cpp.<Platform>.user, and select Properties to open the Property Page for edit.
  5. Select VC++ Directories on the left.
  6. Edit the Include Directories section to include the path to your boost source files.
  7. Repeat steps 3 – 6 for different platform of your choice if needed.

If you want to use the part of boost that require building, but none of the features that requires external dependencies, then building it is fairly simple.

  1. Unarchive the latest version of boost (1.47.0 as of writing) into a directory of your choice (e.g.C:\boost_1_47_0).
  2. Start the Visual Studio Command Prompt for the platform of your choice and navigate to where boost is.
  3. Run: bootstrap.bat to build b2.exe (previously named bjam).
  4. Run b2: (Win32) b2 --toolset=msvc-10.0 --build-type=complete stage ; (x64) b2 --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage. Go for a walk / watch a movie or 2 / ….
  5. Go through steps 2 – 6 from the set of instruction above to set the environment variables.
  6. Edit the Library Directories section to include the path to your boost libraries output. (The default for the example and instructions above would be C:\boost_1_47_0\stage\lib. Rename and move the directory first if you want to have x86 & x64 side by side (such as to<BOOST_PATH>\lib\x86 & <BOOST_PATH>\lib\x64).
  7. Repeat steps 2 – 6 for different platform of your choice if needed.
If you want both x64 & win32 side by side, add “–stagedir=lib/win32” and “–stagedir=lib/x64” to the respective builds

31. October 2011

Exchange 2010: Enable RPC over HTTPS: Outlook Anywhere

Johannes Habich, 19:36 Uhr in Allgemeines




In Exchange Management Console select Server Node and  Client Access.


In action pane hit Enable Outlook Anywhere.


Additionally you need to install the Feature RPC over HTTP Proxy of Win200 Server.

30. October 2011

EXCHANGE 2010: An error caused a change in the current set of domain controllers

Johannes Habich, 18:09 Uhr in Allgemeines



After some digging in the profile, I found out the following file, which seemed to be the cause of the problem:

c:\users\<specific user>\appdata\roaming\microsoft\mmc\Exchange Management Console


Rename or delete this file, restart the EX2010 EMC and all errors will be gone.





15. August 2011

Outlook 2010 HTML break blue citation line

Johannes Habich, 10:34 Uhr in Allgemeines

Coming from Outlook 2003 everyone knows that one can break the blue line marking the cited text  by entering a new text or at least with the common reverse indent button. This does no longer work for Outlook 2007 and 2010 as the blue line is now represented in some different way.

You can get around this by Ctrl+Q but  if you check the email at the recipients mailbox, you will see the unbroken blue line again.

If you switch to Rich Text you can actually use Ctrl+Q and it will be that way at the recipients side too.

If you have a real solution to the html problem, please comment!!!!


Please refrain from any unfeasible comments about the sense and non-sense of HTML mails. For that a lot of forums are available online to take that garbage!

12. July 2011

GIT: Compare/Diff working directory against server/repository state

Johannes Habich, 11:53 Uhr in Tools

git fetch –> updates your local rep but not your working Dir
git diff … origin gives you the comparison

11. July 2011

GIT: Ignore File mode/right changes

Johannes Habich, 06:00 Uhr in Tools

If you have files or directories under git control and change the rights of them, git does recognize them as changed.
To force git to ignore these changes just execute the following.

git config core.filemode false

You can reenable that after all files have a new revision because of an actual change and are comitted in the new mode anyway.

28. June 2011

LIKWID: Installation Hint

Johannes Habich, 06:50 Uhr in Tools

If you set the likwid install path in and the last character is a slash, likwid-pin will not run with the following error message:

ERROR: object ‘~/helper/likwid-2.2-inst’ from LD_PRELOAD cannot be preloaded: ignored.

Delete the last slash and do
make clean && make && make install

and likwid-pin should work fine.

27. June 2011

GIT: Clone Repository with different branch than master

Johannes Habich, 07:52 Uhr in Tools

git clone newdir -b yourbranchname

14. June 2011

GIT: Getting information about tags

Johannes Habich, 11:53 Uhr in Tools

To show the tags you made and the comments or tag messages:

git tag -l -n1

18. April 2011

NVIDIA CUDA disable/enable ECC

Johannes Habich, 13:30 Uhr in CUDA

Show ECC config nvidia-smi -r
Enable ECC on GPU 0: nvidia-smi -g 0 -e 1
Disable ECC on GPU 0: nvidia-smi -g 0 -e 0

You need a reboot to get settings active

28. March 2011

GIT: Remote branches

Johannes Habich, 13:23 Uhr in Tools

Show remote branches:
git remote show origin

16. March 2011

GIT: Pushing a new repository to a git server the first time

Johannes Habich, 07:21 Uhr in Tools

You created some local repository and worked on that for a while. Now you want to have it on a server so that others can collaborate.
We want to keep the full history so we want to push the current repository to the server. In order to do this at least for the master branch you have to edit the config file at:
It probably looks like the following:
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true

The easiest way to get everything right is to check out the empty repository from the server via git clone and diff the two config files.
Finally you see that you have to add something like:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url =
[branch "master"]
remote = origin
merge = refs/heads/master

To the existing config.

Now issue a git push origin master and the master will be pushed.
If you know whether that works with branches as well or how to get that working, please drop me a comment!?

There are other ways to just give the repository as a argument at the git push command but I like to keep my old directories.

26. January 2011

GIT: Merging changes of a branch back to master

Johannes Habich, 12:28 Uhr in Tools

You branched out for development and now it is time to get the improvements back to the master branch.
This is achieve by git merge while on the master branch.

To be sure to not mess up anything, I prefer to clone my repository first and do the merge there.
So best is if you commit all changes in master and dev branch. Do a couple of pushs and pulls so everything is in sync and then clone your repository to a new location.
You can directly clone the branch you want to merge then proceed to 2. otherwise do a

  • git checkout branchname
  • git checkout master
  • git merge branchname

You have to resolve any conflicts in any files by removing the spiky brackets in the file and of course take a close look what caused the conflict and fix it.
Then add the file via git add and commit it via git commit .
Do this for every file.

20. January 2011

CVS: Get new directories of the server

Johannes Habich, 10:09 Uhr in Tools

If you want to update your CVS working copy to get new directories from the server, a simple cvs up does not get these directories.
Try cvs up -d

14. January 2011

GIT: Creating a local Repository

Johannes Habich, 12:13 Uhr in Tools

Till now all my posts concerned repositories already created. But how to create your own git rep in the first place?
Simply execute:

mkdir new-rep-dir
cd new-rep-dir
git init-db

and the new-rep-dir is a git repository

Hint by TZ: git init is the alias for git init-db

23. December 2010

GIT: Working on Branches: Sharing files and commits

Johannes Habich, 12:59 Uhr in Tools

You have several development branches but basically use the same files to test or benchmark all versions. Then there is no sense in developing different code in all these branches for the same purpose.
You can easily merge single files from one branch to the other by cherry-pick.

1. First commit a file and only the file you want to share, nothing else:
git commit -m"Newest fancy script which does all tests for all versions"
2. Save the key somewhere.
3. Go to the other branch folder or checkout the other branch in the same folder, as you like.
4. git cherry-pick 123784hash

You should now have the same file in the other branch as well.

Thanks to Markus for pointing me towards this.

22. December 2010

GIT: Tagging

Johannes Habich, 13:01 Uhr in Tools

Tags are nothing else then names for certain revision.
So called annotated tags store the status of the project at a specific point in time for future use.

Create a tag:
git tag -a v1.0 -m"Your comment for version 1.0"

Push tag to repository:
git push --tags

20. December 2010

Windows7 / Vista / Server2008 unidentified network

Johannes Habich, 14:33 Uhr in Windows HPC

Although a network consisting of a switch and 2 computers would be considered as very private, Win7(aso.) will consider it as unidentifiable and will not allow you to set the network to private.
Here’s a howto on solving this issue:

1. Start –> run –> MMC –> press enter

2. In MMC console , from menu file select Add/Remove Snap-in

3. Select Group Policy Object editor –> Press Add –> select Local computer –> press OK –>press OK

4. Open Computer configration –>Windows Settings –>Security Settings –>select Network list manager policies
on the right Side you will see options:
double click –>Unidentified networks

5. Then you can select the option to consider the Unidentified networks as private and if user can change the


17. December 2010

CUDA Windows Development Environment

Johannes Habich, 11:03 Uhr in Allgemeines, CUDA, HPC

Supported by the new NVIDIA Tesla Compute Cluster (TCC) driver we offer now an integrated development environment for CUDA on basis of Windows HPC2008 and Visual Studio.

For nearly 2 years now RRZE provides development resources for CUDA GPGPU computing under the Linux OS. In December 2009 a GPU cluster joined the two development machines in order to support production runs on up to 16 GPUs. Please contact us if you are interested in GPGPU computing, whether for Linux/Windows based development or production runs.

GIT: bookmark collection

Johannes Habich, 11:02 Uhr in Tools

Just some links:

15. December 2010

GIT: Branching

Johannes Habich, 08:08 Uhr in Allgemeines, Tools

To create a branch for some development work in git is really easy.
First clone an existing repository like described here.

In the new directory simple execute: git branch newbranch.
However, if you execute git status you will see that you are still on the master branch or the other branch you worked before (then the question is how did you get there
Execute git checkout newbranch an d git status will show you that you are now working on branch .
In order to push this information to another repository or a git server, git push per se will not do the trick. First you need to execute git push origin newbranch and now your branch is committed to the other repository.

10. December 2010

Windows and CUDA; enabling TCC with nvidia-smi

Johannes Habich, 08:03 Uhr in Allgemeines, CUDA, Windows HPC

Like in Linux you can use nvidia-smi to set different modes on the TESLA GPUs.
nvidia-smi is located usually at: C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe

Go there with a command prompt and administrative privileges and type nvidia-smi -s. This gives you the current status and the status of TCC mode after reboot.
Set exclusive compute mode enabled for the first GPU by nvidia-smi -g 0 -c 1
Set exclusive compute mode disabled for the first GPU by nvidia-smi -g 0 -c 0
For other GPUs increment the number after -g

/edit 24.12.2010:
Also look at the first comment on how to change between WDDM and TCC driver model.
Thanky Francoise for reporting my mistake. I corrected it above

9. December 2010

Win2008 HPC Server and CUDA TCC revisited

Johannes Habich, 14:07 Uhr in CUDA, HPC, Windows HPC

The release of the stable NVIDIA Driver 260.83 broke my Windows CUDA programming environment.
With the currently newst driver, 263.06, I gave it another shoot. Initially the CUDASDK sample programs did not recognize the GPU as CUDA capable and there was just some babbling about DRIVER and TK mismatch.
However this time searching the web got me to an IBM webpage which got a solution for their servers running Windows 2008 R2.
I tried this in Win2008 and it works like charm:

  • Enter the registry edit utility typing regedit in the run dialog and navigate to:


  • You will find subfolders named 0001 0002 aso. depending on the number of GPUs in your system.
  • For each card you want to enable CUDA go to that 000X directory and add the following reg key (32bit dword worked for me):


If you access the system via RDP read my blog entry on Using nvidia-smi for TCC on how to set this up!

Source of this information is IBM and can be found here for further reference and even more details: IBM Support Site

5. November 2010

GIT: Distributed Revision System

Johannes Habich, 07:30 Uhr in Allgemeines, Tools

Distributed Revision Systems have the advantage that a central server is not necessary in contrast to CVS or SVN. Furthermore commits and even more important diffs to other versions can be made  with a local repository only. This is an adanvantage when working offline, e.g. on journeys, on a plane etc. Furthermore a new branch for testing can quickly be made by simply cloning the repository once more and work in the new directory.

To setup up git client on your ubuntu linux just type aptitude install git-core and you’re done.

For windows you need to download 2 packages:

Tortoise GIT

If you install in this order everything should be fine. If Tortoise later on complains about not finding git, you get to Tortoise’ Settings and point the git path to the directory where you installed msysgit +\bin e.g. c:\Program Files\git\bin

Working together on a project can be done like CVS and SVN. But in contrast to these central methods, you do not commit your files to the central repository but first to your local rep.

The central repository is then updated by a so called push.

To get the updates from the central server you do a pull.

Basic tasks are:

  1. Clone the repository to your local workstation: git clone
  2. Add new files: git add xyz
  3. Commit the new files or changes is already added files: git commit xyz
  4. Send changes to server: git push
  5. Get changes from server to rep only: git fetch
  6. Get changes from server to rep and update checked out files: git pull

This is just for starting with git, please consult the manuals and documentation on more advanced topics.
Thanks to Thomas for this information for a quick start.

Another Distributed Revision System is mercurial where you find a small tutorial here: MercurialHG

22. October 2010

[Winhpcug] Einladung: Windows-HPC in Wirtschafts- und Finanzwiss. am 05.11. in Köln

Johannes Habich, 13:14 Uhr in Allgemeines, Windows HPC

Am 05.11.2010 findet in Köln ein eintägiges Treffen (10:00 – 17:00 Uhr) der
Benutzergruppe mit Schwerpunkt auf den Wirtschafts- und Finanzwissenschaften
statt. Dazu kommt die Diskussion neuer Technologien wie dem Windows HPC
Server 2008 R2. Mehr Informationen finden Sie im angehängten Flyer sowie auf
der Webseite , die auch eine Anmeldemöglichkeit bietet.

Anmeldung and die WINHPCUG Mailingliste:

13. October 2010

NVIDIA CUDA TCC Driver Released 260.83

Johannes Habich, 08:03 Uhr in CUDA, HPC, Windows HPC

Just today Nvidia released the WHQL certified Tesla Compute Cluster driver TCC 260.83 for usage in e.g. Windows 2008 Server/HPC.
Till now only a beta version was available
With that special driver you have the ability to use GPGPU compute resources via RDP or via WindowsHPC batch processing mode.

Download the driver here

Actually installing this driver broke my working environment. So be sure to keep a backup of the system. Even reinstalling the beta version did not solve the problem.

21. July 2010

Windows HPC and Ganglia Monitoring

Johannes Habich, 15:32 Uhr in Windows HPC

We had the common problem, that we needed to restart ganglia a lot lately as several nodes did not report their data anymore and furthermore the service never came up in the first place.

We did several tests and it seems that the ganglia clients send a specific packet at startup; only at startup and only once. If this packet is not recieved than the server does not display any data of this client, although the data is actually collected and sent.

Randomly, some nodes cannot get the inital packet through and are not displayed.

Therefore we start the clients with a time displacement and ensure that all clients can report to the server in a fair fashion.

Still the restart issue remains but we could extend the restart period to 6h.

Thanks to my colleague Kosta G. for finding this issue.

Nach oben