Nov
09

Fedora 14

Fedora 14 is out! Get Fedora

The repisotory for fedora 14 is open. I just put the following packages:

  • 2010-11-09: objcryst-fox-1.9.0.2-1.R1269.fc14
  • 2010-11-09: objcryst-fox-debuginfo-1.9.0.2-1.R1269.fc14
  • 2010-11-09: debroglie-release-14-1.fc14
  • 2010-11-09: newmat-11-2.fc14
  • 2010-11-09: newmat-debuginfo-11-2.fc14
  • 2010-11-09: newmat-devel-11-2.fc14
  • 2010-11-09: flipsmall-20090610-2.fc14
  • 2010-11-09: EDMA-20090927-2.fc14
  • 2010-11-09: platon-101108-1.fc14
  • 2010-11-08: superflip-20100920-1.fc14
  • 2010-11-08: superflip-debuginfo-20100920-1.fc14

superflip, platon and objcryst-fox have been updated compared to the version in the other repositories.

Permanent link to this article: http://blog.debroglie.net/2010/11/09/fedora-14/

Oct
18

Platon

A new platon update is available.

Permanent link to this article: http://blog.debroglie.net/2010/10/18/platon-5/

Oct
03

Valgrind and kcachegrind, spot bottlenecks

I have written a few routines in fortran, optimisation is not really necessary but it always nice to have something running fast. Finding bottlenecks in the execution of your favorite home made software can be tricky.

The routine I wanted to improve is about structure factor calculations. It does one thing: get the reflections from a fcf file, other parameters from the cif file and calculate the structure factor. The first version was in python. The advantage in python, you don’t have to worry about the computing so you can focus on the science. On my test file (4000 reflections), it took 5 seconds. Not to bad for python although the code was very ugly and unmaintainable.

I then ported the all thing in fortran and get something about 4s. At this stage, I used valgrind to profile the code:
$ valgrind --tool=callgrind --dump-instr=yes \
--simulate-cache=yes --collect-jumps=yes \
/home/pascal/etudes/uu.nl/svn/Fcalc/trunk/Fcalc l0124a-4

Then, I use kcachegrind to read the profile. You can get such a map:

Kcachegrind gui

The bigger the area is, the longer it takes for the routine to execute. You can also get the number of time a routine is called. The routine named dhkl is used 751872 times which is not normal. It should be used 4000 times, the same as the number of reflections. Effectively, by looking at my code. This function was too deep in a nested loop with a couple of other functions! The execution time goes down to 2sec.

An other example, is the routine kronecker, it has been called 751872 times. This routine is used on the 3×3 matrix representing a symmetry operation. It’s not suppose to be used that much. I could save the result somewhere to avoid recalculation but it seems it does not improve anything…

However, there is still the big main loop over the strucfact routine. It is typically where openmp becomes handy. The portion of code is:

do i=1,hklsize
fcalctable(i)=structfact(hkltable(1,i),hkltable(2,i),hkltable(3,i))
end do

No complicated shared variables, competition, synchronisation…. each step is completely independent. You just need to rewrite this bit like this:

!$OMP PARALLEL shared(hkltable, fcalctable) private(mythread,inparallel)
!$	  inparallel=OMP_in_parallel()
!$    mythread = OMP_GET_THREAD_NUM()
if(inparallel) then
print *, 'Loop parallelised, thread number: ',mythread
end if
!$OMP DO
do i=1,hklsize
fcalctable(i)=structfact(hkltable(1,i),hkltable(2,i),hkltable(3,i))
end do
!$OMP END DO
!$OMP END PARALLEL

Compile your source code with the -fopenmp flag and on my dual core processor, I have an expected speedup of two. The execution time is now below 1sec.

The new profile is:

kcachegrind result after optimisation

Permanent link to this article: http://blog.debroglie.net/2010/10/03/valgrind-and-kcachegrind-spot-bottlenecks/

Sep
16

ediffana/edensgrid

Edit: all calculations on non-centrosymmetric structures are wrong. I am working on a solution.
Edit 11/10/2010: Fixed in 0.3 version available on the repo.

Two new packages made it in the fedora repos. Not in centos, I used featured in fortran and python not available in the versions of gfortran and subprocess :(

edensgrid calculates (difference) electron density grids. The input is a list 3 fcf file from shelx, the output, an ascii file with the 3D array flattened (2D slices separated by two blank lines). The fourier transform is done with fftw3.

ediffana calculates some stats and plot the distribution of the difference electron density maps (like in wingx). As this is the difference between the model and experimental data, the result should be a normal distribution. Otherwise, you are missing something in your model. The input is a cif file and a electron density map from edensgrid. The ouput is a gnuplot graph or a matplotlib output (default) with some stats in the terminal.

To launch ediffana, just type “ediffana” and your filename without extension, you can put multiple filenames and the graphs will be stacked in one window.

To install them, just yum ediffana and/or edensgrid
For the usage, in a terminal, just type ediffana ‐‐help or edensgrid ‐‐help, the are a few more options.

Source files are here:
https://redmine.debroglie.net/attachments/download/6/edensgrid-0.1.tar.gz
https://redmine.debroglie.net/attachments/download/3/ediffdensity-0.1.tar.gz


#### m104i ####
mean: -0.0000
median: 0.0029
s^2: 0.0657
min: -0.3155
max: 0.6505
Skewness: -0.013 (normal: 0)
Kurtosis: 1.440 (normal: 0)
Normal test: 2.72e+04, 0.00
Report of linear regression of the normal probability plot:
Slope = 0.9948, Intercept = -0.0000
r2 = 0.990
partial fit (left side):
Slope = 1.3925, Intercept = 0.0480
r2 = 0.985
partial fit (right side):
Slope = 2.2717, Intercept = -0.1862
r2 = 0.950

If there is any problem, feel free to talk about it in a comment or send me an email to pascal22p@parois.net. These are not heavily tested yet.

Permanent link to this article: http://blog.debroglie.net/2010/09/16/ediffanaedensgrid/

Aug
31

Tonto-chem troubles

Tonto is still absent on fedora 13 repo, the reason is I want to improve the spec file and produce mpi binaries as well. So far I have rpms for red hat 6: a basic gfortran build, an openmpi build, a mpich2 build and a mvapich2 build. I used a svn snapshot for the build.

For centos 5, I ran into a compiler bug so I am stuck.

For fedora, I have a linking problem on the mpi version (libmpi_f90 not found) which I am trying to solve.

Permanent link to this article: http://blog.debroglie.net/2010/08/31/tonto-chem-troubles/

Aug
27

Coot

Coot is available for fedora 13 from the official repository (not from Debroglie). yum install coot and you’re done.

Permanent link to this article: http://blog.debroglie.net/2010/08/27/coot-2/

Aug
26

Platon update

Platon has been updated for all platforms. Including the outdated versions of fedora down to version 8.

Permanent link to this article: http://blog.debroglie.net/2010/08/26/platon-update-7/

Aug
15

John Should NOT be allowed out unsupervised!

A slight cockup during my planned update of Olex2, Olex2-gui and CCTBX has sadly left the repo without any archived versions! Sorry. I’ve replaced 10, 11, 12, 13 and Centos with the latest 1.1 version, the CCTBX and I am in the process of doing the same for Fedora 8 (Linpus support). However this will leave 9 users stuck – sorry I am a muppet and expect to get a telling off by Pascal.

All of the updates are being placed into repo-test as I have been experimenting with the userspace update scripts. This may eat your Olex2! Report it to TRAC if it does.

Permanent link to this article: http://blog.debroglie.net/2010/08/15/john-should-not-be-allowed-out-unsupervised/

Jul
12

Updates and Delays

I was hoping to bring you the latest Olex2 1.1 release for all supported OS but unfortunately it has been hampered by Fedora 13 linker issues with OpenGL. I expect to roll out Fedora 11, 12 and Centos 5 tomorrow morning to the testing repo along with a new CCTBX and Olex2-gui 1.1. I will continue to work to try and track down the anomalous Fedora 13 behaviour. I may even finally move over to the scons setup supported by the Olex2 team and finally retire my old Makefile? Perhaps not depends if I can figure out the mad build directory structure created by scons and if it is any better?

Also expect the latest platon for Fedora 11, 12, 13 and Centos 5 at the same time.

Permanent link to this article: http://blog.debroglie.net/2010/07/12/updates-and-delays/

May
19

Second commit of rpms in fedora 13 repo

# 2010-05-19: objcryst-fox-1.9.0.2-1.R1215.fc13
# 2010-05-19: objcryst-fox-debuginfo-1.9.0.2-1.R1215.fc13
# 2010-05-19: newmat-11-2.fc13
# 2010-05-19: newmat-debuginfo-11-2.fc13
# 2010-05-19: newmat-devel-11-2.fc13
# 2010-05-19: flipsmall-20090610-2.fc13

Permanent link to this article: http://blog.debroglie.net/2010/05/19/second-commit-of-rpms-in-fedora-13-repo/

Older posts «

» Newer posts

Performance Optimization WordPress Plugins by W3 EDGE