16 May 2012

150. nwchem 6.1 -- diagnostic data

EDIT:
Compiling nwchem 6.1 with internal libs on debian: http://verahill.blogspot.com.au/2012/05/compiling-nwchem-61-with-internal-libs.html
Compiling nwchem 6.1 with openblas on debian: http://verahill.blogspot.com.au/2012/05/building-nwchem-61-on-debian.html

This post in't really meant to be read -- it just contains troubleshooting data for nwchem. It was originally meant to demonstrate how no matter what I did, nwchem 6.1 would segfault on debian. Well, suddenly some of the builds work.

Background
A visible difference when compiling nwchem 6.1 vs nwchem 6.0 on the same machine, or nwchem 6.1 on debian vs nwchem on rocks/centos is that the step below in red takes a much, much longer time (20-30 minutes) with nwchem6 .1 on debian.
ar r /opt/nwchem/nwchem-6.1/lib/LINUX64/libnwcutil.a md5wrap.o md5.o
ranlib /opt/nwchem/nwchem-6.1/lib/LINUX64/libnwcutil.a
/opt/nwchem/nwchem-6.1/lib/LINUX64/libnwcutil.a
In all cases I've manually edited src/config/makefile.h by adding -lz -lssl to line 1914 (needed for python).

INDEX

  • BAD BUILD debian -- internal libs
  • Successful build on debian -- external libs
  • Successful build on ROCKS 5.4.3:
  • Good build: Nwchem 6.0 with openblas

BAD BUILD debian on AMD athlon II X3 (-march=opteron) -- internal libs:
Build script:

export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
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
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

 ldd nwchem 
        linux-vdso.so.1 =>  (0x00007fff0b927000)
        libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00002b2ae1537000)
        libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00002b2ae17eb000)
        libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00002b2ae1a3a000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00002b2ae1c91000)
        libmpi_f77.so.0 => /usr/lib/libmpi_f77.so.0 (0x00002b2ae1e96000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00002b2ae20ce000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00002b2ae22ea000)
        libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00002b2ae24ee000)
        libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00002b2ae2704000)
        libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00002b2ae2962000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00002b2ae2c79000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00002b2ae2efb000)
        libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00002b2ae3111000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00002b2ae3347000)
        libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00002b2ae36ce000)
        libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00002b2ae3ab2000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b2ae1315000)

mpirun -n 1 nwchem nwch.nw
      Screening Tolerance Information
      -------------------------------
          Density screening/tol_rho: 1.00D-10
          AO Gaussian exp screening on grid/accAOfunc:  14
          CD Gaussian exp screening on grid/accCDfunc:  20
          XC Gaussian exp screening on grid/accXCfunc:  20
          Schwarz screening/accCoul: 1.00D-08
0:Segmentation Violation error, status=: 11
(rank:0 hostname:boron pid:7270):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
nwchem: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
[boron:07270] *** Process received signal ***
[boron:07270] Signal: Aborted (6)
[boron:07270] Signal code:  (-6)
[boron:07270] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) [0x2b5a8893b030]
[boron:07270] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2b5a89bd7475]
[boron:07270] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x2b5a89bda6f0]
[boron:07270] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x75d4a) [0x2b5a89c1ad4a]
[boron:07270] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x78c73) [0x2b5a89c1dc73]
[boron:07270] [ 5] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x70) [0x2b5a89c1f960]
[boron:07270] [ 6] /usr/lib/libopen-pal.so.0(+0x32538) [0x2b5a882ca538]
[boron:07270] [ 7] /usr/lib/libopen-pal.so.0(opal_show_help_vstring+0xac) [0x2b5a882c804c]
[boron:07270] [ 8] /usr/lib/libopen-rte.so.0(orte_show_help+0xac) [0x2b5a8806406c]
[boron:07270] [ 9] /usr/lib/libmpi.so.0(MPI_Abort+0x74) [0x2b5a87ddfd14]
[boron:07270] [10] ./nwchem(armci_msg_abort+0x12) [0x2a27a22]
[boron:07270] [11] ./nwchem(dassertp_fail+0x113) [0x2a14d43]
[boron:07270] [12] /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x2b5a89bd74f0]
[boron:07270] [13] ./nwchem(dgemm_+0x44a) [0x2c65b9a]
[boron:07270] [14] ./nwchem() [0x2931960]
[boron:07270] [15] ./nwchem(wnga_matmul+0x1f05) [0x2934e15]
[boron:07270] [16] ./nwchem(ga_dgemm_+0x9b) [0x28a5deb]
[boron:07270] [17] ./nwchem(diis_bld12_+0x10a) [0x6ee9da]
[boron:07270] [18] ./nwchem(dft_main0d_+0x1fac) [0x6d32d8]
[boron:07270] [19] ./nwchem(nwdft_+0xb89) [0x6c8cf5]
[boron:07270] [20] ./nwchem(dft_energy_gradient_+0x3b) [0x6a1adb]
[boron:07270] [21] ./nwchem(task_gradient_doit_+0x36f) [0x535f47]
[boron:07270] [22] ./nwchem(task_gradient_+0x2cc) [0x5373c7]
[boron:07270] [23] ./nwchem(driver_+0x1f2) [0x642785]
[boron:07270] [24] ./nwchem(task_optimize_+0x4eb) [0x537e3b]
[boron:07270] [25] ./nwchem(task_+0x10b6) [0x528e27]
[boron:07270] [26] ./nwchem() [0x521b80]
[boron:07270] [27] ./nwchem(main+0x1d) [0x522081]
[boron:07270] [28] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x2b5a89bc3ead]
[boron:07270] [29] ./nwchem() [0x5202b1]
[boron:07270] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 0 with PID 7270 on node boron exited on signal 6 (Aborted).

nwchem nwch.nw
      Screening Tolerance Information
      -------------------------------
          Density screening/tol_rho: 1.00D-10
          AO Gaussian exp screening on grid/accAOfunc:  14
          CD Gaussian exp screening on grid/accCDfunc:  20
          XC Gaussian exp screening on grid/accXCfunc:  20
          Schwarz screening/accCoul: 1.00D-08
0:Segmentation Violation error, status=: 11
(rank:0 hostname:boron pid:7282):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
nwchem: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
[boron:07282] *** Process received signal ***
[boron:07282] Signal: Aborted (6)
[boron:07282] Signal code:  (-6)
[boron:07282] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) [0x2ade86678030]
[boron:07282] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2ade87914475]
[boron:07282] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x2ade879176f0]
[boron:07282] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x75d4a) [0x2ade87957d4a]
[boron:07282] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x78c73) [0x2ade8795ac73]
[boron:07282] [ 5] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x70) [0x2ade8795c960]
[boron:07282] [ 6] /usr/lib/libopen-pal.so.0(+0x32538) [0x2ade86007538]
[boron:07282] [ 7] /usr/lib/libopen-pal.so.0(opal_show_help_vstring+0xac) [0x2ade8600504c]
[boron:07282] [ 8] /usr/lib/libopen-rte.so.0(orte_show_help+0xac) [0x2ade85da106c]
[boron:07282] [ 9] /usr/lib/libmpi.so.0(MPI_Abort+0x74) [0x2ade85b1cd14]
[boron:07282] [10] ./nwchem(armci_msg_abort+0x12) [0x2a27a22]
[boron:07282] [11] ./nwchem(dassertp_fail+0x113) [0x2a14d43]
[boron:07282] [12] /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x2ade879144f0]
[boron:07282] [13] ./nwchem(dgemm_+0x43f) [0x2c65b8f]
[boron:07282] [14] ./nwchem() [0x2931960]
[boron:07282] [15] ./nwchem(wnga_matmul+0x1f05) [0x2934e15]
[boron:07282] [16] ./nwchem(ga_dgemm_+0x9b) [0x28a5deb]
[boron:07282] [17] ./nwchem(diis_bld12_+0x10a) [0x6ee9da]
[boron:07282] [18] ./nwchem(dft_main0d_+0x1fac) [0x6d32d8]
[boron:07282] [19] ./nwchem(nwdft_+0xb89) [0x6c8cf5]
[boron:07282] [20] ./nwchem(dft_energy_gradient_+0x3b) [0x6a1adb]
[boron:07282] [21] ./nwchem(task_gradient_doit_+0x36f) [0x535f47]
[boron:07282] [22] ./nwchem(task_gradient_+0x2cc) [0x5373c7]
[boron:07282] [23] ./nwchem(driver_+0x1f2) [0x642785]
[boron:07282] [24] ./nwchem(task_optimize_+0x4eb) [0x537e3b]
[boron:07282] [25] ./nwchem(task_+0x10b6) [0x528e27]
[boron:07282] [26] ./nwchem() [0x521b80]
[boron:07282] [27] ./nwchem(main+0x1d) [0x522081]
[boron:07282] [28] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x2ade87900ead]
[boron:07282] [29] ./nwchem() [0x5202b1]
[boron:07282] *** End of error message ***
Aborted



 ltrace nwchem nwch.nw

