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

Add example using MPIClusterManager #26

Open
vchuravy opened this issue Oct 24, 2022 · 0 comments
Open

Add example using MPIClusterManager #26

vchuravy opened this issue Oct 24, 2022 · 0 comments

Comments

@vchuravy
Copy link
Member

vchuravy commented Oct 24, 2022

using MPI
using MPIClusterManagers
using LAMMPS

MPI.Init()

manager = MPIClusterManagers.start_main_loop(MPI_TRANSPORT_ALL) # does not return on worker

cmds = [
    "clear",
]

# do_n_tasks_in_parallel

function run_lammps(manager, cmds)
    @mpi_do manager begin
        LMP(["-screen", "none"], MPI.COMM_WORLD) do lmp
            @test LAMMPS.version(lmp) >= 0
            for cmd in cmds
                command(lmp, cmd)
            end
        end

        # data post-processing
    end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant