Ho ho ho

I wake up and I look to my desk in the darkness. There’s definitely something moving over there. My cat? It can’t be my cat, I don’t have one as far as I remember. A rat? One of the outside squirrels that somehow managed to enter? A bat? Slowly, very slowly so that it doesn’t run away, whatever it is, I move my hand to the light switch and switch it on, while I jump out of bed.

– What? – a manly deep voice shouts at me. His tone is of annoyance, not of surprise. – Oh, it’s you. Sorry I woke you up. – I look to my desk. Over it, a Santa Claus the size of an average garden gnome is trying to drink the remnants of my whiskey out of the big  crystal glass that I served myself yesterday. I left the half when I achieved at around midnight the desired effect, that is, to forget about my shitty job. Wait. Am I still dreaming? – No you’re not. – Santa says. Are you sure? – The small Santa looks me in the eyes to say: – Yes I am. And before you ask about it, yes I do read your mind. I got the power so I can quickly find out if you’re lying or not – He seems to laugh to himself about an internal joke – not that it’s a reliable power, but it’s a good one most of the time.

– So what are you doing in my humble property? – Small Santa empties my glass and looks with lovely eyes to the bottle I left a little bit beyond his reach. Yes, you can take it if you need it, I think, not intentionally proving his powers but deep in my heart. He leaves the glass and start to move slowly in the direction on the bottle. First things first, I say to myself. Even if he’s not real, the sense of hospitality must be kept.

-Well, you know, I have these reindeers, Donner, Blitzen, Vixen, Cupid and so on. You remember them, right? – I try to remember the names but I can’t manage. Probably it’s not important. – Not for you, but it is for me! So you know, there are some open issues between Cupid and Dasher. This is not of public domain, but before they entered under my command there was that beautiful reindeer that they both wanted to cover…- At this point Small Santa managed to pour himself another generous whiskey. – You know how these things are. I’m sure you know, don’t lie to me. Humans are not so different to reindeers, some of them can really get crazy around a carrot. Yes, yes, lame joke. The thing is, as for your car, I do tests rides before the big day. Yeah… this is not our real size, it’s that we can compress or expand my body – suddenly he becomes blurry, like defocused, then he focuses again – depending on the needs. How the hell do you expect me then to go through the chimney? – It makes totally sense. There’s the problem of making the presents less dense or smaller, but I think you could explain that one with magic. – But let’s focus. The thing is, I was on my test ride, invisible and so on, when we cross that reindeer…. and guess what? Cupid and Dasher decide to start over the old fight in the middle of the ride! Since I respect and do not interfere on the sexual life of all the creatures, I’m forced to hop off.  Do you know how long is lasting the sexual intercourse of reindeers? – I show my ignorance about the subject on my face the best way I can. – What do you do when two of your friends decide to go for a girl, and you’re in the middle? Exactly! And I was lucky, you were really close and friendly! – I guess I could define myself in that way. Friendly. So Santa does know me. Interesting. At this moment, I decide to accept the situation and go for a second glass. Do we have ice? -Yes thanks, I want also if you can bring me…- I go to the fridge, take four cubes, come back to my desk and add two cubes to small Santa’s glass. Then I take the bottle an add two fingers to my glass.

-Cheers.- Small Santa scratches his butt, and with a geometrical effort takes the glass (that is half his size) to cling it with mine. We smile. A sudden feeling of happiness invades me. A sudden and meaningless, reasonless feeling.

-Cheers! You rock, man! -I got the joke. A very bad one also. But we laugh together, as old friends do. – Do you have some snacks by any chance? I’m starving!

Advertisements
Posted in dragons, fantasy, new dreams, unpublished | Leave a comment

I don’t like it

I know that it’s a lame excuse, but I got a new laptop, and when I type the keyboard does this “tip tap tip tap tap ” that may remembers you to a typewriter but it’s not a typewriter. I wonder if it’s an intended effect, artificially created to satisfy the growing tribe of hipsters across the world, or a mechanical side effect. One thing is true: I’m able to write just fine on my old laptop, but not on my new one. Is it a matter of discipline, or only of feeling? Let’s say you land right now somewhere in the middle of the MOON and the only thing you have to write about your experience is an old typewriter. I feel like that, like the man on the moon. But I have a choice: I can write on my old laptop, only that it’s at my working place, so I tend to write about work.

Yes I’m not the writer I could be.

Posted in dragons, new dreams | Leave a comment

Windows XP ignoring the hosts file

