Pages

30 April 2013

403. Kernel 3.9 on Debian Wheezy/Testing

Kernel 3.9 is out now -- here's how to build it on debian wheezy. Nothing odd in comparison to earlier versions and it barely warrants a separate post.

* To compile a kernel under Arch linux, see here: http://verahill.blogspot.com.au/2013/03/355-kernel-382-on-arch-linux-exploration.html

* To compile a kernel without kernel-package on debian, see here: http://verahill.blogspot.com.au/2013/02/344-compile-kernel-38-without-using-kpkg.html

So it begins
sudo apt-get install kernel-package fakeroot build-essential ncurses-dev
mkdir ~/tmp
cd ~/tmp
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.9.tar.bz2
tar xvf linux-3.9.tar.bz2
cd linux-3.9/
cat /boot/config-`uname -r`>.config
make oldconfig

You will be asked a lot of questions -- how many depends on what version you upgrade from. If in doubt, pick the default answer (i.e. hit enter). If really in doubt, use google.

Then continue:
make-kpkg clean

Do
make menuconfig

if you want to make any specific changes to the kernel (e.g. add support for certain devices)

Then continue:
time fakeroot make-kpkg -j4 --initrd kernel_image kernel_headers

As usual 4 is the number of threads you wish to launch -- make it equal to the number of cores that you have for optimum performance during compilation (more about that here).

Install:
sudo dpkg -i ../linux-image-3.9.0_3.9.0-10.00.Custom_amd64.deb ../linux-headers-3.9.0_3.9.0-10.00.Custom_amd64.deb


The new stuff
I know it's a bit lazy to simply post the questions as I do below, but...well, I don't have much of an excuse other than you having to figure out for yourself what you want to enable, and what you don't.:

  2. Full dynticks CPU time accounting (VIRT_CPU_ACCOUNTING_GEN) (NEW)
Intel Low Power Subsystem Support (X86_INTEL_LPSS) [N/y/?] (NEW) 
Early load microcode (MICROCODE_INTEL_EARLY) [Y/n/?] (NEW) 
  PCI slot detection driver (ACPI_PCI_SLOT) [N/y/?] (NEW) 
  Container and Module Devices (ACPI_CONTAINER) [Y/?] (NEW) y
Intel P state control (X86_INTEL_PSTATE) [N/y/?] (NEW) 
  "bpf" match support (NETFILTER_XT_MATCH_BPF) [N/m/?] (NEW) 
  "connlabel" match support (NETFILTER_XT_MATCH_CONNLABEL) [N/m/?] (NEW) 
  VLAN filtering (BRIDGE_VLAN_FILTERING) [N/y/?] (NEW) 
  MVRP (Multiple VLAN Registration Protocol) support (VLAN_8021Q_MVRP) [N/y/?] (NEW) 
Virtual Socket protocol (VSOCKETS) [N/m/y/?] (NEW) 
  Enable LED triggers for Netlink based drivers (CAN_LEDS) [N/y/?] (NEW) 
  8 devices USB2CAN interface (CAN_8DEV_USB) [N/m/?] (NEW) 
Fallback user-helper invocation for firmware loading (FW_LOADER_USER_HELPER) [Y/n/?] (NEW) 
  Command line partition table parsing (MTD_CMDLINE_PARTS) [N/m/?] (NEW) 
  IBM FlashSystem 70/80 PCIe SSD Device Driver (BLK_DEV_RSXX) [N/m/y/?] (NEW) 
Device driver for Atmel SSC peripheral (ATMEL_SSC) [N/m/y/?] (NEW) 
Lattice ECP3 FPGA bitstream configuration via SPI (LATTICE_ECP3_CONFIG) [N/m/y/?] (NEW) 
VMware VMCI Driver (VMWARE_VMCI) [N/m/y/?] (NEW) 
    SATA Zero Power Optical Disc Drive (ZPODD) support (SATA_ZPODD) [N/y/?] (NEW) 
    Cache target (EXPERIMENTAL) (DM_CACHE) [N/m/?] (NEW) 
      Broadcom 578xx and 57712 SR-IOV support (BNX2X_SRIOV) [Y/n/?] (NEW) 
      Intel(R) PCI-Express Gigabit adapters HWMON support (IGB_HWMON) [Y/n/?] (NEW) 
  ASIX AX88179/178A USB 3.0/2.0 to Gigabit Ethernet (USB_NET_AX88179_178A) [M/n/?] (NEW) 
    Intel Wireless WiFi MVM Firmware support (IWLMVM) [N/m/?] (NEW) 
  Cypress APA I2C Trackpad support (MOUSE_CYAPA) [N/m/?] (NEW) 
  Support 8250_core.* kernel options (DEPRECATED) (SERIAL_8250_DEPRECATED_OPTIONS) [Y/n/?] (NEW) 
Support for Synopsys DesignWare 8250 quirks (SERIAL_8250_DW) [N/m/y/?] (NEW) 
Comtrol RocketPort EXPRESS/INFINITY support (SERIAL_RP2) [N/m/y/?] (NEW) 
  STMicroelectronics ST33 I2C TPM (TCG_ST33_I2C) [N/m/?] (NEW) 
Intel iSMT SMBus Controller (I2C_ISMT) [N/m/?] (NEW) 
  PXA2xx SSP SPI master (SPI_PXA2XX) [N/m/y/?] (NEW) 
  Intel Lynxpoint GPIO support (GPIO_LYNXPOINT) [N/y/?] (NEW) 
Dual Channel Addressable Switch 0x3a family support (DS2413) (W1_SLAVE_DS2413) [N/m/?] (NEW) 
  Goldfish battery driver (BATTERY_GOLDFISH) [N/m/y/?] (NEW) 
  Maxim MAX6697 and compatibles (SENSORS_MAX6697) [N/m/?] (NEW) 
  TI / Burr Brown INA209 (SENSORS_INA209) [N/m/?] (NEW) 
  Fair-share thermal governor (THERMAL_GOV_FAIR_SHARE) [N/y/?] (NEW) 
  Step_wise thermal governor (THERMAL_GOV_STEP_WISE) [Y/?] (NEW) y
  User_space thermal governor (THERMAL_GOV_USER_SPACE) [N/y/?] (NEW) 
  Thermal emulation mode support (THERMAL_EMULATION) [N/y/?] (NEW) 
  Intel PowerClamp idle injection driver (INTEL_POWERCLAMP) [N/m/?] (NEW) 
  TI LP8755 High Performance PMU driver (REGULATOR_LP8755) [N/m/?] (NEW) 
  V4L2 int device (DEPRECATED) (VIDEO_V4L2_INT_DEVICE) [N/m/?] (NEW) 
    Support for various USB DVB devices v2 (DVB_USB_V2) [N/m/?] (NEW) 
      Cypress firmware helper routines (DVB_USB_CYPRESS_FIRMWARE) [N/m] (NEW) 
      Afatech AF9015 DVB-T USB2.0 support (DVB_USB_AF9015) [N/m/?] (NEW) 
      Afatech AF9035 DVB-T USB2.0 support (DVB_USB_AF9035) [N/m/?] (NEW) 
      Anysee DVB-T/C USB2.0 support (DVB_USB_ANYSEE) [N/m/?] (NEW) 
      Alcor Micro AU6610 USB2.0 support (DVB_USB_AU6610) [N/m/?] (NEW) 
      AzureWave 6007 and clones DVB-T/C USB2.0 support (DVB_USB_AZ6007) [N/m/?] (NEW) 
      Intel CE6230 DVB-T USB2.0 support (DVB_USB_CE6230) [N/m/?] (NEW) 
      E3C EC168 DVB-T USB2.0 support (DVB_USB_EC168) [N/m/?] (NEW) 
      Genesys Logic GL861 USB2.0 support (DVB_USB_GL861) [N/m/?] (NEW) 
      ITE IT913X DVB-T USB2.0 support (DVB_USB_IT913X) [N/m/?] (NEW) 
      MxL111SF DTV USB2.0 support (DVB_USB_MXL111SF) [N/m/?] (NEW) 
      Realtek RTL28xxU DVB USB support (DVB_USB_RTL28XXU) [N/m/?] (NEW) 
NXP Semiconductors TDA998X HDMI encoder (DRM_I2C_NXP_TDA998X) [N/m/?] (NEW) 
  Enable userspace modesetting on radeon (DEPRECATED) (DRM_RADEON_UMS) [N/y/?] (NEW) 
  Goldfish Framebuffer (FB_GOLDFISH) [N/m/y/?] (NEW) 
    Support new DSP code for CA0132 codec (SND_HDA_CODEC_CA0132_DSP) [N/y/?] (NEW) 
Steelseries SRW-S1 steering wheel support (HID_STEELSERIES) [N/m/?] (NEW) 
ThingM blink(1) USB RGB LED (HID_THINGM) [N/m/?] (NEW) 
  Xsens motion tracker serial interface driver (USB_SERIAL_XSENS_MT) [N/m/?] (NEW) 
  USB3503 HSIC to USB20 Driver (USB_HSIC_USB3503) [N/m/?] (NEW) 
  OMAP USB3 PHY Driver (OMAP_USB3) [N/m/y/?] (NEW) 
  OMAP CONTROL USB Driver (OMAP_CONTROL_USB) [N/m/y/?] (NEW) 
  Epson RX-4581 (RTC_DRV_RX4581) [N/m/y/?] (NEW) 
  HID Sensor Time (RTC_DRV_HID_SENSOR_TIME) [N/m/?] (NEW) 
  Synopsys DesignWare AHB DMA support (DW_DMAC) [N/m/y/?] (NEW) 
  Chrome OS Laptop (CHROMEOS_LAPTOP) [N/m/?] (NEW) 
Mailbox Hardware Support (MAILBOX) [N/y/?] (NEW) 
  Step_wise thermal governor (THERMAL_GOV_STEP_WISE) [Y/?] (NEW) y
Intel Non-Transparent Bridge support (NTB) [N/m/y/?] (NEW) 
  Register efivars backend for pstore (EFI_VARS_PSTORE) [Y/n/?] (NEW) 
    Disable using efivars as a pstore backend by default (EFI_VARS_PSTORE_DEFAULT_DISABLE) [N/y/?] (NEW) 
    Enable notifications for userspace key wrap/unwrap (ECRYPT_FS_MESSAGING) [N/y/?] (NEW) 
  Create a snapshot trace buffer (TRACER_SNAPSHOT) [N/y/?] (NEW) 
  CRC32 CRC algorithm (CRYPTO_CRC32) [N/m/y/?] (NEW) 
  CRC32 PCLMULQDQ hardware acceleration (CRYPTO_CRC32_PCLMUL) [N/m/y/?] (NEW) 


Links to this post:
http://www.itnews.com.au/News/342158,debian-70-debuts-with-private-cloud-deployment-tools.aspx
http://www.neowin.net/forum/topic/1158614-ubuntu-or-linux-mint/page__st__15

402. Very briefly: what I forgot about gnome 3...a short rant

Update 30 May 2013: frippery extensions are out now for gnome 3.8. Phew! http://intgat.tigress.co.uk/rmy/extensions/index.html

Original post:
After an initial bout of swearing, and the odd persistent nuisance, I took to gnome 3/gnome-shell pretty well -- I use it every day and it works well for me. It hasn't changed the way I work and it's prettier than gnome 2, so it's alright.

In other words: whenever I've read posts about how awful gnome 3 is and how the poster is going to switch to KDE/XFCE/LXDE/Xmonad I've considered it as whiny hyperbole. After all, even I had got used to gnome 3.

Sure, things like

* people like Allan Day and Jon McCann saying things like this and this
* feature deprecation in everything from gnome-screenshot to nautilus -- gnome-screenshot is now unusable without patching.
* incessant renaming* of 'gnome' applications

all sure don't help in convincing anyone that using gnome is a sane long-term strategy. But gnome 3 has worked ok for me.

*[open Image Viewer in gnome. Click on About in Help. Any indication that the program is called eye-of-gnome and that the package is called eog? Epiphany is now web. Palimpsest brings up disk utility but there's no package with that name anymore]

Or so I thought. What I had forgotten about was all the gnome shell extensions that I had installed to make gnome 3 usable.

This was driven home to me when Arch linux upgraded to gnome 3.8 -- facing the usual unusable default interface of gnome 3 I quickly set to rectify it by going to http://intgat.tigress.co.uk/rmy/extensions/index.html and downlo...wait...no extensions for gnome 3.8? http://extensions.gnome.org didn't yield much either. There were a handful of extensions, but it was missing one of the most important ones -- the bottom panel.

For the moment I'm stuck with vanilla gnome 3 -- and I don't like it a bit.

I haven't actually used gnome 3 -- I've been using gnome 2 with a gnome-shell engine. And that's why I've been happy...

29 April 2013

401. AMD FX 8150:issues building kernel -- random failures.

Update 4:  I found the receipts for one pair of sticks and took it to MSY in Melbourne -- they were replaced on the spot without any questions asked. Very happy.

Update 3: The errors were all due to 3 bad ram sticks. Using the only good stick everything works fine. That's 24 Gb of bad ram...this won't be cheap if I can't find the receipts...

Update 2:
Running memtest86 I caught lots of errors (51 in 50 minutes) before I killed the test. I'm currently testing each stick one by one. I'm hoping that what is seemingly RAM errors can be caused by inapproriate BIOS settings, because 32 Gb bios is not cheap to replace...

While I'm swapping RAM sticks I'm also testing a separate set of stick on a different box. If they are error free it will be interesting to see if they trigger errors on the troublesome node. I'm still hoping for BIOS as being the culprit...

So far three out of four tested sticks have shown errors -- they all happen during test #6. The fourth stick has passed all tests seven times.

Update 1: dmesg also shows the same message as the OP here sees: https://bugzilla.redhat.com/show_bug.cgi?id=909702

The OP puts it down to a misconfigured bios, so the quest continues.
Searching for 990FX and FX8150 I get a number of hits:

Here's a newegg review for 990FX:

 I purchased This MB to run with the AMD FX 8150. I have built computers from high end to low end and know the ones in the middle last the longest and are the most stable.
[..]
At this point the fun of the build is gone, and I have too many hours dealing with problems. 
And that's not the only negative FX8?50 + 990FX review.

The worst part of it is that I've been thinking about building another, identical node (good value for money) as well as recommending my build to a student whom is about to do calcs.

Mind you, I've only ever had issues when it comes to compiling the kernel -- it's been solid when it comes to running calculations.

Original post:


NOTE: this is NOT a solution. Just observations.

My AMD FX 8150 is a great CPU -- it makes up the heart of the fastest of my computational nodes, and is eminently affordable. It does, however, cause me grief in one respect -- I can't compile the linux kernel.

The system
The box that's causing me trouble has
* AMD FX 8150 cpu
* gigabyte 990FXA-D3 motherboard
* nvidia GeForce 210 video card
* Corsair GS 800 PSU
* 4x8 Gb patriot viper PV316G186C0K RAM
While not top of the range, the components should be of reasonable quality.

In terms of software and OS, it's an up-to-date wheezy install (gcc 4.7), running kernel 3.7.2 (compiled on a different machine).

Compiling the kernel
I'm compiling the kernel as shown here: http://verahill.blogspot.com.au/2013/02/342-compiling-kernel-38-on-debian.html

The errors are shown at the end of the post

The fact that the errors keep changing might also be pointing towards there being a hardware fault with my CPU, rather than with FX 8150 in general.

3.8 built fine twice, and crashed the third time. 3.8.10 crashed twice, then built fine the third time.

It all sounds like I'm having hardware issues...but they only seem to be triggered during kernel builds. During 'normal use (i.e. using 100% cpu for weeks at a time) it is perfectly stable. Compiling e.g. nwchem (another pretty heavy compile) also goes absolutely fine.

Troubleshooting something like this also wouldn't be easy. See the end of the post for a list over various errors that I was getting during compilation of different kernel versions.

Anyway, I hit google...



BIOS
That Windows has issues with 8150 might seem unrelated, but it appeared that my errors could be solved by a bios update to my 990 fxa-d3 mobo:
 http://scalibq.wordpress.com/2011/10/19/amd-bulldozer-can-it-get-even-worse/
"The actual reported error is quite random, it just depends on where the CPU fails first. So you generally get a different error code with every BSOD."
and
"AMD’s KB article focuses solely on some boards with the 990FX chipset."
Well, I do have a 990FXA-D3 gigabyte motherboard.

My bios is shown by lshw as
*-firmware
          description: BIOS
          vendor: Award Software International, Inc.
          physical id: 0
          version: F7
          date: 05/30/2012
          size: 128KiB
          capacity: 4032KiB
So the obvious solution was to flash the bios.

Turns out, flashing the BIOS is a headache on Gigabyte motherboards (not buying anything from them again). What happened with simply burning a CD and booting with it in the drive?

Flashing the bios

I downloaded the bios (version F8): http://download.gigabyte.eu/FileList/BIOS/mb_bios_ga-990fxa-d3_f8.exe.

I unzipped it with 7z, giving me 990FXAD3.F8 -- I then put that file in the root of a USB stick..

I've tried with a number of USB sticks, including a blank stick formatted with W95 Fat32 and keeping the stick plugged in before rebooting.

In Q-flash, I always ended up with a prompt saying Floppy A <Drive>, and when I hit enter it says '..    <dir>'. 0 Files found. Yet it also said Total size 7.48G, Free Size: 7.44 G, which matched the size of the USB stick.

Finally I managed to get it to work:
*  in fdisk I only created a 1 gb partition on the USB stick, set type (t) to 6 (Fat16), made it bootable, and wrote changes to disk.
* I then ran mkdosfs -F 16 /dev/sdb1 (my usb stick was /dev/sdb).
*  I then copied the 990FXD3.F8 file to the usb stick root (after mounting it of course) and THAT worked.

Memtest86
Because RAM has traditionally been a major culprit behind hardware errors (especially the random, difficult-to-diagnose type) it's always a good idea to run a memtest. To do that, install memtest86+ (sudo apt-get install memtest86+) and reboot. There should be a new menu item (scroll down) in grub. Memtest takes quite a while, especially if you have a lot of RAM (32 Gb...).

Lo and behold, there are errors:
Tst  Pass  Failing Address              Good        Bad        Err-Bits  Count Chan
------------------------------------------------------------------------------------
6     0     0007383b4f4  -  1848.2MB   fffffbff     ffffffff   00000400    1
6     0     00039c1f294  -   924.1MB   fffffbff     ffffffff   00000004    2
6     0     00120203034  -  4610.0MB   00000004     00000000   00000004    3
6     0     001ca16c464  -  7329.4MB   00020004     00000000   00020000    4
[..]

I counted 51 errors before killing the test (time to identify the bad stick). Many of these occurred in a more limited address space than those shown above. Sigh...the RAM was the most expensive part of this build...

According to this there's a slight chance that the RAM might be ok, but it's still not a good sign.

I've tested each stick by itself -- so far 3 out of 4 sticks have yielded errors during test 6. I did seven passes on the fourth stick and no errors.

The outcome
However, even with the new bios the kernel compiles still fail -- it takes longer for it to fail, but it fails.

I do see the odd thing in dmesg though:
[ 4260.342268] as[29370]: segfault at 4541b5e ip 0000000000410306 sp 00007fff40ec4420 error 4 in as[400000+51000]

So either FX 8150 is still not properly supported by the BIOS, or I've bought a lemon.

The question remains: why do I only see failure during kernel compiles and no other conditions?

After bios flash:

Kernel 3.9-rc8
  CC      drivers/base/dd.o
In file included from /home/me/tmp/linux-3.9-rc8/arch/x86/include/asm/processor.h:23:0,
                 from /home/me/tmp/linux-3.9-rc8/arch/x86/include/asm/atomic.h:6,
                 from include/linux/atomic.h:4,
                 from include/linux/sysfs.h:20,
                 from include/linux/kobject.h:21,
                 from include/linux/device.h:17,
                 from drivers/base/dd.c:20:
/home/me/tmp/linux-3.9-rc8/arch/x86/include/asm/special_insns.h: In function 'native_read_cr0':
/home/me/tmp/linux-3.9-rc8/arch/x86/include/asm/special_insns.h:24:2: internal compiler error: in build_int_cst_wide, at tree.c:1238
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[3]: *** [drivers/base/dd.o] Error 1
make[2]: *** [drivers/base] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/home/me/tmp/linux-3.9-rc8'
make: *** [debian/stamp/build/kernel] Error 2
Kernel 3.8.10
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
ipc/built-in.o:(.debug_info+0x1ed81): undefined reference to `.LASF108'
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory `/home/me/tmp/linux-3.8.10'
make: *** [debian/stamp/build/kernel] Error 2
Kernel 3.7.6
  CC [M]  fs/gfs2/super.o
  CC [M]  fs/gfs2/sys.o
In file included from /home/me/tmp/linux-3.7.6/arch/x86/include/asm/smp.h:13:0,
                 from include/linux/smp.h:38,
                 from include/linux/sched.h:30,
                 from fs/gfs2/sys.c:10:
/home/me/tmp/linux-3.7.6/arch/x86/include/asm/apic.h:394:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[3]: *** [fs/gfs2/sys.o] Error 1
make[2]: *** [fs/gfs2] Error 2
make[1]: *** [fs] Error 2
make[1]: Leaving directory `/home/me/tmp/linux-3.7.6'
make: *** [debian/stamp/build/kernel] Error 2
Kernel 3.5
CC [M] drivers/scsi/lpfc/lpfc_els.o CC [M] drivers/scsi/lpfc/lpfc_hbadisc.o CC [M] drivers/scsi/lpfc/lpfc_init.o In file included from /home/me/tmp/linux-3.5/arch/x86/include/asm/msr.h:139:0, from /home/me/tmp/linux-3.5/arch/x86/include/asm/processor.h:20, from /home/me/tmp/linux-3.5/arch/x86/include/asm/thread_info.h:22, from include/linux/thread_info.h:54, from include/linux/preempt.h:9, from include/linux/spinlock.h:50, from include/linux/seqlock.h:29, from include/linux/time.h:8, from include/linux/timex.h:56, from include/linux/sched.h:57, from include/linux/blkdev.h:4, from drivers/scsi/lpfc/lpfc_init.c:22: /home/me/tmp/linux-3.5/arch/x86/include/asm/paravirt.h: In function 'store_gdt': /home/me/tmp/linux-3.5/arch/x86/include/asm/paravirt.h:304:2: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[4]: *** [drivers/scsi/lpfc/lpfc_init.o] Error 1 make[3]: *** [drivers/scsi/lpfc] Error 2 make[2]: *** [drivers/scsi] Error 2 make[1]: *** [drivers] Error 2 make[1]: Leaving directory `/home/me/tmp/linux-3.5' make: *** [debian/stamp/build/kernel] Error 2

Kernel 3.4.42
Second crash:
  CC [M]  fs/coda/psdev.o
  CC [M]  fs/coda/cache.o
In file included from include/linux/mm.h:256:0,
                 from fs/coda/coda_linux.h:17,
                 from fs/coda/cache.c:24:
include/linux/page-flags.h:232:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[3]: *** [fs/coda/cache.o] Error 1
make[2]: *** [fs/coda] Error 2
make[1]: *** [fs] Error 2
make[1]: Leaving directory `/home/me/tmp/linux-3.4.42'
make: *** [debian/stamp/build/kernel] Error 2
First crash:
  CC      kernel/signal.o
gcc: internal compiler error: Segmentation fault (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[2]: *** [kernel/signal.o] Error 4
make[1]: *** [kernel] Error 2
make[1]: Leaving directory `/home/me/tmp/linux-3.4.42'
make: *** [debian/stamp/build/kernel] Error 2


Kernels that won't build and the errors -- before bios flash:
3.9-rc8
CC [M] fs/nfs/nfs4client.o CC [M] fs/nfs/nfs4sysctl.o CC [M] fs/nfs/nfs4session.o CC [M] fs/nfs/pnfs.o fs/nfs/pnfs.c: In function 'read_seqcount_retry': fs/nfs/pnfs.c:1951:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[3]: *** [fs/nfs/pnfs.o] Error 1 make[2]: *** [fs/nfs] Error 2 make[1]: *** [fs] Error 2 make[1]: Leaving directory `/home/me/tmp/linux-3.9-rc8' make: *** [debian/stamp/build/kernel] Error 2
3.8.10
  CC [M]  fs/nfs/inode.o
In file included from include/net/scm.h:6:0,
                 from include/linux/netlink.h:8,
                 from /home/me/tmp/linux-3.8.10/include/uapi/linux/neighbour.h:5,
                 from include/linux/netdevice.h:51,
                 from include/linux/icmpv6.h:12,
                 from include/linux/ipv6.h:59,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:26,
                 from fs/nfs/inode.c:26:
include/linux/security.h:2581:1: internal compiler error: Segmentation fault
Please submit a full bug report,
3.8.6
CC [M] drivers/hid/hid-lg.o CC [M] drivers/hid/hid-lgff.o CC [M] drivers/hid/hid-lg2ff.o CC [M] drivers/hid/hid-lg3ff.o CC [M] drivers/hid/hid-lg4ff.o CC [M] drivers/hid/hid-picolcd_core.o CC [M] drivers/hid/hid-picolcd_fb.o CC [M] drivers/hid/hid-picolcd_backlight.o drivers/hid/hid-picolcd_backlight.c:120:1: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[3]: *** [drivers/hid/hid-picolcd_backlight.o] Error 1 make[2]: *** [drivers/hid] Error 2 make[1]: *** [drivers] Error 2 make[1]: Leaving directory `/home/me/tmp/linux-3.8.6' make: *** [debian/stamp/build/kernel] Error 2
3.8
CC mm/dmapool.o CC mm/hugetlb.o /bin/sh: line 1: 25153 Done(2) gcc -E -D__GENKSYMS__ -Wp,-MD,mm/.hugetlb.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/home/me/tmp/linux-3.8/arch/x86/include -Iarch/x86/include/generated -Iinclude -I/home/me/tmp/linux-3.8/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/home/me/tmp/linux-3.8/include/uapi -Iinclude/generated/uapi -include /home/me/tmp/linux-3.8/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hugetlb)" -D"KBUILD_MODNAME=KBUILD_STR(hugetlb)" mm/hugetlb.c 25154 Segmentation fault | scripts/genksyms/genksyms -a x86_64 -r /dev/null > mm/.tmp_hugetlb.ver make[2]: *** [mm/hugetlb.o] Error 139 make[1]: *** [mm] Error 2 make[1]: Leaving directory `/home/me/tmp/linux-3.8' make: *** [debian/stamp/build/kernel] Error 2
3.7.6

The errors differ each time:

Second run:
  CC [M]  fs/ext2/namei.o
  CC [M]  fs/ext2/super.o
fs/ext2/super.c: In function 'ext2_fill_super':
fs/ext2/super.c:762:12: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[3]: *** [fs/ext2/super.o] Error 1
make[2]: *** [fs/ext2] Error 2
make[1]: *** [fs] Error 2
make[1]: Leaving directory `/home/me/tmp/linux-3.7.6'
make: *** [debian/stamp/build/kernel] Error 2
First run:
  CC      drivers/base/power/main.o
/bin/sh: line 1: 12317 Done                    gcc -E -D__GENKSYMS__ -Wp,-MD,drivers/base/power/.main.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/home/me/tmp/linux-3.7.6/arch/x86/include -Iarch/x86/include/generated -Iinclude -I/home/me/tmp/linux-3.7.6/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/home/me/tmp/linux-3.7.6/include/uapi -Iinclude/generated/uapi -include /home/me/tmp/linux-3.7.6/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(main)" -D"KBUILD_MODNAME=KBUILD_STR(main)" drivers/base/power/main.c
     12318 Segmentation fault      | scripts/genksyms/genksyms -a x86_64 -r /dev/null > drivers/base/power/.tmp_main.ver
make[4]: *** [drivers/base/power/main.o] Error 139
make[3]: *** [drivers/base/power] Error 2
make[2]: *** [drivers/base] Error 2
make[1]: *** [drivers] Error 2
3.7.2
The errors differ every time:

Second run:
CC [M] drivers/hwmon/tmp102.o ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x76d76)[0x2b2bb07f6d76] /lib/x86_64-linux-gnu/libc.so.6(+0x7a658)[0x2b2bb07fa658] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x70)[0x2b2bb07fbb90] scripts/genksyms/genksyms[0x4075fa] scripts/genksyms/genksyms[0x4037c0] scripts/genksyms/genksyms[0x402de6] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x2b2bb079eead] scripts/genksyms/genksyms[0x400f59] ======= Memory map: ======== 00400000-0040e000 r-xp 00000000 08:05 36440720 /home/me/tmp/linux-3.7.2/scripts/genksyms/genksyms 0060d000-0060e000 rw-p 0000d000 08:05 36440720 /home/me/tmp/linux-3.7.2/scripts/genksyms/genksyms 0060e000-00616000 rw-p 00000000 00:00 0 0089b000-00c58000 rw-p 00000000 00:00 0 [heap] 2b2bb0330000-2b2bb0350000 r-xp 00000000 08:01 11802457 /lib/x86_64-linux-gnu/ld-2.13.so 2b2bb0350000-2b2bb0352000 rw-p 00000000 00:00 0 2b2bb054f000-2b2bb0550000 r--p 0001f000 08:01 11802457 /lib/x86_64-linux-gnu/ld-2.13.so 2b2bb0550000-2b2bb0551000 rw-p 00020000 08:01 11802457 /lib/x86_64-linux-gnu/ld-2.13.so 2b2bb0551000-2b2bb0552000 rw-p 00000000 00:00 0 2b2bb0558000-2b2bb0561000 r-xp 00000000 08:01 2233201 /usr/lib/x86_64-linux-gnu/libfakeroot/libfakeroot-sysv.so 2b2bb0561000-2b2bb0761000 ---p 00009000 08:01 2233201 /usr/lib/x86_64-linux-gnu/libfakeroot/libfakeroot-sysv.so 2b2bb0761000-2b2bb0762000 rw-p 00009000 08:01 2233201 /usr/lib/x86_64-linux-gnu/libfakeroot/libfakeroot-sysv.so 2b2bb0762000-2b2bb0763000 rw-p 00000000 00:00 0 2b2bb077c000-2b2bb077d000 rw-p 00000000 00:00 0 2b2bb0780000-2b2bb0900000 r-xp 00000000 08:01 11802454 /lib/x86_64-linux-gnu/libc-2.13.so 2b2bb0900000-2b2bb0b00000 ---p 00180000 08:01 11802454 /lib/x86_64-linux-gnu/libc-2.13.so 2b2bb0b00000-2b2bb0b04000 r--p 00180000 08:01 11802454 /lib/x86_64-linux-gnu/libc-2.13.so 2b2bb0b04000-2b2bb0b05000 rw-p 00184000 08:01 11802454 /lib/x86_64-linux-gnu/libc-2.13.so 2b2bb0b05000-2b2bb0b0a000 rw-p 00000000 00:00 0 2b2bb0b10000-2b2bb0b12000 r-xp 00000000 08:01 11802447 /lib/x86_64-linux-gnu/libdl-2.13.so 2b2bb0b12000-2b2bb0d12000 ---p 00002000 08:01 11802447 /lib/x86_64-linux-gnu/libdl-2.13.so 2b2bb0d12000-2b2bb0d13000 r--p 00002000 08:01 11802447 /lib/x86_64-linux-gnu/libdl-2.13.so 2b2bb0d13000-2b2bb0d14000 rw-p 00003000 08:01 11802447 /lib/x86_64-linux-gnu/libdl-2.13.so 2b2bb0d14000-2b2bb0d16000 rw-p 00000000 00:00 0 2b2bb0d30000-2b2bb0d45000 r-xp 00000000 08:01 11796731 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b2bb0d45000-2b2bb0f45000 ---p 00015000 08:01 11796731 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b2bb0f45000-2b2bb0f46000 rw-p 00015000 08:01 11796731 /lib/x86_64-linux-gnu/libgcc_s.so.1 2b2bb4000000-2b2bb4021000 rw-p 00000000 00:00 0 2b2bb4021000-2b2bb8000000 ---p 00000000 00:00 0 7fff5cd00000-7fff5cd23000 rw-p 00000000 00:00 0 [stack] 7fff5cdd8000-7fff5cdd9000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] /bin/sh: line 1: 18863 Done(2) gcc -E -D__GENKSYMS__ -Wp,-MD,drivers/acpi/.video.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.7/include -I/home/me/tmp/linux-3.7.2/arch/x86/include -Iarch/x86/include/generated -Iinclude -I/home/me/tmp/linux-3.7.2/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/home/me/tmp/linux-3.7.2/include/uapi -Iinclude/generated/uapi -include /home/me/tmp/linux-3.7.2/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -Os -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(video)" -D"KBUILD_MODNAME=KBUILD_STR(video)" drivers/acpi/video.c 18864 Aborted | scripts/genksyms/genksyms -a x86_64 -r /dev/null > drivers/acpi/.tmp_video.ver make[3]: *** [drivers/acpi/video.o] Error 134 make[2]: *** [drivers/acpi] Error 2 make[1]: *** [drivers] Error 2 make[1]: Leaving directory `/home/me/tmp/linux-3.7.2' make: *** [debian/stamp/build/kernel] Error 2

First run:
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  Building modules, stage 2.
  MODPOST 2369 modules
ERROR: "ieee80211_get_hdrlen" [drivers/staging/rtl8192u/r8192u_usb.ko] undefined!
ERROR: "ieee80211_is_empty_essid" [drivers/staging/rtl8192u/r8192u_usb.ko] undefined!
make[2]: *** [__modpost] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/me/tmp/linux-3.7.2'
make: *** [debian/stamp/build/kernel] Error 2
3.6.3
LD [M] drivers/input/misc/pcf50633-input.ko CC drivers/input/misc/pcspkr.mod.o In file included from drivers/input/misc/pcspkr.mod.c:1:0: include/linux/module.h:299:9: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. make[2]: *** [drivers/input/misc/pcspkr.mod.o] Error 1 make[1]: *** [modules] Error 2 make[1]: Leaving directory `/home/me/tmp/linux-3.6.3' make: *** [debian/stamp/build/kernel] Error 2
3.5.0
The errors keep changing.

Second run:
  CC [M]  drivers/gpu/drm/via/via_map.o
  CC [M]  drivers/gpu/drm/via/via_mm.o
  CC [M]  drivers/gpu/drm/via/via_dma.o
drivers/gpu/drm/via/via_dma.c:741:21: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[5]: *** [drivers/gpu/drm/via/via_dma.o] Error 1
make[4]: *** [drivers/gpu/drm/via] Error 2
make[3]: *** [drivers/gpu/drm] Error 2
make[2]: *** [drivers/gpu] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/home/me/tmp/linux-3.5'
make: *** [debian/stamp/build/kernel] Error 2
First run:
  CC      drivers/hid/hid-sony.mod.o
drivers/hid/hid-sony.mod.c:46:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [drivers/hid/hid-sony.mod.o] Error 1
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/me/tmp/linux-3.5'
make: *** [debian/stamp/build/kernel] Error 2
3.4.42
CC [M] fs/quota/quota_tree.o CC [M] fs/reiserfs/bitmap.o fs/reiserfs/bitmap.c: In function 'scan_bitmap_block.constprop.9': fs/reiserfs/bitmap.c:236:9: warning: 'next' may be used uninitialized in this function [-Wmaybe-uninitialized] CC [M] fs/reiserfs/do_balan.o CC [M] fs/reiserfs/namei.o gcc: internal compiler error: Segmentation fault (program as) Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make[3]: *** [fs/reiserfs/namei.o] Error 4 make[2]: *** [fs/reiserfs] Error 2 make[1]: *** [fs] Error 2 make[1]: Leaving directory `/home/me/tmp/linux-3.4.42' make: *** [debian/stamp/build/kernel] Error 2


Another dmesg error:

400. XpressConnect on Debian, Arch: step by step

Here's a step-by-step write-up of this post: http://verahill.blogspot.com.au/2013/04/393-not-fix-xpressconnect-on-ubuntu-vs.html

The 'problem' with running Xpress Connect on non-Ubuntu linux distributions is entirely artificial -- XpressConnect checks whether you are using Ubuntu, and if you're not, it refuses to run.

So the solution is simply to pretend that you are using ubuntu, however annoying that is. I wish universities would take this into account and end their association with Cloudpath, or to force them to support other distributions.

Note: XpressConnect is completely superfluous -- it doesn't do anything other than set up your wireless connection, which is something you could easily do by hand. See e.g. here for eduroam: http://verahill.blogspot.com.au/2013/04/394-eduroam-using-wicd-and-network.html


How-to get XpressConnect running
1. Create the file /etc/lsb-release and put the following in it
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"
If you are completely new to linux, one way of creating the file is to run
gksu gedit /etc/lsb-release

Alternatively, if you're not using gnome, try
sudo nano /etc/lsb-release 

2. Install lshw and iwlist

On debian (and clones like mint, ubuntu etc.):
sudo apt-get install lshw wireless-tools

On arch linux
sudo pacman -S lshw wireless_tools

3. Run XpressConnect
This is the vanilla version -- replace http://hosted.cloudpath.net/Xavier/Production/tools/XpressConnect-Linux.tar with the link to your universities version.

cd ~/Downloads
wget http://hosted.cloudpath.net/Xavier/Production/tools/XpressConnect-Linux.tar
tar xvf XpressConnect-Linux.tar
./XpressConnect-DoubleClickToRun

That's it. Simple as that.

27 April 2013

399. Looking at speeding up (re)boot on debian wheezy.

I'd be interested in getting my beowulf cluster nodes to boot a little bit faster -- (re)boots of the nodes very are infrequent, but the front node doubles as my work desktop and is normally rebooted at least once per month (kernel upgrades etc.) -- rebooting the front node makes me nervous, however, and the faster it boots, the better it is.

I should probably build a low-powered front node specifically for my cluster though...but that takes money, and money takes time.

Anyway, boot. In spite of the impetus for this post I'm testing this on my laptop which has wheezy, gnome 3.4 and an SSD -- it's not that representative of the target system and I'll have to repeat this on a normal desktop with a spinning hdd at a later stage.

I'm more or less following http://wiki.debian.org/BootProcessSpeedup. Note that insserv seems to be set up and enabled by default in Wheezy.


Timing it -- Setting up bootchart2
I first tried to define boot times arbitrarily as the time from me hitting enter in GRUB, to the visual appearance of the log-in prompt in GDM3, but it was too imprecise (up to +- 2) relative to the time a boot took (ca 9-10s).

I ended up installing bootchart and bootchart-view instead.
sudo apt-get install bootchart2

Then edit /etc/default/grub as shown here:
GRUB_CMDLINE_LINUX_DEFAULT="quiet initcall_debug printk.time=y init=/sbin/bootchartd"
and run
sudo update-grub

After a boot, run
pybootchartgui
eog bootchart.png

You'll get something like this:
Look at the top, right above the first chart -- it says 'time: 6.61s'. I'll use that as the metric.

Most of the time bootchart2 worked fine, but for the odd boot the /var/log/bootchart.tgz wasn't accepted by pybootchartgui.

Normal boot, pre-optimisation: 
'Cold' reboots: 6.61, 5.77 seconds
Warm* reboots: 6.46, 5.79, 5.97 seconds

*using shutdown -r now

The variability is very high -- there's almost a second between the fastest and slowest boots. Keep that in mind when looking at the numbers later on.


Using readahead-fedora to pre-load files
sudo apt-get install readahead-fedora

After install, readhead-early, -late and stop were enabled in rcconf.

The first boot took over 7 seconds, but later boots were typically around 6 seconds or faster. Note that readahead is solving an issue which isn't really present when using high bandwidth SSDs, and may even slow things down under conditions where you use an SSD or a spinning disk with a high rpm (e.g. >7200 rpm)

First run

'normal' run

Not exactly an improvement. Looking at /etc/readahead.d/custom.early shows that the wrong kernel files are loaded -- I'm using a custom kernel (3.8.5-ck1) but the stock kernel files are loaded (3.2.0-4). I edited custom.early to point towards my current kernel, and then did a warm reboot.


Speeding up reboots -Kexec
sudo apt-get install kexec-tools

Shutdown your computer once, then boot up. After that first time you can do warm reboots (sudo shutdown -r now) without going through the BIOS and grub stages. The only -- visible -- downside is that your screen will go crazy for a few seconds as the running kernel is being overwritten by the new kernel (I presume). Doesn't look pretty, but reboot is fast.

I couldn't get bootchart to time the hot reboots, but they look 'fast'.


I'll be repeating this on a system with a spinning disk at a later stage.

26 April 2013

398. Securing your Dropbox with encfs

Quite some time ago I made a post about how to use truecrypt and dropbox together. It wasn't a very elegant solution as it consisted of putting a truecrypt container in the dropbox folder.

 Apart from being pretty obvious, it suffers from drawbacks, such as the fixed size of the truecrypt container taking up space whether you're using it all or not.

[Note that mounting the dropbox folder inside a truecrypt container isn't a real solution either since it won't actually encrypt anything.]

Playing around with encfs made me realise that THIS is the perfect solution for secure Dropbox.

We'll make the assumption that you don't want to encrypt everything in your dropbox, but only things which is kept in a specific folder.

I'm presuming that you've got dropbox set up and working. If not, get the deb files from https://www.dropbox.com/

If you're having issues, make sure that fuse is installed, and that you belong to the group fuse (too add, do sudo usermod -a -G fuse $USER . To check do cat /etc/group|grep fuse)

Getting started:

sudo apt-get install encfs
mkdir ~/Dropbox/encrypted
encfs ~/Dropbox/encrypted ~/decrypted
The directory "/home/me/decrypted" does not exist. Should it be created? (y,n) Y Creating new encrypted volume. Please choose from one of the following options: enter "x" for expert configuration mode, enter "p" for pre-configured paranoia mode, anything else, or an empty line will select standard mode. ?> p Paranoia configuration selected. Configuration finished. The filesystem to be created has the following properties: Filesystem cipher: "ssl/aes", version 3:0:2 Filename encoding: "nameio/block", version 3:0:1 Key Size: 256 bits Block Size: 1024 bytes, including 8 byte MAC header Each file contains 8 byte header with unique IV data. Filenames encoded using IV chaining mode. File data IV is chained to filename IV. File holes passed through to ciphertext. -------------------------- WARNING -------------------------- The external initialization-vector chaining option has been enabled. This option disables the use of hard links on the filesystem. Without hard links, some programs may not work. The programs 'mutt' and 'procmail' are known to fail. For more information, please see the encfs mailing list. If you would like to choose another configuration setting, please press CTRL-C now to abort and start over. Now you will need to enter a password for your filesystem. You will need to remember this password, as there is absolutely no recovery mechanism. However, the password can be changed later using encfsctl. New Encfs Password: Verify Encfs Password:
Put the files you want to be encrypted in ~/decrypted -- NOT ~/Dropbox/encrypted. Once you're done, unmount ~/decrypted:
sudo umount ~/decrypted


When you want to access your encrypted files or add more files to the encrypted file, just mount ~/Dropbox/encrypted using encfs:
encfs ~/Dropbox/encrypted ~/decrypted/

397. Briefly: compiling ck (Con Kolivas) kernel 3.8.9 in arch linux


mkdir ~/tmp
cd ~/tmp 
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.8.9.tar.bz2
tar xvf linux-3.8.9.tar.bz2
cd linux-3.8.9/
wget http://ck.kolivas.org/patches/3.0/3.8/3.8-ck1/patch-3.8-ck1.bz2
bunzip2 patch-3.8-ck1.bz2
patch -p1 < patch-3.8-ck1
cp /proc/config.gz .
gunzip config.gz
mv config .config
make oldconfig
make -j2
make -j2 modules
sudo make modules_install
sudo make headers_install INSTALL_HDR_PATH=/usr/src/linux-3.8.9-ck1-ARCH
sudo cp arch/x86_64/boot/bzImage /boot/vmlinuz-3.8.9-ck1-ARCH
sudo cp System.map /boot/System-3.8.9-ck1-ARCH.map
sudo mkinitcpio -k 3.8.9-ck1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-3.8.9-ck1-ARCH.img
sudo grub-mkconfig -o /boot/grub/grub.cfg

396. Compiling gromacs 4.6 with gpu support, openblas and fftw3 on debian wheezy

NOTE: with ACML my performance on my FX8150 and FX8350 nodes is only 25% of that with Openblas (double precision). Yes, for some reason gromacs is four times faster with openblas than with the machine vendor libraries in my tests.

Here are the release notes: http://www.gromacs.org/About_Gromacs/Release_Notes/Versions_4.6.x
As far as I understand you don't have to rely on openmm anymore for CUDA. Yes, the PITA of compiling openmm is gone!

Note that GPU calcs only speed things up under certain, specific conditions  -- and not all nvidia cards are supported (or equal). My own set-up, using statically cooled graphics cards, is definitely not appropriate for a GPU cluster. Once nwchem comes out with GPU support I might upgrade to fancier $200 graphics cards (maybe COSMO in NWChem will finally become more reasonable in terms of computational cost), but there's little reason for that at the moment.

Not all cards are created equal either -- e.g. GT210, which has GPU compute capability 1.2, is too poor to run with gromacs. GT430 (compute cap GT430) works. Both are obviously not viable for professional work.

Also note that it seems that you still need to use OPENMM if you want GPU support for implicit solvation.

Gromacs used to be easy to install. It's become a fair bit more complicated between 4.5.5 and 4.6. See here for gromacs 4.5.5: http://verahill.blogspot.com.au/2012/05/gromacs-with-external-fftw3-and-blas-on.html

CUDA: If you want to build with cuda you need gcc-4.6, which is still available in the wheezy repos. 4.7 won't work. Luckily, you can have both on your system, but you'll need to specify CC and CXX as shown below.

Openblas
Note that the links to the openblas file tends to die after a while, so you might have to download it manually.

sudo mkdir /opt/openblas
sudo chown ${USER} /opt/openblas
cd ~/tmp
wget http://github.com/xianyi/OpenBLAS/tarball/v0.2.6
tar xvf v0.2.6
cd xianyi-OpenBLAS-87b4d0c/
wget http://www.netlib.org/lapack/lapack-3.4.1.tgz
make all BINARY=64 CC=/usr/bin/gcc FC=/usr/bin/gfortran USE_THREAD=0 INTERFACE64=1 1> make.log 2>make.err
make PREFIX=/opt/openblas install
cp lib*.*  /opt/openblas/lib

add
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openblas/lib
to your ~/.bashrc [for later use with nwchem and ecce, add /opt/openblas/lib to /etc/ld.so.conf and do sudo ldconfig -- you might want to make libopenblas.so and libopenblas.so.0 sym links to the main lib, libopenblas_bulldozer-r0.2.6.so]

single-precision gromacs 4.6 with both CPU and GPU

CUDA
If you have an nvidia card and want to enable GPU calcs, do
sudo apt-get install nvidia-cuda-toolkit gcc-4.6 g++-4.6

If /usr/lib/libcuda.so is nothing by a symmlink to /usr/lib/libcuda.so.1, and the file /usr/lib/libcuda.so.1 is missing (this was the case on my wheezy amd64), then do
sudo rm /usr/lib/libcuda.so
sudo ln -s /usr/lib/x86_64-linux-gnu/libcuda.so.1 /usr/lib/libcuda.so

You can also simply make sure that there/s no /usr/lib/libcuda.so.

Continue with the gromacs compilation:
cd ~/tmp
sudo apt-get install cmake
wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-4.6.tar.gz
tar xvf gromacs-4.6.tar.gz
mkdir build_gromacs46
cd build_gromacs46
sudo mkdir /opt/gromacs
sudo chown ${USER} /opt/gromacs
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/openblas/lib
export LDFLAGS="-L/opt/openblas/lib -lopenblas"
export CPPFLAGS="-I/opt/openblas/include"
export CC=/usr/bin/gcc-4.6 && export CXX=/usr/bin/g++-4.6 && cmake -DGMX_FFT_LIBRARY=fftw3 -DGMX_BUILD_OWN_FFTW=On -DGMX_DOUBLE=off -DCMAKE_INSTALL_PREFIX=/opt/gromacs/gromacs4.6_single -DGMX_EXTERNAL_BLAS=/opt/openblas/lib ../gromacs-4.6
make
make install

Note: for acml I used this instead:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/acml/acml5.2.0/gfortran64_fma4_int64/lib
export LDFLAGS="-L/opt/acml/acml5.2.0/gfortran64_fma4_int64/lib -lacml"
export CPPFLAGS="-I/opt/acml/acml5.2.0/gfortran64_fma4_int64/include"
export CC=/usr/bin/gcc-4.6 && export CXX=/usr/bin/g++-4.6 && cmake -DGMX_FFT_LIBRARY=fftw3 -DGMX_BUILD_OWN_FFTW=On -DGMX_DOUBLE=off -DCMAKE_INSTALL_PREFIX=/opt/gromacs/gromacs4.6_single -DGMX_EXTERNAL_BLAS=/opt/acml/acml5.2.0/gfortran64_fma4_int64/lib ../gromacs-4.6


Double-precision gromacs without GPU acceleration:

cd ~/tmp/build_gromacs46
rm * -rf
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/openblas/lib
export LDFLAGS="-L/opt/openblas/lib -lopenblas"
export CPPFLAGS="-I/opt/openblas/include"
export CC=/usr/bin/gcc-4.6 && export CXX=/usr/bin/g++-4.6 && cmake -DGMX_FFT_LIBRARY=fftw3 -DGMX_BUILD_OWN_FFTW=On -DGMX_DOUBLE=on -DGMX_GPU=off -DCMAKE_INSTALL_PREFIX=/opt/gromacs/gromacs4.6_double -DGMX_EXTERNAL_BLAS=/opt/openblas/lib ../gromacs-4.6
make
make install

Note: for acml I used this instead:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/acml/acml5.2.0/gfortran64_fma4_int64/lib
export LDFLAGS="-L/opt/acml/acml5.2.0/gfortran64_fma4_int64/lib -lacml"
export CPPFLAGS="-I/opt/acml/acml5.2.0/gfortran64_fma4_int64/include"
export CC=/usr/bin/gcc-4.6 && export CXX=/usr/bin/g++-4.6 && cmake -DGMX_FFT_LIBRARY=fftw3 -DGMX_BUILD_OWN_FFTW=On -DGMX_DOUBLE=on -DGMX_GPU=off -DCMAKE_INSTALL_PREFIX=/opt/gromacs/gromacs4.6_double -DGMX_EXTERNAL_BLAS=/opt/acml/acml5.2.0/gfortran64_fma4_int64/lib ../gromacs-4.6

Add gromacs to path:
echo 'export PATH=$PATH:/opt/gromacs/gromacs4.6_single/bin:/opt/gromacs/gromacs4.6_double/bin' >> ~/.bashrc

Switching between GPU and CPU
You can use the same binary for both, but remember that only the single precision binaries have GPU support to begin with. To set gpu vs cpu, use the -nb option in mdrun:
-nb enum auto Calculate non-bonded interactions on: auto, cpu, gpu or gpu_cpu


Quick test:
cd ~/tmp
wget http://www.gromacs.org/@api/deki/files/128/=gromacs-gpubench-dhfr.tar.gz
tar xvf \=gromacs-gpubench-dhfr.tar.gz
cd dhfr/GPU/dhfr-solv-PME.bench
mdrun -nb cpu -s topol.tpr -testverlet

Hit ctrl+c to stop and get statistics. Then try
mdrun -nb gpu -s topol.tpr -testverlet

I got
XPU ns/day -------------- auto 7.4 GPU 7.7 CPU 4.1 gpu_cpu 7.5

where I have a 3 core 3.1 GHz AMD Athlon II X3 445 CPU and an NVIDIA GeForce GT 430 graphics card -- neither of which is anything special.

Note also that the ns/day values depended highly on how long I let the calc run, and as I didn't time it and make them run the same amount of time, I suspect that auto, GPU and gpu_cpu are all about the same.

25 April 2013

395. Compiling the ck-kernel 3.8.x on debian (and patching i915)


What is the ck kernel? In short it is a patch for the mainline kernel which is supposed to render it more responsive for desktop use. See here: https://wiki.archlinux.org/index.php/Linux-ck

I'm not going to try to 'benchmark' this against the stock kernel, since I'm not clear what a good metric would be -- how do you measure 'responsiveness'? Come to think of it -- what's a good, objective definition?

Download the kernel version that you need from http://kernel.org and the ck path from Con's web page at http://users.on.net/~ckolivas/kernel/

I also ended up applying this patch to sort out recent i915 issues:
http://verahill.blogspot.com.au/2013/03/368-slow-mouse-and-keyboard-triggered.html
https://bbs.archlinux.org/viewtopic.php?pid=1248190
http://forums.gentoo.org/viewtopic-p-7278760.html
https://bbs.archlinux.org/viewtopic.php?pid=1254285#p1254285

I did it by creating a file called i915.patch and placing it in the kernel source root:
--- drivers/gpu/drm/drm_crtc_helper.c 2013-04-26 10:24:07.987942008 +1000 +++ ../../linux-3.8.8/drivers/gpu/drm/drm_crtc_helper.c 2013-04-17 15:11:28.000000000 +1000 @@ -1067,7 +1067,7 @@ void drm_helper_hpd_irq_event(struct drm enum drm_connector_status old_status; bool changed = false; - if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll) + if (!dev->mode_config.poll_enabled) return; mutex_lock(&dev->mode_config.mutex);
Note that as far as I know it doesn't solve the issue, but it does allow you to disable polling by editing /etc/default/grub and adding
GRUB_CMDLINE_LINUX_DEFAULT="quiet drm_kms_helper.poll=N"
followed by running
sudo update-grub

So far it's working fine (after testing for ca one hour).

Anyway, here's kernel 3.8.5 (should work on all 3.8.x):
sudo apt-get install kernel-package fakeroot build-essential ncurses-dev
mkdir ~/tmp
cd ~/tmp
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.5.tar.xz
tar xvf linux-3.8.5.tar.xz
cd linux-3.8.5/
wget http://ck.kolivas.org/patches/3.0/3.8/3.8-ck1/patch-3.8-ck1.bz2
bunzip2 patch-3.8-ck1.bz2
patch -p1 < patch-3.8-ck1
patching file arch/powerpc/platforms/cell/spufs/sched.c patching file Documentation/scheduler/sched-BFS.txt patching file Documentation/sysctl/kernel.txt patching file fs/proc/base.c patching file include/linux/init_task.h patching file include/linux/ioprio.h patching file include/linux/sched.h patching file init/Kconfig patching file init/main.c patching file kernel/delayacct.c patching file kernel/exit.c patching file kernel/posix-cpu-timers.c patching file kernel/sysctl.c patching file lib/Kconfig.debug patching file include/linux/jiffies.h patching file drivers/cpufreq/cpufreq.c patching file drivers/cpufreq/cpufreq_ondemand.c patching file drivers/cpufreq/cpufreq_conservative.c patching file kernel/sched/bfs.c patching file kernel/sched/Makefile patching file include/uapi/linux/sched.h patching file include/linux/swap.h patching file mm/memory.c patching file mm/swapfile.c patching file mm/vmscan.c patching file arch/x86/Kconfig patching file kernel/Kconfig.hz patching file kernel/Kconfig.preempt patching file Makefile
patch -p0 -R < i915.patch
patching file drivers/gpu/drm/drm_crtc_helper.c
make-kpgk clean cat /boot/config-`uname -r`>.config make oldconfig time fakeroot make-kpkg -j4 --initrd kernel_image kernel_headers sudo dpkg -i ../linux*3.8.5-ck*.deb

where 4 is the number of cores on your machine (note: it only has to do with compiling -- you can use the compiled binaries on any number of cores).

That's it. Now all you have to do is reboot and you'll be using your new kernel. Simple, eh?

23 April 2013

394. Eduroam using wicd and network-manager

Eduroam is a "secure international roaming service" which is used by a great number of universities in Europe, the US and Australia, as well as being used by a limited number of campuses in Asia and Africa.

It's a pretty neat idea since there's frequent exchange of visitors between universities (visiting researchers, seminar speakers, PhD students visiting to do measurements etc.). Getting an account to set up with IT for a temporary user is too much hassle -- and this takes care of that.

While Eduroam might be implemented slightly different on different campuses, this is what I've had luck with in Melbourne (https://wiki.aarnet.edu.au/display/eduroam/For+End+Users).

Here are a couple of screenshots and instructions for network-manager and wicd

network-manager

Security: WPA & WPA2 Enterprise Authentication: Protected EAP (PEAP) Anon. Identity: CA certificate: Inner Authentication: MSCHAPv2 Username: uniusername Password: password


Wicd
I wiped my laptop a month or two ago and hadn't bothered reconnecting to eduroam after that, so when setting it up in wicd I first tried creating a script in /etc/wicd/encryption/templates, which I activated by including it in /etc/wicd/encryption/templates/active. I kept on getting 'bad password' errors though. Note that I've had no success whatsoever connecting to any network using wicd in virtualbox. What I show below works on physical hardware (i.e. my Thinkpad SL410) though.

Anyway, simple: click on Properties for the eduroam network you want to connect to, and set it up as shown below (version 1.7.2 as found in Wheezy)


For Encryption, pick PEAP with TKIP/MSCHAPv2, and input your university username and password.

You don't need to use the CA cert, so if you don't have access to the eduroam CA cert, don't worry, and don't include it (it improves security though).




Android
As a bonus, here are the settings in android.


Links to this post:
http://crunchbang.org/forums/viewtopic.php?pid=345087

20 April 2013

393. Solved: XpressConnect on Ubuntu vs Debian. Extra focus on Swinburne university (AU/Melbourne)

Update 4. It's fixed now. There are two fixes:
1. XpressConnect wants ubuntu and checks for it via /etc/lsb-release, a file that doesn't exist on debian. Set it up to pretend that you're using ubuntu, and XpressConnect works.
2. Just configure the network connection manually. This is by far the easiest, as long as you know the settings.

Either way you'll need network-manager, lshw and wireless-tools in order to use XpressConnect. See towards the end of the post for more details.

Presumably this should work on any distro (e.g. arch, centos, rhel, sles), not just debian.

Update 3: Someone at Swinburne managed to connect to the Wifi without using XpressConnect by simply manually configuring the network: http://forums.debian.net/viewtopic.php?f=10&t=103387&p=494412#p494145

Original post:

Until a few days ago I'd never heard of XpressConnect before, but apparently it's a program that sets up your wireless connection automatically, and is used by a number of universities ( http://lmgtfy.com/?q=xpressconnect+site%3A*.edu)

In short, it works on Ubuntu (32 bit 10.04 lts) but not Debian (64 bit wheezy, 32 or 64 bit squeeze). Note that Ubuntu 10.04 has Gnome 2, as does Squeeze. Wheezy has Gnome 3.


Description
You don't need to be anywhere near a uni network to reproduce the issue -- anyone, with or without a wireless card, can test it.

Note: I generated the logs with a copy of XpressConnect downloaded from Swinburne, not the generic version -- hence why it says swinwifi etc.

On debaian, first make sure to install lshw and wireless-tools, and to add /sbin to path in the terminal you're using.
sudo apt-get install lshw wireless-tools
export PATH=$PATH:/sbin

The 'installation' is simple
cd ~/Downloads
wget http://hosted.cloudpath.net/Xavier/Production/tools/XpressConnect-Linux.tar
tar xvf XpressConnect-Linux.tar
./XpressConnect-DoubleClickToRun 
Will download x64 version... --2013-04-18 21:11:16-- http://hosted.cloudpath.net/Xavier/Production//tools/XpressConnect-x64.tar.bz2 Resolving hosted.cloudpath.net (hosted.cloudpath.net)... 72.18.151.75 Connecting to hosted.cloudpath.net (hosted.cloudpath.net)|72.18.151.75|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 6266475 (6.0M) [application/x-bzip2] Saving to: `/tmp/XpressConnect-x64.tar.bz2' 100%[==============================================================================================================================>] 6,266,475 780K/s in 10s 2013-04-18 21:11:27 (600 KB/s) - `/tmp/XpressConnect-x64.tar.bz2' saved [6266475/6266475] files files/logo.jpg network_config.xml resources.properties XpressConnect-x64

XpressConnect-DoubleClickToRun is a simple shell script that determines whether system is 32 or 64 bit, downloads a tar file to /tmp, untars it and launches a pre-compiled binary, XpressConnect-x64.
You can also launch XpressConnect-x64 directly by going to /tmp and running it.

Anyway, XpressConnect-x64 then makes sure that you have network-manager running, and tries to determine what your network card is. Based on this, /tmp/netdata.txt is generated. Once this is done, XpressConnect allows you to enter your credentials and sets up your network connection.
Well, that's what happens if you use ubuntu. On Debian (or Arch) you get an error message about 'network configuration' missing.

Delving a bit deeper into it, the binary fails to generate the netdata.txt on debian (and arch), and it seems to have to do with network-manager (or dbus, possibly).


The logs:
XpressConnect-x64 generates a log file (/tmp/xpressconnect.log).

On ubuntu it looks like this:
Looking for id : 266 Looking for id : 259 Setting start page. Moving to widget 0. Loading configuration page. Starting configuration parse thread. Acquire processing lock. Building NIC data. Starting configuration parser. Validating checksum. Checking license. License validation checked out properly. Today is : 04/19/2013 License expires : The date validation checked out properly. Checking for valid networks for this platform. Only one network configuration found. Auto-selecting it. Auto-selected network 'swinwifi'. Interface : /org/freedesktop/NetworkManager/Devices/0 is in state 8 Interface : /org/freedesktop/NetworkManager/Devices/1 is in state 3 There were no interfaces found that could be autodetected for use. Checking that there are interfaces of the correct type available. Found 1 possible interface(s). Selected interface with object path of /org/freedesktop/NetworkManager/Devices/1 Int type : 2 Set profile index : 11 Going to page 3 Config parser terminated. Set 'static' window labels. ---- Gathering Data ---- Parsing OS information... Checking OS bit depth. OS bits info : i686 OS is 32 bits. Checking hardware information. Looking for extra NIC data. Found driver name for 'wlan0' from DBus. - Driver : rtl8187 Couldn't get capabilities from DBus, trying the hard way. Attempting to release lock. Release processing lock. Set welcome banners. Using DBus UUID for client ID. Using DBus UUID for client ID. Client ID : f3af3f95c2229c756e98556050ed0cc4 Session ID : 6980532961366355275 Upload value (1) : 0 Moving to widget 3.
And on Debian:
Looking for id : 266 Looking for id : 259 Setting start page. Moving to widget 0. Loading configuration page. Starting configuration parse thread. Acquire processing lock. Building NIC data. Starting configuration parser. Validating checksum. Checking license. License validation checked out properly. Today is : 04/22/2013 License expires : The date validation checked out properly. Checking for valid networks for this platform. No valid networks found in the configuration. Config parser terminated. Failed to parse configuration. Set 'static' window labels. ---- Gathering Data ---- Parsing OS information... Checking OS bit depth. OS bits info : x86_64 OS is 64 bits. Checking hardware information. Looking for extra NIC data. Found driver name for 'wlan0' from DBus. - Driver : rtl8187 Couldn't get capabilities from DBus, trying the hard way. Attempting to release lock. Release processing lock. Set welcome banners. Using DBus UUID for client ID. Using DBus UUID for client ID. Client ID : fe88ef3cf6716df910e7fa570000000b Session ID : 13542037211366584788 Moving to widget 9. User clicked 'Retry' on the bad config widget. Moving to widget 1. Selected network 'swinwifi'. Going to page 9 Adding page 1 Moving to widget 9.
The platform bit bothers me -- is it checking for ubuntu vs other distros?

XpressConnect then generates a file called /tmp/netdata.txt:
*-network description: Ethernet interface product: 82540EM Gigabit Ethernet Controller vendor: Intel Corporation physical id: 3 bus info: pci@0000:00:03.0 logical name: eth0 version: 02 serial: 08:00:27:53:23:4c width: 32 bits clock: 66MHz capabilities: bus_master cap_list ethernet physical configuration: broadcast=yes driver=e1000 driverversion=7.3.21-k5-NAPI firmware=N/A ip=10.0.2.15 latency=64 mingnt=255 multicast=yes resources: irq:10 memory:f0000000-f001ffff ioport:d010(size=8) *-network description: Wireless interface physical id: 1 logical name: wlan0 serial: 00:11:a3:08:12:1d capabilities: ethernet physical wireless configuration: broadcast=yes multicast=yes wireless=IEEE 802.11bg

I also did a strace on both ubuntu and debian, but strace generates a lot of information. A major difference I observed was the presence of CLOCK_MONOTONIC in the ubuntu log, but this is to synchronize for the CA certificate (or something -- I don't know what I'm talking about). Anyway, it probably just indicates what we already know -- the binary doesn't detect the card on debian but it does on ubuntu.

ldd XpressConnect-x64 gives the following on ubuntu (32 bit):
linux-gate.so.1 => (0x006a3000) libdbus-1.so.3 => /lib/libdbus-1.so.3 (0x007b3000) libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00c8b000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x008b8000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00da4000) libXext.so.6 => /usr/lib/libXext.so.6 (0x00225000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00480000) libz.so.1 => /lib/libz.so.1 (0x00110000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00125000) librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x00665000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x006f2000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00ac3000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x002d8000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00129000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x002fe000) libexpat.so.1 => /lib/libexpat.so.1 (0x00148000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00a12000) /lib/ld-linux.so.2 (0x00637000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00c7a000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0096f000)

and this on debian (64 bit):
linux-vdso.so.1 => (0x00007fff50dfb000) libdbus-1.so.3 => /lib/libdbus-1.so.3 (0x00007f2bbb807000) libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f2bbb5fd000) libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f2bbb3c7000) libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f2bbb13f000) libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f2bbaf2d000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f2bbabf1000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f2bba9da000) libdl.so.2 => /lib/libdl.so.2 (0x00007f2bba7d6000) librt.so.1 => /lib/librt.so.1 (0x00007f2bba5cd000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f2bba3b1000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f2bba09d000) libm.so.6 => /lib/libm.so.6 (0x00007f2bb9e1a000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f2bb9c04000) libc.so.6 => /lib/libc.so.6 (0x00007f2bb98a2000) libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f2bb9679000) libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f2bb945d000) /lib64/ld-linux-x86-64.so.2 (0x00007f2bbba58000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f2bb9259000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f2bb9054000)

Evidence of evil and a fix

The evidence
Here's a snippet of the strace output from ubuntu
2200 write(8, "The date validation checked out "..., 42) = 42 2200 write(8, "Checking for valid networks for "..., 47) = 47 2200 open("/etc/lsb-release", O_RDONLY|O_LARGEFILE) = 15 2200 read(15, "DISTRIB_ID=Ubuntu\nDISTRIB_RELEAS"..., 8191) = 104 2200 read(15, "", 8191) = 0 2200 close(15)
and here's Debian:
3079 write(8, "The date validation checked out "..., 42) = 42 3079 write(8, "Checking for valid networks for "..., 47) = 47 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 open("/etc/lsb-release", O_RDONLY) = -1 ENOENT (No such file or directory) 3079 write(8, "No valid networks found in the c"..., 46) = 46 3079 close(11)

The evil is that it's highly misleading -- it's not checking for valid networks, it's checking whether you've got ubuntu. And it didn't fail to find a valid network -- it failed to find /etc/lsb-release.
Here's /etc/lsb-release from ubuntu
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=10.04 DISTRIB_CODENAME=lucid DISTRIB_DESCRIPTION="Ubuntu 10.04.4 LTS"

The fix
Debian doesn't have an lsb-release file, so I simply copied the /etc/lsb-release file from ubuntu to debian. Guess what? XpressConnect now works on debian!

And no, having an empty /etc/lsb-release file doesn't work. Also, editing it (replacing 'ubuntu' with 'debian') also causes XpressConnect to stop working.



Another 'fix' -- manual Configuration:
XpressConnect does not do more than set up your wireless connection i.e. sets the required settings and installs the CA certificate for your particular network. In other words, you can just manually configure your network and you'll probably be fine.

Unfortunately, I haven't found a URL for the CA cert for Swinburne, which is the example that I'm working with (based on a forum post)

I managed to extract most of that by running it in an ubuntu VM. Note that I am nowhere near Swinburne, not staff/a student there and actually can't test this to completion.
ubuntu -- apparently it's no longer brown...
The settings are:
Security: WPA & WPA2 Enterprise Authentication: Tunneled TLS Anonymous identity: anonymous CA certificate: swinwifi.der Inner authentication: PAP Username: ***@swinburne.edu Pasword: ******

You'll need swinwifi.der. Because it is in binary I can't easily post it. However, you can generate it from the .pem file which is in ascii armour:
-----BEGIN CERTIFICATE----- MIID9zCCA2CgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBtDELMAkGA1UEBhMCQVUx ETAPBgNVBAgTCFZpY3RvcmlhMRIwEAYDVQQHEwlNZWxib3VybmUxKzApBgNVBAoT IlN3aW5idXJuZSBVbml2ZXJzaXR5IG9mIFRlY2hub2xvZ3kxDDAKBgNVBAsTA0lU UzEeMBwGA1UEAxMVcmFkaXVzLmNjLnN3aW4uZWR1LmF1MSMwIQYJKoZIhvcNAQkB FhRuZXR3b3Jrc0Bzd2luLmVkdS5hdTAeFw0wNzAxMTcwMzU3MDVaFw0xNzAxMTQw MzU3MDVaMIG0MQswCQYDVQQGEwJBVTERMA8GA1UECBMIVmljdG9yaWExEjAQBgNV BAcTCU1lbGJvdXJuZTErMCkGA1UEChMiU3dpbmJ1cm5lIFVuaXZlcnNpdHkgb2Yg VGVjaG5vbG9neTEMMAoGA1UECxMDSVRTMR4wHAYDVQQDExVyYWRpdXMuY2Muc3dp bi5lZHUuYXUxIzAhBgkqhkiG9w0BCQEWFG5ldHdvcmtzQHN3aW4uZWR1LmF1MIGf MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDGwvfVz2DnKxFMYTG1k0QklSHC7vk5 kjIiDkdU3sRTdQ07cQUOI/8wFN4zZXowEz0DwlO1o/YWaZqw27EP85cp9XBndwRK ZZpIv57zrxo8nxJV/mKBpOM7MHpkclju20XoEtrQ7FwTHPbWaaKmSuaMVitWcFVg C3CIYkvQn9pozQIDAQABo4IBFTCCAREwHQYDVR0OBBYEFEo9WNtNMY7jUvvASrE9 Z/OdaeU9MIHhBgNVHSMEgdkwgdaAFEo9WNtNMY7jUvvASrE9Z/OdaeU9oYG6pIG3 MIG0MQswCQYDVQQGEwJBVTERMA8GA1UECBMIVmljdG9yaWExEjAQBgNVBAcTCU1l bGJvdXJuZTErMCkGA1UEChMiU3dpbmJ1cm5lIFVuaXZlcnNpdHkgb2YgVGVjaG5v bG9neTEMMAoGA1UECxMDSVRTMR4wHAYDVQQDExVyYWRpdXMuY2Muc3dpbi5lZHUu YXUxIzAhBgkqhkiG9w0BCQEWFG5ldHdvcmtzQHN3aW4uZWR1LmF1ggEAMAwGA1Ud EwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEASFZ/5oRvTpgs0yQmdXxczUvJhUam 5KTP8MAb8owh1v65VkBFXLdJ27THEDt0SX3ZzwlYIvKcVMoiJcXjE6uLgZPI4AZv 7ogHIU5TOvQsYXWNeCqQMqOTnZtVQPvZmOcHcM1aqiBCAVX3YhIU1S04SccYdKBA PaggsSjsagqoZvA= -----END CERTIFICATE-----

openssl x509 -in swinwifi.pem -out swinwifi.der -outform DER

Put it in the folder ~/.certificates.

The md5sum should be
11843b7d38bc0b024e8356f11d4d7c42 swinwifi.der
I've also tried that java version of xpress connect.

Finally, do NOT as a rule download certificates from third parties! How can you trust that my intentions are good? At the moment you're choice is between trusting me and Shuttleworth though...



Why bother?
Because an increasing number of university networks have adopted this -- frankly broken -- piece of software, I think it's of some interest to users of other distros to investigate whether there are any simple solutions. This in particular since not all uni networks have instructions for manual configuration anymore. Besides, a challenge is a challenge.



19 April 2013

392. Wheezy release date set

...assuming that nothing happens in between now and then of course. See here:
We now have a target date of the weekend of 4th/5th May for the release. We have checked with core teams, and this seems to be acceptable for everyone. This means we are able to begin the final preparations for a release of Debian 7.0 - "Wheezy".

While that's interesting, the real cause for excitement will of course be Jessie.

For those following testing instead of wheezy in their /etc/apt/sources.list, now might be a good time to replace all instances of testing with wheezy and installing apt-listbugs in anticipation. Jessie might be a bit wobbly in the beginning...

Links to this post:
http://crunchbang.org/forums/viewtopic.php?id=26012

18 April 2013

391. encfs on debian testing

Truecrypt is nice and all, but the way it's managed is a bit un-linux like. It IS open source though, but because it isn't completely clear who the maintainers are, and while the source code is probably safe to use, most people use pre-built binaries -- just because it's open source doesn't mean that the binaries are built from that source. I'm happy with truecrypt, but if we're going to be paranoid, we might as well go all the way. Also, it would be nice with an encryption tool which can be installed from the repos, and as a binary built by a trusted party (i.e. the debian maintainers).

Note that truecrypt wins hands down on features -- as always, pick the tool that does the job.

encfs is a well-established encryption tool for linux systems and is available in most distro repos -- it does encryption of files, and while it lacks many of the options of truecrypt, it is useful for encrypting directory structures.

Installation
sudo apt-get install encfs

Yes, that's it. If you're having issues, make sure that fuse is installed, and that you belong to the group fuse (too add, do sudo usermod -a -G fuse $USER . To check do cat /etc/group|grep fuse)

Set-up
Set-up is equally easy.
 encfs ~/.secret ~/encrypted
The directory "/home/me/encrypted" does not exist. Should it be created? (y,n) Y Creating new encrypted volume. Please choose from one of the following options: enter "x" for expert configuration mode, enter "p" for pre-configured paranoia mode, anything else, or an empty line will select standard mode. ?> Standard configuration selected. Configuration finished. The filesystem to be created has the following properties: Filesystem cipher: "ssl/aes", version 3:0:2 Filename encoding: "nameio/block", version 3:0:1 Key Size: 192 bits Block Size: 1024 bytes Each file contains 8 byte header with unique IV data. Filenames encoded using IV chaining mode. File holes passed through to ciphertext. Now you will need to enter a password for your filesystem. You will need to remember this password, as there is absolutely no recovery mechanism. However, the password can be changed later using encfsctl. New Encfs Password: Verify Encfs Password:

At the end of this your encryption folder will be mounted.

How it works:
A (to me) nice way of illustrating how it works is the following:
ls ~/encrypted/ -lah
total 24K drwxr-xr-x 2 me me 4.0K Apr 18 14:29 . drwxr-xr-x 212 me me 20K Apr 18 14:29 ..
ls ~/.secret/ -lah
total 32K drwxr-xr-x 2 me me 4.0K Apr 18 14:29 . drwxr-xr-x 212 me me 20K Apr 18 14:29 .. -rw-r--r-- 1 me me 1.1K Apr 18 14:29 .encfs6.xml -rw-r--r-- 1 me me 411 Nov 14 2011 .passwd.gpg
touch ~/encrypted/test ls ~/encrypted/ -lah
total 24K drwxr-xr-x 2 me me 4.0K Apr 18 14:32 . drwxr-xr-x 212 me me 20K Apr 18 14:29 .. -rw-r--r-- 1 me me 0 Apr 18 14:32 test
ls ~/.secret/ -lah
total 32K drwxr-xr-x 2 me me 4.0K Apr 18 14:32 . drwxr-xr-x 212 me me 20K Apr 18 14:29 .. -rw-r--r-- 1 me me 1.1K Apr 18 14:29 .encfs6.xml -rw-r--r-- 1 me me 0 Apr 18 14:32 IfSGAzSkFsuN2A,SpPmnKSYu -rw-r--r-- 1 me me 411 Nov 14 2011 .passwd.gpg
df -h
encfs 734G 525G 172G 76% /home/me/encrypted

In other words, anything that is put into ~/encrypted ends up as an encrypted file in ~/.secret. It's a little bit different from truecrypt, which uses a filesystem container -- this is more similar to encrypting each file with gpg/pgp, just with a good way of managing it from a filesystem pov.

Also, this means that you don't have to dedicate a certain amount of space to the encrypted file system as you would have to with truecrypt.

Anyway, unmount ~/encrypted and no-one will have access to the decrypted forms of the files.
sudo umount ~/encrypted

To mount it again, just do
encfs ~/.secret ~/encrypted

You can change the name of the directory you want to mount it in.

It is also possible to mount automatically on boot, but this would defeat most purposes of encrypting in the first place.

17 April 2013

390. NWChem: "Fix collapse/expand in xc_nucder_gen" when using actlist and frequency calc

I ended up with the error in the title when running a job today -- the job does a calc on a complex system, where I'm only interested in optimising and doing normal mode analysis on part of the system. I (am supposed to) achieve this using actlist.

Googling shows the following two posts:
Question: http://www.emsl.pnl.gov/docs/nwchem/nwchem-support/2004/03/0010.Problem_with_Vibrational_frequencies
Answer: http://www.emsl.pnl.gov/docs/nwchem/nwchem-support/2004/03/0012.RE:_Problem_with_Vibrational_frequencies

There doesn't seem to be a follow up between then and now (nine years later).

Note that this is completely different from this post which seems to be due to the OP not putting the actlist in deck A2 (i.e. s/he computes the frequencies for different systems in A and B)

The issue:
The smallest job I can use to trigger this is the following:
scratch_dir /scratch Title "trigger" Start trigger echo charge 0 geometry autosym units angstrom O -1.79757 -0.236404 0.264744 H -2.77094 -0.198938 0.271156 H -1.44498 0.380299 -0.412669 O -0.0458786 1.77247 -0.0605460 H -0.317322 1.32556 0.781197 H 0.894700 1.49387 -0.199468 end ecce_print ecce.out basis "ao basis" cartesian print H library "6-31G" O library "6-31G" END dft mult 1 direct XC b3lyp grid fine iterations 999 mulliken end task dft energy set geometry:actlist 1:3 task dft freq

Here's the error message:
HESSIAN: the one electron contributions are done in 0.1s Fix collapse/expand in xc_nucder_gen 0 ------------------------------------------------------------------------ ------------------------------------------------------------------------ current input line : 0: ------------------------------------------------------------------------ ------------------------------------------------------------------------ This error has not yet been assigned to a category ------------------------------------------------------------------------ For more information see the NWChem manual at http://www.nwchem-sw.org/index.php/NWChem_Documentation
I can't trigger it with just one water and using an actlist of 1:3 -- seems like I need inactive atoms. However, I've run similar calcs in the past without issue.

The solution:
Do a numerical instead of analytical frequency calculation.

This works:
scratch_dir /scratch Title "trigger" Start trigger echo charge 0 geometry autosym units angstrom O -1.79757 -0.236404 0.264744 H -2.77094 -0.198938 0.271156 H -1.44498 0.380299 -0.412669 O -0.0458786 1.77247 -0.0605460 H -0.317322 1.32556 0.781197 H 0.894700 1.49387 -0.199468 end ecce_print ecce.out basis "ao basis" cartesian print H library "6-31G" O library "6-31G" END dft mult 1 direct XC b3lyp grid fine iterations 999 mulliken end task dft energy set geometry:actlist 1:3 task dft freq numerical

15 April 2013

389. Patches for NWChem 6.1.1 on Debian Wheezy/Testing

There are a couple of issues with the current version of NWChem (27th of June 2012):
* PSPW is broken when NWChem is compiled with/run on systems with gcc 4.7 (here)
* Python support requires patching to include -lz -lssl (here)
* for GabEdit to work more detail needs to be printed (here)


To fix all those issues in one go, do the following:

1. Copy the text at the end of the post, and paste it into a file, e.g. diff.patch.

2. Put the patch file in NWCHEM_TOP (i.e. the root of the source code) e.g. /opt/nwchem/nwchem-6.1.1
If you are patching a previously compiled version of nwchem then do

patch -p0 < diff.patch
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/openblas/lib -lopenblas"
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 LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/openblas/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
export FC=gfortran
cd $NWCHEM_TOP/src/ddscf
make
cd $NWCHEM_TOP/src/nwdft/scf_dft
make
cd $NWCHEM_TOP/src/mcscf
make
cd $NWCHEM_TOP/src
make link
cd $NWCHEM_TOP/contrib
./getmem.nwchem

If it's a freshly extracted source, otherwise look at http://verahill.blogspot.com.au/2012/09/briefly-compiling-nwchem-611-with.html

Patch:
diff -rupN src.original/config/makefile.h src/config/makefile.h --- src.original/config/makefile.h 2013-04-15 12:41:45.016853322 +1000 +++ src/config/makefile.h 2013-04-15 12:38:44.933319544 +1000 @@ -1169,7 +1169,7 @@ endif FOPTIONS = -Wextra #-Wunused #-ffast-math FOPTIMIZE = -O2 -ffast-math -Wuninitialized DEFINES += -DGFORTRAN - _GCC46= $(shell gfortran -dumpversion 2>&1|awk ' /4.6./ {print "Y";exit};/4.7./ {print "Y";exit};{print "N"}') + _GCC46= $(shell gfortran -dumpversion 2>&1|awk ' /4.6/ {print "Y";exit};/4.7/ {print "Y";exit};{print "N"}') ifeq ($(_GCC46),Y) DEFINES += -DGCC46 endif @@ -1298,7 +1298,7 @@ endif FVECTORIZE=-O3 -ffast-math -mtune=native -mfpmath=sse -msse3 -ftree-vectorize -ftree-vectorizer-verbose=1 -fprefetch-loop-arrays -funroll-all-loops # FOPTIMIZE=-O1 # FVECTORIZE=-O1 - _GCC46= $(shell gfortran -dumpversion 2>&1|awk ' /4.6./ {print "Y";exit};/4.7./ {print "Y";exit};{print "N"}') + _GCC46= $(shell gfortran -dumpversion 2>&1|awk ' /4.6/ {print "Y";exit};/4.7/ {print "Y";exit};{print "N"}') ifeq ($(_GCC46),Y) DEFINES += -DGCC46 endif @@ -1890,7 +1890,7 @@ endif FOPTIONS += -ff2c -fno-second-underscore endif DEFINES += -DCHKUNDFLW -DGCC4 - _GCC46= $(shell gfortran -dumpversion 2>&1|awk ' /4.6./ {print "Y";exit};/4.7./ {print "Y";exit};{print "N"}') + _GCC46= $(shell gfortran -dumpversion 2>&1|awk ' /4.6/ {print "Y";exit};/4.7/ {print "Y";exit};{print "N"}') ifeq ($(_GCC46),Y) DEFINES += -DGCC46 endif @@ -1954,7 +1954,7 @@ endif ifeq ($(BUILDING_PYTHON),python) # EXTRA_LIBS += -ltk -ltcl -L/usr/X11R6/lib -lX11 -ldl - EXTRA_LIBS += -lnwcutil -lpthread -lutil -ldl + EXTRA_LIBS += -lnwcutil -lpthread -lutil -ldl -lssl -lz LDOPTIONS = -Wl,--export-dynamic endif ifeq ($(NWCHEM_TARGET),CATAMOUNT) diff -rupN src.original/ddscf/movecs_pr_anal.F src/ddscf/movecs_pr_anal.F --- src.original/ddscf/movecs_pr_anal.F 2013-04-15 12:41:45.036852381 +1000 +++ src/ddscf/movecs_pr_anal.F 2013-04-15 12:23:28.100409225 +1000 @@ -195,7 +195,7 @@ c 22 format(1x,2(' Bfn. Coefficient Atom+Function ',5x)) write(LuOut,23) 23 format(1x,2(' ----- ------------ ---------------',5x)) - do klo = 0, min(n-1,9), 2 + do klo = 0, min(n-1,199), 2 khi = min(klo+1,n-1) write(LuOut,2) ( $ int_mb(k_list+k)+1, diff -rupN src.original/ddscf/rohf.F src/ddscf/rohf.F --- src.original/ddscf/rohf.F 2013-04-15 12:41:45.036852381 +1000 +++ src/ddscf/rohf.F 2013-04-15 12:23:28.100409225 +1000 @@ -153,7 +153,7 @@ c ilo = 1 ihi = nmo endif - call movecs_print_anal(basis, ilo, ihi, 0.15d0, g_movecs, + call movecs_print_anal(basis, ilo, ihi, 0.01d0, g_movecs, $ 'ROHF Final Molecular Orbital Analysis', $ .true., dbl_mb(k_eval), oadapt, int_mb(k_irs), $ .true., dbl_mb(k_occ)) diff -rupN src.original/ddscf/scf_vec_guess.F src/ddscf/scf_vec_guess.F --- src.original/ddscf/scf_vec_guess.F 2013-04-15 12:41:45.036852381 +1000 +++ src/ddscf/scf_vec_guess.F 2013-04-15 12:23:28.100409225 +1000 @@ -505,19 +505,19 @@ c nprint = min(nclosed+nopen+30,nmo) if (scftype.eq.'RHF' .or. scftype.eq.'ROHF') then call movecs_print_anal(basis, 1, - & nprint, 0.15d0, g_movecs, + & nprint, 0.01d0, g_movecs, & 'ROHF Initial Molecular Orbital Analysis', & .true., dbl_mb(k_eval), oadapt, int_mb(k_irs), & .true., dbl_mb(k_occ)) else nprint = min(nalpha+20,nmo) call movecs_print_anal(basis, max(1,nbeta-20), - & nprint, 0.15d0, g_movecs, + & nprint, 0.01d0, g_movecs, & 'UHF Initial Alpha Molecular Orbital Analysis', & .true., dbl_mb(k_eval), oadapt, int_mb(k_irs), & .true., dbl_mb(k_occ)) call movecs_print_anal(basis, max(1,nbeta-20), - & nprint, 0.15d0, g_movecs(2), + & nprint, 0.01d0, g_movecs(2), & 'UHF Initial Beta Molecular Orbital Analysis', & .true., dbl_mb(k_eval+nbf), oadapt, int_mb(k_irs+nmo), & .true., dbl_mb(k_occ+nbf)) diff -rupN src.original/ddscf/uhf.F src/ddscf/uhf.F --- src.original/ddscf/uhf.F 2013-04-15 12:41:45.036852381 +1000 +++ src/ddscf/uhf.F 2013-04-15 12:23:28.096409414 +1000 @@ -144,11 +144,11 @@ C enddo ihi = max(ihi-1,1) 9611 continue - call movecs_print_anal(basis, ilo, ihi, 0.15d0, g_movecs, + call movecs_print_anal(basis, ilo, ihi, 0.01d0, g_movecs, $ 'UHF Final Alpha Molecular Orbital Analysis', $ .true., dbl_mb(k_eval), oadapt, int_mb(k_irs), $ .true., dbl_mb(k_occ)) - call movecs_print_anal(basis, ilo, ihi, 0.15d0, g_movecs(2), + call movecs_print_anal(basis, ilo, ihi, 0.01d0, g_movecs(2), $ 'UHF Final Beta Molecular Orbital Analysis', $ .true., dbl_mb(k_eval+nbf), oadapt, int_mb(k_irs+nmo), $ .true., dbl_mb(k_occ+nbf)) diff -rupN src.original/mcscf/mcscf.F src/mcscf/mcscf.F --- src.original/mcscf/mcscf.F 2013-04-15 12:41:45.000854073 +1000 +++ src/mcscf/mcscf.F 2013-04-15 12:23:23.748613695 +1000 @@ -680,7 +680,7 @@ c if (util_print('final vectors analysis', print_default)) $ call movecs_print_anal(basis, $ max(1,nclosed-10), min(nbf,nclosed+nact+10), - $ 0.15d0, g_movecs, 'Analysis of MCSCF natural orbitals', + $ 0.01d0, g_movecs, 'Analysis of MCSCF natural orbitals', $ .true., dbl_mb(k_evals), .true., int_mb(k_sym), $ .true., dbl_mb(k_occ)) c diff -rupN src.original/nwdft/scf_dft/dft_mxspin_ovlp.F src/nwdft/scf_dft/dft_mxspin_ovlp.F --- src.original/nwdft/scf_dft/dft_mxspin_ovlp.F 2013-04-15 12:41:45.604825677 +1000 +++ src/nwdft/scf_dft/dft_mxspin_ovlp.F 2013-04-15 12:23:28.228403211 +1000 @@ -184,14 +184,14 @@ c call ga_sync() c call movecs_print_anal(basis,int_mb(k_non),int_mb(k_non) - & ,0.15d0,g_alpha,'Alpha Orbitals without Beta Partners', + & ,0.01d0,g_alpha,'Alpha Orbitals without Beta Partners', & .false., 0.0 ,.false., 0 , .false., 0 ) c if (nct.GE.2) then do i = 2,nct ind = int_mb(k_non+i-1) call movecs_print_anal(basis,ind,ind - & ,0.15d0,g_alpha,' ', + & ,0.01d0,g_alpha,' ', & .false., 0.0 ,.false., 0 , .false., 0 ) enddo endif @@ -350,7 +350,7 @@ c endif c endif c 9990 format(/,18x,'THERE ARE',i3,1x,'UN-PARTNERED ALPHA ORBITALS') c - call movecs_print_anal(basis, 1, nalp, 0.15d0, g_ualpha, + call movecs_print_anal(basis, 1, nalp, 0.01d0, g_ualpha, & 'Alpha Orb. w/o Beta Partners (after maxim. alpha/beta overlap)', & .false., 0.0 ,.false., 0 , .false., 0 ) c diff -rupN src.original/nwdft/scf_dft/dft_scf.F src/nwdft/scf_dft/dft_scf.F --- src.original/nwdft/scf_dft/dft_scf.F 2013-04-15 12:41:45.608825490 +1000 +++ src/nwdft/scf_dft/dft_scf.F 2013-04-15 12:23:28.228403211 +1000 @@ -1733,7 +1733,7 @@ c else blob='DFT Final Beta Molecular Orbital Analysis' endif - call movecs_print_anal(ao_bas_han, ilo, ihi, 0.15d0, + call movecs_print_anal(ao_bas_han, ilo, ihi, 0.01d0, & g_movecs(ispin), & blob, & .true., dbl_mb(k_eval(ispin)), oadapt, diff -rupN src.original/nwdft/scf_dft_cg/dft_cg_solve.F src/nwdft/scf_dft_cg/dft_cg_solve.F --- src.original/nwdft/scf_dft_cg/dft_cg_solve.F 2013-04-15 12:41:45.612825303 +1000 +++ src/nwdft/scf_dft_cg/dft_cg_solve.F 2013-04-15 12:23:28.220403588 +1000 @@ -164,7 +164,7 @@ c blob = 'DFT Final Beta Molecular Orbital Analysis' endif call movecs_fix_phase(g_movecs(ispin)) - call movecs_print_anal(basis, ilo, ihi, 0.15d0, + call movecs_print_anal(basis, ilo, ihi, 0.01d0, & g_movecs(ispin),blob, & .true., dbl_mb(k_eval+(ispin-1)*nbf), & oadapt, int_mb(k_irs+(ispin-1)*nbf),