The fire (II)

We we walk back to the fire we do it hand by hand. There the things changed: the dancers are gone, the scene still looks like a Goya paint, but a different one. The main group seems to hear a speaker, that stands in the middle, close to the fire. The speaker move his arms in an exaggerated way. It’s a story of some kind, probably a comedy. But I don’t pay attention to him. We stand in the shadows, close to the barrel of sangria. I’m thinking about how I’m going to reach the next level with Marta. And what am I going to do the rest of the camping time, that will be around a week. I know these people don’t respect so much the traditional concept of couples. Despite there are couples, like that one over there, it does not seem to be the rule. Maybe is that it’s too early, or maybe it’s that they are already in their tents. Am I ready to commit, even for a week? What if tomorrow I meet her?

I can also take a radical approach, and let it be. That is, do not think about it. I heard it works, but personally I can barely separate sex and love. Around the fire, another speaker started to gesticulate. Definitely, it’s some kind of play. I look to Marta. As I said, she’s like 10 centimeters smaller than me, but I like that. The difference in size allowed me to peer through her shirt, and get interested. But what does she wants? She seems to be an educated girl, but nowadays, that does mean that she probably understand other’s points of view, nothing else. For me, an education means you are not only able to respect other’s views, but you can also share their thoughts. Of course, you don’t need education for that, but an education helps, since it’s forcing you to get into positions you never heard about before, and learn them. Slowly, I move my hand from her hip to her breast. She caress the hand a little, and then she moves it down, without looking at me.

“Hey, there you are!”  Marta moves out of my grip and goes to pick a shadow, that she brings. She was therefore not attending to the play, but looking for somebody. I was completely cheated. “This is Alicia” she introduces me. They come hand by hand, that is, Alicia seems to occupy the place I was having up to now. Alicia is smaller than Marta, so like 20 cm smaller than me, blonde, pretty and thin. They both match, somehow. Her hair is short cut, and she dresses in some kind of leggings and a lousy blouse. “Nice to meet you” I manage to murmur. And now I’m Je, unless I do something to avoid it. But I do not. I smile and say “Hello Alicia. What brings you here? “

Advertisements

Talking

Marta smiles to me. Her smile is big, and sincere. “You’re back” she says. “Good, I was starting to be bored of waiting.” I dare to answer. “Where’s Je?”. “Forget about Je. ” she whispers slowly, caressing my cheek. I tremble. That was exactly what I wanted to hear. She averts her eyes and continues “He’s after all an adult, he’ll find out his way back. Tell me about your plans. Do you have a tent?”. Suddenly I remember. My backpack is somewhere around. There is my tent and my sleeping bag. It’s pretty dark already, and I don’t want to mount a tent in the night, so I wake up over a nest of something. I tell her about. “Don’t worry my boy. I don’t have a tent also. We can get drunken together, speak about the meaning of life and everything and sleep when sun comes!” I smile. She smiles. We kiss, briefly. I pass my arm around her waist.  She grabs my hand. I look at her, but she’s not here, she looks beyond the clearing. “So where do you want to settle? I don’t want to end up smelling to smoke ” Marta seems to correct herself ” nothing about smoking, I’m a social smoker, but the smell is so sticky… don’t you think so? ” We’re embraced but sitting side by side. She keeps caressing my waist. Anyway, it looks like I may have her body but not her mind. ” Yes ” I say. What else can I say? I’ve been completely captured. “How about going back to the fire?” I venture to propose. “Maybe we can join the games!” “Good idea! ” she exclaims. Then she get rid gently of my climbing hand and pull me out of the sitting position gently. I resist, and moan. “Come on!” She says, and pull again. I stop resisting, and the inertia makes me fall over her. But she resist standing. In her arms, I grab gently her butt. She laughs. “Slowly, cowboy! We have all the night to explore each other! “

The clearing

At one point I’m not anymore able to hold the pee. I simply leave Marta, and hoping she will be still there when I come back, I go into the woods. I hear water close by. We’re supposed to be close to a stream that we can use to clean ourselves, if needed, and to get water for cooking. Carefully, I try in the dark not to fall in the stream, and I hop from stone to stone to the other side of it. I barely read a sign hanging from the closeby bushes: It’s an arrow reading “toilets”. Another person approaches from the opposite direction. “Hi man” he says. I don’t know him, but I don’t think that’s an issue here. “Hi” I reply.

I reach the toilet clearing. It does not stink, as one could think about. Over the rocks, you have a box with toilet paper, and a shovel, I guess to hide your load, once it is released. Without thinking more about it, I go to the closest stone wall, that seems to go up to the very top of the sky, and I empty my bladder. Oh gosh. I’m much better now. Maybe I will even manage to perform reasonably well with Marta, if the opportunity comes, I think. While thinking about it, I get a little pumped down there. I don’t remember last time I was with a girl. I mean, beyond a kiss. I need to improve that as soon as possible.

Once you know the way, to trace my steps back is quite easy. Soon I see the smoker’s clearing, and Marta, alone, magically illuminated by the moon. Je is nowhere around. As happy as an oyster, I go to the barrel of sangria, pick up two empty glasses, fill them up, and go for her.

Leginon installation routine

To cover it all, I think I miss to speak about LeginonLeginon is a system designed for automated collection of images from a transmission electron microscope. Yes, I quote. Now the truth. It’s ideal to collect automatically images from a microscope, and see them in your browser. The entitled user is on the average very happy with the system: you don’t need to sit on a dark place and wait until your grid has been deployed of points of interest. Instead, you check a little what is visible, that is, that your sample is really worthing it, mark a ROI, and start leginon. So far so good.

Unfortunately it comes with some practical issues.

First of all, the leginon server and the leginon clients (the microscope PC and the camera PC) need to be in the same network. They need to see “each other” by name, and that has been proven to be not so easy. Yes, I know, it’s easy to give an IP on the same range. It’s not easy when you don’t control the IP the computer gets, since it’s assigned by a DNS and DHCP beyond your control. And it’s not easy if the computer doesn’t connect with the IP you want whenever you want. Unfortunately, we have all the time these problems where I am.

Second, the leginon software, as a foreign software that takes over the functions of the microscope, is not seen with good eyes by the Customer Support (CS). So be aware that if you “break” something while installing leginon, you may get into troubles. There is no easy solution for this issue, but to be careful. For example, I screwed up the TEM server on the microscope PC by installing leginon. Fortunately, there was a technician around, and he’s a reasonable person, so he helped us out to bring back the system (Windows 2000) to a working state. His comment about was that the new network connection was interfering with the microscope network. And I have no idea about how that can happen, but it happens.

So my advice in this sense: be sure you have a working backup system before you start. Now our procedure. We downloaded all the necessary python packages and put them in a memory stick. The memory stick will be our software source.

1) Copy your repository, software.W32 to Windows local hard drive

2) From that folder, install, in order, accepting defaults
– Python-2.7.3.msi
– wxPython2.8-win23
– MySQL-python-1.2.4b-win32
– PIL-1.1.7.win32
– numpy-1.7.0-win32
– scipy-0.11.0-win32

3) Copy myami-3.2 (or get it from SVN tortoise) to local hard drive. We will install it later

4) Adjust all the necessary host files on Windows and Linux computers
– Linux: vi /etc/hosts, add the IP addresses and hostnames, service network restart
– Windows: Open Notepad as Administrator, Open C:\Windows\System32\drivers\etc\
File name (select all files to the right) hosts

5) Install numextension from software.W32, accepting defaults
– numextension-svn.win32

6) Install myami packages. Open a command prompt on the Windows PC, and do the next:

cd myami-3.2\leginon
c:\Python27\python.exe setup.py install
cd ..\pyami\
c:\Python27\python.exe setup.py install
cd ..\sinedon\
c:\Python27\python.exe setup.py install
cd ..\pyscope\
c:\Python27\python.exe setup.py install
cd ..\imageviewer
c:\Python27\python.exe setup.py install

7) Install comtypes, adjust the default one
– comptypes-0.6.2.win32.exe
cd C:\myami-3.2\pyscope\
copy and replace safearray.py, test that it gives you no error by importing it on a python prompt.
cp C:\myami-3.2\pyscope\safearray.py C:\Python27\Lib\site-packages\comtypes\safearray.py
>> import comtypes

8) Run CheckCom
cd C:\Python27\Lib\site-packages\pyscope\
C:\Python27\python.exe checkcom.py
—> errors in our case, but that doesn’t seem to bother so much.

9) Install DM plugins
—> skipped

10) Check configuration
cd C:\Python27\Lib\site-packages\leginon\
configcheck.py
–> fixed the conflict by copying c.ProgramFiles.myami configuration .cfg files

11) Test that we can access to database
>> import MySQLdb
>> db = MySQLdb.connect(host=”leginon-server”, user=”usr_object”, passwd=”youknowit”)
–> OK (you must get a clean >> prompt)

12) Test launcher.py
–> OK (no serious errors displayed)

13) modify .cfg files

  • sinedon.cfg  copy to C:\Python27\Lib\site-packages\sinedon
  • modify: host: leginon-server, usr_object pwd – youknowit
  • leginon.cfg copy to C:\Python27\Lib\site-packages\leginon
  • modify: nothing for now
  • instruments.cfg copy to C:\Python27\Lib\site-packages\pyscope
  • modify according to camera and scope. For example:
[camera]
class: gatan.Gatan
zplane: 50
height: 4096
width: 4096

[tem]
class: tecnai.Tecnai
cs: 2.0e-3

After that, you should be ready to go. Just to be sure, run start-leginon.py on the command prompt (instead of with the script) and configcheck.py, to know where do you have all the configuration files. I hope this helped!

The fire

When I reach the fire, first thing it reminds me is a Goya paint. A lot of people are sitting right outside the light from the flames, and like ten of them are dancing around the center, between the sitting ones, dressed with colourful and revealing clothes. Boys and girls, in diverse state of nakedness. I don’t know the song, but it looks like a part of a game. “Follow me, then you lead…” or something like this. A little bit out of place, since I don’t know how the whole thing is organized, I take a jar filled with sangria offered by my guide, and sit on the first empty spot. My guide waves me then goodbye, and joins the dancing circle. I smile.

The spectacle is sublime. “Hey, hello!” the girl sitting next to me introduces herself. She’s brunette, and small. Her hair is long, but it’s upswept on the top, in a fancy but wild way, two chopsticks helping it to stay in place. Her face is sharp, her eyes big, her lips and her mouth extremely big. She dresses in black. She’s maybe around 20. “Is it your first time in our camp?” I nod. Then we speak, despite of the noise, ignoring the dancers. She’s from Granada, she studies Medicine, she wants to save the world one day by finding the cure to idiocy. “Seriously!” We laugh. We get closer, I start to touch her around, since she’s touching me since I sat. I peer inside her lousy t-shirt, and I can see most of her breasts. Then he comes and grab her by her arm. “Marta! There you are!” He looks at me, and realizes my face. He has dreadlocks, and tattoos, and no t-shirt, despite of the cold. He introduces himself. “Hello new. I’m Je.” Nice name, I answer.  He smiles. So in addition to beautiful, he’s stupid. But that’s life. Marta stands up and suddenly seems to remember me. “Do you want to join is? ” I nod, but I don’t know what she’s speaking about. So as easy as I get close to her, I’m again an alien. Not everything is lost, thought. She keeps grabbing my hand, while we dodge the dancers and reach another esplanade, where a couple of barrels stands, surrounded by more people, these ones smoking something with aromatic smell. “Fill it up” Marta says, handing me her jar and Je’s jar. I empty mine in a gulp. Je nods, approving it. I fill the three jars, and we take a seat over a trunk, a little apart from the smokers. “Cheers!” says Je. He may be stupid, but it’s frankly friendly. So I forget about his previous interruption and I try to continue it where I left it, that is, approaching Marta.

Compile unblur on CentOS 7

Another one about EM software. Unblur is used to align the frames of movies recorded on an electron microscope to reduce image blurring due to beam-induced motion (quoted from The Grigorieff lab webpage). In principle, one can download the package and use it as is, since it comes with precompiled executables. But we don’t want that, we want to compile it and modify the code. Yes, we’re experimentalist, yuhu! So we get the tarball from the abovementioned web and try as suggested, knowing it will not work 😉

./configure FC=ifort F77=ifort –enable-optimizations –enable-openmp

It does not give us a makefile (that is the desired result) since we don’t have an intel compiler (ifort). The error reads:

configure: error: Fortran 77 compiler cannot create executables

What if we change the compiler? The corresponding command lines are

 ./configure FC=gcc F77=gcc –enable-optimizations –enable-openmp

gives us the same error, but declaring gfortran produces something new.

./configure FC=gfortran F77=gfortran –enable-optimizations 
–enable-openmp

The new error reads:

configure: error: Could not find your installation of 
the GSL CBLAS library

Now what. We need to be sure the GSL CBLAS library. We  do yum install gsl-devel, and after running the configure gfortran line, we get another error:

configure: error: Could not find your installation of 
the jbig library

The library is unknown to me, but after a good old search, I find a repository. Here I show it. I make and make test, ending up on:

git clone https://www.cl.cam.ac.uk/~mgk25/git/jbigkit
The T.85 pbmtools have PASSED the functional tests. Good!
make[1]: Leaving directory `/usr/local/jbigkit/pbmtools'

It is time to try again the configure gfortran line. Note that we added the jbig libraries.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/jbigkit/libjbig/

Unfortunately, a new library is missing.

configure: error: Could not find your installation of 
the TIFF library

I know we have that library (ldconfig -p | grep tiff) but let’s say it’s not the good one. I will get it from somewhere else, and I will specifically tell the “configure gfortran” where it is. After some fiddling, I find one that works. This is now my configure gfortran line:

./configure FC=gfortran F77=gfortran 
--with-fftw-libdir=/usr/local/chimera-1.11/lib/ 
enable-optimizations enable-openmpi

With the above one, we finally get a makefile. The problem is, it doesn’t make. I need to update the compilers to be able to cope with the code syntax.  I do that with the help of yum.

## > yum install centos-release-scl-rh
## > yum install devtoolset-3-gcc 
devtoolset-3-gcc-c++ devtoolset-3-gcc-gfortran
## > scl enable devtoolset-3 bash
## > gcc --version
gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)

Be aware that without enabling the devtoolset, the gcc and gfortran are not the right ones. The next error is an easy one:

external_libs/libtiff/libtiff_helper_functions.c:1:20: 
fatal error: tiffio.h: No such file or directory

Therefore I find the missing file and copy it to external_libs/libtiff/. I need unfortunately to do the same for the files tiff.h, tif_config.h, tiffconf.hAnd finally, I got it. A clean make! Pity that the new executable doesn’t seem to do what is supposed to do. But that’s life, my son. That’s life.

phpMyAdmin upload and fix old database

Yes, because you wanted it, two posts in a day about computing. Previously I told you the tale of the phpMyAdmin server on CentOS 7. Now I will upload the database from the old CentOS 6 into the new CentOS 7, and afterwards, fix it. Tachan! Let’s begin.

On “a” we have a working phpMyAdmin system. We can log in as root, etc. Let’s say even we have a working database, but we want to replace it completely. On “b” we have mounted the old system as /data_temp, as a separated disk. The whole system can be accessed as an extra drive. Logic tells me that we need to stop mysql, backup something like “the mysql” folder, and copy the “old” one in place. Let’s do it

root@a ~ ## > service mysqld stop
               Stopping mysqld: [ OK ]
root@a ~ ## > cd /var/lib/
root@a /var/lib ## > mv mysql/ mysql.original/
root@a /var/lib ## > 
rsync -av root@b:/data_temp/var/lib/mysql/ /var/lib/mysql/

Now we start mysql again.

root@a ~ ## > service mysqld start

And we try to login on phpMyAdmin. Eureka! The old database from”b” is there! What could be the problem? For example, it’s stupid but the database from b had another password, that was not the one we set up in a. Fortunately, I was able to recall it. And we found out that one table was corrupted!

ScopeEMData-broken

Then what? We google a little and find out How to Repair MySQL Database Tables. Basically, you select the table on the upper menu (on the picture, it will be “leginondb”) and from the foldable menu at the bottom of the page, we select “Repair table”. There are solutions via the command line also, but since this one works like a charm, I decide not to try the others. The result, after the reparation, looks like this: ScopeEMData-repaired

At last but not at least, I want to clean the logs. Since we’ve been using the old database for a year without really taking care of it,  a lot of binary logs are there. The question is, is it safe to delete mysql-bin files ? We’ll never know until we try it. This I do via command line, as indicated here.

root@a ~ ## > mysql -u root -p
Enter password: 
Welcome to the MySQL monitor. Commands end with ; or \g.
...bla bla bla..

mysql> RESET MASTER;
Query OK, 0 rows affected (1.85 sec)

mysql> exit
Bye

I check and not only they are gone, but the system seems to run much more smoothly. Yes I know. Enough database management for a day. Have a nice day!