Difference between revisions of "Amber on Seawulf (compilation)"

From Rizzo_Lab
Jump to: navigation, search
(compiling Amber10)
(compiling Amber10)
 
(5 intermediate revisions by the same user not shown)
Line 133: Line 133:
 
  ./configure_amber gfortran
 
  ./configure_amber gfortran
  
Because I am compiling a cheek out from the CVS tree I had to modify 4 files in the source  the source code in
+
Because I am compiling a cheek out from the CVS tree I had to modify 4 files in the source code and cp one file (qmmm_module.mod ) to a different dir
  
 
when running   
 
when running   
Line 143: Line 143:
 
after:
 
after:
 
  make serial  
 
  make serial  
  cp /nfs/user03/tbalius/amber10/src/sander/qmmm_module.mod /nfs/user03/tbalius/amber10/src/dcqtp/mod/  
+
  cp sander/qmmm_module.mod dcqtp/mod/  
 +
make serial
  
  
Line 171: Line 172:
 
change the following lines:
 
change the following lines:
  
  amber10/src/dcqtp/src/freq/freq.F90:11:
+
1)amber10/src/dcqtp/src/freq/freq.F90:11:
 
   use qmmm_module, only: qmmm_struct, qmmm_div
 
   use qmmm_module, only: qmmm_struct, qmmm_div
  amber10/src/dcqtp/src/freq/freq.F90~:38:
+
  amber10/src/dcqtp/src/freq/freq.F90:38:
 
   dimension dcl(3,qmmm_div%ntotatm+qmmm_struct%nlink)
 
   dimension dcl(3,qmmm_div%ntotatm+qmmm_struct%nlink)
  amber10/src/dcqtp/src/mem/allocateScrfVars.F90~:10:
+
  2)amber10/src/dcqtp/src/mem/allocateScrfVars.F90:10:
 
   use qmmm_module, only : qmmm_struct, qmmm_div
 
   use qmmm_module, only : qmmm_struct, qmmm_div
  amber10/src/dcqtp/src/mem/allocateScrfVars.F90~:45:
+
  amber10/src/dcqtp/src/mem/allocateScrfVars.F90:45:
 
   allocate (atarea(qmmm_div%ntotatm+qmmm_struct%nlink), stat=ierror)
 
   allocate (atarea(qmmm_div%ntotatm+qmmm_struct%nlink), stat=ierror)
  amber10/src/dcqtp/src/pb/pbsolver.F90~:36:
+
  3)amber10/src/dcqtp/src/pb/pbsolver.F90:36:
 
   use qmmm_module, only : qmmm_struct, qmmm_nml, qmmm_div
 
   use qmmm_module, only : qmmm_struct, qmmm_nml, qmmm_div
  amber10/src/dcqtp/src/pb/pbsolver.F90~:73:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:73:
 
         allocate(charges(qmmm_div%ntotatm+qmmm_struct%nlink),stat=ier)
 
         allocate(charges(qmmm_div%ntotatm+qmmm_struct%nlink),stat=ier)
  amber10/src/dcqtp/src/pb/pbsolver.F90~:123:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:123:
 
               do i=1,qmmm_div%ntotatm+qmmm_struct%nlink
 
               do i=1,qmmm_div%ntotatm+qmmm_struct%nlink
  amber10/src/dcqtp/src/pb/pbsolver.F90~:131:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:131:
 
                       call divpb(qmmm_div%ntotatm+qmmm_struct%nlink, &
 
                       call divpb(qmmm_div%ntotatm+qmmm_struct%nlink, &
  amber10/src/dcqtp/src/pb/pbsolver.F90~:133:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:133:
 
                       qmmm_div%all_atom_numbers, &
 
                       qmmm_div%all_atom_numbers, &
  amber10/src/dcqtp/src/pb/pbsolver.F90~:142:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:142:
 
             do i=1,qmmm_div%ntotatm+qmmm_struct%nlink
 
             do i=1,qmmm_div%ntotatm+qmmm_struct%nlink
  amber10/src/dcqtp/src/pb/pbsolver.F90~:151:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:151:
 
                     do j=qmmm_div%ntotatm+qmmm_struct%nlink,i,-1
 
                     do j=qmmm_div%ntotatm+qmmm_struct%nlink,i,-1
  amber10/src/dcqtp/src/pb/pbsolver.F90~:162:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:162:
 
                     do j=qmmm_div%ntotatm+qmmm_struct%nlink,i,-1
 
                     do j=qmmm_div%ntotatm+qmmm_struct%nlink,i,-1
  amber10/src/dcqtp/src/pb/pbsolver.F90~:163:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:163:
 
                         temp = qmmm_div%all_atom_numbers(j-1)
 
                         temp = qmmm_div%all_atom_numbers(j-1)
  amber10/src/dcqtp/src/pb/pbsolver.F90~:164:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:164:
 
                         qmmm_div%all_atom_numbers(j)=temp
 
                         qmmm_div%all_atom_numbers(j)=temp
  amber10/src/dcqtp/src/pb/pbsolver.F90~:166:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:166:
 
                     qmmm_div%all_atom_numbers(i)=1
 
                     qmmm_div%all_atom_numbers(i)=1
  amber10/src/dcqtp/src/pb/pbsolver.F90~:184:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:184:
 
             call divpb(qmmm_div%ntotatm+qmmm_struct%nlink, &
 
             call divpb(qmmm_div%ntotatm+qmmm_struct%nlink, &
  /nfs/user03/tbalius/amber10/src/dcqtp/src/pb/pbsolver.F90~:186:
+
  amber10/src/dcqtp/src/pb/pbsolver.F90:186:
 
                       qmmm_div%all_atom_numbers, &
 
                       qmmm_div%all_atom_numbers, &
 +
 +
for the frist occurence in every file remove qmmm_div; eg, change
 +
 +
from:
 +
use qmmm_module, only: qmmm_struct, qmmm_div
 +
to:
 +
use qmmm_module, only: qmmm_struct
 +
 +
for other occurences change qmmm_div to qmmm_struct
 +
 +
To change this with ease do the following:
 +
 +
  cd ${AMBERHOME}/src/dcqtp/src
 +
  sed -i 's/qmmm_div/qmmm_struct/g' freq/freq.F90
 +
  sed -i 's/qmmm_div/qmmm_struct/g' mem/allocateScrfVars.F90
 +
  sed -i 's/qmmm_div/qmmm_struct/g' pb/pbsolver.F90
 +
 +
sed -i is for in place edits (meaning modifying the input file).

Latest revision as of 16:04, 19 April 2010

compiling Amber9

Follow the steps in the INSTALL file.

At step 5, edit config.h by change g95 to gfortrain.

The following lib file is not found by the compiler

 /usr/include/X11/extensions/shape.h

I copied the following dir from another machine:

 /usr/include/X11/extensions

and put it in my home dir in:

 ~/usr/include/X11/extensions

I modified the files changing the reported line number:

/nfs/user03/tbalius/amber9/src/leap/src/Xmu/ShapeWidg.c line: 27 
/nfs/user03/tbalius/amber9/src/leap/src/Xraw/Logo.c     line: 26
/nfs/user03/tbalius/amber9/src/leap/src/Xraw/Mailbox.c  line: 64 

from:
#include <X11/extensions/shape.h>
to:
#include </nfs/user03/tbalius/usr/include/X11/extensions/shape.h>

instead we should have

 /usr/include/X11/extensions/shape.h  	 x11proto-xext-dev

installed.


I get the following Error:

/usr/bin/ld: cannot find -lXext

possible solutions:


cd /usr/lib
ln -s ./libXext.so.6.4.0 ./libXext.so

instead I did the following:

cd ~/user
mkdir lib
ln -s /usr/lib/libXext.so.6.4.0 libXext.so
cd ../
ln -s lib lib64
ln -s lib lib32

Then I changed the following file at the specified line:

 amber9/src/leap/src/leap/Makefile  line:117

from:

../Xmu/libXmu.a $(XLIBS) -lXt -lXext -lSM -lICE -lX11 $(LM) -lpthread

to:

../Xmu/libXmu.a -L/nfs/user03/tbalius/usr/lib/ -lXext -L/usr/lib/ -lXt -lSM -lICE -lX11 -lm -lpthread

MAKE PARALLEL

./configure -mpich2 -p4 gfortran
AMBERHOME is set to /nfs/user03/tbalius/amber9
Setting up Amber configuration file for architecture: gfortran
Using parallel communications library: mpich2
MPI_HOME is set to /nfs/user03/tbalius/mpich2-install
 ./configure: line 314: /nfs/user03/tbalius/mpich2-install/bin/mpif90: No such file or directory
The MKL_HOME environment variable is not defined.

The configuration file, config.h, was successfully created.


Because of the bold error, we change configure file at line 313:

from:

    loadlib=`$MPI_HOME/bin/mpif90 -show | perl -p -e 's/(-[lL]\S+\s)|\S+\s/$1/g'`

to:

    loadlib=`$MPI_HOME/bin/mpif77 -show | perl -p -e 's/(-[lL]\S+\s)|\S+\s/$1/g'`

compiling Amber10

while making amber10 tools I get the following error:

  ShapeWidg.c:27:34: error: X11/extensions/shape.h: No such file or directory

Like above changed the same files:

From:

Xmu/ShapeWidg.c:#include <X11/extensions/shape.h>
Xraw/Logo.c:#include <X11/extensions/shape.h>
Xraw/Mailbox.c:#include <X11/extensions/shape.h>

To:

Xmu/ShapeWidg.c:#include </nfs/user03/tbalius/usr/include/X11/extensions/shape.h>
Xraw/Logo.c:#include </nfs/user03/tbalius/usr/include/X11/extensions/shape.h>
Xraw/Mailbox.c:#include </nfs/user03/tbalius/usr/include/X11/extensions/shape.h>


Next, I get the same error as in amber9.

 /usr/bin/ld: cannot find -lXext

During linking.

I change the following file at the specified line:

amber10/src/leap/src/leap/Makefile at line 114
from 
    ../Xmu/libXmu.a $(XLIBS) -lXt -lXext -lSM -lICE -lX11 -lXau -lXdmcp $(LM) -lpthread
to
    ../Xmu/libXmu.a $(XLIBS) -lXt -lSM -lICE -lX11 -lXau -lXdmcp -L/nfs/user03/tbalius/usr/lib -lXext $(LM) -lpthread


Problem with testing amber tools:

Running test to compute GB Newton-Raphson and normal modes:

/nfs/user03/tbalius/amber10/lib/libnab.a(newton.o): In function `newton':
newton.c:(.text+0xba8): undefined reference to `assert'
/nfs/user03/tbalius/amber10/lib/libnab.a(nmode.o): In function `nmode':
nmode.c:(.text+0x511e): undefined reference to `assert'
collect2: ld returned 1 exit status
cc failed! 
make[1]: *** [asp_test] Error 1
make[1]: Leaving directory `/nfs/user03/tbalius/amber10/test/nab'
make: *** [test.nab] Error 2

every thing else ran.

configure amber with gfortran

./configure_amber gfortran

Because I am compiling a cheek out from the CVS tree I had to modify 4 files in the source code and cp one file (qmmm_module.mod ) to a different dir

when running

 make serial 

First is seems that the following file need to be placed to the following dir and it is not being copied there:

after:

make serial 
cp sander/qmmm_module.mod dcqtp/mod/ 
make serial


I get the following error:

 gfortran: ../../sander: linker input file unused because linking not done
 gfortran -c -O1 -fno-automatic   -ffree-form ../../sander -I../src/include -DHAS_LAPACK -DQMMM -o ../obj/freq_qmmm.o ../src/freq/freq.F90
 ../src/freq/freq.F90:11.38:
    use qmmm_module, only: qmmm_struct, qmmm_div
                                    1
 Error: Symbol 'qmmm_div' referenced at (1) not found in module 'qmmm_module'

../src/freq/freq.F90:38.26:

   dimension dcl(3,qmmm_div%ntotatm+qmmm_struct%nlink)
                        1
 Error: Expected another dimension in array declaration at (1)
 make[3]: *** [../obj/freq_qmmm.o] Error 1
 make[3]: Leaving directory `/nfs/user03/tbalius/amber10/src/dcqtp/mod'
 make[2]: *** [libdivcon.a] Error 2
 make[2]: Leaving directory `/nfs/user03/tbalius/amber10/src/dcqtp'
 make[1]: *** [divcon] Error 2
 make[1]: Leaving directory `/nfs/user03/tbalius/amber10/src/sander'
 make: *** [serial] Error 2


change the following lines:

1)amber10/src/dcqtp/src/freq/freq.F90:11:
  use qmmm_module, only: qmmm_struct, qmmm_div
amber10/src/dcqtp/src/freq/freq.F90:38:
 dimension dcl(3,qmmm_div%ntotatm+qmmm_struct%nlink)
2)amber10/src/dcqtp/src/mem/allocateScrfVars.F90:10:
 use qmmm_module, only : qmmm_struct, qmmm_div
amber10/src/dcqtp/src/mem/allocateScrfVars.F90:45:
 allocate (atarea(qmmm_div%ntotatm+qmmm_struct%nlink), stat=ierror)
3)amber10/src/dcqtp/src/pb/pbsolver.F90:36:
 use qmmm_module, only : qmmm_struct, qmmm_nml, qmmm_div
amber10/src/dcqtp/src/pb/pbsolver.F90:73:
       allocate(charges(qmmm_div%ntotatm+qmmm_struct%nlink),stat=ier)
amber10/src/dcqtp/src/pb/pbsolver.F90:123:
             do i=1,qmmm_div%ntotatm+qmmm_struct%nlink
amber10/src/dcqtp/src/pb/pbsolver.F90:131:
                     call divpb(qmmm_div%ntotatm+qmmm_struct%nlink, &
amber10/src/dcqtp/src/pb/pbsolver.F90:133:
                     qmmm_div%all_atom_numbers, &
amber10/src/dcqtp/src/pb/pbsolver.F90:142:
            do i=1,qmmm_div%ntotatm+qmmm_struct%nlink
amber10/src/dcqtp/src/pb/pbsolver.F90:151:
                    do j=qmmm_div%ntotatm+qmmm_struct%nlink,i,-1
amber10/src/dcqtp/src/pb/pbsolver.F90:162:
                    do j=qmmm_div%ntotatm+qmmm_struct%nlink,i,-1
amber10/src/dcqtp/src/pb/pbsolver.F90:163:
                       temp = qmmm_div%all_atom_numbers(j-1)
amber10/src/dcqtp/src/pb/pbsolver.F90:164:
                       qmmm_div%all_atom_numbers(j)=temp
amber10/src/dcqtp/src/pb/pbsolver.F90:166:
                    qmmm_div%all_atom_numbers(i)=1
amber10/src/dcqtp/src/pb/pbsolver.F90:184:
            call divpb(qmmm_div%ntotatm+qmmm_struct%nlink, &
amber10/src/dcqtp/src/pb/pbsolver.F90:186:
                     qmmm_div%all_atom_numbers, &

for the frist occurence in every file remove qmmm_div; eg, change

from:

use qmmm_module, only: qmmm_struct, qmmm_div 

to:

use qmmm_module, only: qmmm_struct

for other occurences change qmmm_div to qmmm_struct

To change this with ease do the following:

 cd ${AMBERHOME}/src/dcqtp/src
 sed -i 's/qmmm_div/qmmm_struct/g' freq/freq.F90
 sed -i 's/qmmm_div/qmmm_struct/g' mem/allocateScrfVars.F90
 sed -i 's/qmmm_div/qmmm_struct/g' pb/pbsolver.F90

sed -i is for in place edits (meaning modifying the input file).