charmm installation

Hello!
I am trying to compile CHARMM version c34a1 PG compilers v7.0. The machine is a Operetron quadcore (64bit) CPU machine running Debian (kernel 2.6.18-5-amd64, x86_64). I tried following the instructions on the PG website about compiling CHARMM (version v30) on AMD-64bit, but am unsucessful, with both serial and the parallel versions.

I am interested in building the serial verison first; and I get the error in finding “librt.so /librt.a”
as:
/usr/bin/ld: cannot find -lrt
make: *** [/charmm/serial/c34a1/exec/gnu/charmm] Error 2

Any pointers ? Any other info is required, I will gladly provide.

-Prabhakar

Hi Prabhakar,

Do /usr/lib64/librt.a and /usr/lib64/librt.so exist on your system? If not, please make sure it has. What is in your $PGI/linux86-64/7.0*/bin/localrc? Can you post it here?

Hongyon

Thank you for the reply. I appreciate it.

  1. /usr/lib64/librt.* exists on the system, as given by
    $ ls -l /usr/lib64/librt.*
    -rw-r–r-- 1 root root 91376 2007-05-15 08:19 /usr/lib64/librt.a
    lrwxrwxrwx 1 root root 15 2007-09-24 14:16 /usr/lib64/librt.so -> /lib/librt.so.1

I just realised that I should have posted a more complete error info given by CHARMM. here is :

/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: cannot find -lrt
make: *** [/home/prabha/charmm/serial/c34a1/exec/gnu/charmm] Error 2

  1. PGI localrc :
    $ more $PGI/linux86-64/7.0/bin/localrc
    set LFC=-lgfortran;
    set LDSO=/lib64/ld-linux-x86-64.so.2;
    set GCCDIR=/usr/lib/gcc/x86_64-linux-gnu/4.1.2;
    set GCCINC=/usr/lib/gcc/x86_64-linux-gnu/4.1.2/include;
    set G77DIR=/usr/lib/gcc/x86_64-linux-gnu/4.1.2/;
    set OEM_INFO=64-bit target on x86-64 Linux;
    set LOCALRC=YES;
    set THROW=__THROW=;
    set EXTENSION=extension=;
    set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc);

GLIBC version 2.3.6

GCC version 4.1.2

export PGI=/home/prabha/portland;

makelocalrc executed by prabha Fri Nov 9 12:38:04

Hi Prabhakar,

It’s strange that GCCDIR for 64-bit points to /usr/lib instead of /usr/lib64. Does /usr/lib points to /usr/lib64?

It looks like /usr/lib64/librt.so does not point to the right librt.so.1 and that /lib/librt.so.1 is rather 32-bit share object instead of 64-bit.

You may need to make sure that /usr/lib64/librt.so points to the 64-bit librt.so.1. If librt.so.1 is a symlink, make sure it points to correct target.

Hongyon

Hi hyongyon,
Thank you, I appreciate the help.

  1. Well, /usr/lib64 points to /usr/lib; so that should cover that.
    $ ls -l /usr (gives for lib and lib32, and lib64) ,

drwxr-xr-x 149 root root 81920 2007-10-22 14:38 lib
lrwxrwxrwx 1 root root 24 2007-09-24 14:16 lib32 -> /emul/ia32-linux/usr/lib
lrwxrwxrwx 1 root root 3 2007-09-24 14:16 lib64 -> lib

  1. I do not know how to check if the librt.so is 64-bit rather than 32-bit; but I try
    $ ldd /usr/lib/librt.so
    libc.so.6 => /lib/libc.so.6 (0x00002ba9762ba000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00002ba9764f8000)
    /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
    It is pointing to the 64-bit version of ld-linux! And
    $ls -l /lib64
    lrwxrwxrwx 1 root root 4 2007-09-24 14:16 /lib64 -> /lib

Is this suffecient to check if the correct 64-bit version is being used ? Any other checks?

-Prabhakar

Hi Prabhakar,

command: file should be sufficient to say if it is 32-bit or 64-bit.

Here is example fore 64-bit:

syst% file /usr/lib64/librt.so
/usr/lib64/librt.so: symbolic link to `/lib64/librt.so.1’

syst% file /lib64/librt.so.1
/lib64/librt.so.1: symbolic link to `librt-2.3.5.so’

syst% file /lib64/librt-2.3.5.so
/lib64/librt-2.3.5.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

And here is for 32-bit:

syst% file /lib/librt-2.3.5.so
/lib/librt-2.3.5.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped

Hongyon

Hi Hongyon,
Thank you.
Looks like it the file is 64-bit version, but
$ file /usr/lib/librt.so
/usr/lib/librt.so: symbolic link to /lib/librt.so.1' $ file /lib/librt.so.1 /lib/librt.so.1: symbolic link to librt-2.3.6.so’
$ file /lib/librt-2.3.6.so
/lib/librt-2.3.6.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.0, stripped

While yours was “not stripped”, mine is “stripped”; I do not know what the difference means and if it is significant ? (Is it related to underscoring of fortan functions when compiling ?)

-Prabhakar



Hi Prabhakar,

What is the compiler flags that you use to compile? Did you remove all -tp p6 occurrences from file build/UNX/Makefile_GNU? If -tp p6 is there, that means you compile 32-bit application. Perhaps, you compile some of the files with -tp p6 and the link with 64-bit libraries.

Thank you,
Hongyon

Thank you hongyon!

Great catch! I was compiling previously with “-tp p6”, the individual subroutines! Changing it to “-tp amd64”, allowed me to compile. Ran the “test.com”, some programs Segment fault; All of them have

" VEHEAP> Expanding heap size by 6914048 words.
Segmentation fault"

Tried adding “-mcmodel=medium” flag to FC, but SegFaults in more input files. Wondering what the issue is! Would it be a concern when I want to compile the parallel version tommorrow?

ps: charmm installation with " ./install.com gnu large PGF77 X86_64 "

Thank you!
Prabhakar


Hi Prabhakar,

The latest version of CHARMM we have here is v32b1. We won’t get to try latest version until next week at the earliest.

I assume X86_64 option at your build command line is the same as I8 in v32b1 version?

Which version of compilers are you using? It’s possible that there is a bug in compilers.

We will let you know as we have more information.

Thank you,
Hongyon

Hi Hongyon,
I am using PG 7.0/7.0-7 compilers.
My machine is Dual-Core Opteron, and gives
$uname -a
Linux sisboombah 2.6.18-5-amd64 #1 SMP Tue Oct 2 20:37:02 UTC 2007 x86_64 GNU/Linux

I digged around and found the c32b1 version. Changed the “-tp p6” to “-tp amd64” / “-tp amd64” and “pgf77” to “pgf90” in build/UNX/Makefile_gnu. The compilation was successful with “./install.com gnu large PGF77” ( “i8” does not work becase it install.com complains that “-i8 not available for this platform”.

Running test suite has the same issues with “VEHEAP”. So Iam unsucessful in getting the older c32b1 working! Should I try a older PG compiler ?? May I ask which one are you using and which options do you pass to install.com ??

Thank you.
Prabhakar

Hi Prabhakar,

Please make sure you update all the changes as mention in Tips and Techniques page for 64-bit CHARMM.

Note: There is a typo in options for pgcc, so please don’t add $(I8DUM1) in pgcc option. There is no -i8 option for pgcc.

Hongyon

Please try unlimit stack size too.

Hongyon