Software modules on CentOS 7

Here’s how I did it.

yum install environment-modules -y

On my CentOS 7, this is what I get when I check the package information:

root@beta ~ ## > rpm -qi environment-modules
Name : environment-modules
Version : 3.2.10
Release : 10.el7
Architecture: x86_64
Install Date: Wed 28 Sep 2016 05:08:40 PM CEST
Group : System Environment/Base
Size : 220124
License : GPLv2+
Signature : RSA/SHA256, Wed 25 Nov 2015 03:27:36 PM CET, 
Key ID 24c6a8a7f4a80eb5
Source RPM : environment-modules-3.2.10-10.el7.src.rpm
Build Date : Fri 20 Nov 2015 06:44:07 AM CET
Build Host :
Relocations : (not relocatable)
Packager : CentOS BuildSystem <>
Vendor : CentOS
Summary : Provides dynamic modification of a user's environment
Description :
The Environment Modules package provides 
for the dynamic modification of
a user's environment via modulefiles.

Each modulefile contains the information needed to configure 
the shell for an application. Once the Modules package is 
initialized, the environment can be modified on a per-module 
basis using the module command which interprets modulefiles. 
Typically modulefiles instruct the module command to alter 
or set shell environment variables such as PATH, MANPATH, etc. 
modulefiles may be shared by many users on a system
and users may have their own collection to supplement or 
replace the shared modulefiles.

Modules can be loaded and unloaded dynamically and atomically, 
in an clean fashion. All popular shells are supported, 
including bash, ksh, zsh, sh, csh, tcsh, as well as 
some scripting languages such as perl.

Modules are useful in managing different versions of applications.
Modules can also be bundled into metamodules that will load 
an entire suite of different applications.

NOTE: You will need to get a new shell after installing 
this package to have access to the module alias.

I made a first module as described on the Admin Magazine. Our gcc version is 4.8.5, so I customize the module file for this one.  In my case we “cd” to the default module folders, make a specific folder for the specific type of program, and copy the template

root@beta  ## > cd /usr/share/Modules/modulefiles
root@beta ## > mkdir compilers
root@beta ## > cp modules compilers/gcc-4.8.5

Then we edit the module info (compilers/gcc-4.8.5). The modified version looks like this:

## modules compilers/gcc-4.8.5
## modulefiles/compilers/gcc-4.8.5. Sample gcc module
proc ModulesHelp { } {
 global version modroot

puts stderr "compilers/gcc-4.8.5 - sets the Environment for 
      GCC 4.8.5 "

module-whatis "Sets the environment for using 
    gcc-4.8.5 (C, Fortran)"

# for Tcl script use only
set topdir /usr/bin/gcc
set version 4.8.5
set sys linux86

setenv CC $topdir/bin/gcc
setenv GCC $topdir/bin/gcc
setenv FC $topdir/bin/gfortran
setenv F77 $topdir/bin/gfortran
setenv F90 $topdir/bin/gfortran
prepend-path PATH $topdir/include
prepend-path PATH $topdir/bin
prepend-path MANPATH $topdir/man
prepend-path LD_LIBRARY_PATH $topdir/lib

Will that be enough? To test it, I log in as a user on the machine and try to load the module:

yo@beta ~ $ > module avail

------------------/usr/share/Modules/modulefiles --------------
compilers/gcc-4.8.5 dot module-git module-info modules null use.own
yo@beta ~ $ > module help compilers/gcc-4.8.5

----------- Module Specific Help for 'compilers/gcc-4.8.5' --------

compilers/gcc-4.8.5 - sets the Environment for GCC 4.8.5 
yo@beta ~ $ > module whatis compilers/gcc-4.8.5 
compilers/gcc-4.8.5 : Sets the environment 
       for using gcc-4.8.5 (C, Fortran)
yo@beta ~ $ > module load compilers/gcc-4.8.5
yo@beta ~ $ > module list
Currently Loaded Modulefiles:
 1) compilers/gcc-4.8.5

So yes, it’s enough. I start creating happily modules and I find out that the most crucial part (as expected) seems to be where is the software compiled, the architecture, and the libraries needed.

If you don’t have clear still what to do with modules or how to handle them, you can check the Confluence page (pay attention to the table of commands on Basic Module Usage) the the FAQ of Sourceforge, the Linux Software Modules page of Illinois University, The Viriginia Tech page or the Michigan University page. Even Wikipedia has a link about it. Or you can google it yourself 🙂

