From NWChem
Viewed 2413 times, With a total of 8 Posts
|
Gets Around
Threads 24
Posts 86
|
|
11:58:55 PM PDT - Tue, Sep 29th 2015 |
|
Hi, NwChem developers.
Some old issue returns
http://www.nwchem-sw.org/index.php/Special:AWCforum/st/id1348/Incomplete_EXTRA_LIBS_for_LI...
in Ubuntu python-config --libs returns:
-lpthread -ldl -lutil -lm -lpython2.7
without -lz for some reason.
therefore linking fails.
For this reason in NWChem 6.5 source -lz added to python-config --libs returns
https://github.com/jeffhammond/nwchem/blob/master/src/config/makefile.h#L2005
But this is not in version 6.6
P.S.
To make situation a bit clearer I want to add two links:
https://docs.python.org/2/extending/embedding.html#compiling-and-linking-under-unix-like-s...
https://bugs.python.org/issue15590
Quote:username
to link an embedded interpreter, SYSLIBS should be used,
which might not be complete.
However in this case MODLIBS is missing.
run python
>>> import sysconfig
>>> sysconfig.get_config_var('LIBS')
'-lpthread -ldl -lutil'
>>> sysconfig.get_config_var('SYSLIBS')
'-lm'
>>> sysconfig.get_config_var('MODLIBS')
'-L/usr/lib -lz'
python-config --libs returns same as sysconfig.get_config_var('LIBS') and sysconfig.get_config_var('SYSLIBS') but sysconfig.get_config_var('MODLIBS') output is obviously missing.
with respect
Vladimir
|
Edited On 3:23:59 AM PDT - Wed, Sep 30th 2015 by Vladimir
|
|
|
-
Edoapra Forum:Admin, Forum:Mod, bureaucrat, sysop
|
|
Forum Vet
Threads 9
Posts 1489
|
|
8:26:38 AM PDT - Wed, Sep 30th 2015 |
|
Plesase set the env. variable USE_PYTHONCONFIG=Y
Once this variable is set, all the linking bits should be picked up.
At what stage does the NWChem python interface require libz? Most of my development occurs on a ubuntu 14.04 box and I have not seen this failure.
If you really need any extra library, you can add it to BLASOPT (as a temporary fix)
|
Edited On 8:32:18 AM PDT - Wed, Sep 30th 2015 by Edoapra
|
|
|
|
Gets Around
Threads 24
Posts 86
|
|
10:42:55 AM PDT - Wed, Sep 30th 2015 |
|
Quote:Edoapra Sep 30th 10:26 pmPlesase set the env. variable USE_PYTHONCONFIG=Y
Once this variable is set, all the linking bits should be picked up.
At what stage does the NWChem python interface require libz? Most of my development occurs on a ubuntu 14.04 box and I have not seen this failure.
If you really need any extra library, you can add it to BLASOPT (as a temporary fix)
Thanks for advice Edo, tomorrow I will try to test it.
But I want to add that before compiling NWCHEM I have installed the following packages on Ubuntu 14.04 (from scratch):
sudo apt-get install build-essential
sudo apt-get install python-dev zlib1g-dev libssl-dev gfortran
sudo apt-get install libopenblas-dev
sudo apt-get install libopenmpi-dev openmpi-bin
sudo apt-get install csh
sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu /usr/lib/python2.7/config
Vladimir
|
Edited On 10:45:41 AM PDT - Wed, Sep 30th 2015 by Vladimir
|
|
|
-
Edoapra Forum:Admin, Forum:Mod, bureaucrat, sysop
|
|
Forum Vet
Threads 9
Posts 1489
|
|
11:05:58 AM PDT - Wed, Sep 30th 2015 |
|
Quote:Vladimir Sep 30th 9:42 am
Thanks for advice Edo, tomorrow I will try to test it.
But I want to add that before compiling NWCHEM I have installed the following packages on Ubuntu 14.04 (from scratch):
sudo apt-get install build-essential
sudo apt-get install python-dev zlib1g-dev libssl-dev gfortran
sudo apt-get install libopenblas-dev
sudo apt-get install libopenmpi-dev openmpi-bin
sudo apt-get install csh
NOT NEEDED sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu /usr/lib/python2.7/config
Vladimir
The symbolic link step should NOT be needed (sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu /usr/lib/python2.7/config)
Once you set PYTHONHOME, PYTHONVERSION and USE_PYTHONCONFIG, all the required libraries should be taken care of
|
|
|
|
Gets Around
Threads 24
Posts 86
|
|
2:52:21 AM PDT - Thu, Oct 1st 2015 |
|
Quote:Edoapra Oct 1st 1:05 am
The symbolic link step should NOT be needed (sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu /usr/lib/python2.7/config)
Once you set PYTHONHOME, PYTHONVERSION and USE_PYTHONCONFIG, all the required libraries should be taken care of
It's quite the thing
Many thanks for your help, Edoapra.
|
|
|
|
Clicked A Few Times
Threads 4
Posts 14
|
|
12:44:48 PM PDT - Fri, Apr 22nd 2016 |
|
This is my best installation for Nwchem-Python in Ubuntu-14.04 and it run wonderful
|
Here is my best compilation in Ubuntu-14.04
This file is to compile nwchem-6.6 in Ubuntu 14.04
Required to be installed: OpenMPI, OpenBLAS, Python2.7, Gnuplot and Tkinter
1. Make a symbolic link of all .py files from "~/nwchem-6.6/contrib/python" to the address "/usr/lib/python2.7"
2. Make the following symbolic link for "_tkinter.so" and "_tkinter_d.so":
A. "sudo ln -s /usr/lib/python2.7/lib-dynload/_tkinter.so /usr/lib/python2.7/config-x86_64-linux-gnu/_tkinter.so"
B. "sudo ln -s /usr/lib/python2.7/lib-dynload/_tkinter_d.so /usr/lib/python2.7/config-x86_64-linux-gnu/_tkinter_d.so"
3. Make and link "python-config" file:
"sudo ln -s /usr/lib/python2.7/config-x86_64-linux-gnu /usr/lib/python2.7/python-config"
4. From terminal go to the path's address "~/nwchem-6.6/" and run "make.sh" file.
To run make.sh file execute the following command:
chmod +x make.sh
./make.sh
export USE_NOFSCHECK=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all python"
export LARGE_FILES=TRUE
export ENABLE_COMPONENT=yes
export PYTHONHOME=/usr
export PYTHON_EXE=python
export PYTHONVERSION=2.7
export PYTHONPATH=/usr/lib/python2.7
export USE_PYTHONCONFIG=yes
export PYTHONCONFIGDIR=python-config
export PYTHONLIBTYPE=so
export USE_PYTHON64=yes
export USE_64TO32=yes
export CC=gcc
export FC=gfortran
export HAS_BLAS=yes
export BLAS_SIZE=4
export BLASOPT="-L/usr/lib -lopenblas"
export USE_MPI=yes
export USE_MPIF=yes
export USE_MPIF4=yes
export ARMCI_NETWORK=SOCKETS
export MPI_LOC=/usr/lib/openmpi/
export MPI_LIB=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBMPI="-lpthread -L$MPI_LIB -lmpi_f90 -lmpi_f77 -lmpi"
export MRCC_METHODS=yes
export CCSD=yes
export CCSDT=yes
export CCSDTQ=yes
cd $NWCHEM_TOP/src
make clean
make nwchem_config 2>&1 | tee make.nwchem_config.log
make 64_to_32
make
cd ../contrib
./getmem.nwchem
|
|
|
|
Gets Around
Threads 24
Posts 86
|
|
12:52:38 AM PDT - Thu, May 12th 2016 |
|
What does it means?
export BLAS_SIZE=4
export USE_64TO32=y
I'm using openblas and doesn't require this.
- sudo apt-get install libopenblas-dev
export BLASOPT="-L/usr/lib/openblas-base -lopenblas"
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openblas-base
|
Edited On 12:58:30 AM PDT - Thu, May 12th 2016 by Vladimir
|
|
|
-
Edoapra Forum:Admin, Forum:Mod, bureaucrat, sysop
|
|
Forum Vet
Threads 9
Posts 1489
|
|
11:04:43 AM PDT - Thu, May 12th 2016 |
|
Quote:Vladimir May 11th 11:52 pmWhat does it means?
export BLAS_SIZE=4
export USE_64TO32=y
I'm using openblas and doesn't require this.
- sudo apt-get install libopenblas-dev
export BLASOPT="-L/usr/lib/openblas-base -lopenblas"
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openblas-base
Yes, you need those definitions for openblas on a 64-bit architecture, unless openblas was compiled with 64-bit integers (INTERFACE64=1)
http://www.nwchem-sw.org/index.php/Compiling_NWChem#Optimized_math_libraries
|
|
|
|
Gets Around
Threads 24
Posts 86
|
|
8:52:07 PM PDT - Thu, May 12th 2016 |
|
I find no difference (speed, precision) with (USE_64TO32=y; make 64_to_32) or without in my case.
|
|
|
AWC's:
2.5.10 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC