Error with example wf_ex.py

74 views
Skip to first unread message

Janakiraman Balachandran

unread,
Dec 23, 2015, 2:02:29 PM12/23/15
to Materials Project Development Group
Hi,

I tried to run the example python code wf_ex.py provided in the examples section. When I try to run the code, it throws me an error

Traceback (most recent call last):
 
File "wf_ex_orig.py", line 97, in <module>
    my_wf
= structure_to_wf(s)
 
File "wf_ex_orig.py", line 54, in structure_to_wf
    jobs
= VaspJob.double_relaxation_run('', gzipped=False)
TypeError: double_relaxation_run() got an unexpected keyword argument 'gzipped'

I removed the gzipped=False argument and now the code created the output file Si_wf.json.

Now when I try to ass this json file to the fireworks through lpad add
Si_wf.json I get the following error. Infact I get the same error even if I  try to add the Si_wf.json that was provided as part of example.

Traceback (most recent call last):
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/bin/lpad", line 4, in <module>
    __import__
('pkg_resources').run_script('FireWorks==1.2.1', 'lpad')
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/pkg_resources/__init__.py", line 735, in run_script
   
self.require(requires)[0].run_script(script_name, ns)
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1652, in run_script
   
exec(code, namespace, namespace)
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/EGG-INFO/scripts/lpad", line 6, in <module>
    lpad
()
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/scripts/lpad_run.py", line 829, in lpad
    args
.func(args)
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/scripts/lpad_run.py", line 152, in add_wf
    fwf
= Workflow.from_file(f)
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 264, in from_file
   
return cls.from_format(f.read(), f_format=f_format)
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 236, in from_format
   
return cls.from_dict(reconstitute_dates(json.loads(f_str)))
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/core/firework.py", line 1042, in from_dict
   
return Workflow([Firework.from_dict(f) for f in m_dict['fws']],
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 147, in _decorator
    new_args
[0] = {k: _recursive_load(v) for k, v in args[0].items()}
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 147, in <dictcomp>
    new_args
[0] = {k: _recursive_load(v) for k, v in args[0].items()}
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 108, in _recursive_load
   
return {k: _recursive_load(v) for k, v in obj.items()}
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 108, in <dictcomp>
   
return {k: _recursive_load(v) for k, v in obj.items()}
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 111, in _recursive_load
   
return [_recursive_load(v) for v in obj]
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 103, in _recursive_load
   
return load_object(obj)
 
File "/global/u1/r/rbala/pythonVirtualEnvs/pymatgenCori_Python2_7_9_Nov2015/lib/python2.7/site-packages/FireWorks-1.2.1-py2.7.egg/fireworks/utilities/fw_serializers.py", line 346, in load_object
   
raise ValueError('load_object() could not find a class with cls._fw_name {}'.format(fw_name))
ValueError: load_object() could not find a class with cls._fw_name Vasp Writer Task




Janakiraman Balachandran

unread,
Dec 27, 2015, 12:57:10 AM12/27/15
to Materials Project Development Group
It will be of great help if someone can help me identify the source of my issue. Thanks a lot.

mont...@lbl.gov

unread,
Jan 22, 2016, 7:37:59 PM1/22/16
to Materials Project Development Group
There was an issue in the example related to some changes in deserialization of fireworks a few months ago that I've just now fixed in the latest master branch of MPWorks, but I wasn't getting the same error as the one listed in your post.  Since fireworks seems to be unable to find a particular firetask, your issue is most likely related to how custom external firetasks (like those in mpworks) are typically added to fireworks via a config file, which you can read more about here:


If your config file is ADD_USER_PACKAGES are correct and the issue persists, I also occasionally have issues with firework deserialization if the dependencies I'm using (i. e. numpy, scipy, particularly if in modules loaded on external clusters) are older, so you might check to see if upgrading one of these resolves the problem.

-Joey

Janakiraman Balachandran

unread,
Feb 2, 2016, 3:01:57 PM2/2/16
to Materials Project Development Group
Thank you Joey for your reply and apologies for the delay in followup. I don't think there is much issue with configuration, since I placed the necessary yaml files (my_qadapter, my_fworker, my_launchpad) in the run directory and so there is possibly no issue. There. In fact, I'm able to run simple fireworks tasks such as echo successfully employing the current setting.

My belief is that this is most likely due to some compatibility with different code versions of fireworks, custodian, MPWorks and pymatgen. It will be of great help if you can tell me which versions of the above codes did you use to successfully run your example.

Thank you and I look forward to hear back from you

Best,
Ram

Joseph Montoya

unread,
Feb 2, 2016, 3:13:16 PM2/2/16
to Janakiraman Balachandran, Materials Project Development Group
Sure, I’m using 

pymatgen: 3.3.1
fireworks: 1.2.5
MPWorks: 0.1dev0.1 (latest branch from github)
custodian: 0.8.8

Joseph Montoya
Persson Group, Environmental Energy Technologies Division
Lawrence Berkeley National Laboratory



--
You received this message because you are subscribed to the Google Groups "Materials Project Development Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to matproj-devel...@googlegroups.com.
To post to this group, send email to matproj...@googlegroups.com.
Visit this group at https://groups.google.com/group/matproj-develop.

Reply all
Reply to author
Forward
0 new messages