Monday, November 27, 2023

Install AMD ROCm on Debian Bookworm (stable)

 So far, AMD does not yet officially support Debian in ROCm. Only RHEL, SLES and Ubuntu are supported in ROCM 5.7.1. On the Debian side there is a team working on providing support in the next release.

 However, one can install ROCm on Debian Bookworm using the amdgpu-install tool for Ubuntu.

 

wget https://repo.radeon.com/amdgpu-install/5.7.1/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb
sudo apt install ./amdgpu-install_5.7.50701-1_all.deb

 Then one can install rocm step-by-step. 

Kernel Driver

First install the amdgpu kernel dkms:

sudo amdgpu-install --usecase=dkms

 If a custom kernel is used, this will not directly work, because only kernel up to 6.2 are suupported. Otherwise exclude the custom kernels with:

BUILD_EXCLUSIVE_KERNEL="^(6\.[0-2]\..*|5\..*)"

in /etc/dkms/amdgpu.conf

 

ROCm

 ROCm only supports Python 3.10, unfortunately this is no longer available in Debian Bookworm. However python3.10 can be installed from Debian Sid.

Then install ROCm

sudo amdgpu-install --usecase=rocm

 Check the install with:

rocminfo

 

Also add your user to these groups:

sudo usermod -a -G render,video $LOGNAME

 

 

Tuesday, April 30, 2019

conda list outdated packages

How to get a list of outdated/upgradeable/updatable packages in anaconda? The analogue of
pip list --outdated
ask conda to update all packages with the dry run flag (-d)
conda update --all -d
you get a large output like this:
Collecting package metadata: done
Solving environment: done

## Package Plan ##

  environment location: /media/nairboon/shared/software/anaconda3


The following packages will be downloaded:

    package              |            build
    ---------------------------|-----------------
    anaconda-navigator-1.9.7   |           py37_0         4.8 MB
    astroid-2.2.5                        |           py37_0         275 KB
    atomicwrites-1.3.0              |           py37_1          13 KB
....

   zict-0.1.4                              |           py37_0          20 KB
    zipp-0.3.3                            |           py37_1           9 KB
    ------------------------------------------------------------
                                           Total:       456.1 MB

The following NEW packages will be INSTALLED:

  pyrsistent         pkgs/main/linux-64::pyrsistent-0.14.11-py37h7b6447c_0
  soupsieve          pkgs/main/linux-64::soupsieve-1.8-py37_0
 ....
  sphinxcontrib-ser~ pkgs/main/noarch::sphinxcontrib-serializinghtml-1.1.3-py_0
  zipp               pkgs/main/linux-64::zipp-0.3.3-py37_1

The following packages will be UPDATED:

  anaconda-navigator                           1.9.6-py37_0 --> 1.9.7-py37_0
  astroid                                      2.1.0-py37_0 --> 2.2.5-py37_0
  atomicwrites                                 1.2.1-py37_0 --> 1.3.0-py37_1
  attrs                               18.2.0-py37h28b3542_0 --> 19.1.0-py37_1
  beautifulsoup4                               4.6.3-py37_0 --> 4.7.1-py37_1
  bitarray                             0.8.3-py37h14c3975_0 --> 0.9.0-py37h7b6447c_0
  bleach                                       3.0.2-py37_0 --> 3.1.0-py37_0
  blosc                                   1.14.4-hdbcaa40_0 --> 1.15.0-hd408876_0
  bokeh                                        1.0.2-py37_0 --> 1.1.0-py37_0


....
but at the last segment you'll find the list of packages that will be updated

Monday, January 28, 2019

"TypeError: Document not active" or "TypeError: The expression cannot be converted to return the specified type." Javascript Fullscreen API Error Messages:


Error message 

 

In a recent Firefox (64.0) you'll see this error:

TypeError: The expression cannot be converted to return the specified type.

in Chrome (71.0.x):

TypeError: Document not active

Cause

 