To install it in our SLURM cluster, since we had previously a collection of programs in /usr/local, we only need to rsync the corresponding folder

rsync -av /usr/share/Modules/modulefiles/ 

After that, unfortunately, if you lauch a job that calls module load SLURM gives this error

/usr/bin/modulecmd: No such file or directory

But the error has a very easy workaround as found on the confluence wiki




#!/bin/bash -login

The error, as explained, is due to the use of the bash shell, instead of the SLURM shell.



ABRT, the automatic bug report tool

One day I log in as root into one of my new CentOS 7 machines and, together with the login information (authenticity message or similar) it tells me

ABRT has detected 1 problem(s). 
For more info run: abrt-cli list --since 1475056165

Usually I ignore these messages, and wait to see what happens. So I do my stuff and log out. Everything looks fine. Then I log in back, and the message reappears. What’s ABRT? How can I delete these messages? I’m not the only root in town, and I want to avoid being blamed for being irresponsible.  It’s not, of course, that I want to delete the problems I’m causing. Or I think it’s not that.

I found the answer to my question on the Red Hat Customer Portal. It tells me what it is, and how to handle it. I choose the easy solution: to call from my command prompt the gnome-abrt. The nice GUI tells me that the error I have was related with a python installation that I copied from another machine. So I delete it 🙂 . End of my worries. For the record, the ABRT GUI looks like this:


Have a nice day!

PI2 wifi with WPA2 enterprise

I don’t have this one clear. So I may modify the post later, please pass by if it doesn’t work in your case.

The idea is to place on the doors a PI2, connected to a touchscreen,  with the official case, default raspbian, and so on, just to show a PHP booking calendar. Firs stone I found is how to connect the little guy with our WiFi, using WPA & WPA Enterprise.

Of course you can google what to do. But there are a lot of PI’s out there, therefore you have a lot of solutions. Recently, it was even announced the number of pi’s sold  reached ten million. But in principle it is nothing compared with the billion of iPhones or the one point four billions of android devices. So let’s say it’s still a device for freaks.

I connected the touchscreen to my pi2, enclosed it on my case, and power it on. First thing you need to deal with is the absence of a keyboard. Fine with that, since it will be basically a display. I plug my spare one and go ahead. I can open a terminal. The default user is pi@raspberrypi. I change the password by typing passwd. For comfortableness I go to sudo, by typing sudo su. I update it, by releasing an apt-get update, change its name, and reboot.

Then I try to connect to our wifi. Our wifi “guest” is connecting, no problem, but we need to have it in our intranet, to access to the internal calendar. So I try the wifi “intern”. Surprise! How to authenticate the user? The default network manager does not have so many options! Since I like the command line, I try first to modify the WPA supplicant configuration as described on the given link. That seems unfortunately NOT enough, and after a couple of reboots, I still don’t connect to “intern”. My wpa_supplicant.conf looks like this:

network {
         pairwise=CCMP TKIP
         group=CCMP TKIP
         eap =TLS

Another link about the subject is confirming the configuration. So why it doesn’t work?  Wait a minute. Isn’t a computer? So let’s try what I do with the computers! I get the standard network manager. As root, I install all the network tools I think I may need :

# type this if you want to update from jessie to pixel
apt-get dist-upgrade
# type this if you dont want to go to pixel
# apt-get update 
apt-get install network-manager

During the network manager installation, you get this important message:

The following network interfaces were found in /etc/network/interfaces
which means they are currently configured by ifupdown:
- eth0
- wlan0
- wlan1
If you want to manage those interfaces with NetworkManager instead
remove their configuration from /etc/network/interfaces.

Then we install the GUI by typing apt-get install network-manager-gnome

… and via cable, I ssh to the pi2 from my desktop. Fine for now on, but when I go root, I can’t open the display. The error reads:

su -
X11 connection rejected because of wrong authentication.

I did what suggested on stack exchange. But it was not enough.

The solution was to edit /etc/ssh/sshd_config like this

PermitRootLogin yes
systemctl restart ssh.service

Now I can open the nm-connection-editor and do as usual. In my case, I fill something with these parameters:

Section Wifi:
SSID: intern
Mode: Infrastructure
MTU: automatic

Section Wifi-Security
Security: WPA & WPA2 Enterprise
Authentication: Protected EAP (PEAP)
CA certificate: No CA certificate is required
PEAP version: Automatic
Inner authentication : MSCHAPv2
Username: "DOMAIN\username"
Password: ****

I think the rest of the parameters you can tune yourself. I check that the connection works, obviously, by unplugging the cable. Then I reboot. Unfortunately, even marking the option “connect to the network when available”, something is not allowing my pi2 to connect automatically. Solution? To manually activate the connection using the wicd widget.

apt-get install wicd

Then I need to be sure the screen stays up. To do so, I disable sleep screen. Next thing is to run firefox at startup, full screen.

More tuning as soon as I tune it up 🙂

13-09-2017 EDIT: After an apt-get upgrade to jessie. Since I have a 7″ touch display, it was useful also to increase the screen resolution to change the scale and being able to see some buttons missing. Solution found on the raspberripi forum, “nano” the /boot/config.txt file

  sudo nano /boot/config.txt

Add at the end.


Save, close and reboot. This sets up a scaled screen resolution. Now I can use directly the nm-connection-editor, fill the details as above and skip the wicd install.


The place behind the door was definitely less glamorous than what I remembered. It had a charm, starting with the name, but now that charm was looking cheap and wasted for me. I stopped coming here when I crossed the bridge, that is, after I started the second half of my criminology studies. That was half an age ago! Maybe it was the drugs. As a researcher, I wanted to try myself everything. I remember a specific sticker, but not the name of it. Was it Superman? or  Smiley? The point is, I liked that one because under its effects everything was becoming shiny and shifted, as in an old 3D movie. And a lot of memories of my first years at the Academy were looking like that now, like an old movie.

This time, it will be a beer. I crossed the half-empty dance hall, where people were moving in an apparent random way, some of them with glasses, some of them following the soft and surrounding techno music. Some holograms were also on display. They danced. On the average, the clients looked like of my age, more or less. No oldies.

The barman was a pioneer. I looked at his grey skin, and his dark eyes. He looked at me (I think) and told me something I didn’t fully hear. I asked for a beer. He obviously understood, because he turned his head, immediately, and started to do something.  You don’t have a lot of opportunities to speak with a pioneer, and I was wondering if I should start a small talk with him. He put the beer in front of me. I put my fingers over the counter and paid. He looked at my hand and started to turn.

– Hey man. – I said. He faced me again, but didn’t say anything. Suddenly I realized I had no idea if he was able to understand my language. So I went to the point. – Do you know how to reach the Golden Rabbit?

The door

I was amazed by the view. How could it be that I was alone looking at the sea of lights under my feet? The view was much more impressive than the echelon. The buildings, as mushrooms, were growing attached to the pillars, some of them connected through hanging paths, hundreds of meters long. Deep down there, a disk far away was shining. Probably the Pioneers square. I looked for more landmarks. The green dome to the right of the Pioneers square needs to be the farm of the Low Lands. And the blue one? Probably the aquarium.

I was tempted to ask my glasses over the current population of this chamber. But I changed my mind. I don’t think we are the ones who should care about those numbers. Besides, thinking about so many people in such a close space was producing me claustrophobia. So I headed downstairs.

Fifteen minutes later I was on the ground. The blue arrows were still pointing ahead of me. Around me, the view was not anymore so impressive. The street I was following was more a service path than a promenade. The buildings were oddly illuminated, as partially occupied only. I walked when another half klik. An odd odour reached my nose, as if the air I was currently breathing was recycled twice. Maybe it was. There was no wind in the area.

I reached the end of the nameless street, turned to my left, following the blue arrows, and I found the door.

GPU fever (II)

The problem with the DELL server not recognizing the PCIe GPUs happened not to be obvious. I fought for a week with the PSU, bios configuration, ILO flashing, firmware update, cables, different cards, etc, without success. Finally, a technician came, and, actually, my boss didn’t let him leave until our cards were seen. Here you have a look to one of our servers (a different one) with 2 shiny cards. Everybody is very happy. What’s next? More GPUs, of course. And an specific SLURM partition dedicated for GPU computing.

The list

When it arrived, the list was quite short. 5 names. All girls. My sensei was obviously knowing me more than myself. To be a member of the Corps is said to be a dangerous, ungrateful and short-living job, it’s nice to have some incentive. I was wondering, anyway, if I should ask him if he took for himself the assignment of questioning her, or if she was not even considered as a possible witness.

Around me, lights were being diminished, so I decided to come back to my cubicle and think about it in the morning. About where to begin, I will, of course, start by searching their profiles on the net, using my brand-new all-access Corp network ID.