RPM installation OpenFOAM-v1812 on OpenSUSE 15.0
Hello, dear visitors of the forum. My question is about installing OpenFOAM-v1812 on OpenSUSE 15.0. On the page https://www.openfoam.com/download/in...nary-linux.php brief instructions for installing from RPM packages. With YaST, the installation went to the / opt / openfoam-1812 directory. What's next? How does the program run? I did not find the startOpenFOAM script at / opt / openfoam-1812 / ... Maybe the program is not installed and need additional settings?
Tell me please. For me, this is all for the first time (both OpenFOAM and Linux) |
Quick answer: :eek: How did they forget to write that on the instructions page...
OK, if the path you've reported is correct, then you can add the following line to your "~/.bashrc" file: Code:
source /opt/openfoam-1812/etc/bashrc |
Hello, dear wyldckat. Thanks for your reply. I inserted this line at the end of the contents of the file opt/openfoam/etc/bashrc:
. . . # Finalize setup of OpenFOAM environment for POSIX shell if [ -d "$WM_PROJECT_DIR" ] then if [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ] then echo "source $WM_PROJECT_DIR/etc/config.sh/setup" 1>&2 fi . "$WM_PROJECT_DIR/etc/config.sh/setup" "$@" else echo "Error: did not locate installation path for $WM_PROJECT-$WM_PROJECT_VERSION" 1>&2 echo "No directory: $WM_PROJECT_DIR" 1>&2 fi # Cleanup variables (done as final statement for a clean exit code) unset foamOldDirs projectDir #------------------------------------------------------------------------------ source /opt/openfoam-1812/etc/bashrc Then press save. Then I switch to the terminal, enter the "simpleFoam -help", but nothing happens: roman@linux-ijwm:~> simpleFoam -help If 'simpleFoam' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf simpleFoam You also write "~/.bashrc". It means that the file bashrc needs to be copied from the directory /opt to the /home directory? I tried it, but it also doesn't help How does the environment OpenFOAM run in general (from Console)? |
Quick answers:
Quote:
Please read the following wiki page for more details: https://openfoamwiki.net/index.php/I...with_the_Shell Quote:
Please edit the file "/opt/openfoam-1812/etc/bashrc" and remove the line you added at the bottom of it. Then follow these steps and instructions:
|
I used a text editor Kate, i.e.:
kate ~/.bashrc This .bashrc file content: # Sample .bashrc for SuSE Linux # Copyright (c) SuSE GmbH Nuernberg # There are 3 different types of shells in bash: the login shell, normal shell # and interactive shell. Login shells read ~/.profile and interactive shells # read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all # settings made here will also take effect in a login shell. # # NOTE: It is recommended to make language settings in ~/.profile rather than # here, since multilingual X sessions would not work properly if LANG is over- # ridden in every subshell. # Some applications read the EDITOR variable to determine your favourite text # editor. So uncomment the line below and enter the editor of your choice :-) #export EDITOR=/usr/bin/vim #export EDITOR=/usr/bin/mcedit # For some news readers it makes sense to specify the NEWSSERVER variable here #export NEWSSERVER=your.news.server # If you want to use a Palm device with Linux, uncomment the two lines below. # For some (older) Palm Pilots, you might need to set a lower baud rate # e.g. 57600 or 38400; lowest is 9600 (very slow!) # #export PILOTPORT=/dev/pilot #export PILOTRATE=115200 test -s ~/.alias && . ~/.alias || true source /opt/openfoam-1812/etc/bashrc Then I run a new terminal window and see: mpicc: command not found roman@linux-ijwm:~> Testing with the "simpleFoam -help" command doesn't work: mpicc: command not found roman@linux-ijwm:~> simpleFoam -help simpleFoam: error while loading shared libraries: libmpi.so.12: cannot open shared object file: No such file or directory roman@linux-ijwm:~> |
Quick answer: OK, you're close to having it work. Please run the following commands:
Code:
mpi-selector --set openmpi If the last command now gives you a help list instead of complaining about missing MPI, then edit the "~/.bashrc" file and change the last line to this: Code:
source /etc/profile.d/mpi-selector.sh |
Hello, dear Bruno Santos. I did everything as you said. But the situation repeats.
This is the end of the file .bashrc now: . . test -s ~/.alias && . ~/.alias || true source /etc/profile.d/mpi-selector.sh source /opt/openfoam-1812/etc/bashrc This is a new terminal window: mpicc: command not found roman@linux-ijwm:~> mpi-selector --set openmpi (this is a repeat of my actions) Defaults already exist; overwrite them? (y/N) y roman@linux-ijwm:~> source /etc/profile.d/mpi-selector.sh roman@linux-ijwm:~> source ~/.bashrc mpicc: command not found roman@linux-ijwm:~> simpleFoam -help Usage: simpleFoam [OPTIONS] Options: -case <dir> Specify case directory to use (instead of the cwd) -decomposeParDict <file> Use specified file for decomposePar dictionary -dry-run Check case set-up only using a single time step -dry-run-write Check case set-up and write only using a single time step -noFunctionObjects Do not execute function objects -parallel Run in parallel -postProcess Execute functionObjects only -doc Display documentation in browser -doc-source Display source code in browser -help Display short help and exit -help-full Display full help and exit Steady-state solver for incompressible, turbulent flows. Using: OpenFOAM-1812 (1812) (see www.OpenFOAM.com) Build: 1812 Arch: LSB;label=32;scalar=64 roman@linux-ijwm:~> kate ~/.bashrc roman@linux-ijwm:~>exit New terminal: mpicc: command not found roman@linux-ijwm:~> ... and so on |
Quick answer: As root, run the following command:
Code:
zypper install openmpi-devel |
Hello, dear Bruno Santos. Thanks for your help. I did everything as you said.
Terminal: Code:
mpicc: command not found New terminal: Code:
roman@linux-ijwm:~> icoFoam -help Code:
roman@linux-ijwm:~> foamInstallationTest Code:
roman@linux-ijwm:~> mkdir -p $FOAM_RUN Code:
roman@linux-ijwm:~> run Code:
roman@linux-ijwm:~/OpenFOAM/roman-1812/run> simpleFoam Code:
roman@linux-ijwm:~/OpenFOAM/roman-1812/run> paraFoam |
Quick answers:
|
Thank you very much! OpenFOAM works. In spite of the fact that in the /opt directory there are files associated with ParaVIEW, it doesn't start from the shell:
Code:
|
As mentioned in the original page you pointed to, the idea is to use the Scotch and ParaView RPM packages that already exist in the Science repository.
Since Scotch is installed automatically along with OpenFOAM (I think it is...), then you just need to install ParaView manually: Code:
zypper install paraview |
Thank you very much. ParaVIEW has been successfully installed, but it run with the following comments:
roman@linux-ijwm:~/OpenFOAM/roman-1812/run/pitzDaily> paraFoam Cannot use ParaView reader module library (PVFoamReader) The PV_PLUGIN_PATH environment value is not set Continuing with builtin reader: paraFoam -vtk Created temporary 'pitzDaily.foam' It's important? Because the visualization of tutorial simple calculations was successful. If I run the program with the help of the paraview command, the calculation results cannot be read: roman@linux-ijwm:~/OpenFOAM/roman-1812/run/pitzDaily> paraview File ' "/home/roman/OpenFOAM/roman-1812/run/pitzDaily/pitzDaily.foam" ' cannot be read. ERROR: In /home/abuild/rpmbuild/BUILD/ParaView-v5.6.0/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 782 vtkPVCompositeDataPipeline (0x562dc76ef160): Algorithm vtkAMReXParticlesReader(0x562dc7543ff0) returned failure for request: vtkInformation (0x562dc76f7e40) Debug: Off Modified Time: 220506 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION ALGORITHM_AFTER_FORWARD: 1 FORWARD_DIRECTION: 0 Can I ask any questions on this forum about settings of interaction between OpenFOAM and external pre- and post-processors (for example, SALOME, which include ParaVIEW)? |
Quick answers:
|
Thank you very much!
|
Hello everybody,
This thread is very interesting, I had the same problems as RoPr. Unfortunately, I have still problem when I want to install openfoam doc, examples, modules and selector. It seems the deposit 'openSUSE:LEAP:15.1:ARM' is not valid. Does everyone know if there is a problem on servers? Is it due to the openSUSE version (15.1 instead of 15.0 in this thread). I don't have found a specific user guide to install openfoam on openSUSE15.1. Thank you for your help. |
Hello Stiral!
There’s probably nothing wrong with your repos. the rsync server is down as indicated by opensuse in their website. you can wait till it is fixed. The science repo is working for me though, you should able to install the openfoam-xxxx |
Quote:
Quote:
Just leaving another solution for anyone else that comes across the same problem. So basically I continued getting the mpicc: command not found even after installing the recommended mpi packages. So I ended up making the following changes to the bashrc file located at $WM_PROJECT_DIR/etc/bashrc export WM_MPLIB=SYSOPENMPI to export WM_MPLIB=OPENMPI This enables Openfoam to use the built in libraries as oposed to the one installed in the system. OpenFoam2012 (from the science repository) on openSUSE Tumbleweed. |
Quote:
This is not only pretty strange, it is also not what I would recommend changing at all. I don't know how exactly you have sourced things but normally, the mpicc command will not even be needed. During the RPM build, an additional file (etc/config.sh/prefs.sys-openmpi) is generated. It will have this type of content: Code:
# etc/config.sh/prefs.sys-openmpi If this path is missing, or incorrect that could explain your problem. Only in that case does it actually use the mpicc command to determine paths. If mpicc is actually setup for you will depend on what you have done (or not) with the mpi-selector command in opensuse. It is worth taking a further dig to see what has gone wrong. Simply changing the entry to "OPENMPI" like you have done indicates that you expect to be using openmpi from a ThirdParty installation that doesn't exist. While your quick solution does remove the warning about not finding mpicc, you are unlikely to have much joy if you try to run anything in parallel. You will get the dummy stubs that all essentially emit error messages only. |
You are right. Although I was able to remove the error message, it didn't actually solve the problem. I verified this by running a test parallel case.
What I did initially was based off of what I read here. (pg. 10) I reverted the changes I made and used the mpi-selector to choose openmpi2. My prefs.sys-openmpi file is identical to yours. But now when I run this case I get the following error: [hal9000:03673] *** An error occurred in MPI_Init_thread [hal9000:03673] *** on a NULL communicator [hal9000:03673] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort, [hal9000:03673] *** and potentially your MPI job) [hal9000:03674] *** An error occurred in MPI_Init_thread [hal9000:03674] *** on a NULL communicator [hal9000:03674] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort, [hal9000:03674] *** and potentially your MPI job) [hal9000:03675] *** An error occurred in MPI_Init_thread [hal9000:03675] *** on a NULL communicator [hal9000:03675] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort, [hal9000:03675] *** and potentially your MPI job) [hal9000:03672] *** An error occurred in MPI_Init_thread [hal9000:03672] *** on a NULL communicator [hal9000:03672] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort, [hal9000:03672] *** and potentially your MPI job) [hal9000:03672] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed! [hal9000:03673] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed! [hal9000:03674] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed! [hal9000:03675] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed! ^C [1]+ Exit 1 mpirun -np 4 interFoam -parallel > log.interFoam I would really appreciate some help. Edit: After a bit of tinkering, I've switched to a Debian based distribution and everything just works at the moment. I'll get back to this thread when I go back to tumbleweed in the future. |
All times are GMT -4. The time now is 15:33. |