A rather meaningless and unhelpful error message occurs when one tries to exit fullscreen via javascript if the document isn't actually in fullscreen mode.


Solution


The solution is to check whether we are currently in fullscreen mode.


Snippet



Run it in jsfiddle, for testing the fullscreen mode.

See also

 

https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullScreen
https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/fullscreenElement

Friday, November 15, 2013

Possible effect on science of the unconditional basic income

The idea of a unconditional basic income is gaining a lot of traction lately, which means more and more people are getting exposed to this idea.
However one of the main counterargument still remains, that people will just become lazy bums.
Yet my position is that I firmly believe that each and everyone has a passion and given a basic income they will indeed shift their work focus from their normal job to whatever they're passionate about. I think this sounds fairly reasonable, but we don't really know how will this affect society as a whole.
Nevertheless I will try to assess the effect on science, a part of society.

In Switzerland (there will be a vote on the basic income) a lot of research is funded by the Swiss National Science Foundation. So what will happen to all researcher and PhD candidates once there is a basic income?
They will most likely just do what they did all the time: research. Why? Because they are very dedicated about their research.
To become a researcher in Switzerland you spend at least 18 years of your life at school studying. You're not just going to stop researching.

The more interesting question is whether the research output will increase. To answer this we need to look a bit into research funding.
The SNF pays an annual salary of 47-50'000 CHF for doctoral candidates. With the basic income, these researchers would get 30'000 CHF (12*2'500) year. This means that the SNF only has to pay about 20'000 CHF/y per PhD candidate. In other words with the budget of today and the basic income they can fund twice as many researcher! Actually they will probably not hire that many new researchers because this is just the salary and there are other costs (lab, conferences, etc.) involved in funding a project.

Of course this does not mean a doubling of research output, but there will be less pressure & less grant application writing for researchers therefore more time for research, generally a better working environment and more funding for commercial unattractive research proposals.
Thus I think it's safe to say that with a basic income, research & science will advance greatly.

Friday, September 27, 2013

Why the Zeitgeist Movement stopped growing

The Zeitgeist movement is promoting a resource based economy mainly through activism. This has worked out well in the early days, when it spread almost instantly around the globe. But now this growth has stalled. One reason could be that it has reached some sort of saturation point in the market of activists.

This implies that the movement, despite its dedication, is not winning the public over at all. It sounds absurd, but according to a study, this is exactly happening.

According to this article: The Paradox of Activism,which summarizes the study, activists alienate the people whose support they hope to win, due to negative stereotype associated with the activists.

 In other words, until activists can change their stereotype, activism may do more harm than good. So how can we change that stereotype? By showing that activists don't act as the stereotype requires.

One way would be to build up an alternative society not just talk about building it, no matter how tremendous this task is. The day an united group starts building a new society, it no longer preaches, but lives what it's preaching.

Monday, July 22, 2013

Idea: Nutrition management tool

Pleas read the Idea intro.
Have you ever wondered how healthy your diet is and how to improve it easily? This is a proposal for a software that would do exactly that, with a bit black magic in the background.

What would the user do


User Joe would track (whenever he does not forget) what he eats. The software would try to model his average nutrition intake, through heuristics and a database of nutrition facts. He would also have to decide diet recommendation he'd like to follow. i.e vegetarian, vegan, low-carb, no gluten etc. and which micro-nutrition, vitamins & supplements recommendation he trusts. (We can use data from this project to design recommendations)

What would the user get


The software would create, according to the users preferences, a list of supplements and ingredients the user is supposed to eat to reach his targeted nutrition needs.

The black magic


The used magic is tracking down all possible inter-ingredients relationships. In other words: the effect a ingredient has upon other ingredients, i.e your body does not absorb iron very well in absence of vitamin c. By using these relationships of ingredients it would be possible to create a menu plan that maximizes nutrition absorption with the smallest possible amount of food. Thus increasing the efficiency of eating.