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

Log file with errors due to MPI [docker install] can cause freezes of FreeCAD #96

Closed
oliveroxtoby opened this issue Apr 1, 2023 · 1 comment

Comments

@oliveroxtoby
Copy link
Collaborator

In GitLab by @dschmidt-hgu on Dec 7, 2022, 08:00

Problem Description:
Running a simpleFoam case that takes approx. >1500 iterations can cause FreeCAD to freeze,
as the log.simpleFoam file is bloated (>100MB file size) due to MPI error messages.
SimpleFoam will continue to run in the background...

This is an issue related to open-mpi in docker, which is already discussed @
open-mpi/ompi#4948

A simple workaround (presented there and locally tested for CfdOF) is,
to place a new line into the Allrun script [runParallel() function]

runParallel()
{
    nproc="$1"
    shift
    exe="$(which $1)"
    sol=$(basename -- "$1")
    sol="${sol%.*}"
    shift
    if [ -f log."$sol" ]; then rm log."$sol"; fi
    export OMPI_MCA_btl_vader_single_copy_mechanism=none  # bug fix open-mpi
    mpiexec -np $nproc "$exe" -parallel "$@" 1> >(tee -a log."$sol") 2> >(tee -a log."$sol" >&2)
    err=$?
    if [ ! $err -eq 0 ]; then exit $err; fi
}

I cannot say if using another open-mpi version in the docker could make this additional line obsolete.

System Configuration:
FreeCAD_0.20-1-2022-08-20-conda-Linux-x86_64-py310.AppImage
CfdOF v.1.20.4 [Docker install]
Ubuntu 20.04 [Kernel 5.4.0-135-generic]

Kind regards
Dominik

@oliveroxtoby
Copy link
Collaborator Author

In GitLab by @oliveroxtoby on Dec 13, 2022, 10:09

Thank you for this! I've implemented your suggested workaround.

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