pyiron / pyiron_atomistics

pyiron_atomistics - an integrated development environment (IDE) for atomistic simulation in computational materials science.
https://pyiron-atomistics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
44 stars 15 forks source link

Using `-` in project and job names silently breaks #645

Open pmrv opened 2 years ago

pmrv commented 2 years ago

Jobs are created and run fine, but loading gives an error.

Reminder for myself.

jan-janssen commented 2 years ago

It should fail already during the creation of the job - for projects I guess it is fine.

pmrv commented 2 years ago

I just had an example where it doesn't work for Murnaghan jobs. I'll take care of it after the workshop.

samwaseda commented 2 years ago

It used to fail but now the conversion of - to m (which stands for minus) is done automatically. Indeed for loading it fails but I also don't know where it comes from

job = pr.create.job.Vasp('vasp')
job.structure = pr.create.structure.bulk('Al', cubic=True)
murn = job.create_job('Murnaghan', 'testing-case')
murn.run()
pr.load('testing-case')
ligerzero-ai commented 2 years ago

Actually, I found that pyiron has issues initiating any jobs in subgroups with dash'd job-names - I did some matrix testing today and found that the jobname assigned in subgroups must not have the conversion properly done:

~/dev_pyiron/show-dash-creation-failure/Pnodash_Sdash_jnodash/nest-level-1-subproject-0/job_0/job_0_hdf5/job_0 runs

but

~/dev_pyiron/show-dash-creation-failure/Pnodash_Sdash_jdash/nest-level-1-subproject-0/job-0/job-0_hdf5/jobm0 fails

I suspect it's because the job-0 and job-0_hdf5 are not properly converted into jobm0 and jobm0_hdf5, a la:

~/dev_pyiron/show-dash-creation-failure/Pnodash_Sdash_jdash/nest-level-1-subproject-0/jobm0/jobm0_hdf5/jobm0

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

  | Project | Subgroup | Job | Runs? | Event? -- | -- | -- | -- | -- | -- Dashed? | x | x | x | no | Fails on beginning job on cluster   |   |   |   |   |   Dashed? | x | x |   | yes |   Dashed? | x |   | x | no | Fails on beginning job on cluster Dashed? | x |   |   | yes |     |   |   |   |   |   Dashed? |   | x | x | no | Fails on beginning job on cluster Dashed? |   |   | x | no | Fails on beginning job on cluster Dashed? |   | x |   | yes |  

The stacktrace is as follows: cat error.out

Traceback (most recent call last):
  File "/u/system/SLES12/soft/pyiron/dev/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/u/system/SLES12/soft/pyiron/dev/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/cmmc/u/hmai/github_branch_sorting_behaviour/pyiron_base/pyiron_base/cli/__main__.py", line 3, in <module>
    main()
  File "/cmmc/u/hmai/github_branch_sorting_behaviour/pyiron_base/pyiron_base/cli/__init__.py", line 63, in main
    args.cli(args)
  File "/cmmc/u/hmai/github_branch_sorting_behaviour/pyiron_base/pyiron_base/cli/wrapper.py", line 31, in main
    job_wrapper_function(
  File "/cmmc/u/hmai/github_branch_sorting_behaviour/pyiron_base/pyiron_base/jobs/job/wrapper.py", line 148, in job_wrapper_function
    job = JobWrapper(
  File "/cmmc/u/hmai/github_branch_sorting_behaviour/pyiron_base/pyiron_base/jobs/job/wrapper.py", line 61, in __init__
    self.job = pr.load(int(job_id))
  File "/cmmc/u/hmai/github_branch_sorting_behaviour/pyiron_base/pyiron_base/project/generic.py", line 816, in load
    return self.load_from_jobpath(
  File "/cmmc/u/hmai/github_branch_sorting_behaviour/pyiron_base/pyiron_base/project/generic.py", line 840, in load_from_jobpath
    job = job.to_object()
  File "/cmmc/u/hmai/github_branch_sorting_behaviour/pyiron_base/pyiron_base/jobs/job/core.py", line 481, in to_object
    raise ValueError(
ValueError: The HDF5 file of this job with the job_name: "jobm0" is empty, so it can not be loaded.
liamhuber commented 2 years ago

I don't have a comment on the topic, but I just wanted to quickly say: very nice table @ligerzero-ai. Absolutely the right way to format this information, and renders really nicely. I'm going to have to keep that piece of typesetting in mind!

samwaseda commented 2 years ago

I don't have a comment on the topic, but I just wanted to quickly say: very nice table @ligerzero-ai. Absolutely the right way to format this information, and renders really nicely. I'm going to have to keep that piece of typesetting in mind!

It's super nice but it looks like there's a lot of HTML involved ... ? It would be actually great if it's possible with markdown.

ligerzero-ai commented 2 years ago

I don't have a comment on the topic, but I just wanted to quickly say: very nice table @ligerzero-ai. Absolutely the right way to format this information, and renders really nicely. I'm going to have to keep that piece of typesetting in mind!

It's super nice but it looks like there's a lot of HTML involved ... ? It would be actually great if it's possible with markdown.

Actually github supports pasting from excel, which was where I was copying stuff. Github is pretty frictionless when copy pasting stuff!

samwaseda commented 2 years ago

Actually github supports pasting from excel, which was where I was copying stuff. Github is pretty frictionless when copy pasting stuff!

yeah but for someone like me who doesn't have excel we need a non-capitalist solution 😎

pmrv commented 2 years ago

I don't have a comment on the topic, but I just wanted to quickly say: very nice table @ligerzero-ai. Absolutely the right way to format this information, and renders really nicely. I'm going to have to keep that piece of typesetting in mind!

It's super nice but it looks like there's a lot of HTML involved ... ? It would be actually great if it's possible with markdown.

Ask and you shall receive.