A little bit of context is needed. We have a subnet with 3 computers that need to connect to each other. It’s a Windows XP, a Windows 7 and a Centos 6. We can’t get rid of the OS, since they are controlling devices. We need to be able to ping by name, and unfortunately, we can’t hook them up with a DNS server.

We are doing this to be able to run leginon on the subnet. The installation guide is telling us how to add the hosts so that each member is able to see each other. Unfortunately, on the Windows XP, no matter what we write on the host file, we can’t ping the others by name. If you google the problem, a lot of nice information is coming back. We tried what is explained on this thread on serverfault without success. First we check the that the Registry Key is pointing to the right entry. We open regedit, and look for:

The key that is on

\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\Tcpip\Parameters\DataBasePath

is indeed:

%SystemRoot%\System32\drivers\etc

So I assume is not the key. To rule out permission problems, we cut the host file out and paste it on the desktop, we create a new one and fill it up, without luck. Also the right click path (Properties->Security) is looking OK. All the users are having all the relevant permissions. We then change the proxy settings by going to Internet Explorer -> Internet Options -> Connections -> LAN settings. Also it look like is suggested. Just in case, we check the network configuration, but still no ping. We can’t flush the DNS cache (on a cmd window, ifconfig /flusdns), since we don’t have a DNS on the subnet. What is it?

I found the answer here. I go to Start–>Control Panel–>Administrative Tools–>Component Services–>Services(Local).

It looks like this, depending on your XP tuning:servicesdialog

I search for the service called DNS Cache (not in the picture) and disable by clicking on it. Then I come back to my host file, test the ping by name and voila! It works! Finally I can ping from the Windows XP. Why the DNS cache was configured like that, I will never know. Why I didn’t think about it in the first place, I can explain, if asked. Anyway, thanks google, for being there when I need you 😀

Posted in bits, windows, hardware, leginon, EM | Leave a comment

A cisTEM module on CentOS 7

cistem

cisTEM is user-friendly software to process cryo-EM images of macromolecular complexes and obtain high-resolution 3D reconstructions from them. And you will find it here. I will not discuss about why you want to have it on your system instead of any other tool. The installation is very easy, if you choose the precompiled version as recommended on the documentation. Just unzip and run. I like it!

So my module looks like:

#%Module1.0#############################################
## modules cisTEM
##
## modulefiles/cisTEM module
##
proc ModulesHelp { } {
        global version modroot
        puts stderr "cisTEM  - sets the Environment
for using  cisTEM "
}

module-whatis   "Sets the environment for using cisTEM "

# for Tcl script use only
set     topdir           /usr/local/cistem-1.0.0-beta/
set     version         1.0
set     sys                linux86

setenv CISTEM_V "1"

prepend-path    PATH            $topdir
prepend-path    LD_LIBRARY_PATH   /usr/lib:/usr/lib64/:

I save it and test it as a user: module load blablabla, a window pops up, so everything looks fine to send it to the test users. This time to make a difference I had quite a quick feedback. There are programs doing the same image refinements over GPUS. Well, it looks like with this code, that rely on CPUs again, the refinements are done in a shorter time: in around 30% less time. That is impressive, and if you ask me, it has not an easy explanation without a careful benchmark. How many CPUs per GPU core you need to emulate the processing time? We’ll never know…or will we?

About usage, we fought a little to apply the suggested cluster settings and we end up launching 80 jobs if the processing requires 80 threads, but it’s nothing that cannot be sorted out or ignore if the software delivers what it’s promising. And it looks like it is. Now I wonder, what shall we do with the other GPUs that we have on different machines? But that’s science, I guess. The winner is that one who has it all, brain, resources and mood.

Posted in bits, centos, slurm, linux, nvidia, GPU, software | Leave a comment

ipFire install

ipfire_tux_512x512NOTE: this project was not used at the end, and information here is written only as a reference.

We need to have control over a specific set of computers. Basically, what we need is control over a subnet that, despite of being isolated, it should be able to mount the network drives of the “big” net. On the “big” net we have the storage, the internet connection, and so on.

To realize that, it was suggested to me to install the Linux distribution ipfire. So here we go. First we get the computer with, at least, 2 network cards, one for the subnet (we will call it emnet) and one for big net (called bignet from now on). We will call the computer in a burst of originality ipfire. Ipfire is connected to the  bignet that is giving internet access, also. But on the emnet, we don’t need to have internet. Actually, it’s even better if we don’t have.

We have two configuration options for our problem. Option 1 is to have ipfire visible from the bignet. We will have access to the emnet only from the ipfire machine, via ssh. Option 2 is to have it visible from the emnet only. That is, if you want, not very useful. We choose option 1, with GREEN connected to bignet and RED connected to emnet. The installation is pretty smooth,  with old style, BIOS-like menus. We fill up admin and root password and do not enable DHCP, since we have one working on the bignet. When asked, we fill up our bignet DNS servers. After finishing with the installation, we can check out that we can see the ipfire web interface. Easy as a pie! Also, if we log in on the ipfire machine, we can ping and ssh the emnet clients. As expected, from an emnet client we can’t yet see other machines but only ipfire. Now it’s time to setup the firewall options.

At this point, after some discussion with the IT department, we abandon the solution to go for a local server setup. That will be a far easier solution, but not as elegant as the one with ipfire. The reason is, the complexity of the subnet arrangement we get with ipfire is not needed. So to say, we’re killing a fly with a canyon 😀

Posted in bits, EM, fragments, ipfire, linux, software | Leave a comment

Cent OS 7 fix yum against another client

The problem: I did some experiments on one of my clients, resulting on a client that is having a different package list than the other. I will call that client B. Let’s call the ‘healthy’ client A. When you make yum update, B is not able to get the latest kernel, since it is already quite altered. The goal is to make B to reach A without cloning the system or things like that. I managed in several steps.

rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum clean all
  • Create package list on A, copy it to B, install them on B
on A: rpm -qa > installed-software.log
on B: yum -y install $(cat installed-software.log)
  • Copy relevant configuration files from A to B.
on B: rsync -av A:/etc/pki* /etc/pki* --progress --delete-after
on B: rsync -av A:/etc/yum* /etc/yum* --progress --delete-after
on B: yum clean all; yum update
  • Regenerate grub so that it gets the new kernel.
on B: yum install grub2
on B: grub2-mkconfig --output=/boot/grub2/grub.cfg

The package information (pki) is the key here to have the same on A and B. I hope you don’t need to do this frequently, it’s really a waste of time. Be careful when you mess around, maybe it’s better to do it on a container or something like that!

Posted in bits, centos, containers, linux, yum | Leave a comment

A docker Hello World on Cent OS 7

Previously I gave you my recipe for containers on Cent OS 7. Now we are going to enable dockers and play a little with them. I’m following a version of this guide to dockers on Cent OS 7. Actually it’s pretty easy: first we install them.

yum install docker docker-ce docker-ce-edge docker-ce-test

This command on my machine able to run lxc already, is installing docker.x86_64 plus 15 dependencies. It could be some packages are also updated, so be aware. Then we start the daemon and call the hello-world container. This is my output.

root@machine ~ ## > systemctl start docker
root@machine ~ ## > docker run hello-world
Unable to find image 'hello-world:latest' locally
Trying to pull repository docker.io/library/hello-world ... 
latest: Pulling from docker.io/library/hello-world
ca4f61b1923c: Pull complete 
Digest: sha256:be0cd392e45be7997ec7f98e23905c

Hello from Docker!
This message shows that your installation 
appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" 
image from the Docker Hub. (amd64)
 3. The Docker daemon created a new container 
from that image which runs the
executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to 
the Docker client, which sent it to your terminal.

To try something more ambitious, you can run an Ubuntu container 
with:
 $ docker run -it ubuntu bash

If you do as suggested above,  a docker ubuntu container is pulled. It looks like this:

root@machine ~ ## > docker run -it ubuntu bash
Unable to find image 'ubuntu:latest' locally
Trying to pull repository docker.io/library/ubuntu ... 
latest: Pulling from docker.io/library/ubuntu
660c48dd555d: Pull complete 
4c7380416e78: Pull complete 
421e436b5f80: Pull complete 
e4ce6c3651b3: Pull complete 
be588e74bd34: Pull complete 
Digest: sha256:7c67a2206d3c0
root@b5e65d5f8ae0:/# ls

There are a lot of open questions to be answered. I will see what I can do with them.

EDIT: I run a Quantum State Diffusion docker on my test machine easily by typing this:

docker run  quantum_state_diffusion/Dockerfile  # just run it
docker run -it --entrypoint=/bin/bash tabakg/quantum_state_diffusion 
#get a shell on it

Now it’s time to write my own docker.

Posted in bits, centos, containers, docker, hardware, linux, programming | Leave a comment