Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A result can not be added to a workflow if a parameter exists with the same name (SQLA) #960

Closed
szoupanos opened this issue Nov 28, 2017 · 1 comment
Assignees
Milestone

Comments

@szoupanos
Copy link
Contributor

E.g.

In [11]: w2=load_workflow(2)
In [44]: s2=StructureData()

In [45]: s2
Out[45]: <StructureData: uuid: 780f3af8-77e7-4cec-a711-c8eb7e4b76ef (unstored)>

In [46]: s2.store()
Out[46]: <StructureData: uuid: 780f3af8-77e7-4cec-a711-c8eb7e4b76ef (pk: 787)>

In [47]: w2.add_result('structure',s2)

In [48]: w2.get_results()
Out[48]: {u'params': <ParameterData: uuid: bf245765-f5b5-414d-a038-67a79be5854d (pk: 785)>}

In [49]: w2.add_result('structure2',s2)

In [50]: w2.get_results()
Out[50]:
{u'params': <ParameterData: uuid: bf245765-f5b5-414d-a038-67a79be5854d (pk: 785)>,
 u'structure2': <StructureData: uuid: 780f3af8-77e7-4cec-a711-c8eb7e4b76ef (pk: 787)>}
In [51]: w2.get_attributes()
Out[51]:
{u'submission_has_failed': False,
 u'update_calculation_set': {u'max_wallclock_seconds': 86400,
  u'resources': {u'num_machines': 1, u'num_mpiprocs_per_machine': 16}},
 u'update_parameters': {u'CONTROL': {u'max_seconds': 74193}},
 u'update_settings': {u'cmdline': [u'-nk', u'16']}}

In [52]: w2.get_parameters()
Out[52]:
{u'band_calculation_set': {},
 u'band_group_name': u'bands_finished_pw_kpts_dist_0p2_smear_cold_psfam_SSSPv0p7effPBE_volthr_0p01_calc_vc-relax_deg_0p02',
 u'band_input': {u'automatic_parallelization': {u'max_num_machines': 1,
   u'max_wall_time_seconds': 86400},
  u'distance_kpoints_in_dispersion': 0.01},
 u'band_parameters_update': {u'ELECTRONS': {u'conv_thr': 4e-09,
   u'diagonalization': u'cg'}},
 u'calculation_set': {},
 u'codename': u'pw-5.2.0',
 u'group_name': u'pw_finished_pw_kpts_dist_0p2_smear_cold_psfam_SSSPv0p7effPBE_volthr_0p01_calc_vc-relax_deg_0p02',
 u'input': {u'automatic_parallelization': {u'max_num_machines': 1,
   u'max_wall_time_seconds': 86400,
   u'target_time_seconds': 28800},
  u'clean_workdir': True,
  u'distance_kpoints_in_mesh': 0.2,
  u'finish_with_scf': False,
  u'relaxation_scheme': u'vc-relax',
  u'volume_convergence_threshold': 0.01},
 u'kpoints': <KpointsData: uuid: 7b521778-f4a9-4231-ae5f-8f3b58d80746 (pk: 715)>,
 u'parameters': {u'ELECTRONS': {u'conv_thr': 8e-11, u'electron_maxstep': 100},
  u'SYSTEM': {u'degauss': 0.02,
   u'ecutrho': 840.0,
   u'ecutwfc': 70.0,
   u'occupations': u'smearing',
   u'smearing': u'cold'}},
 u'pseudo_family': u'SSSP_v0.7_eff_PBE',
 u'structure': <StructureData: uuid: 780f3af8-77e7-4cec-a711-c8eb7e4b76ef (pk: 787)>}

In [53]: w2.add_result('pseudo_family',s2)

In [54]: w2.get_results()
Out[54]:
{u'params': <ParameterData: uuid: bf245765-f5b5-414d-a038-67a79be5854d (pk: 785)>,
 u'structure2': <StructureData: uuid: 780f3af8-77e7-4cec-a711-c8eb7e4b76ef (pk: 787)>}
@szoupanos
Copy link
Contributor Author

Fixed by #962

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant