It is confusing that solver building failed in fact when it showed “BUILD SUCCESSFUL”
Did you meet it before? How can i solve this problem?
> BUILD SUCCESSFUL
> To run solver from command line: ./mfixsolver
> To run solver from GUI: Select [project]/mfixsolver in the Run dialog
> Traceback (most recent call last):
> File "/home/wu/anaconda3/envs/mfix-21.1.4/bin/build_mfixsolver", line 10, in <module>
> File "/home/wu/anaconda3/envs/mfix-21.1.4/lib/python3.7/site-packages/mfixgui/build_mfixsolver.py", line 21, in main
> File "/home/wu/anaconda3/envs/mfix-21.1.4/lib/python3.7/site-packages/mfixgui/build_mfixsolver.py", line 59, in main_args
> File "/home/wu/anaconda3/envs/mfix-21.1.4/lib/python3.7/site-packages/mfixgui/build_mfixsolver.py", line 89, in make_symlink
> os.symlink(os.path.join(rundir, "mfixsolver.sh"), solver)
> FileExistsError: [Errno 17] File exists: '/home/wu/simulation/mfixsolver.sh' -> '/home/wu/simulation/mfixsolver'
I agree that this is a little confusing. The compilation step itself succeeded, which triggered “BUILD SUCCEEDED”, but after that an installation step failed, where we create a symbolic link.
The code in question:
os.symlink(os.path.join(rundir, "mfixsolver.sh"), solver)
os.remove should have deleted
/home/wu/simulation/mfixsolver but it looks like this failed for some reason, then the
symlink operation reported
Can you delete
/home/wu/simulation/mfixsolver and try again?
Thank you for your advice, Charles. It works.
Can you please explain that why installation step is needed after compilation step? For simple program written by myself, it seems only compilation step is needed before starting running.
@wuming : You are right, the installation step is not strictly necessary, but we do it to simplify things, so that the name of the solver executable is the same on Windows and Linux systems. Creating this symbolic link is a smal extra step, but it’s never caused trouble before this bug report. I’d like to understand how this happened, the
build_mfixsolver script should have cleaned up the existing file first. If this continues to be a problem I’ll look at changing the way the compilation/installation process works.