Skip to content

[BUG] In model_devi step, LAMMPS reports errors with "ERROR on proc 0: Cannot open dump file (src/dump.cpp:582)" #1180

Closed
deepmodeling/dpdispatcher
#322

Description

@scott-5

Summary

Probably due to a bug in DPGEN's internal call to DPDispatcher, the traj folder in local directory /home/user/colombo-ABACUS/ABACUS-DeePKS-DPGEN/run/iter.000000/01.model_devi/task.000.000000 was not uploaded to the corresponding directory on the remote server correctly, causing LAMMPS to report an error when dumping *.lammpstrj to traj folder that could not be found. (dump 1 all custom 10 traj/*.lammpstrj id type x y z fx fy fz in the input file of LAMMPS)

DPGEN Version and Platform

The version 0.11.1 of DPGEN is running on CentOS 7.

Job submission and computing cluster configuration

The remote server OS is CentOS 7, and the scheduling system on it is LSF.

Expected Behavior

If normal, task.000.0000xxx in the remote work directory /home/mzx/work/ should contain the files conf.lmp, input.lammps and the folder traj so that LAMMPS can output dump to the traj folder.

Actual Behavior

Under the remote work directory /home/mzx/work/, task.0000.0000xx contains only conf.lmp, input.lammps, no traj folder, but it generates an additional path, that is completely /home/mzx/work/submission_hash/home/user/colombo-ABACUS/ABACUS-DeePKS-DPGEN/run/iter.000000/01.model_devi/task.000.0000xx/traj (home/user/colombo-ABACUS/ABACUS-DeePKS-DPGEN/run/iter.000000/01.model_devi/task.000.0000xx is exactly the same as the local directory)

Steps to Reproduce

This problem can be reproduced by modifying machine.json based on the official example. The modified machine.json is attached below and can be reproduced by running dpgen run run_param.json machine.json under colombo-ABACUS/ABACUS-DeePKS-DPGEN/run.

Further Information, Files, and Links

The emergence of additional directories that are the same as the local directory seems to be due to the failure to upload the traj file, but the dpgen upload file does not output the log file, so it is difficult to know why traj cannot be uploaded correctly.
machine.zip

Activity

  1. added
    bug
    on Apr 12, 2023
  2. njzjz commented on Apr 12, 2023

    @njzjz
    Member

    @Cloudac7 could you take a look? deepmodeling/dpdispatcher#275 might break the behavior.

  3. scott-5 commented on Apr 13, 2023

    @scott-5
    ContributorAuthor

    This problem is caused by the poor support of DPDispatcher for the LSF scheduling. I tried to simplify this issue and wrote the following script to reproduce.

    from dpdispatcher import Machine, Resources, Submission, Task
    import os
    
    machine = Machine.load_from_dict({
        'batch_type': 'LSF',
        'local_root': "./",                                                               
        'remote_root': '/home/mzx/work',
        'context_type': 'SSHContext',
        'remote_profile': {'hostname': '11.22.33.8', 'username': 'mzx'}
    })
    
    resources = Resources.load_from_dict({
        'number_node': 1,
        'cpu_per_node': 32,
        'queue_name': 'normal',
        'group_size': 1
    })
    
    task = Task(
        command="echo Hello > traj/test",
        task_work_path='./',
        forward_files=['traj'],
        backward_files=['traj'],
        outlog="out",
        errlog="err",
    )
    task_list=[task]
    
    submission = Submission(
            work_base="./",
            machine=machine,
            resources=resources,
            task_list=task_list,
        )
    
    submission.run_submission()
    

    I found that for LSF it only uploads files normally, but folders (separately upload to a directory with the same name as the local absolute directory), but for slurm, both uploads properly.

  4. Cloudac7 commented on Apr 13, 2023

    @Cloudac7
    Contributor

    This problem is caused by the poor support of DPDispatcher for the LSF scheduling. I tried to simplify this issue and wrote the following script to reproduce.

    from dpdispatcher import Machine, Resources, Submission, Task
    import os
    
    machine = Machine.load_from_dict({
        'batch_type': 'LSF',
        'local_root': "./",                                                               
        'remote_root': '/home/mzx/work',
        'context_type': 'SSHContext',
        'remote_profile': {'hostname': '11.22.33.8', 'username': 'mzx'}
    })
    
    resources = Resources.load_from_dict({
        'number_node': 1,
        'cpu_per_node': 32,
        'queue_name': 'normal',
        'group_size': 1
    })
    
    task = Task(
        command="echo Hello > traj/test",
        task_work_path='./',
        forward_files=['traj'],
        backward_files=['traj'],
        outlog="out",
        errlog="err",
    )
    task_list=[task]
    
    submission = Submission(
            work_base="./",
            machine=machine,
            resources=resources,
            task_list=task_list,
        )
    
    submission.run_submission()
    

    I found that for LSF it only uploads files normally, but folders (separately upload to a directory with the same name as the local absolute directory), but for slurm, both uploads properly.

    Not the point, for I just reproduced the bug on Slurm platform. Please try the new commit on DPDispatcher. I am the former developer on LSF support and it is an issue about SSHContext.

  5. scott-5 commented on Apr 13, 2023

    @scott-5
    ContributorAuthor

    okey, thanks

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions