SebWouters / CheMPS2

CheMPS2: a spin-adapted implementation of DMRG for ab initio quantum chemistry
GNU General Public License v2.0
68 stars 34 forks source link

Installing questions with psi4 plugin option #20

Closed nesquik91 closed 8 years ago

nesquik91 commented 8 years ago

Dear CheMPS2 members,

I'm having trouble with installing chemps2 as a new plugin of psi4.

After changing [dmrgscf.cc with /sourcefolder/chemps2/integrals/psi4plugins/dmrgscf.cc] the manual (http://sebwouters.github.io/CheMPS2/interfaces.html) says

change the line of Makefile as [PSIPLUGIN = -L$(OBJDIR)/lib -lplugin -lchemps2] but there is no PSIPLUGIN line in my Makefile. (I'm using the same version of psi4 that you've tested)

I got error messages when I make without revising Makefile but also, I'm not sure if this problem is related with Makefile PSIPLUGIN.

Here is my /dmrgscf/Makefile

NAME = $(shell basename pwd)

CXXSRC = $(notdir $(wildcard *.cc))

CXX = /usr/local/intel/composer_xe_2015.1.133/bin/intel64/icpc CXXDEFS = -DHAVE_MM_MALLOC_H -DFC_SYMBOL=2 -DHAVE_MKL_LAPACK -DHAVE_MKL_BLAS -DHAS_CXX11_VARIADIC_TEMPLATES -DHAS_CXX11_STATIC_ASSERT -DHAS_CXX11_SIZEOF_MEMBER -DHAS_CXX11_RVALUE_REFERENCES -DHAS_CXX11_NULLPTR -DHAS_CXX11_LONG_LONG -DHAS_CXX11_LAMBDA -DHAS_CXX11_INITIALIZER_LIST -DHAS_CXX11_DECLTYPE -DHAS_CXX11_CSTDINT_H -DHAS_CXX11_CONSTEXPR -DHAS_CXX11_AUTO_RET_TYPE -DHAS_CXX11_AUTO -DHAS_CXX11_FUNC -DHAS_CXX11 -DSYS_LINUX CXXFLAGS = -DRESTRICT=restrict -Xlinker -export-dynamic -fPIC -std=c++11 -qopenmp -O3 -no-prec-div -DNDEBUG -xHost LDFLAGS = -shared-intel -shared-intel INCLUDES = -I/home/suhwan/psi4public/objdir/interfaces/include -I/home/suhwan/psi4public/objdir/src/lib -I/home/suhwan/psi4public/src/lib -I/home/suhwan/psi4public/include -I/home/suhwan/psi4public/objdir/include -I/home/suhwan/psi4public/objdir/boost/include -I/usr/include/python2.6 -I/usr/include -I/usr/include -I/home/suhwan/psi4public/objdir/lib -I/usr/local/hdf5/1.8.13/include/

UNAME = $(shell uname)

DEPENDINCLUDE = $(notdir $(wildcard .h))

PSITARGET = $(NAME).so

default:: $(PSITARGET)

ifeq ($(UNAME), Linux) LDFLAGS += -shared endif ifeq ($(UNAME), Darwin) LDFLAGS += -shared -undefined dynamic_lookup CXXFLAGS += -fno-common endif

BINOBJ = $(CXXSRC:%.cc=%.o)

%.o: %.cc $(CXX) $(CXXDEFS) $(CXXFLAGS) $(INCLUDES) -c $<

$(PSITARGET): $(BINOBJ) $(CXX) $(LDFLAGS) -o $@ $^ $(CXXDEFS)

clean:

rm -f $(BINOBJ) $(PSITARGET) .d .pyc *.test output.dat psi.timer.dat

and error messages while "make"

In file included from /usr/include/python2.6/pyconfig.h(6), from /home/suhwan/psi4public/objdir/boost/include/boost/python/detail/wrap_python.hpp(50), from /home/suhwan/psi4public/objdir/boost/include/boost/python/detail/prefix.hpp(13), from /home/suhwan/psi4public/objdir/boost/include/boost/python/object_fwd.hpp(8), from /home/suhwan/psi4public/src/lib/liboptions/liboptions.h(34), from /home/suhwan/psi4public/include/process.h(27), from /home/suhwan/psi4public/src/lib/libparallel/parallel.h(35), from /home/suhwan/psi4public/src/lib/libplugin/plugin.h(26), from dmrgscf.cc(1): /usr/include/python2.6/pyconfig-64.h(1034): warning #47: incompatible redefinition of macro "_POSIX_C_SOURCE" (declared at line 162 of "/usr/include/features.h")

define _POSIX_C_SOURCE 200112L

      ^

In file included from /usr/include/python2.6/pyconfig.h(6), from /home/suhwan/psi4public/objdir/boost/include/boost/python/detail/wrap_python.hpp(50), from /home/suhwan/psi4public/objdir/boost/include/boost/python/detail/prefix.hpp(13), from /home/suhwan/psi4public/objdir/boost/include/boost/python/object_fwd.hpp(8), from /home/suhwan/psi4public/src/lib/liboptions/liboptions.h(34), from /home/suhwan/psi4public/include/process.h(27), from /home/suhwan/psi4public/src/lib/libparallel/parallel.h(35), from /home/suhwan/psi4public/src/lib/libplugin/plugin.h(26), from dmrgscf.cc(1): /usr/include/python2.6/pyconfig-64.h(1043): warning #47: incompatible redefinition of macro "_XOPEN_SOURCE" (declared at line 164 of "/usr/include/features.h")

define _XOPEN_SOURCE 600

      ^

In file included from /home/suhwan/psi4public/objdir/boost/include/boost/python/object/function_handle.hpp(10), from /home/suhwan/psi4public/objdir/boost/include/boost/python/converter/arg_to_python.hpp(19), from /home/suhwan/psi4public/objdir/boost/include/boost/python/call.hpp(15), from /home/suhwan/psi4public/objdir/boost/include/boost/python/object_core.hpp(14), from /home/suhwan/psi4public/objdir/boost/include/boost/python/object.hpp(9), from /home/suhwan/psi4public/objdir/boost/include/boost/python/list.hpp(10), from /home/suhwan/psi4public/src/lib/libmints/onebody.h(30), from /home/suhwan/psi4public/src/lib/libmints/mints.h(29), from /home/suhwan/psi4public/src/lib/libdpd/dpdmospace.h(29), from /home/suhwan/psi4public/src/lib/libdpd/dpd.h(38), from dmrgscf.cc(3): /home/suhwan/psi4public/objdir/boost/include/boost/python/object/py_function.hpp(167): warning #1478: class "std::auto_ptrboost::python::objects::py_function_impl_base" (declared at line 85 of "/usr/include/c++/4.4.7/backward/auto_ptr.h") was declared deprecated mutable std::auto_ptr m_impl; ^

dmrgscf.cc(846): error: class "CheMPS2::CASSCF" has no member "calcNOON" CheMPS2::CASSCF::calcNOON( iHandler, mem1, mem2, DMRG1DM ); ^

dmrgscf.cc(862): error: class "CheMPS2::CASSCF" has no member "rotate2DMand1DM" CheMPS2::CASSCF::rotate2DMand1DM( nDMRGelectrons, nOrbDMRG, mem1, mem2, DMRG1DM, DMRG2DM ); ^

compilation aborted for dmrgscf.cc (code 2)

make: *\ [dmrgscf.o] Error 2

thank you for the help.

loriab commented 8 years ago

Possibly relevant: latest changes broke old plugins, so you'll need to adjust signature according to direction on this thread http://forum.psicode.org/t/wavefunction-passing-update/139 . Although the above looks more like a version problem at first glance.

SebWouters commented 8 years ago

Hi nesquick91,

Lori is right. There is an API break between v1.6 of chemps2 and the current head. If you use chemps2 v1.6 with the plugin and the version of psi4 specified in the manual it should work.

Tomorrow I will upload a new version of the plugin which works with psi4-0.5 (latest release; this week) and which works with the to be released v1.7 of chemps which also supports DMRG-CASPT2.

More news follows.

Best wishes, Sebastian On 17 Feb 2016 15:16, "Lori A. Burns" notifications@github.com wrote:

Possibly relevant: latest changes broke old plugins, so you'll need to adjust signature according to direction on this thread http://forum.psicode.org/t/wavefunction-passing-update/139 . Although the above looks more like a version problem at first glance.

— Reply to this email directly or view it on GitHub https://github.com/SebWouters/CheMPS2/issues/20#issuecomment-185223569.

nesquik91 commented 8 years ago

Dear all,

Thank you for your kind comments. I've installed v1.6 and "make" problem is solved.

But, I got another problem with symbol error.

While typing [psi4 O2.dmrgscf.in test]

my error messages is

[psi4: symbol lookup error: dmrgscf/dmrgscf.so: undefined symbol: _ZN7CheMPS26Irreps12getGroupNameEi]

I found a link that related with this problem (https://github.com/psi4/psi4/issues/96) but I couldn't get it exactly where can I give: -L/home/luca/psi-master/CheMPS2/build/binbin/lib64 AND -lchemps2 command.

my libchemps2.so file is located in /usr/local/

and here is the $ ldd dmrgscf.so

    linux-vdso.so.1 =>  (0x00007fffb15ff000)
    libimf.so => /usr/local/intel/composer_xe_2015.1.133/compiler/lib/intel64/libimf.so (0x00002b07b8f43000)
    libsvml.so => /usr/local/intel/composer_xe_2015.1.133/compiler/lib/intel64/libsvml.so (0x00002b07b93fe000)
    libirng.so => /usr/local/intel/composer_xe_2015.1.133/compiler/lib/intel64/libirng.so (0x00002b07ba2dc000)
    libm.so.6 => /lib64/libm.so.6 (0x00002b07ba509000)
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002b07ba78d000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b07baa93000)
    libintlc.so.5 => /usr/local/intel/composer_xe_2015.1.133/compiler/lib/intel64/libintlc.so.5 (0x00002b07bacaa000)
    libc.so.6 => /lib64/libc.so.6 (0x00002b07baf05000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00002b07bb299000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003f6f000000)

and I've also tried [export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH] to my bashrc.

Thank you again for the help.

SebWouters commented 8 years ago

Hi nesquick91,

In the line

  $(CXX) $(LDFLAGS) -o $@ $^ $(CXXDEFS)

you need to add -lchemps2:

  $(CXX) $(LDFLAGS) -o $@ $^ $(CXXDEFS) -lchemps2

so that when you do

  ldd dmrgscf.so

one of the entries is libchemps2.so.

Best wishes, Sebastian

2016-02-18 6:16 GMT+01:00 nesquik91 notifications@github.com:

Dear all,

Thank you for your kind comments. I've installed v1.6 and "make" problem is solved.

But, I got another problem with symbol error.

While typing [psi4 O2.dmrgscf.in test]

my error messages is

[psi4: symbol lookup error: dmrgscf/dmrgscf.so: undefined symbol: _ZN7CheMPS26Irreps12getGroupNameEi]

I found a link that related with this problem (psi4/psi4#96 https://github.com/psi4/psi4/issues/96) but I couldn't get it exactly where can I give: -L/home/luca/psi-master/CheMPS2/build/binbin/lib64 AND -lchemps2 command.

my libchemps2.so file is located in /usr/local/

and here is the $ ldd dmrgscf.so

linux-vdso.so.1 =>  (0x00007fffb15ff000)
libimf.so => /usr/local/intel/composer_xe_2015.1.133/compiler/lib/intel64/libimf.so (0x00002b07b8f43000)
libsvml.so => /usr/local/intel/composer_xe_2015.1.133/compiler/lib/intel64/libsvml.so (0x00002b07b93fe000)
libirng.so => /usr/local/intel/composer_xe_2015.1.133/compiler/lib/intel64/libirng.so (0x00002b07ba2dc000)
libm.so.6 => /lib64/libm.so.6 (0x00002b07ba509000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002b07ba78d000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002b07baa93000)
libintlc.so.5 => /usr/local/intel/composer_xe_2015.1.133/compiler/lib/intel64/libintlc.so.5 (0x00002b07bacaa000)
libc.so.6 => /lib64/libc.so.6 (0x00002b07baf05000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b07bb299000)
/lib64/ld-linux-x86-64.so.2 (0x0000003f6f000000)

and I've also tried [export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH] to my bashrc.

Thank you again for the help.

— Reply to this email directly or view it on GitHub https://github.com/SebWouters/CheMPS2/issues/20#issuecomment-185546621.


dr. ir. Sebastian Wouters Postdoctoral Fellow of the Research Foundation Flanders (FWO) Ghent University (address) Center for Molecular Modeling Technologiepark 903 9052 Zwijnaarde (Belgium) (e-mail) sebastianwouters@gmail.com


SebWouters commented 8 years ago

@nesquik91 @loriab

I have fully updated the plugins to psi4-0.5 (released February 17, 2016). Please check

@jturney : I still strongly recommend that you absorb (a modified form of) the fcidump plugin in psi4, and allow to call it by specifying

set fcidump true

in the input file.

Fixed by 2ac122475c2a8c994129fe49a20e519b2a702fc9

SebWouters commented 8 years ago

@nesquik91 @loriab @jturney

I get the same error

../../psi4-0.5/objects/bin/psi4: symbol lookup error: /home/seba/software/psi4plugings/dmrg/dmrg.so: undefined symbol: _ZN7CheMPS26Irreps12getGroupNameB5cxx11Ei

when chemps2 is compiled with the intel compiler (16.0.0 20150815) and psi4 with the GNU compiler (5.2.1 20151010). I suggest to use the same compiler for both codes. It certainly works when both codes are compiled with the GNU compiler. I haven't tested it yet when both are compiled with the intel compiler.

Does this solve your issue?

nesquik91 commented 8 years ago

Dear Sebastian,

Thank you for your help.

My problem is solved by changing $(CXX) $(LDFLAGS) -o $@ $^ $(CXXDEFS) -lchemps2 line in Makefile.

I used intel compiler for both psi4 and chemps2 but had upper error messages.

Thank you again.