[CP2K:6734] Re: CP2K/ASE tests

Satish Kumar satis... at gmail.com
Tue May 10 16:33:22 UTC 2016


Hi Ole

I was experiencing a  similar problem but in line 183 of cp2k.py, which is 
related to
"Error unknown command VERSION". Following is what I did:

$python

Python 2.6.6 (r266:84292, May 22 2015, 08:34:51) 

[GCC 4.4.7 20120313 (Red Hat 4.4.7-15)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> from ase.calculators.cp2k import CP2K

>>> from ase.structure import molecule

>>> CP2K.command="env OMP_NUM_THREADS=1 
/usr/local/openmpi-1.8.4-gnu/bin/mpirun -n 24 cp2k_shell.popt"

>>> calc = CP2K()

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/lib/python2.6/site-packages/ase/calculators/cp2k.py", line 
183, in __init__

    assert self._recv() == '* READY'

AssertionError

#Now with debug=True

>>> calc = CP2K(debug=True)

env OMP_NUM_THREADS=1 /usr/local/openmpi-1.8.4-gnu/bin/mpirun -n 24 
cp2k_shell.popt

Received: * READY

Sending: VERSION

Received: * ERROR unknown command VERSION

Received: * ERROR, type HELP for help

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

  File "/usr/lib/python2.6/site-packages/ase/calculators/cp2k.py", line 
183, in __init__

    assert self._recv() == '* READY'

AssertionError

>>>

When I am manually working with cp2k_shell.popt, I do see the 'READY *' 
status 
and the cp2k_shell.popt seem to be fine. I also tried with Python 2.7.3 but 
the 
Assertion Error persists. 

Thank you for your time.

On Wednesday, July 1, 2015 at 12:09:35 PM UTC-4, Ole Schütt wrote:
>
> > Indeed, replacing cp2k.popt with cp2k_shell.popt solved the problem. 
> Many thanks!
>
> I'm glad to read that.
> I just committed a patch to the ASE svn repository. Now it should also 
> work with Python 3.
>
> Since you are apparently one of the first users of this new ASE-CP2K 
> interface, I'm very curious about your experiences.
> So, please let me know if you encounter any more problems.
>
> -Ole
>
> Am Mittwoch, 1. Juli 2015 14:27:23 UTC+2 schrieb S Ling:
>>
>> Hi Ole,
>>
>> Indeed, replacing cp2k.popt with cp2k_shell.popt solved the problem. Many 
>> thanks!
>>
>> SL
>>
>> On 1 July 2015 at 12:02, Ole Schütt <o.... at schuett.name> wrote:
>>
>>> Hi SLing,
>>>
>>> it looks like you set 
>>>
>>>   ASE_CP2K_COMMAND=aprun -n 24 -N 24 cp2k.popt
>>>
>>> while you should set it to the cp2k_shell instead:
>>>
>>>   ASE_CP2K_COMMAND=aprun -n 24 -N 24 cp2k_shell.popt
>>>
>>> I realize that this is not obvious. I'll see if I can print a more 
>>> meaning full error message for this in the future.
>>>
>>> -Ole
>>>
>>> Am Mittwoch, 1. Juli 2015 12:01:22 UTC+2 schrieb S Ling:
>>>>
>>>> Hi Ole,
>>>>
>>>> Please see below error message if I ran the script with debugging.
>>>>
>>>> SL
>>>>
>>>> ===============
>>>> aaa at mom3:/work/aaa/ase/ase/test/cp2k> python cp2k_H2_PBE.py
>>>> aprun -n 24 -N 24 cp2k.popt
>>>> Received: 
>>>> Traceback (most recent call last):
>>>>   File "cp2k_H2_PBE.py", line 33, in <module>
>>>>     main()
>>>>   File "cp2k_H2_PBE.py", line 23, in main
>>>>     calc = CP2K(debug=True, xc='PBE', label='test_H2_PBE')
>>>>   File "/work/aaa/ase/ase/calculators/cp2k.py", line 160, in __init__
>>>>     assert self._recv() == '* READY'
>>>> AssertionError
>>>> Sending: EXIT
>>>>
>>>>
>>>> On 1 July 2015 at 10:32, Ole Schütt <o.... at schuett.name> wrote:
>>>>
>>>>> Hi SLing,
>>>>>
>>>>> that appears to be a slightly different error message now. Could you 
>>>>> run the script again with debugging:
>>>>>
>>>>>    calc = CP2K(debug=True, ...)
>>>>>
>>>>> ... and send me the output? It should show the communication between 
>>>>> ASE and the cp2k_shell.
>>>>>
>>>>> -Ole
>>>>>
>>>>> Am Mittwoch, 1. Juli 2015 11:17:14 UTC+2 schrieb S Ling:
>>>>>>
>>>>>> Hi Ole,
>>>>>>
>>>>>> I have just tried to install ASE using Python 2.7.6, and I still got 
>>>>>> a similar error message.
>>>>>>
>>>>>> SL
>>>>>>
>>>>>> ===============
>>>>>> aaa at mom3:/work/aaa/ase/ase/test/cp2k> python cp2k_H2_PBE.py
>>>>>> Traceback (most recent call last):
>>>>>>   File "cp2k_H2_PBE.py", line 33, in <module>
>>>>>>     main()
>>>>>>   File "cp2k_H2_PBE.py", line 23, in main
>>>>>>     calc = CP2K(xc='PBE', label='test_H2_PBE')
>>>>>>   File "/work/aaa/ase/ase/calculators/cp2k.py", line 160, in __init__
>>>>>>     assert self._recv() == '* READY'
>>>>>> AssertionError
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 1 July 2015 at 06:20, Ole Schütt <o.... at schuett.name> wrote:
>>>>>>
>>>>>>> Hi SLing,
>>>>>>>
>>>>>>> it seems like you are using Python 3 and have run into a common 
>>>>>>> incompatibility issue. I'll look into it.
>>>>>>> Thanks for reporting this.
>>>>>>>
>>>>>>> -Ole
>>>>>>>
>>>>>>>
>>>>>>> Am Mittwoch, 1. Juli 2015 00:29:30 UTC+2 schrieb S Ling:
>>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> I was trying several of the CP2K/ASE tests listed on the following 
>>>>>>>> website,
>>>>>>>>
>>>>>>>> http://www.cp2k.org/tools:ase
>>>>>>>>
>>>>>>>> and I got the following error message. I am not very familiar with 
>>>>>>>> ASE. Can you tell me what does the error message mean? Two relevant 
>>>>>>>> environment variables ASE_CP2K_COMMAND and CP2K_DATA_DIR have been set, and 
>>>>>>>> I don't think the error is related to that.
>>>>>>>>
>>>>>>>> Many thanks!
>>>>>>>>
>>>>>>>> SL
>>>>>>>>
>>>>>>>> [aaa at www cp2k]$ python cp2k_O2.py 
>>>>>>>> Traceback (most recent call last):
>>>>>>>>   File "cp2k_O2.py", line 35, in <module>
>>>>>>>>     main()
>>>>>>>>   File "cp2k_O2.py", line 25, in main
>>>>>>>>     basis_set="SZV-MOLOPT-SR-GTH")
>>>>>>>>   File 
>>>>>>>> "/home/aaa/.local/lib/python3.3/site-packages/ase/calculators/cp2k.py", 
>>>>>>>> line 160, in __init__
>>>>>>>>     assert self._recv() == '* READY'
>>>>>>>> AssertionError
>>>>>>>> Exception TypeError: "'str' does not support the buffer interface" 
>>>>>>>> in <bound method CP2K.__del__ of <ase.calculators.cp2k.CP2K object at 
>>>>>>>> 0x2ae385f1b250>> ignored
>>>>>>>>
>>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>> Groups "cp2k" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>> send an email to cp2k+... at googlegroups.com.
>>>>>>> To post to this group, send email to cp... at googlegroups.com.
>>>>>>> Visit this group at http://groups.google.com/group/cp2k.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "cp2k" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to cp2k+... at googlegroups.com.
>>>>> To post to this group, send email to cp... at googlegroups.com.
>>>>> Visit this group at http://groups.google.com/group/cp2k.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "cp2k" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to cp2k+... at googlegroups.com.
>>> To post to this group, send email to cp... at googlegroups.com.
>>> Visit this group at http://groups.google.com/group/cp2k.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20160510/7957cca9/attachment.htm>


More information about the CP2K-user mailing list