MPI_Barrier(0x119f72d0, 0x7fff2e777340, 1, 0x2e2e7d0, 1)                                                                                           = 0
MPI_Barrier(0x119f72d0, 0x7fff2e776d90, 1, 0x7fff2e776dd0, 1)                                                                                      = 0
--- SIGSEGV (Segmentation fault) ---
vfprintf(0x2b1e48f4e7a0, "%d:%s: %d\n", 0x7fff2e7757580:Segmentation Violation error, status=: 11
)                                                                                            = 44
getpid()                                                                                                                                           = 7346
printf("(rank:%d hostname:%s pid:%d):ARM"..., 0, "boron", 7346(rank:0 hostname:boron pid:7346):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
)                                                                                    = 124
__errno_location()                                                                                                                                 = 0x2b1e49552088
free(0x119effb0)                                                                                                                                   = <void>
signal(15, NULL)                                                                                                                                   = 0x02a56230
signal(2, 0x02a56460)                                                                                                                              = 0x02a564b0
signal(11, 0x2b1e472f2690)                                                                                                                         = 0x02a56320
MPI_Abort(0x119f72d0, 11, 0, -1, 0x7fff2e775440nwchem: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
 <unfinished ...>
--- SIGABRT (Aborted) ---
[boron:07346] *** Process received signal ***
[boron:07346] Signal: Aborted (6)
[boron:07346] Signal code:  (-6)
[boron:07346] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) [0x2b1e47963030]
[boron:07346] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2b1e48bff475]
[boron:07346] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x2b1e48c026f0]
[boron:07346] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x75d4a) [0x2b1e48c42d4a]
[boron:07346] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x78c73) [0x2b1e48c45c73]
[boron:07346] [ 5] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x70) [0x2b1e48c47960]
[boron:07346] [ 6] /usr/lib/libopen-pal.so.0(+0x32538) [0x2b1e472f2538]
[boron:07346] [ 7] /usr/lib/libopen-pal.so.0(opal_show_help_vstring+0xac) [0x2b1e472f004c]
[boron:07346] [ 8] /usr/lib/libopen-rte.so.0(orte_show_help+0xac) [0x2b1e4708c06c]
[boron:07346] [ 9] /usr/lib/libmpi.so.0(MPI_Abort+0x74) [0x2b1e46e07d14]
[boron:07346] [10] ./nwchem(armci_msg_abort+0x12) [0x2a27a22]
[boron:07346] [11] ./nwchem(dassertp_fail+0x113) [0x2a14d43]
[boron:07346] [12] /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x2b1e48bff4f0]
[boron:07346] [13] ./nwchem(dgemm_+0x446) [0x2c65b96]
[boron:07346] [14] ./nwchem() [0x2931960]
[boron:07346] [15] ./nwchem(wnga_matmul+0x1f05) [0x2934e15]
[boron:07346] [16] ./nwchem(ga_dgemm_+0x9b) [0x28a5deb]
[boron:07346] [17] ./nwchem(diis_bld12_+0x10a) [0x6ee9da]
[boron:07346] [18] ./nwchem(dft_main0d_+0x1fac) [0x6d32d8]
[boron:07346] [19] ./nwchem(nwdft_+0xb89) [0x6c8cf5]
[boron:07346] [20] ./nwchem(dft_energy_gradient_+0x3b) [0x6a1adb]
[boron:07346] [21] ./nwchem(task_gradient_doit_+0x36f) [0x535f47]
[boron:07346] [22] ./nwchem(task_gradient_+0x2cc) [0x5373c7]
[boron:07346] [23] ./nwchem(driver_+0x1f2) [0x642785]
[boron:07346] [24] ./nwchem(task_optimize_+0x4eb) [0x537e3b]
[boron:07346] [25] ./nwchem(task_+0x10b6) [0x528e27]
[boron:07346] [26] ./nwchem() [0x521b80]
[boron:07346] [27] ./nwchem(main+0x1d) [0x522081]
[boron:07346] [28] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x2b1e48bebead]
[boron:07346] [29] ./nwchem() [0x5202b1]
[boron:07346] *** End of error message ***
unexpected breakpoint at 0x2b1e48bff474
--- SIGABRT (Aborted) ---
+++ killed by SIGABRT +++
strace nwchem nwch.nw


write(1, "(rank:0 hostname:boron pid:7439)"..., 124(rank:0 hostname:boron pid:7439):ARMCI DASSERT fail. ../../ga-5-1/armci/src/common/signaltrap.c:SigSegvHandler():310 cond:0
) = 124
rt_sigaction(SIGTERM, {SIG_DFL, [TERM], SA_RESTORER|SA_RESTART, 0x2b5c984ef4f0}, {0x2a56230, [TERM], SA_RESTORER|SA_RESTART, 0x2b5c984ef4f0}, 8) = 0
rt_sigaction(SIGINT, {0x2a56460, [INT], SA_RESTORER|SA_RESTART, 0x2b5c984ef4f0}, {0x2a564b0, [INT], SA_RESTORER|SA_RESTART, 0x2b5c984ef4f0}, 8) = 0
rt_sigaction(SIGSEGV, {0x2b5c96be2690, [SEGV], SA_RESTORER|SA_RESTART, 0x2b5c984ef4f0}, {0x2a56320, [SEGV], SA_RESTORER|SA_RESTART, 0x2b5c984ef4f0}, 8) = 0
open("/usr/share/openmpi/help-mpi-api.txt", O_RDONLY) = 14
write(2, "nwchem: malloc.c:3096: sYSMALLOc"..., 431nwchem: malloc.c:3096: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
) = 431
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(7439, 7439, SIGABRT)             = 0
--- SIGABRT (Aborted) @ 0 (0) ---
write(2, "[boron:07439] *** Process receiv"..., 46[boron:07439] *** Process received signal ***
) = 46
futex(0x2b5c98840840, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "[boron:07439] Signal: Aborted (6"..., 67[boron:07439] Signal: Aborted (6)
[boron:07439] Signal code:  (-6)
) = 67
mmap(NULL, 134217728, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x2b5ca16c5000
munmap(0x2b5ca16c5000, 43233280)        = 0
munmap(0x2b5ca8000000, 23875584)        = 0
mprotect(0x2b5ca4000000, 135168, PROT_READ|PROT_WRITE) = 0
futex(0x2b5c98842590, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x2b5c98286404, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "[boron:07439] [ 0] /lib/x86_64-l"..., 83[boron:07439] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) [0x2b5c97253030]
) = 83
write(2, "[boron:07439] [ 1] /lib/x86_64-l"..., 82[boron:07439] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2b5c984ef475]
) = 82
write(2, "[boron:07439] [ 2] /lib/x86_64-l"..., 81[boron:07439] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x2b5c984f26f0]
) = 81
write(2, "[boron:07439] [ 3] /lib/x86_64-l"..., 78[boron:07439] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x75d4a) [0x2b5c98532d4a]
) = 78
write(2, "[boron:07439] [ 4] /lib/x86_64-l"..., 78[boron:07439] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x78c73) [0x2b5c98535c73]
) = 78
write(2, "[boron:07439] [ 5] /lib/x86_64-l"..., 88[boron:07439] [ 5] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x70) [0x2b5c98537960]
) = 88
write(2, "[boron:07439] [ 6] /usr/lib/libo"..., 72[boron:07439] [ 6] /usr/lib/libopen-pal.so.0(+0x32538) [0x2b5c96be2538]
) = 72
write(2, "[boron:07439] [ 7] /usr/lib/libo"..., 91[boron:07439] [ 7] /usr/lib/libopen-pal.so.0(opal_show_help_vstring+0xac) [0x2b5c96be004c]
) = 91
write(2, "[boron:07439] [ 8] /usr/lib/libo"..., 83[boron:07439] [ 8] /usr/lib/libopen-rte.so.0(orte_show_help+0xac) [0x2b5c9697c06c]
) = 83
write(2, "[boron:07439] [ 9] /usr/lib/libm"..., 73[boron:07439] [ 9] /usr/lib/libmpi.so.0(MPI_Abort+0x74) [0x2b5c966f7d14]
) = 73
write(2, "[boron:07439] [10] ./nwchem(armc"..., 62[boron:07439] [10] ./nwchem(armci_msg_abort+0x12) [0x2a27a22]
) = 62
write(2, "[boron:07439] [11] ./nwchem(dass"..., 61[boron:07439] [11] ./nwchem(dassertp_fail+0x113) [0x2a14d43]
) = 61
write(2, "[boron:07439] [12] /lib/x86_64-l"..., 78[boron:07439] [12] /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x2b5c984ef4f0]
) = 78
write(2, "[boron:07439] [13] ./nwchem(dgem"..., 54[boron:07439] [13] ./nwchem(dgemm_+0x446) [0x2c65b96]
) = 54
write(2, "[boron:07439] [14] ./nwchem() [0"..., 42[boron:07439] [14] ./nwchem() [0x2931960]
) = 42
write(2, "[boron:07439] [15] ./nwchem(wnga"..., 60[boron:07439] [15] ./nwchem(wnga_matmul+0x1f05) [0x2934e15]
) = 60
write(2, "[boron:07439] [16] ./nwchem(ga_d"..., 56[boron:07439] [16] ./nwchem(ga_dgemm_+0x9b) [0x28a5deb]
) = 56
write(2, "[boron:07439] [17] ./nwchem(diis"..., 58[boron:07439] [17] ./nwchem(diis_bld12_+0x10a) [0x6ee9da]
) = 58
write(2, "[boron:07439] [18] ./nwchem(dft_"..., 59[boron:07439] [18] ./nwchem(dft_main0d_+0x1fac) [0x6d32d8]
) = 59
write(2, "[boron:07439] [19] ./nwchem(nwdf"..., 53[boron:07439] [19] ./nwchem(nwdft_+0xb89) [0x6c8cf5]
) = 53
write(2, "[boron:07439] [20] ./nwchem(dft_"..., 66[boron:07439] [20] ./nwchem(dft_energy_gradient_+0x3b) [0x6a1adb]
) = 66
write(2, "[boron:07439] [21] ./nwchem(task"..., 66[boron:07439] [21] ./nwchem(task_gradient_doit_+0x36f) [0x535f47]
) = 66
write(2, "[boron:07439] [22] ./nwchem(task"..., 61[boron:07439] [22] ./nwchem(task_gradient_+0x2cc) [0x5373c7]
) = 61
write(2, "[boron:07439] [23] ./nwchem(driv"..., 54[boron:07439] [23] ./nwchem(driver_+0x1f2) [0x642785]
) = 54
write(2, "[boron:07439] [24] ./nwchem(task"..., 61[boron:07439] [24] ./nwchem(task_optimize_+0x4eb) [0x537e3b]
) = 61
write(2, "[boron:07439] [25] ./nwchem(task"..., 53[boron:07439] [25] ./nwchem(task_+0x10b6) [0x528e27]
) = 53
write(2, "[boron:07439] [26] ./nwchem() [0"..., 41[boron:07439] [26] ./nwchem() [0x521b80]
) = 41
write(2, "[boron:07439] [27] ./nwchem(main"..., 50[boron:07439] [27] ./nwchem(main+0x1d) [0x522081]
) = 50
write(2, "[boron:07439] [28] /lib/x86_64-l"..., 92[boron:07439] [28] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x2b5c984dbead]
) = 92
write(2, "[boron:07439] [29] ./nwchem() [0"..., 41[boron:07439] [29] ./nwchem() [0x5202b1]
) = 41
write(2, "[boron:07439] *** End of error m"..., 43[boron:07439] *** End of error message ***
) = 43
rt_sigreturn(0x2b5c9883e880)            = 0
rt_sigaction(SIGABRT, {SIG_DFL, ~[], SA_RESTORER, 0x2b5c984ef4f0}, NULL, 8) = 0
tgkill(7439, 7439, SIGABRT)             = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT +++
Aborted
file /usr/lib/openmpi/lib/*.[012]
/usr/lib/openmpi/lib/libmca_common_sm.so.1.0.0:  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x731251ada812ba409b917e7ec925e75cb95fcc52, stripped
/usr/lib/openmpi/lib/libmpi_cxx.so.0.0.1:        ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xe679d9fdb2473fb97bd107690b02491280462741, stripped
/usr/lib/openmpi/lib/libmpi_f77.so.0.0.1:        ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xdbdf7ec4bd4a97f956e3ff21ebbbdb065e8dc07d, stripped
/usr/lib/openmpi/lib/libmpi_f90.so.0.0.1:        ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xf1a77e4b758dcfe4838c6aaf5e92f65f770aded8, stripped
/usr/lib/openmpi/lib/libmpi.so.0.0.2:            ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xd8f75c840e38687f22b8a8f2c52ffb29b8a24441, stripped
/usr/lib/openmpi/lib/libopenmpi_malloc.so.0.0.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0xaaf2d64a0c2b989d4bcc93be37e6af122ba701e8, stripped
/usr/lib/openmpi/lib/libopen-pal.so.0.0.0:       ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x6f1f28e594e0db80ea54dba9e3f497c5787039f2, stripped
/usr/lib/openmpi/lib/libopen-rte.so.0.0.0:       ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x15b7f2b0e8ef92cb7cd357c9f8c7693d3d90a058, stripped
cat src/tools/build/config.log |egrep "BLAS|blas|lapack|LAPACK"
configure:18162: Checks for BLAS,LAPACK,ScaLAPACK
configure:18408: Attempting to locate BLAS library
configure:18414: checking for BLAS with user-supplied flags
configure:18546: checking for BLAS in AMD Core Math Library
configure:18682: checking for BLAS in Intel Math Kernel Library
configure:18818: checking for BLAS in ATLAS
configure:18939: gfortran -o conftest     conftest.f -lf77blas -latlas -lm  >&5
/usr/bin/ld: cannot find -lf77blas
configure:18961: checking for BLAS in PhiPACK libraries
configure:19079: gfortran -o conftest     conftest.f -lsgemm -ldgemm -lblas -lm  >&5
configure:19101: checking for BLAS in Apple Accelerate.framework
configure:19227: checking for BLAS in Apple vecLib.framework
configure:19353: checking for BLAS in Alpha CXML library
configure:19608: checking for BLAS in Sun Performance Library
configure:19861: checking for BLAS in SGI/Cray Scientific Library
configure:19987: checking for BLAS in SGIMATH library
configure:20113: checking for BLAS in IBM ESSL library
configure:20224: gfortran -o conftest     conftest.f -lessl -lblas -lm  >&5
configure:20246: checking for BLAS in generic library
configure:20344: gfortran -o conftest     conftest.f -lblas -lm  >&5
configure:20574: Attempting to locate LAPACK library
configure:20637: checking for Fortran 77 LAPACK with user-supplied flags
configure:20652: gfortran -o conftest      conftest.f  -lblas -lm  >&5
configure:20676: checking for dgetrs_ in -llapack
configure:20709: cc -o conftest        conftest.c -llapack  -L/usr/lib/openmpi/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L. -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath -lblas -lm  >&5
/usr/bin/ld: cannot find -llapack
| #define HAVE_BLAS 1
| #define BLAS_SIZE 4
configure:20676: checking for dgetrs_ in -llapack_rs6k
configure:20709: cc -o conftest        conftest.c -llapack_rs6k  -L/usr/lib/openmpi/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L. -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath -lblas -lm  >&5
/usr/bin/ld: cannot find -llapack_rs6k
| #define HAVE_BLAS 1
| #define BLAS_SIZE 4
configure:20741: WARNING: LAPACK library not found, using internal LAPACK
configure:20919: Attempting to locate SCALAPACK library
configure:20926: checking for SCALAPACK with user-supplied flags
configure:20992: gfortran -o conftest       -L/usr/lib/openmpi/lib  conftest.f   -lblas  -lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread -lm  >&5
configure:21014: checking for SCALAPACK in generic library
configure:21081: gfortran -o conftest       -L/usr/lib/openmpi/lib  conftest.f -lscalapack  -lblas  -lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread -lm  >&5
/usr/bin/ld: cannot find -lscalapack
configure:21213: WARNING: ScaLAPACK library not found, interfaces won't be defined
| #define HAVE_BLAS 1
| #define BLAS_SIZE 4
| #define HAVE_LAPACK 0
| #define HAVE_SCALAPACK 0
| #define HAVE_BLAS 1
| #define BLAS_SIZE 4
| #define HAVE_LAPACK 0
| #define HAVE_SCALAPACK 0
configure:38904:           BLAS_LDFLAGS=
configure:38906:              BLAS_LIBS=-lblas
configure:38908:          BLAS_CPPFLAGS=
ac_cv_lib_lapack___dgetrs_=no
ac_cv_lib_lapack_rs6k___dgetrs_=no
BLAS_CPPFLAGS=''
BLAS_LDFLAGS=''
BLAS_LIBS='-lblas'
HAVE_BLAS_FALSE='#'
HAVE_BLAS_TRUE=''
HAVE_LAPACK_FALSE=''
HAVE_LAPACK_TRUE='#'
HAVE_SCALAPACK_FALSE=''
HAVE_SCALAPACK_TRUE='#'
LAPACK_CPPFLAGS=''
LAPACK_LDFLAGS=''
LAPACK_LIBS=''
SCALAPACK_CPPFLAGS=''
SCALAPACK_LDFLAGS=''
SCALAPACK_LIBS=''
#define HAVE_BLAS 1
#define BLAS_SIZE 4
#define HAVE_LAPACK 0
#define HAVE_SCALAPACK 0



Successful build on debian -- external libs

Build script:
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 -lopenblas_barcelona-r0.1.1"
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
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

ldd nwchem 
        linux-vdso.so.1 =>  (0x00007fffbdfff000)
        libopenblas.so.0 => /opt/openblas/lib/libopenblas.so.0 (0x00002b1065eef000)
        libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00002b1066cfc000)
        libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00002b1066faf000)
        libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00002b10671fe000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00002b1067456000)
        libmpi_f77.so.0 => /usr/lib/libmpi_f77.so.0 (0x00002b106765a000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00002b1067892000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00002b1067aaf000)
        libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00002b1067cb2000)
        libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00002b1067ec8000)
        libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00002b1068127000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00002b106843d000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00002b10686bf000)
        libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00002b10688d6000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00002b1068b0b000)
        libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00002b1068e92000)
        libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00002b1069277000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b1065ccd000)

mpirun -n 1 nwchem test.nw
WORKS!


gfortran --version
GNU Fortran (Debian 4.6.3-1) 4.6.3
ar t libncwutil.a
basis.o bas_input.o bas_contrib.o bas_checksum.o basisP.o bas_blas.o bas_blasP.o bas_vec_info.o geom.o geom_input.o geom_input2.o geom_3d.o geom_2d.o geom_1d.o geom_numcore.o geom_checksum.o geom_print_ecce.o geom_freeze.o geom_fragment.o geom_getsym.o geom_hnd.o c_inp.o hnd_rdfree.o inp.o inp_irange.o inp_ilist.o pstat_init.o pstat_term.o pstat_alloc.o pstat_on.o pstat_off.o pstat_pr_all.o pstat_free.o pstat_pr_han.o pstat_pr_det.o hdbm.o rtdb_f2c.o rtdb.o rtdb_seq.o context.o context_f2c.o dosymops.o gensym.o sym_vec_sym.o ludcmp.o mprint.o opprint.o sym_put_geom.o spgen.o sym_map.o sym_nwc.o sym_apply_op.o sym_get_cart.o sym_grp_name.o sym_ap_cart.o sym_cent_map.o sym_num_ops.o sym_ops_get.o sym_pr_all.o sym_geom_prj.o cross_prod.o sym_op_cname.o sym_pr_ops.o deter3.o sym_op_clsfy.o sym_tr_bs_op.o sym_bs_irrep.o sym_op_type.o sym_char_tab.o sym_pr_ctab.o sym_inv_op.o sym_mo_adapt.o sym_g_sym.o wrcell.o dctr.o sym_irrepname.o sym_abelian.o sym_sym.o sym_mo_ap_op.o sym_bas_op.o sym_sh_pair.o md5wrap.o md5.o output.o errquit.o ffflush.o print_center.o util_flush.o util_host.o util_date.o input_echo.o util_transpose.o ga_iter_diag.o ga_maxelt.o ga_pcg_min.o line_search.o ga_orth_vec.o ga_ran_fill.o ga_mix.o ga_list.o ga_it_proj.o ga_screen.o ga_get_diag.o fortchar.o seq_output.o ga_mat2col.o util_ch_brd.o two_ind_trn.o util_pname.o sread.o swrite.o banner.o util_print.o util_version.o util_nwchem_paper.o mk_fit_xf.o int_2c_ga.o ga_local_mdot.o util_cpusec.o util_wallsec.o gather.o scatter.o ga_trace_dg.o lcopy.o util_legal.o util_file_name.o util_io_unit.o util_speak.o util_rtdb_speak.o util_file_copy.o util_file_unlink.o util_system.o util_sleep.o util_rtdb_state.o ecce_print.o util_random.o util_job.o util_getenv.o util_getarg.o util_nwchemrc.o util_md.o util_md_c.o util_md_sockets.o dgewr.o atoi.o indint.o util_wall_remain.o ga_normf.o corr_mk_ref.o nw_inp_from_file.o bgj.o movecs_ecce.o get_density.o moeig_read.o util_debug.o util_erf.o ga_it2.o ma_print.o freeze_input.o ga_extra.o util_test.o util_ga_test.o util.o util_patch_test.o util_ndim_test.o util_perf_test.o util_test_lu.o util_test_eig.o util_dra_test.o util_eaf_test.o util_sf_test.o ga_lkain_2cpl3.o util_io.o util_xyz.o util_ma.o util_mpinap.o linux_cpu.o linux_shift.o linux_random.o erfc.o linux_setfpucw.o ga_matpow.o util_pack.o dabssum.o dabsmax.o dfill.o ifill.o mabyte_fill.o ga_it_lsolve.o ga_it_orth.o ga_orthog.o idamin.o util_jacobi.o stpr_sjacobi.o util_memcpy.o ga_accback.o ga_asymmetr.o util_gnxtval.o nxtask.o util_mirror.o util_sgroup.o icopy.o dsum.o dgefa.o




Successful build on ROCKS 5.4.3 on dell cluster (intel):
Script:
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=/share/apps/nwchem/nwchem-6.1
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONHOME=/opt/rocks
export PYTHONVERSION=2.4
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/opt/openmpi
export MPI_INCLUDE=/opt/openmpi/include
export LIBRARY_PATH=$LIBRARY_PATH:/opt/openmpi/lib:/share/apps/openblas
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
export BLASOPT="-L/share/apps/openblas/lib -lopenblas -lopenblas_nehalem-r0.1.1 -lopenblas_nehalemp-r0.1.1"
cd $NWCHEM_TOP/src
#make clean
make  nwchem_config
make  FC=gfortran
ldd /share/apps/nwchem/nwchem-6.1/bin/LINUX64/nwchem 
        linux-vdso.so.1 =>  (0x00007fff301fd000)
        libopenblas.so.0 => /share/apps/openblas/lib/libopenblas.so.0 (0x00002aea76d0b000)
        libmpi.so.0 => /opt/openmpi/lib/libmpi.so.0 (0x00002aea77a16000)
        libopen-rte.so.0 => /opt/openmpi/lib/libopen-rte.so.0 (0x00002aea77ded000)
        libopen-pal.so.0 => /opt/openmpi/lib/libopen-pal.so.0 (0x00002aea7806f000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00000039ee200000)
        libmpi_f77.so.0 => /opt/openmpi/lib/libmpi_f77.so.0 (0x00002aea782e2000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00000039ee600000)
        libutil.so.1 => /lib64/libutil.so.1 (0x00000039f7a00000)
        libgfortran.so.1 => /usr/lib64/libgfortran.so.1 (0x00002aea78515000)
        libm.so.6 => /lib64/libm.so.6 (0x00000039ede00000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00000039fa400000)
        libc.so.6 => /lib64/libc.so.6 (0x00000039eda00000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00000039f0a00000)
        /lib64/ld-linux-x86-64.so.2 (0x00000039ed600000)

This build works, whether I specify the openblas libs or use the internal nwchem libs.

Good build: Nwchem 6.0 with openblas on amd phenom II X6-- this is my 'reference' build since it works perfectly.
Build script:
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
export USE_MPI=y
export USE_MPIF=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export BLASOPT="-L/opt/openblas/lib -lopenblas -lopenblas_barcelona-r0.1.1"
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

ldd /opt/nwchem/nwchem-6.0/bin/LINUX64/nwchem
        linux-vdso.so.1 =>  (0x00007fff3cd72000)
        libopenblas.so.0 => /opt/openblas/lib/libopenblas.so.0 (0x00002b3404bb2000)
        libmpi.so.0 => /usr/lib/libmpi.so.0 (0x00002b34059bf000)
        libopen-rte.so.0 => /usr/lib/libopen-rte.so.0 (0x00002b3405c72000)
        libopen-pal.so.0 => /usr/lib/libopen-pal.so.0 (0x00002b3405ec1000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00002b3406119000)
        libmpi_f77.so.0 => /usr/lib/libmpi_f77.so.0 (0x00002b340631d000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00002b3406555000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00002b3406772000)
        libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00002b3406975000)
        libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00002b3406b8b000)
        libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00002b3406dea000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00002b3407100000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00002b3407382000)
        libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00002b3407599000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00002b34077ce000)
        libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00002b3407b55000)
        libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00002b3407f3a000)
        /lib64/ld-linux-x86-64.so.2 (0x00002b3404990000)

13 May 2012

149. Emptying Root's Trash in debian

My / partition was filling up because of /var/cache/apt/archives
The files in that folder are write-protected. I tried doing sudo rm *.deb but it didn't work. Doing sudo nautilus and deleting like that worked. However, the space doesn't get released as everything goes into the trash of root. And you can't access that easily using nautilus.

So....
sudo su
cd /root/.local/share/Trash/files
rm *.deb



11 May 2012

148. popt, readopt and g09?

Update:
NOTE that readopt WORKS in G09 rev. B and rev. D. It DOESN'T work in G09 rev. A.

readopt is a whole lot easier to use than popt.

Original post:
For various reasons I want to be able to freeze some atoms while including other in my optimisation using gaussion 09. Readopt (http://www.gaussian.com/g_tech/g_ur/k_opt.htm) sounded like a good idea.

The problem
I can't get this to work:
%nprocshared=6
%Chk=reduced_solvate.chk
#P ub3lyp/lanl2dz 6D 10F opt=ReadOptimize Punch=(MO) Pop=() 
reduced_solvate
3 2 ! charge and multiplicity
 Cr     10.0000     10.0000     10.1100
 O     10.0000     10.0000     12.1300
 H     10.0000     10.8000     12.7000
 H     10.0000     9.20000     12.7000
 O     10.0000     7.84000     10.0000
 H     10.0000     7.15000     10.6900
[..]
 H     6.32536     3.63314     12.3506
 H     8.48233     15.9732     5.80567
noatoms atoms=1-19
readopt and rdopt don't work either -- they all give 'syntax error' (C64 flashback!)

 QPErr --- A syntax error was detected in the input line.
 #P ub3lyp/lanl2dz 6D 10F ReadOptimize Pu
                                                  '
 Last state="GCL"
The solution: 

Anyway, you can use popt but it takes a bit more preparation of the coordinates.

You can convert an .xyz file quickly by using:
cat molecule.xyz | gawk '{print $1,"-1",$2,$3,$4}'>popt_molecule.xyz

Change 0 to -1 for the atoms you want to optimise.

%nprocshared=6
%Chk=popt_solvate.chk
#Popt ub3lyp/lanl2dz 6D 10F Punch=(MO) scf=(maxcycle=1024)
reduced_solvate popt
3 2 ! charge and multiplicity
Cr 0 10.0000 10.0000 10.1100
O 0 10.0000 10.0000 12.1300
H 0 10.0000 10.8000 12.7000
H 0 10.0000 9.20000 12.7000
O 0 10.0000 7.84000 10.0000
H 0 10.0000 7.15000 10.6900
[..]
H -1 3.62686 7.14993 12.8142
H -1 5.12696 15.5239 9.01700
H -1 6.32536 3.63314 12.3506
H -1 8.48233 15.9732 5.80567

10 May 2012

147. Oniom in nwchem -- with a little bit of help from gromacs and openbabel

Example -- I want to do explicit solvent modelling of methanol in water. This is obviously an articifical approach, but generally applicable.

This is a rough approach to doing oniom calculations using nwchem 6.0 -- this is a technical description, not a how-to when it comes to the science.

1. Pre-optimisation
Draw methanol and set up a simple calc using e.g. ecce to pre-optimise the structure with e.g. an implicit solvent model. Here's nwch.nw:

scratch_dir /scratch
Title "pre-oniom"
Start  pre-oniom
echo
charge 0
geometry autosym units angstrom
 C     0.00000     0.00000     0.00000
 H     -0.675500     -0.675500     0.675500
 H     0.675500     -0.675500     -0.675500
 H     -0.675500     0.675500     -0.675500
 O     0.866025     0.866025     0.866025
 H     1.51843     0.213620     1.51843
end
ecce_print /home/me/jobs/jobs/testing/old/pre-oniom/ecce.out
basis "ao basis" spherical print
  H library "6-31+G*"
  O library "6-31+G*"
  C library "6-31+G*"
END
dft
  mult 1
  XC b3lyp
  mulliken
end
driver
  default
end
cosmo
end
task dft optimize
task dft freq


2. Solvation using gromacs
Take the output, nwch.nwout, and use babel to export the optimised structure

babel -inwo nwch.nwout -oxyz molecule.xyz

The next few steps require gromacs:
editconf -f molecule.xyz -o molecule.gro -box 2 2 2
genbox -cp molecule.gro -cs spc216.gro -o solvated.gro
babel -igro solvated.gro -oxyz solvated.xyz

tail -n +3 solvated.xyz > oniom.nw

3. Putting it all together

The only 'trick' is how to define what part of the input belongs to the high level section and what belongs to the low level section -- for a solvation case like this, where whole molecules are treated by one method or another, use model. The last atom to be part of the high level section is the last of the six atoms in methanol, so the keyword is model 6. Atoms 7 to infinity are thus part of the sto-3g part, and atoms 1-6 part of the 6-31g* part.


memory stack 600 mb heap 200 mb global 800 mb

scratch_dir /scratch
Title "oniom"
Start oniom
echo
charge 0

geometry units angstrom
symmetry c1
C         10.12000       10.35000       10.00000
H          9.60000       10.72000       10.89000
H          9.60000       10.72000        9.11000
H         11.14000       10.74000       10.00000
[.]
H          0.46000        2.39000        6.86000
H          1.16000        1.73000        8.18000
end

basis sto-3g spherical
 * library sto-3g
end

basis 6-31g spherical
 * library 6-31g
end



oniom
    model 6
    low  dft basis sto-3g input "dft\; xc\; end"
    high dft basis "6-31g" input "dft\; xc\; end"
end

basis "ao basis" spherical print
  H library "6-31+G*"
  O library "6-31+G*"
  C library "6-31+G*"
END

task oniom



This takes forever to run, but run it does. The memory statement is important -- if the global memory is too small it will crash. Also, be aware that the amount of memory specified is per instance -- if you launch with mpirun -n 3, multiply by 3 to get the amount of memory that needs to be present (here, 2.4 GB physical RAM).



09 May 2012

146. Nwchem with openblas

Openblas seems to be the successor of Gotoblas. http://xianyi.github.com/OpenBLAS/
I willingly admit that I am no expert on this blas library stuff, so I may well be doing something obviously wrong.

1. Compiling and installing openblas
sudo mkdir /opt/openblas
sudo chown ${USER} /opt/openblas
mkdir ~/tmp
cd ~/tmp

download from here http://github.com/xianyi/OpenBLAS/tarball/v0.1.1

tar xvf xianyi-OpenBLAS-v0.1.1-0-g5b7f443.tar.gz

 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

cd /opt/openblas/lib
rm libopenblas.so.0
ln -s libopenblas.so libopenblas.so.0

do ls /opt/openblas/lib and note what cpu specific file you have such as libopenblas_barcelona-r0.1.1.so or libopenblas_nehalem-r0.1.1.a

edit /etc/ld.so.conf and add
/opt/openblas/lib

2. Compiling nwchem

sudo apt-get install build-essential gfortran python2.7-dev
mkdir /opt/nwchem/
sudo chown ${USER} /opt/nwchem
cd /opt/nwchem
wget http://www.nwchem-sw.org/images/Nwchem-6.0.tar.gz
tar -xvf Nwchem-6.0.tar.gz
cd nwchem-6.0/


For python support, edit src/config/makefile.h and add -lz -lssl to line 1962 (see here: http://verahill.blogspot.com.au/2012/04/adding-python-support-to-nwchem-under.html)

Next, continue
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
export USE_MPI=y
export USE_MPIF=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export BLASOPT="-L/opt/openblas/lib -lopenblas -lopenblas_barcelona-r0.1.1"
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

Now edit your ~/.bashrc and add
export PATH=$PATH:/opt/nwchem/nwchem-6.0/bin/LINUX64
export LD_LIBRARY_PATH=/opt/openblas/lib:$LD_LIBRARY_PATH 
and you should be done.

You might find that ecce still won't properly execute nwchem jobs (you don't get an error -- it just doesn't work) -- edit your /etc/ld.so.conf and add a line saying

/opt/openblas/lib

Then do sudo ldconfig and it will work


Time to look into benchmarking...


So far I've got the following benchmarks (in seconds) for nwchem when optimising benzene with 6-311++g** using mpirun -n 3.

without -lpthread
_____Internal blas_____openblas_____ATLAS_____acml_____
Ta     249.8                    277.7                 335.9           ------
Be     408.2                    421.7                 568.4        
B      546.4                     579.9                 760.2        

Noticing a mention regarding -lpthread online I compiled with that as part of the mpilibs, and lo and behold:

with -lpthread

_____Internal blas_____openblas_____ATLAS_____acml_____
Ta      201.7                    198.9                233.9           ------
Be      371.1                    314.4                390.3        
B        496.6                    416.8                 521.9

* All run using mpirun -n 3. Be=phenom II X6. B= Athlon II X3. Ta= i7-1600 X4. Intel MKL cost money, acml are free.

This doesn't mean that one library is superior to the other -- it just means that under the conditions I employed and in the presence of any mistake I may have made, these are my observations. Your mileage will vary.

08 May 2012

145. Rasmol on ROCKS 5.4.3

By request:

This shows how to install rasmol on ROCKS 5.4.3 which is based on CentOS.

Rasmol 2.7.5.2
wget http://www.rasmol.org/software/RasMol_Latest.tar.gz
tar xvf
cd RasMol-2.7.5.2/src/
./build_all.sh

If all went well
sh rasmol_run.sh
should start it

NOTE: this doesn't install rasmol anywhere -- it builds it and allows you to run it from the src directory. Put an alias in your ~/.bashrc  pointing towards the rasmol_run script e.g.
alias rasmol='sh /home/me/.rasmol/RasMol-2.7.5.2/src/rasmol_run.sh'

Note that prior to this you will have to set up a working build environment, e.g.
sudo yum install gcc gcc-c++ gcc-gfortran cpp

07 May 2012

144. [Fixed] Upgraded ECCE (6.2 -> 6.3) won't let you save input files, can't write basis etc.

Update 1/6/2012: As always there's a better, smarter way of doing this, and as usual it involves reading the manual, or in this case reading the documentation that comes with ecce:
"... you had issues upgrading from ECCE 6.2 to 6.3 in regards to ECCE not being able to find scripts it needed to generate input files such as creating basis sets. Your solution was the manual way for something that is a basic part of ECCE setup for users (maybe you've since figured this out). There is a $ECCE_HOME/scripts/runtime_setup.sh sh/bash environment setup script that you can invoke to set up the paths as needed. This is documented in the list of steps needed when you install ECCE after it is done extracting the distribution right before the install finishes. When you actually invoke ecce then the rest of the environment (such as putting the scripts/parsers directory in the path) is done by the ecce_env script."

From what I understand the path which is set is ECCE_HOME and $ECCE_HOME/scripts is the added to PATH. But that's not enough. I think the 'word too long' thingy is playing up again.

The problem:
After upgrading ecce from 6.2 to 6.3 I keep getting errors of this type after drawing a structure, and then choosing a basis set:

ERROR: Input files could not be generated--failed writing basis set
Calculation saved as small.

And yes, no input files are generated.

Since I launch ecce from the terminal, I get the following error messages when I try to launch nwchem jobs:

sh: 1: std2NWChem: not found

and gaussian jobs:
sh: 1: std2Gaussian-03: not found

Unrelated: I also get a lot of
Word too long.
Word too long.
Word too long.
Word too long.
which has to do with csh somehow. I am not a fan of csh.

My ecce-6.3/apps/siteconfig/CONFIG.beryllium looks correct.

The investigation:

First, in ecce-6.3
 cat */*/*/*|strings|grep std2
[..]
std2GAMESS(US)          - Script that translates basis set from standard
std2Gaussian-92         - Identical to std2Gaussian-94.
std2Gaussian-94         - Script that translates basis set from standard
std2NWChem              - Script that translates basis set from standard
[..]
At least now we know what its related to.
tail -n 9999 */*/*/*|strings|egrep "std2|<=="
==> apps/scripts/parsers/README <==
   "std2Gaussian-94".
std2GAMESS(US)          - Script that translates basis set from standard
std2Gaussian-92         - Identical to std2Gaussian-94.
std2Gaussian-94         - Script that translates basis set from standard
std2NWChem              - Script that translates basis set from standard
locate std2
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2Amica
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2GAMESS-UK
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2GAMESS-US
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2Gaussian-03
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2Gaussian-92
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2Gaussian-94
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2Gaussian-98
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2Hondo
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2Meldef
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2NWChem
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2aceII
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2molcas
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2molpro
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2supermolecule
/home/me/.ecce/ecce-6.3/apps/scripts/parsers/std2tx93
apps/scripts/ecce_env shows that ecce checks whether parsers is in path -- and adds the parsers directory if it isn't:

if (`echo $PATH | grep -c "${ECCE_HOME}/scripts/parsers"` == 0 ) then
  set path = (${ECCE_HOME}/scripts/parsers $path)
endif

Something seems to go wrong here.

The solution

Add this to ~/.bashrc
export ECCE_HOME=/home/me/.ecce/ecce-6.3/apps
export PATH=${ECCE_HOME}/scripts:
${ECCE_HOME}/scripts/parsers
:${PATH}

06 May 2012

143. MD =Ecce + NWChem. 4.Dynamics

Update 19 June 2013:
A much better written and complete guide to getting started with MD in ECCE+NWChem is found here: http://saccharides.blogspot.tw/2013/06/ecce-md-calculation.html

Original post:

Part 1:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-1-prepare.html

Part 2:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-2-md-optimize.html

Part 3:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-3-energy.html


Rightclick, new, dynamics

 Double-click on the new icon


Click on editor


 Make sure the number of step is high enough -- I had a lot of off errors when it was 30, or 300. You should also use an equilibration period -- here I didn't.
 Nothing much to see here.
 Here's the output -- without initial equilibration
and with 1000 equil steps
And that's about it. Time to start looking into doing MM/QM...

05 May 2012

142. MD = Ecce + NWChem. 3. Energy

Update 19 June 2013:
A much better written and complete guide to getting started with MD in ECCE+NWChem is found here: http://saccharides.blogspot.tw/2013/06/ecce-md-calculation.html

Original post:

Part 1:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-1-prepare.html

Part 2:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-2-md-optimize.html

Part 4.
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-4dynamics.html

Rightclick and select new, Energy
 Double-click on the new icon
 Click on editor
 Set up your calc, then launch
It should run quickly. There's little to see in terms of output except for single-point energies.

141. MD = Ecce + NWChem. 2. MD Optimize

Update 19 June 2013:
A much better written and complete guide to getting started with MD in ECCE+NWChem is found here: http://saccharides.blogspot.tw/2013/06/ecce-md-calculation.html

Original post:

Part 1 is here: http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-1-prepare.html

Part 3:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-3-energy.html


Part 4.
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-4dynamics.html



Rightclick on your project and select create new, Optimeze

Double-click on the icon that was created
 Click on editor
You can now configure the optimization.
 Things you may want to look at are the number of steps
 and whether you use SHAKE or not -- 100% of failed attempts so far have been related to SHAKE.
Launch. This will take longer than the Prepare step. A lot longer.


Displaying the result might also take a while -- here's a 2x2x2 box with 100 iterations:
without showing solvent

showing solvent


140. MD = ECCE + NWChem: 1. Prepare

Update 19 June 2013:
A much better written and complete guide to getting started with MD in ECCE+NWChem is found here: http://saccharides.blogspot.tw/2013/06/ecce-md-calculation.html

Original post:
Here's a multi-part description of how to set up a minimal MD simulation using ECCE/NWChem. To make things real easy we'll do an example with a fully described and parametrised system.

Part 2:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-2-md-optimize.html

Part 3:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-3-energy.html

Part 4:
http://verahill.blogspot.com.au/2012/05/md-ecce-nwchem-4dynamics.html


How to install and configure ecce is described elsewhere on this blog.

Start here
Start Ecce, select Organizer
 Rightclick in the organiser and create a new MD Study
 Rightclick on the new project, and create a MD Prepare
 This is what you should have now. Double click on the Prepare icon, then click on the Editor icon
 You get this menu. Click on the Builder icon in the bottom left corner.
Click on the Import from Structure Library icon (hidden behind the dropped down menu in the screenshot). Go to RNA bases, monomers and select Cytidine. Also, check the Atom table and Coordinates options in the Tools menu.
 Hit ctrl+s to save, and close the window.

Back in the organiser set the size of the box for the system
 And click on solvate. You'll see what commands are being added to your input files.
 You might not be able to launch at this point, with ecce complaining about being unable to find the pdb. For me, opening the builder and clicking on Center in the Coordinates box on the right (make it show by checking the right box in Tools menu in the Builder)

If all goes well you'll be able to launch your job, which will finish very fast.
 And here's what we have at this point.

Part 2 will do the next step -- MD Optimize

139. compiling nwchem with custom ATLAS on debian

I'm not yet sure, but there seems to be something weird with this build. Use the openblas build here preferentially:  http://verahill.blogspot.com.au/2012/05/nwchem-with-openblas.html

i.e. do not use this build without testing it against builds without external blas/atlas and against other libraries.

I am not an expert

The atlas build is pretty much like what was described here:
http://verahill.blogspot.com.au/2012/05/compile-atlas-blas-on-debian-testing.html


Build atlas
Check you cpu governor:

cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor 
ondemand
Next, set it to performance for all cores (example for three-core AMD)
sudo cpufreq-set -g performance
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor

Prepare the install directory:
sudo mkdir /opt/ATLAS
sudo chown ${USER} /opt/ATLAS

Prepare the compile directory
mkdir ~/tmp
cd ~/tmp
 wget http://downloads.sourceforge.net/project/math-atlas/Developer%20%28unstable%29/3.9.72/atlas3.9.72.tar.bz2
tar xvf atlas3.9.72.tar.bz2
cd ATLAS/
mkdir build/
vim Make.top 
change -V on line 6 to -v

cd build
.././configure --prefix=/opt/ATLAS

There's any level of detail in what you can pass to configure. -A AMD64 would be one option. Look at the bottom for more info.

make
make install
cp lib/lib* /opt/ATLAS/lib

Once it's all done, set the cpu governor back if you so desire.
sudo cpufreq-set -g ondemand
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor


nwchem
For python support you need to edit src/config/makefile.h (see http://verahill.blogspot.com.au/2012/04/adding-python-support-to-nwchem-under.html)

export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=/opt/nwchem/nwchem-6.0
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export PYTHONHOME=/usr
export PYTHONVERSION=2.7
export BLASOPT="-L/opt/ATLAS/lib -latlas -lblas -llapack"
export USE_MPI=y
export USE_MPIF=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
make clean
make nwchem_config
make FC=gfortran

Note: don't use HAS_BLAS=y. It gave me no end of grief.

Also, IF you binary executes without a hitch at this point it means that you're libs are not being loaded.  You need to put
export LD_LIBRARY_PATH=/opt/ATLAS/lib:$LD_LIBRARY_PATH
in your ~/.bashrc

Building takes a while, but should go ok. Make sure you have python2.7-dev installed, and if you're using a different python version, make sure to change the options above.




Here's also an example ~/.nwchemrc file for no particular reason at all -- if you've got ecce installed you might want to make sure yours is correct.
nwchem_basis_library /opt/nwchem/nwchem-6.0/src/basis/libraries/
nwchem_nwpw_library /opt/nwchem/nwchem-6.0/src/nwps/libraryps/
ffield amber
amber_1 /opt/nwchem/nwchem-6.0/src/data/amber_s/
amber_2 /opt/nwchem/nwchem-6.0/src/data/amber_x/
spce /opt/nwchem/nwchem-6.0/src/data/solvents/spce.rst
charmm_s /opt/nwchem/nwchem-6.0/src/data/charmm_s/
charmm_x /opt/nwchem/nwchem-6.0/src/data/charmm_x/




You can get a list over compile options for ATLAS using
make xprint_enums ; ./xprint_enums

after you've done .././configure

See http://sourceforge.net/tracker/index.php?func=detail&aid=3021404&group_id=23725&atid=379483


138. Compile ATLAS blas on debian testing

I first tried the latest stable and gave up due to "ERROR 639 DURING CACHE EDGE DETECTION!!" errors. Hence, I used unstable.

Start here

mkdir /opt/ATLAS
chown ${USER}  /opt/ATLAS
mkdir ~/tmp
cd ~/tmp
 wget http://downloads.sourceforge.net/project/math-atlas/Developer%20%28unstable%29/3.9.72/atlas3.9.72.tar.bz2


tar xvf atlas3.9.72.tar.bz2
cd ATLAS/


Edit ATLAS/Make.top 
change the V on line 6 to lowercase i.e. from
- $(ICC) -V 2>&1  >> bin/INSTALL_LOG/ERROR.LOG
to
- $(ICC) -v 2>&1  >> bin/INSTALL_LOG/ERROR.LOG

mkdir build/
cd build/
sudo apt-get install cpufrequtils

Since I don't like computers overheating I normally throttle my cpu. To unset throttling on a AMD64 (phenom II) six core system, before compile:
/usr/bin/cpufreq-selector -g performance
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
sudo cp /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor

Alternatively, you can disable throttle checking using the -Si cputhrchk 0 configure switch. If you don't, and throttling is on, configure will fail.

OK, continuing with the build, in your build/ directory:

.././configure --prefix=/opt/ATLAS -A AMD64

Before you continue, do
make xprint_enums ; ./xprint_enums
and study the output -- you might find a better ARCH fit than e.g. AMD64.  If so, run the configure command above again. There is a lot of other options which you can configure as well. Obviously, nothing prevents you from experimenting and re-compiling if something goes wrong. You can also run without any -A switch at all.

Continuing:
make
make install
cp lib/lib* /opt/ATLAS/lib

Your libs should be in /opt/ATLAS/lib -- when you compiled something to include the new libs, use
"-L/opt/ATLAS/lib"

137. Setting up Gaussian g09 on debian -- precompiled binaries

Most people would use a precompiled and pre-installed copy of gaussian on their local computational grid. If you do, however, purchase your own copy, or work at an institution with a site license, then you can install gaussian on your local beowulf cluster (or over-powered desktop).

And it's easy. I've presumed that your username is verahill, and your group is verahill.


You need csh
sudo apt-get install csh

Next set up a destination directory
mkdir /opt/gaussian
sudo chown verahill:verahill /opt/gaussian

copy the gaussian binaries to /opt/gaussian/g09 so that you have

/opt/gaussian/g09
|-- basis
|-- bsd
`-- tests
    |-- com
    |-- ia64
    `-- newz

Gaussian wants almost everything to be executable
chmod +x /opt/gaussian/g09/*
chmod +x /opt/gaussian/g09/bsd/*
cd /opt/gaussian/g09
csh bsd/install

Next, edit your ~/.bashrc and add (anywhere)
export g09root=/opt/gaussian export GAUSS_SCRDIR=/scratch . /opt/gaussian/g09/bsd/g09.profile export PATH=$PATH:/opt/gaussian/g09/bsd:/opt/gaussian/g09/local

Source your bashrc to make changes take effect immediately:
source ~/.bashrc

You need to edit the bashrc of anyone wanting to use gaussian

And you're done!

136. Compiling GIMP 2.8 on Debian Wheezy/Testing

EDIT 14/12/2012: To use an ugly approach to running gimp 2.8 on debian stable/squeeze, look here:
http://verahill.blogspot.com.au/2012/12/running-gimp-28-in-chroot-on-debian.html
It ain't pretty...

EDIT 27/05/2012: GIMP 2.8 is now in the debian testing repos.

GIMP 2.8 is out -- and it's got the fabled single-window mode: http://www.phoronix.com/scan.php?page=news_item&px=MTA5NjA

First you need to install babl >=0.1.10, and gegl-0.2 >= 0.2.0,  then you can compile and install GIMP 2.8. The versions of babel and gegl in the debian testing/wheezy repos are too old, so you will need to compile tboth babel and gegl yourself -- luckily it is very easy to do so (see below).

Building with python script support needed a ton of packages (it requires PyGTK which depends on pygobject which depends on glib and gobject-introspection etc.), so here I passed --disable-python during build. It just means you can't script gimp with python. No python.

As always, I only spot what packages are missing on my system. If you find that other packages are missing, let me know in the comment section and I'll expand the post. At a minimum, you will need build-essential

LMDE MINT USERS: it seems like you need to add a single line to your /etc/ld.so.conf file:
/usr/local/lib
Then do
sudo ldconfig 

ldconfig is in the package libc-bin

Both babl and gegl are gimp specific, so not giving install prefixes is probably ok. Just don't try to uninstall the pre-existing versions or gnome will disappear on you. See here http://forums.linuxmint.com/viewtopic.php?f=190&t=101253 for more LMDE discussions. See here http://cloudplasma.co.uk/2012/05/gimp-2-8-on-linux-mint-debian-edition/ for a compile based on this post.

START HERE
0. sudo apt-get install build-essential libatk1.0-dev libfontconfig1-dev libcairo2-dev libgudev-1.0-0 libdbus-1-dev libdbus-glib-1-dev liblcms1-dev libexif-dev libxfixes-dev libgtk2.0-dev python2.7-dev libtiff4-dev libpango1.0-dev

1. babl 0.1.10
wget ftp://ftp.gtk.org/pub/babl/0.1/babl-0.1.10.tar.bz2
tar xvf babl-0.1.10.tar.bz2
cd babl-0.1.10/
./configure
make
sudo make install

2. gegl 0.2.0
sudo apt-get install libglib2.0-dev zlib1g-dev
wget ftp://ftp.gtk.org/pub/gegl/0.2/gegl-0.2.0.tar.bz2
tar xvf gegl-0.2.0.tar.bz2 
cd gegl-0.2.0/
./configure
make
sudo make install

3. gimp 2.8.0
sudo apt-get install intltool
wget ftp://ftp.gimp.org/pub/gimp/v2.8/gimp-2.8.0.tar.bz2
tar xvf gimp-2.8.0.tar.bz2 
cd gimp-2.8.0/
./configure --prefix=/home/me/.gimp --disable-python
make
make install

3. ~/.bashrc
Chuck the following in your ~/.bashrc
alias gimp28='/home/me/.gimp/bin/gimp-2.8'
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

and source it. (source ~/.bashrc)

Start from the terminal using
gimp28

Done!

You can turn on single-window mode, by going to Windows and checking Single-Window Mode.


Edit: posted the how-to above eight hours ago, and already linked to by Debian-facile :-)


Links to this post:
http://forums.linuxmint.com/viewtopic.php?t=101253&f=190
http://cloudplasma.co.uk/2012/05/gimp-2-8-on-linux-mint-debian-edition/
http://linuxmint-fr.org/forum/graphisme/92501-installation-de-gimp-28.html

04 May 2012

135. Oniom in gaussian -- with a little bit of help from gromacs and openbabel

Example -- I want to do explicit solvent modelling of methanol in water. This is obviously an articifical approach, but generally applicable.

This is a rough approach to doing oniom calculations using gaussian 09

1. Pre-optimisation
Draw methanol and set up a simple calc using e.g. ecce to pre-optimise the structure with e.g. an implicit solvent model. Here's g03.g03in:

  1 %nprocshared=4
  2 %Chk=g09_oniom.chk
  3 #P rb3lyp/GEN 5D Opt=()  Freq=()  Punch=(MO) Pop=() scrf=(pcm,solvent=water)
  4 
  5 g09_oniom
  6 
  7 0 1 ! charge and multiplicity
  8  C     0.00000     0.00000     0.00000
  9  H     -0.675500     -0.675500     0.675500
 10  H     0.675500     -0.675500     -0.675500
 11  H     -0.675500     0.675500     -0.675500
 12  O     0.866025     0.866025     0.866025
 13  H     1.51843     0.213620     1.51843
 14 
 15  H  0
 16  S   3  1.00
 17       18.73113700      0.03349500
 18        2.82539400      0.23472700
 19        0.64012200      0.81375700
 20  S   1  1.00
 21        0.16127800      1.00000000
 22  ****
 23  O  0
 24  S   6  1.00
 25     5484.67170000      0.00183100
 26      825.23495000      0.01395000
 27      188.04696000      0.06844500
 28       52.96450000      0.23271400
 29       16.89757000      0.47019300
 30        5.79963500      0.35852100
 31  SP  3  1.00
 32       15.53961600     -0.11077800      0.07087400
 33        3.59993400     -0.14802600      0.33975300
 34        1.01376200      1.13076700      0.72715900
 35  SP  1  1.00
 36        0.27000600      1.00000000      1.00000000
 37  SP  1  1.00
 38        0.08450000      1.00000000      1.00000000
 39  D   1  1.00
 40        0.80000000      1.00000000
 41  ****
 42  C  0
 43  S   6  1.00
 44     3047.52490000      0.00183500
 45      457.36951000      0.01403700
 46      103.94869000      0.06884300
 47       29.21015500      0.23218400
 48        9.28666300      0.46794100
 49        3.16392700      0.36231200
 50  SP  3  1.00
 51        7.86827200     -0.11933200      0.06899900
 52        1.88128800     -0.16085400      0.31642400
 53        0.54424900      1.14345600      0.74430800
 54  SP  1  1.00
 55        0.16871400      1.00000000      1.00000000
 56  SP  1  1.00
 57        0.04380000      1.00000000      1.00000000
 58  D   1  1.00
 59        0.80000000      1.00000000
 60  ****

2. Solvation using gromacs
Take the output, g03.g03out, and use babel to export the optimised structure
babel -ig09 g03.g03out -oxyz molecule.xyz

The next few steps require gromacs:
editconf -f molecule.xyz -o molecule.gro -box 2 2 2
genbox -cp molecule.gro -cs spc216.gro -o solvated.gro
babel -igro solvated.gro -oxyz solvated.xyz

Because I'm lazy, I then add an extra column for high/low, chop off the first few lines, and add a column with zeros...because that works. Not sure what that's actually for. Molecule?

tail -n +3 solvated.xyz | gawk '{print $1,"0",$2,$3,$4,"Low"}'>oniom.xyz

Edit oniom.xyz by hand and change the lines with "Low" to "High" (or just H) for the atoms in the methanol molecule.

C 0 10.14000 10.34000 10.00000 High
H 0 9.65000 10.75000 10.90000 High
H 0 9.65000 10.75000 9.10000 High
H 0 11.19000 10.65000 10.00000 High
O 0 10.14000 8.91000 10.00000 High
H 0 9.22000 8.60000 10.00000 High
O 0 5.69000 12.75000 11.65000 Low
H 0 4.76000 12.68000 11.28000 Low
H 0 5.80000 13.64000 12.09000 Low
O 0 15.55000 15.11000 7.03000 Low
[..]
cp oniom.xyz oniom.in

Edit oniom.in and put in your gaussian instructions, e.g.:

%chk=methanol_explicit.chk
%mem=500MB
%nprocshared=3
#Oniom(rb3lyp/6-31+g*:uff) maxdisk=6000MB opt=()

Methanol in explicit water

0 1 0 1 0 1
C 0 10.14000 10.34000 10.00000 High
[...]
So, you specify Oniom(high level:low level) -- here dft and MM (via uff -- amber and charmm are available too -- but then you must carefully define the atom types. See here).

You don't always, but sometimes, have to specify the spin/multiplicity of the high and low level systems as well as the total spin and multiplicity. Anyway, you can: First the overall, the the high, then the low level. E.g. we have a chromium compound with an unpaired spin of 1 (multiplicity=2) and a charge of +3, and have a MM shell with five sodium atoms and a multiplicity of 1 (spin=0). The total charge is 8 and total multiplicity is 2. The line would read 8 2 3 2 0 1.

That's it! You're ready to roll.

The run takes about 3 minutes.

That's it!







134. Introducing a CA certificate in debian

So, for some reason you've been issued a CA certificate. Now what?

I've presumed that you've somehow downloaded both the root certificate (cacert.crt) and your personal certificate (usercert.pem). You'll need both.


Openssl

Convert to .p12
openssl pkcs12 -export -in usercert.pem -inkey userkey.pem -out usercert.p12

Verify
You can verify your issued certificate, e.g.
openssl verify  -CAfile ~/Downloads/cacert.crt ~/.globus/usercert.pem


Browsers:

Iceweasel/Firefox 
Go to Edit, Preferences, Advanced, Encryption: View certificates. Click import under Your Certificates and select your usercert.p12 (see above for conversion).  Got to servers, import cacert.crt.

Make sure that your cert authority shows up under the authority tab (otherwise try importing cacert.crt). Highlight the relevant authority, and click on edit trust: select the relevant fields of identification (e.g. website and/or email).


Chrome/Chromium
Click on the spanner icon, go to Settings, Under the bonnet, Manage Certificates and select Import under Your Certificates. Click on server, import the cacert.crt. Approve the certificate authority for the intended uses of the certificate. If you did it already in firefox it may have carried over.


Email:

Evolution
First go to Edit, Preferences, scroll down to Certificates and import your certificate and, under authorities, import the root certificate (cacert.crt).

Under the Authorities tab, select the issuing authority, click on edit and set the trust level (probably all)


Next, go to Edit, Preferences, Mail Accounts, Select an account and click on Edit. Select the Security tab


Repeat this for all accounts you want to use this certificate with.

Test it:


Send it. Receive it.

If all is correct, this is what greets you

If you don't add the certificate authority as being trusted -- and this will be the case for some of your recipients, this is what you see. Signature no good.


Thunderbird
Go to Edit, Account Settings... and under each account click on Security, then on View Certificates -- import your certificate and the issuing authority's certificate here, or you won't be able to Select the certificates under Digital Signing and Encryption.

Also, under View Certificates, highlight the certificate authority and select Edit Trust -- click on Edit CA trust, select website, mail etc., then select I do trust...
I presume that you do trust the authority or this is an exercise in futility.
You need to do this for ALL accounts that you intend to use, or you'll run into trust issues.

You can select/de-select signing when composing using the S/MIME menu.

If all goes well, users which also have the same certificate authority listed as trusted (probably not the case, but whatever) will see a sealed envelope (this message has been signed by pgp as well as S/MIME: