Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

18 February 2014

555. Very Briefly: Drawing molecules on linux: bkchem

I can't evaluate drawing programs on linux without giving bkchem a look. In fact, up till now this has been my preferred drawing application on linux, in particular since it uses .svg as it's native file format i.e. it's very easy to post-process drawing and turn them into proper .eps files for inclusion in latex documents.

bkchem is in the debian repos:
sudo apt-get install bkchem

It's a very basic program, although looking through the options it isn't too feature sparse either.

However, there's one important feature that ISISDraw and MarvinSketch have that I can't find in bkchem: it's lacking a function to clean molecules i.e. to make them look nice.




554. Briefly: Drawing molecules on linux: Marvinsketch

I don't remember how I installed this, but marvinsketch is by far the fanciest molecular drawing application on linux. It's written in java, which means that it runs natively (well, as natively as something like java can run).

Note: it's free for academia only and you will need to register.

To get MarvinBeans, go to https://www.chemaxon.com/ and register as an academic. Then go to http://www.chemaxon.com/download/marvin-suite/ and download the 64 bit linux installer with jre.

Presumable you can install it by doing
sh marvinbeans-6.1.0-linux_with_jre64.sh

in the download directory.
Once it's installed create a file called ~/.local/share/applications/marvinsketch.desktop:
[Desktop Entry] Name=MarvinSketch GenericName=MarvinSketch Comment=Software for drawing molecules Exec=sh /home/me/ChemAxon/MarvinBeans/MarvinSketch Terminal=false Type=Application Categories=Science Version=6.1

You should now be able to find it in GNOME 3.

There are a lot of similarities between ISISDraw and MarvinSketch -- and that's a good thing since it allows people like myself to draw molecules quickly without thinking too much about it.
A Blank slate

Running Chem Inspector

It didn't like my wedges

I turned the structure into 3D and rotated it

Elemental analysis

553. Briefly: Drawing molecules on Debian Wheezy: ISISDraw under wine (very briefly)

I'm cheating here: this isn't a program for linux. Instead we're running a windows program under wine, which is not ideal. On the other hand, it's so easy to do that it's worth exploring as an option to 'pure' linux offerings.

I'll be posting about native linux offerings later.

Either way, I've kept a copy of ISISDraw 2.5 around since the early 2000s. Luckily, other people are mirroring the installation file for it as well. See e.g. http://fc.smcdsb.on.ca/~rszerminski/addl_files_for_web/DRAW24.EXE for ISISDraw 2.4

 You'll need to install wine:i386 and for that you'll need to enable multiarch if you're on amd64:
sudo dpkg --add-architecture
sudo apt-get update
sudo apt-get install wine:i386
wget http://fc.smcdsb.on.ca/~rszerminski/addl_files_for_web/DRAW24.EXE
wine DRAW24.EXE

As always, if you have problems with e.g. weird fonts, use winetricks to install at least corefonts, or ideally allfonts:
wget http://winetricks.org/winetricks
sudo mv winetricks /usr/bin/winetricks
chmod +x /usr/bin/winetricks 
winetricks allfonts

Then run ISISDraw:
A blank slate
 ISISDraw has a lot of options, including templates and journal settings.
Chem Inspector
 There's a bug under wine: to get the menus for the buttons on the left side to show up, click on the button on the left panel, and then move the mouse left while still holding the button down.
To get the menus to work, click and while still holding the left button down move right
 ISISDraw is not going to blow you away, but it's free and it works under wine.

03 February 2014

548. A lot has been happening with Kingsoft WPS

Seems like they have been making progress.

I wrote my original post about wps (also see this post) for version 8.1.0.3724, and on this site they are currently at 9.1.0.4244 -- Alpha 12, patch 3. Judging from all the bugs that have been fixed it seems that the devs have been quite busy. The short interval between different alpha version also indicates that the development is very active. Good stuff.

Basically, WPS is the only reasonable (subjective) solution for reading .docx files on linux that I've encountered.

Either way,if you have a previous version of wps installed, remove it
sudo apt-get autoremove wps-office:i386

Then get on with it:
mkdir ~/tmp
cd ~/tmp
sudo dpkg --add-architecture i386
sudo apt-get update
wget http://wdl.cache.ijinshan.com/wps/download/Linux/unstable/kingsoft-office_9.1.0.4244~a12p3_i386.deb
sudo dpkg -i kingsoft-office_9.1.0.4244~a12p3_i386.deb
sudo apt-get install -f




Missing fonts. Clicking on the link takes you indirectly to bbs.wpn.cn, which is in Chinese.


To sort out the fonts issue above you can join bbs.wpn.cn as shown in this post, then download the wps_symbol_fonts.zip file from this post. Install the fonts by doing
cp ~/Downloads/wps_symbol_fonts.zip ~/.fonts
cd ~/.fonts
unzip wps_symbol_fonts.zip

And start WPS. The 'symbol' issue should be solved. Either way, the look of WPS has been updated, and now it can handle my test file which even MS offerings are struggling with:
See here for a post where I compare different office suites using that file (older post): http://verahill.blogspot.com.au/2013/01/313-which-office-for-linux-users.html

To sort out mime types/file associations do
sudo update-desktop-database /usr/local/share/applications/
sudo update-mime-database /usr/share/mime/

25 December 2013

538. Briefly: Sort folders before files in nautilus 3.8

I'm running debian jessie (current testing) on my laptop and after having held off upgrading for a while since I had to take it to a conference and didn't want to risk ending up with a broken system, I finally took the leap. I notice that there are a lot of references to systemd in dmesg, but haven't had a look at what it actually means -- are we past init and fully switched to systemd now? Or how do I go about modifying my network configuration if I can't use /etc/network/interfaces?

Anyway, one annoying little thing is that in Nautilus the folder content by default is arranged in alphabetical order, regardless of whether it's a file or a directory. The old behaviour was to arrange folders in alphabetical order, then files.

Here's how to get it back to 'normal' behaviour:
 
The new behaviour
Click on the 'Files' menu on the top desktop bar, select preferences:
Check 'Sort folders before files' to get back the normal behaviour
Check sort folders before files to make Nautilus behave well again

12 November 2013

529. Briefly: Error Writing spool: NT_STATUS_DISK_FULL

I recently had trouble printing on a networked printer at work, where we use 'Papercut' to share printers -- basically you submit your job, give your credentials, then run over to a printer and release the job.

Anyway, I suddenly had issues printing:

The solution:
I'm not entirely sure what fixed it, but here's what I did

lpstat showed a number of jobs that had been submitted to the printer, but couldn't be released:
me@beryllium:~/Downloads$ lpstat
global-mfp-1166         me              591872   Mon 11 Nov 2013 12:36:29 EST
global-mfp-1167         me              993280   Mon 11 Nov 2013 12:36:44 EST
global-mfp-1168         me             2014208   Mon 11 Nov 2013 12:36:59 EST
global-mfp-1169         me              871424   Mon 11 Nov 2013 12:37:17 EST
global-mfp-1170         me              573440   Mon 11 Nov 2013 12:37:31 EST
global-mfp-1171         me             1199104   Mon 11 Nov 2013 12:37:51 EST
global-mfp-1172         me              183296   Mon 11 Nov 2013 12:38:02 EST
global-mfp-1173         me              491520   Mon 11 Nov 2013 12:38:19 EST
global-mfp-1174         me             2035712   Mon 11 Nov 2013 12:38:38 EST
global-mfp-1175         me             2035712   Mon 11 Nov 2013 12:39:54 EST
global-mfp-1176         me              635904   Mon 11 Nov 2013 12:41:54 EST
global-mfp-1177         me              148480   Mon 11 Nov 2013 16:29:58 EST
I preceded to cancel all the jobs:
me@beryllium:~/Downloads$ cancel global-mfp-1166
me@beryllium:~/Downloads$ lpstat
global-mfp-1167         me              993280   Mon 11 Nov 2013 12:36:44 EST
global-mfp-1168         me             2014208   Mon 11 Nov 2013 12:36:59 EST
global-mfp-1169         me              871424   Mon 11 Nov 2013 12:37:17 EST
global-mfp-1170         me              573440   Mon 11 Nov 2013 12:37:31 EST
global-mfp-1171         me             1199104   Mon 11 Nov 2013 12:37:51 EST
global-mfp-1172         me              183296   Mon 11 Nov 2013 12:38:02 EST
global-mfp-1173         me              491520   Mon 11 Nov 2013 12:38:19 EST
global-mfp-1174         me             2035712   Mon 11 Nov 2013 12:38:38 EST
global-mfp-1175         me             2035712   Mon 11 Nov 2013 12:39:54 EST
global-mfp-1176         me              635904   Mon 11 Nov 2013 12:41:54 EST
global-mfp-1177         me              148480   Mon 11 Nov 2013 16:29:58 EST
me@beryllium:~/Downloads$ cancel global-mfp-1167
me@beryllium:~/Downloads$ cancel global-mfp-1168
me@beryllium:~/Downloads$ cancel global-mfp-1169
me@beryllium:~/Downloads$ cancel global-mfp-1170
me@beryllium:~/Downloads$ cancel global-mfp-1171
me@beryllium:~/Downloads$ cancel global-mfp-1172
me@beryllium:~/Downloads$ cancel global-mfp-1173
me@beryllium:~/Downloads$ cancel global-mfp-1174
me@beryllium:~/Downloads$ cancel global-mfp-1175
me@beryllium:~/Downloads$ cancel global-mfp-1176
me@beryllium:~/Downloads$ cancel global-mfp-1177
me@beryllium:~/Downloads$ lpstat
me@beryllium:~/Downloads$ 

That didn't remove the error message, however. Opening Printers in Gnome(3) showed that the printer with an issues was set to 'off'. Unlocking and changing it to 'on' resolved the issue.

17 October 2013

520. New node: AMD FX 8350/32 Gb RAM/990 FX

Update 5 Nov 2012: Note that the motherboard doesn't support the CPU and this leads to spontaneous reboots under certain conditions. Make sure to look at the list over supported CPUs for the motherboard you use (in retrospect, obvious -- but as a linux person you get used to ignoring those things since everything's for just OSX or Win).

See here for the troubleshooting thread:
 http://verahill.blogspot.com.au/2013/10/523-random-reboots-troubleshooting-in.html

Also see this thread: http://www.techpowerup.com/forums/showthread.php?t=184061
I'll need to read up on...stuff...but the bottom line seems to be that one would expect issues with this board/cpu combo:

Still only a 4+1 phase board the FX chips pull a bit more power than that can put out comfortably and stable. [..] Those would be your three best to choose from all are the better 8+2 phase designs...
and
my opinion is to stay away from the asus FX ive seen many people asking why their boards are throttling at full load, vrm protection causes voltages to drop at full load when vrms hit a certain temp.

and it seemed that low (CPU) voltages precipitated crashes.

Original post:
So I built a new node at the beginning of October 2013, using the following parts:
  • AMD FX 8350 CPU
  • 4*8 Gb GSkill RAM
  • ASRock 990FX Extreme3 motherboard
  • 1 Tb Seagate Barracuda HDD
  • MSI N210 graphics card
  • ASUS NX1101 Gigabit NIC
  • Corsair GS700 PSU
  • Antec GX700 case
NOTE that I'm having issues with spontaneous reboots during extended periods (days) of heavy load (100% CPU) which do not appear to be associated with faulty RAM, so you might want to think twice before using the exact same permutation of parts as is listed above. Most likely there's a power issue -- either the PSU isn't supplying enough juice to the Mobo, or the Mobo isn't supplying enough power to the CPU. Note also that the CPU isn't listed as an officially supported CPU by the motherboard manufacturer.*

See here for my troubleshooting thread: http://verahill.blogspot.com.au/2013/10/523-random-reboots-troubleshooting-in.html

So the main value of this post are the photos which show how easy it is to build a computer. Just don't...well...build this particular computer -- use a different motherboard.

The other value of the post is purely personal -- I just wanted to write down the steps to take whenever installing a new node in my little cluster.

There will be a post later on troubleshooting (and hopefully fixing) the issue of the spontaneous reboots.

*I've built a number of computers for myself as well as for other people and haven't had any issues (other than bad RAM) before. I got lazy this time and am paying for it.

The first step was assembly:

I like the case -- it's metal and feels robust. Having two fans on top is a definite plus as well as it works well with my home-built rack.

Note that the case doesn't come with a printed manual -- to get the manual you need to go online. And it still falls short -- there's no guide as to how to use the many, many cables it comes with. However, it's not rocket science either. Turns out that the case has a molex plug for powering the case fans. So plug in the molex plug to the PSU, then plug in the fans to the four weird plug/cables that the case comes with. Note that the mobo has no plug for the internal connector USB 3 cable that the case comes with.

See here for more details re the case: http://www.hardocp.com/article/2013/09/12/antec_gx700_atx_computer_case_review
Case, closed

The glorious innards of The Case.

The 700GX does not come with a mobo panel -- not that they tend to be useful anyway

Luckily all (most?) mobos come with their own panels -- push it in place before doing anything else. It can need a bit of negotiation in order to snap in properly.

The case came with riser nuts, four PSU screws and lots of screws for the mobo.

Put the riser nuts in the case -- they are the golden thingies

And here's the mother board. I don't know if there are universally accepted recommendations, but I prefer to install the CPU and RAM onto the mother board before installing it in the case -- you have more space to manouver and the risk of breaking the board is smaller.

The heatsink (left) and CPU (right)

The heatsink comes with thermal paste pre-applied. Don't touch it -- you want it to be as smooth and even as possible.

Get the CPU out

Note the yellow triangle in the bottom right corner in the picture

That should match up with the triangle in the bottom left of this picture. Note the raised level on the right side of the CPU socket.

The CPU in place. Note the raised lever. There should be no pushing -- the CPU should fit perfectly without any force whatsoever. If you bend a pin...then good luck.

The lever is in the locked position.

Next put the heatsink on. Give this a bit of thought as you won't want to have to reseat it several times (in the worst case you'll have to go buy some thermal paste, clean the heatsink and reapply the paste). So make sure you line up the fasteners before pushing the heatsink in place.

Everything is locked down.

The motherboard with the processor and heatsink in place. In the picture the CPU fan is attached to the WRONG connector. Look for a connector saying 'CPU FAN' (in the picture it's attached to POWER FAN)

Open the RAM slot fasteners, and push the RAM sticks in place firmly, but without excessive violence. Once the fasteners snap shut by themselves the sticks are properly seated. Improperly seated RAM sticks tend to prevent you from booting and leads to a lot of noise.

All four RAM sticks in place, and the motherboard attached to the case via seven screws that screw into the riser nuts.

The PSU is in place.

Main power and auxiliary power cables attached.

This particular case has a special tray for the hard drives.

Hard drive in place

SATA data and power cables attached

The other end of the SATA data cable attaches to the motherboard (SATA 1)

After a bit of rewiring. 

PCI NIC and PCI-E graphics cards in place.
And below is a picture of the cluster -- each node is connected to a gigabit WAN (192.168.2.0/24) router  and a gigabit LAN switch (192.168.1.0/24). 8/32 means 8 cores, 32 gb ram. The cluster 'runs' on the LAN. Each of the four nodes in the picture (there are two three-core nodes in addition) are connected to a KVM. Jobs are managed using SGE.

It's questionable whether one can really call it a cluster though since I run each job on a single node for performance reasons. It still attracts attention from visitors to my office though.



Software:
I then installed debian wheezy on it. During the installation I was notified that I might want to consider enabling non-free to get the r8169 and tg3 firmwares

So after enabling non-free in the sources I did:
sudo apt-get install firmware-realtek firmware firmware-linux-nonfree

Didn't seem to change anything though -- everything was working fine before too.

I also installed amd64-microcode which, if I understand things correctly, should obviate the need for some of the full BIOS updates.

Other little housekeeping things:
I first sorted out
INIT: Id "co" respawning too fast: disabled for 5 minutes
as shown here: http://verahill.blogspot.com.au/2012/01/debian-testing-64-wheezy-small-fixes.html

I then installed a few basic thing:
sudo apt-get install vim screen sinfo gawk lm-sensors

and made a ~/.vimrc:
set number set pastetoggle=<f3> nnoremap <f4> :set nonumber!<CR>

And set vim to the default editor in lieu of nano:
sudo update-alternatives --config editor

I edited /etc/default/sinfo to make it use the correct network:
OPTS="${OPTS} --quiet --bcastaddress=192.168.1.255"
I set up 'static' dhcp on the WAN router.

On the node, I then sorted out /etc/network/interfaces  to use dhcp on eth1 and 192.168.1.180 on eth0, and to route everything properly (i.e. local traffic over eth0, and everything else over eth1):

auto lo
iface lo inet loopback

auto eth1
iface eth1 inet dhcp

auto eth0
iface eth0 inet static
address 192.168.1.180
gateway 192.168.1.1
netmask 255.255.255.0

post-up ip route flush all
post-up route add default eth1
post-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 eth0

SGE won't work properly unless you edit /etc/hosts:
127.0.0.1       localhost
#127.0.1.1      oxygen
192.168.1.180   oxygen

The way my cluster works is that every node has its own shared folder.
mkdir ~/oxygen
mkdir ~/scratch
chmod 777 ~/oxygen

Export it as shown here: http://verahill.blogspot.com.au/2012/02/debian-testing-wheezy-64-sharing-folder.html
Set up ssh key login in both directions:
ssh-keygen
vim ~/.ssh/authorized_keys

Then add the new node to the cluster: http://verahill.blogspot.com.au/2013/08/501-briefly-adding-new-node-to-sge.html
Build nwchem as shown here: http://verahill.blogspot.com.au/2013/05/424-nwchem-63-on-debian-wheezy.html
Set up gaussian as shown here: http://verahill.blogspot.com.au/2012/05/settiing-up-gaussian-g09-on-debian.html
Fix shmem: http://verahill.blogspot.com.au/2012/10/shmmax-revisited-and-shmall-shmmni.html

Finally, to address this issue regarding corrupt packages during SSH sessions I then added to /etc/rc.local/sbin/ethtool -K eth1 rx off tx off

20 September 2013

517. Very briefly: Prime95 (GIMPS) on linux

I'm very unhappy about a newly built node which randomly crashes and reboots when running long jobs. More about that later, but here are the specs: FX 8350, 4x8 Gb RAM GSkill Ripjaws, ASRock FX990 Extreme3, Corsair GS700, MSI N210, ASUS NX1101 in an Antec GX700 case, running Wheezy with stock kernel (3.2.0-4 amd64).

I've tested the RAM using memtest86+  and found no errors, the rig uses a 700 W Corsair PSU which /should/ provide enough power, and I see no evidence of overheating based on a cronjob which runs every 2 minutes. Anyway, the first step in troubleshooting is finding a good way of reproducing the error reliably, and prime95 is what the windows overclockers use to stresstest.

Turns out prime95 (actually GIMPS) can run in a few different modes which tests different aspects of you system, which makes it sound like a pretty good program for my purposes.

See here for more information: http://www.mersenne.org/freesoft/

mkdir ~/tmp/mprime -p
cd ~/tmp/mprime
wget http://www.mersenne.info/gimps/p95v279.linux64.tar.gz
tar xvf p95v279.linux64.tar.gz
./mprime
Welcome to GIMPS, the hunt for huge prime numbers. You will be asked a few simple questions and then the program will contact the primenet server to get some work for your computer. Good luck! Attention OVERCLOCKERS!! Mprime has gained a reputation as a useful stress testing tool for people that enjoy pushing their hardware to the limit. You are more than welcome to use this software for that purpose. Please select the stress testing choice below to avoid interfering with the PrimeNet server. Use the Options/Torture Test menu choice for your stress tests. Also, read the stress.txt file. If you want to both join GIMPS and run stress tests, then Join GIMPS and answer the questions. After the server gets some work for you, stop mprime, then run mprime -m and choose Options/Torture Test. Join Gimps? (Y=Yes, N=Just stress testing) (Y): N Number of torture test threads to run (3): 2 Choose a type of torture test to run. 1 = Small FFTs (maximum FPU stress, data fits in L2 cache, RAM not tested much). 2 = In-place large FFTs (maximum heat and power consumption, some RAM tested). 3 = Blend (tests some of everything, lots of RAM tested). 11,12,13 = Allows you to fine tune the above three selections. Blend is the default. NOTE: if you fail the blend test, but can pass the small FFT test then your problem is likely bad memory or a bad memory controller. Type of torture test to run (3): 1 Accept the answers above? (Y): Y [Main thread Sep 20 11:06] Starting workers. [Worker #1 Sep 20 11:06] Worker starting [Worker #1 Sep 20 11:06] Setting affinity to run worker on any logical CPU. [Worker #2 Sep 20 11:06] Worker starting [Worker #2 Sep 20 11:06] Setting affinity to run worker on any logical CPU. [Worker #1 Sep 20 11:06] Beginning a continuous self-test to check your computer. [Worker #1 Sep 20 11:06] Please read stress.txt. Hit ^C to end this test. [Worker #2 Sep 20 11:06] Beginning a continuous self-test to check your computer. [Worker #2 Sep 20 11:06] Please read stress.txt. Hit ^C to end this test. [Worker #1 Sep 20 11:06] Test 1, 180000 Lucas-Lehmer iterations of M580673 using AMD K10 type-1 FFT length 28K, Pass1=112, Pass2=256. [Worker #2 Sep 20 11:06] Test 1, 180000 Lucas-Lehmer iterations of M580673 using AMD K10 type-1 FFT length 28K, Pass1=112, Pass2=256. CTRL+C
And so on.

27 June 2013

465. The Intel MKL (Math Kernel Library) on Linux (Debian) -- for free

I've been living under the impression that the Intel MKL weren't free.

In all fairness, since I'm using AMD almost exclusively and the ACML is free -- and OpenBlas has worked fine on my i5-2400-based node -- I haven't had enough motivation to really dig into this. However, as part of a post on compiling GAMESS US, Kirill Berezovsky mentions in passing that you can get both the Intel MKL and ifortran for free for non-commercial use.

To be fair, that's free in the Windows sense, not in the Linux sense. You've still got enough restrictions to make Stallman weep, but it's free enough that we have a fighting chance at evaluation the software -- and use it if it's good enough.

See here for ACML: http://verahill.blogspot.com.au/2013/05/422-set-up-acml-on-linux.html
See here for OpenBlas: http://verahill.blogspot.com.au/2013/05/423-openblas-on-debian-wheezy.html

Anyway, this is about MKL:


0. Register a request
Go to http://software.intel.com/en-us/non-commercial-software-development
Click on what you want to download -- in this case the Intel MKL. Fill out the form and hit submit. Note that you'll need to enable cookies for this to work.


[while I was at it I got the intel parallel studio xe as well -- that's 2 Gb though, so don't get it unless you want it and have a lot of bandwidth to spare]


1. Download
You'll get an email with a link. Click it:


The MKL file is 609 MB, which is a bit bigger than the ACML files which tend to be around 67-70 Mb (each).

Note: the email you get has a serial number. From what I understand it's valid for one year if you want to download updates and new releases. However, nowhere does it say that any installed software will expire, so I presume that you can continue using the MKL libraries indefinitely.


2. Install
In my case the file is called l_mkl_11.0.4.183.tgz and it was downloaded to ~/Downloads
mkdir ~/tmp
cd ~/tmp
cp ~/Downloads/l_mkl_11.0.4.183.tgz .
tar xvf l_mkl_11.0.4.183.tgz
cd l_mkl_11.0.4.183
sudo sh install.sh
Step no: 1 of 7 | Welcome -------------------------------------------------------------------------------- Welcome to the Intel(R) Math Kernel Library 11.0 Update 4 for Linux* installation program. The Flagship of HPC Math Libraries. This library contains highly optimized, extensively threaded, mathematical functions for engineering, scientific, and financial applications that require maximum performance. -------------------------------------------------------------------------------- You will complete the steps below during this installation: Step 1 : Welcome Step 2 : License Step 3 : Activation Step 4 : Intel(R) Software Improvement Program Step 5 : Options Step 6 : Installation Step 7 : Complete -------------------------------------------------------------------------------- Step no: 1 of 7 | Options > Missing Optional Pre-requisite(s) -------------------------------------------------------------------------------- There are one or more optional unresolved issues. It is highly recommended to resolve them all before you continue the installation. You can fix them without exiting from the installation and re-check. Or you can quit from the installation, fix them and run the installation again. -------------------------------------------------------------------------------- Missing optional pre-requisites -- unsupported OS -------------------------------------------------------------------------------- 1. Skip missing optional pre-requisites [default] 2. Show the detailed info about issue(s) 3. Re-check the pre-requisites h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [1]: 1 [..] 13. THIRD PARTY PROGRAMS. The Materials may include third party programs or materials that are governed by the third party's license terms, including without limitation, open source software. The license terms associated with such third party programs or materials govern your use of same, and Intel is not liable for such third party programs or materials. * Other names and brands may be claimed as the property of others -------------------------------------------------------------------------------- Do you agree to be bound by the terms and conditions of this license agreement? Type "accept" to continue or "decline" to back to the previous menu: accept Step no: 3 of 7 | Activation -------------------------------------------------------------------------------- If you have purchased this product and have the serial number and a connection to the internet you can choose to activate the product at this time. Activation is a secure and anonymous one-time process that verifies your software licensing rights to use the product. Alternatively, you can choose to evaluate the product or defer activation by choosing the evaluate option. Evaluation software will time out in about one month. Also you can use license file, license manager, or remote activation if the system you are installing on does not have internet access activation options. -------------------------------------------------------------------------------- 1. I want to activate my product using a serial number [default] 2. I want to evaluate my product or activate later 3. I want to activate either remotely, or by using a license file, or by using a license manager h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [1]: 1 Note: Press "Enter" key to back to the previous menu. Please type your serial number (the format is XXXX-XXXXXXXX): -------------------------------------------------------------------------------- Activation completed successfully. -------------------------------------------------------------------------------- Press "Enter" key to continue: Step no: 4 of 7 | Intel(R) Software Improvement Program -------------------------------------------------------------------------------- Help improve your experience with Intel(R) software Participate in the design of future Intel software. Select 'Yes' to give us permission to learn about how you use your Intel software and we will do the rest. - No Personal contact information is collected - There are no surveys or additional follow-up emails by opting in - You can stop participating at any time Learn more about Intel(R) Software Improvement Program http://software.intel.com/en-us/articles/software-improvement-program With your permission, Intel may automatically receive anonymous information about how you use your current and future Intel software. -------------------------------------------------------------------------------- 1. Yes, I am willing to participate and improve Intel software. (Recommended) 2. No, I don't want to participate in the Intel(R) Software Improvement Program at this time. b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection: 2 Step no: 5 of 7 | Options -------------------------------------------------------------------------------- You are now ready to begin installation. You can use all default installation settings by simply choosing the "Start installation Now" option or you can customize these settings by selecting any of the change options given below first. You can view a summary of the settings by selecting "Show pre-install summary". -------------------------------------------------------------------------------- 1. Start installation Now 2. Change install directory [ /opt/intel/composer_xe_2013.4.183 ] 3. Change components to install [ All ] 4. Show pre-install summary h. Help b. Back to the previous menu q. Quit -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [1]: 1 Step no: 6 of 7 | Installation -------------------------------------------------------------------------------- Each component will be installed individually. If you cancel the installation, components that have been completely installed will remain on your system. This installation may take several minutes, depending on your system and the options you selected. -------------------------------------------------------------------------------- Installing Intel Math Kernel Library 11.0 Update 4 on IA-32 component... done -------------------------------------------------------------------------------- Installing Intel Math Kernel Library 11.0 Update 4 on Intel(R) 64 component... done -------------------------------------------------------------------------------- Finalizing installation... done -------------------------------------------------------------------------------- Press "Enter" key to continue Step no: 7 of 7 | Complete -------------------------------------------------------------------------------- Thank you for installing and for using the Intel(R) Math Kernel Library 11.0 Update 4 for Linux*. Support services start from the time you install or activate your product, so please create your support account now in order to take full advantage of your product purchase. Your Subscription Service support account provides access to free product updates interactive issue management, technical support, sample code, and documentation. To create your support account, please visit the Subscription Services web site https://registrationcenter.intel.com/RegCenter/registerexpress.aspx?clientsn=NBJ N-87S2RM3P To get started using Intel(R) Math Kernel Library 11.0 Update 4 located in /opt/intel/composer_xe_2013.4.183 visit: install-dir/Documentation/en_US/mkl/get_started.html. -------------------------------------------------------------------------------- q. Quit [default] -------------------------------------------------------------------------------- Please type a selection or press "Enter" to accept default choice [q]:

3. Usage
I'll demonstrate using nwchem. I've repeated the build instructions over and over on this blog, but here it goes again:

sudo apt-get install build-essential gfortran python2.7-dev libopenmpi-dev openmpi-bin
sudo mkdir /opt/nwchem -p
sudo chown $USER:$USER /opt/nwchem
cd /opt/nwchem
wget http://www.nwchem-sw.org/download.php?f=Nwchem-6.3.revision1-src.2013-05-28.tar.gz -O Nwchem-6.3.revision1-src.2013-05-28.tar.gz
tar xvf Nwchem-6.3.revision1-src.2013-05-28.tar.gz
cd nwchem-6.3-src.2013-05-28/
export NWCHEM_TOP=`pwd`
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONVERSION=2.7
export PYTHONHOME=/usr

export BLASOPT="-L/opt/intel/composer_xe_2013.4.183/mkl/lib/intel64/ -lmkl_sequential -lmkl_core -lmkl_intel_ilp64"
export LIBRARY_PATH="$LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/intel/composer_xe_2013.4.183/mkl/lib/intel64/"

export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
export ARMCI_NETWORK=SOCKETS

cd $NWCHEM_TOP/src

make clean
make nwchem_config
make FC=gfortran 1> make.log 2>make.err

cd $NWCHEM_TOP/contrib
export FC=gfortran
./getmem.nwchem


I had a look at http://www.ichec.ie/support/tutorials/mkl.pdf to better understand what the different libraries do. Still not quite clear though, so I might not be getting optimal performance.


4. Performance
I basically repeated the test job shown here: http://verahill.blogspot.com.au/2013/05/430-briefly-crude-comparison-of.html

The machine has 16 gb ram and an intel i5-2400 cpu (4 cores)

ACML: Total times cpu: 1644.3s wall: 1655.5s
MKL:    Total times  cpu:     1550.0s     wall:     1563.8s

It certainly looks good. While 100 seconds in less than two minutes, and 1550 is 94 %  of 1644, it's a difference of about one day per fortnight, which doesn't make much of a difference on a small single-user cluster, it would make a bit of cumulative difference on our 1400 core multi-user cluster.

24 June 2013

461. Briefly: setting up SHELX on linux (crystallography)

Nothing difficult, but putting up instructions won't hurt anyone.

SHELX is THE crystal structure refinement software. I'm not a crystallographer, but it never hurts familiarising yourself with the tools of  your collaborators.


Download
Register using this page (if you're an academic user): http://shelx.uni-ac.gwdg.de/SHELX/register.php
To find the answer to the xtal question, use google.

You'll then receive an email with a password. Now go to
http://shelx.uni-ac.gwdg.de/SHELX/download.php
where you'll find instructions.

Download all the files:

Several of my files became corrupted the first time I downloaded them for some reason: anode.bz2, shelx[cde].bz2, shredcif.bz2.

I'm presuming that you're downloading the files to ~/Downloads

Here are the 'good' md5sums:
219183542ada47a17e5528bf217f9261 anode.bz2 61335e6b9cf2e654242db80822f32681 ciftab.bz2 918fe0a04e59589938a81a93d8e3eaff shelxc.bz2 e65580af087989aa4958eb53dcd8a473 shelxd.bz2 bc5cad6e4129fa61bbde49207cd4d244 shelxe.bz2 5390146a4b516425fb7b326533443ba7 shelxl.bz2 95617863be917743df55bd94509504fb shelxs.bz2

While you're at it, download the testdata from http://shelx.uni-ac.gwdg.de/~gsheldr/bin/test_data/: cdetutorial_andrea.zip, ciftab_templates.zip, difficult_sad.zip, ltests.zip, pn1a.zip


Installation
sudo apt-get install bunzip2 xargs
mkdir ~/tmp/shelx-2013 -p
cd ~/Downloads
cp shredcif.bz2 shelxe.bz2 shelxd.bz2 shelxc.bz2 ciftab.bz2 anode.bz2 shelxl.bz2 shelxs.bz2 ~/tmp/shelx-2013
cd ~/tmp/shelx-2013/
ls *.bz2|xargs -I {} bunzip2 {}
chmod +x *
sudo cp * /usr/local/bin

If you downloaded the test data:

mkdir ~/tmp/shelx_examples
cd ~/Downloads
cp cdetutorial_andrea.zip ciftab_templates.zip difficult_sad.zip ltests.zip pn1a.zip ~/tmp/shelx_examples
cd ~/shelx_examples
ls *.zip |xargs -I {} unzip {}


And you're done. Now, learning how to use SHELX, and how to use it properly, is a different matter on which I am not qualified to write.