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

run in docker #747

Closed
noisystreet opened this issue Jul 31, 2019 · 6 comments
Closed

run in docker #747

noisystreet opened this issue Jul 31, 2019 · 6 comments

Comments

@noisystreet
Copy link

noisystreet commented Jul 31, 2019

I have built SU2 in docker and run several cases, but some of them failed at MPI_Waitany . Will there be officially support for a docker release version of SU2 ?

here's the Dockerfile I used to build SU2.

Dockerfile.txt

@talbring
Copy link
Member

Please have a look here #738 and here #739.

@talbring
Copy link
Member

And we will eventually provide container images using Singularity soon. However, we first have to find a proper way of running the python scripts in parallel from outside of the container.

@stephansmit
Copy link

@talbring
Is this problem (of not being able to run the python scripts in parallel from outside the container) described in an issue somewhere?

@talbring
Copy link
Member

Well thats not really an issue. Its just a conceptual thing. Usually what you want to do with an container is to run something from the outside like

./container_binary <arguments>

or to be more specific, like I did with the singularity container

./su2.sif SU2_CFD configfile

This way you can also run the python scripts

./su2.sif parallel_computation.py -f configfile

This works well in serial, however, if you want to run it in parallel you probably should use mpirun from the host system (actually I have no idea what happens if you run mpirun inside of the container, but I am pretty sure that it won't work properly on a cluster). But: at the moment the python scripts do exactly that at the moment, they call the binaries using mpirun in the container.

@stephansmit
Copy link

stephansmit commented Aug 9, 2019

While playing around with the singularity containers a little bit, what do you think about this solution?

Execute the python script inside the container with the python on the host

singularity exec su2_container.sif cat /SU2/bin/SU2_PY/parallel_computation.py | python3

Adjust the python interface (SU2_PY/SU2/run/interface.py) to execute the container:

# set mpi command
if user_defined:
    mpi_Command = os.environ['SU2_MPI_COMMAND']
elif slurm_job:
    mpi_Command = 'srun -n %i %s'
elif singularity_job:
    mpi_Command = 'mpirun -n %i singularity exec su2_container.sif %s'
elif not which('mpirun') is None:
    mpi_Command = 'mpirun -n %i %s'
elif not which('mpiexec') is None:
    mpi_Command = 'mpiexec -n %i %s'
else:
    mpi_Command = ''

Just need to make sure that the hostfile is also included in the mpirun command if run on multiple nodes.

@stale
Copy link

stale bot commented Oct 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 30, 2019
@stale stale bot closed this as completed Nov 6, 2019
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

3 participants