CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.org] OpenFOAM stopped working

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2016, 17:42
Default OpenFOAM stopped working
  #1
New Member
 
Matt
Join Date: Sep 2016
Posts: 7
Rep Power: 8
mattmirsad is on a distinguished road
Dear all,

I have recently installed (compiled) OpenFOAM 4 on ubuntu 16.0.4 LTS successfully and it was working very fine.

In my .bashrc file I had created an alias as below:

alias of4c='source /opt/openfoam4Com/OpenFOAM-4.0/etc/bashrc'

Today when I execute the of4c in order to use OpenFOAM 4, I got the following lines in the terminal:

/home/m
_foamSource: command not found
_foamEval: command not found
_foamSource: command not found
_foamSource: command not found
_foamSource: command not found
_foamSource: command not found
_foamSource: command not found
_foamSource: command not found
_foamSource: command not found
/home/m



I am very amazed! because it was working fine just till yesterday!. I have no idea what has went wrong.

Could you please give advice?

Thanks,
Matt
mattmirsad is offline   Reply With Quote

Old   September 29, 2016, 16:48
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,968
Blog Entries: 45
Rep Power: 126
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick questions:
  1. Is "/opt/openfoam4Com" a real path or a symbolic path?
  2. Did you start a new terminal before running of4c?
  3. When you start a new terminal and run the following command:
    Code:
    export | grep -e FOAM -e WM
    does it give you any textual output?
    • If it does, then it's likely you have another OpenFOAM version or fork being loaded automatically and it's conflicting with the current installation.
__________________
wyldckat is offline   Reply With Quote

Old   October 2, 2016, 11:34
Default
  #3
New Member
 
Matt
Join Date: Sep 2016
Posts: 7
Rep Power: 8
mattmirsad is on a distinguished road
Hi Bruno,

Thanks for your response.

Here are the answers to your questions:
1. /opt/openfoam4Com is a real path
2. Yes
3. This is the output of the results:
Code:
declare -x FOAMY_HEX_MESH="yes"
declare -x FOAM_APP="/opt/openfoam4Com/OpenFOAM-4.0/applications"
declare -x FOAM_APPBIN="/opt/openfoam4Com/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/bin"
declare -x FOAM_ETC="/opt/openfoam4Com/OpenFOAM-4.0/etc"
declare -x FOAM_EXT_LIBBIN="/opt/openfoam4Com/ThirdParty-4.0/platforms/linux64GccDPInt32/lib"
declare -x FOAM_INST_DIR="/opt/openfoam4Com"
declare -x FOAM_JOB_DIR="/opt/openfoam4Com/jobControl"
declare -x FOAM_LIBBIN="/opt/openfoam4Com/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/lib"
declare -x FOAM_MPI="openmpi-system"
declare -x FOAM_RUN="/home/m/OpenFOAM/m-4.0/run"
declare -x FOAM_SETTINGS=""
declare -x FOAM_SIGFPE=""
declare -x FOAM_SITE_APPBIN="/opt/openfoam4Com/site/4.0/platforms/linux64GccDPInt32Opt/bin"
declare -x FOAM_SITE_LIBBIN="/opt/openfoam4Com/site/4.0/platforms/linux64GccDPInt32Opt/lib"
declare -x FOAM_SOLVERS="/opt/openfoam4Com/OpenFOAM-4.0/applications/solvers"
declare -x FOAM_SRC="/opt/openfoam4Com/OpenFOAM-4.0/src"
declare -x FOAM_TUTORIALS="/opt/openfoam4Com/OpenFOAM-4.0/tutorials"
declare -x FOAM_USER_APPBIN="/home/m/OpenFOAM/m-4.0/platforms/linux64GccDPInt32Opt/bin"
declare -x FOAM_USER_LIBBIN="/home/m/OpenFOAM/m-4.0/platforms/linux64GccDPInt32Opt/lib"
declare -x FOAM_UTILITIES="/opt/openfoam4Com/OpenFOAM-4.0/applications/utilities"
declare -x LD_LIBRARY_PATH="/opt/openfoam4Com/ThirdParty-4.0/platforms/linux64Gcc/gperftools-svn/lib:/opt/openfoam4Com/ThirdParty-4.0/platforms/linux64Gcc/ParaView-5.0.1/lib/paraview-5.0:/opt/openfoam4Com/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/lib/openmpi-system:/opt/openfoam4Com/ThirdParty-4.0/platforms/linux64GccDPInt32/lib/openmpi-system:/usr/lib/openmpi/lib:/home/m/OpenFOAM/m-4.0/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam4Com/site/4.0/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam4Com/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/lib:/opt/openfoam4Com/ThirdParty-4.0/platforms/linux64GccDPInt32/lib:/opt/openfoam4Com/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/lib/dummy"
declare -x PATH="/opt/openfoam4Com/ThirdParty-4.0/platforms/linux64Gcc/gperftools-svn/bin:/opt/openfoam4Com/ThirdParty-4.0/platforms/linux64Gcc/ParaView-5.0.1/bin:/home/m/OpenFOAM/m-4.0/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam4Com/site/4.0/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam4Com/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/bin:/opt/openfoam4Com/OpenFOAM-4.0/bin:/opt/openfoam4Com/OpenFOAM-4.0/wmake:/home/m/bin:/home/m/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
declare -x PV_PLUGIN_PATH="/opt/openfoam4Com/OpenFOAM-4.0/platforms/linux64GccDPInt32Opt/lib/paraview-5.0"
declare -x PWD="/home/m/OpenFOAM/m-4.0/run"
declare -x WM_ARCH="linux64"
declare -x WM_ARCH_OPTION="64"
declare -x WM_CC="gcc"
declare -x WM_CFLAGS="-m64 -fPIC"
declare -x WM_COMPILER="Gcc"
declare -x WM_COMPILER_LIB_ARCH="64"
declare -x WM_COMPILER_TYPE="system"
declare -x WM_COMPILE_OPTION="Opt"
declare -x WM_CXX="g++"
declare -x WM_CXXFLAGS="-m64 -fPIC -std=c++0x"
declare -x WM_DIR="/opt/openfoam4Com/OpenFOAM-4.0/wmake"
declare -x WM_LABEL_OPTION="Int32"
declare -x WM_LABEL_SIZE="32"
declare -x WM_LDFLAGS="-m64"
declare -x WM_LINK_LANGUAGE="c++"
declare -x WM_MPLIB="SYSTEMOPENMPI"
declare -x WM_OPTIONS="linux64GccDPInt32Opt"
declare -x WM_OSTYPE="POSIX"
declare -x WM_PRECISION_OPTION="DP"
declare -x WM_PROJECT="OpenFOAM"
declare -x WM_PROJECT_DIR="/opt/openfoam4Com/OpenFOAM-4.0"
declare -x WM_PROJECT_INST_DIR="/opt/openfoam4Com"
declare -x WM_PROJECT_USER_DIR="/home/m/OpenFOAM/m-4.0"
declare -x WM_PROJECT_VERSION="4.0"
declare -x WM_THIRD_PARTY_DIR="/opt/openfoam4Com/ThirdParty-4.0"
Indeed I have different versions (2 installations) of OpenFOAM installed in /opt folder. I read that it is possible to choose different versions of OpenFOAM through defining alias commands in the .bashrc file as below:
Code:
alias of4='source /opt/openfoam4/etc/bashrc'
alias of4c='source /opt/openfoam4Com/OpenFOAM-4.0/etc/bashrc'
How should I make sure that these versions are not conflicting with each other?

Thanks,
Matt

Last edited by wyldckat; November 13, 2016 at 18:13. Reason: Added [CODE][/CODE] markers
mattmirsad is offline   Reply With Quote

Old   November 13, 2016, 18:26
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,968
Blog Entries: 45
Rep Power: 126
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Matt,

My apologies for the delay in getting back to you on this, but unfortunately flew by and I still haven't managed to deduce a solution or reasoning for this... wait... there were some recent details that came up which might explain this. I've documented some of them here: http://bugs.openfoam.org/view.php?id=2311

Technically I don't see anything in the output of export that would point to the problem with "GREP_OPTIONS", so that shouldn't be it... oh, wait, I asked you to run export with grep, so the output isn't complete.

OK, anyway, if you haven't fixed this already, let's try fixing this the other way around:
Quote:
Originally Posted by mattmirsad View Post
Code:
alias of4='source /opt/openfoam4/etc/bashrc'
alias of4c='source /opt/openfoam4Com/OpenFOAM-4.0/etc/bashrc'
How should I make sure that these versions are not conflicting with each other?
You can change those lines to this:
Code:
alias of4='[ -n "$WM_PROJECT_DIR" ] && source $WM_PROJECT_DIR/etc/config.sh/unset; source /opt/openfoam4/etc/bashrc'
alias of4c='[ -n "$WM_PROJECT_DIR" ] && source $WM_PROJECT_DIR/etc/config.sh/unset; source /opt/openfoam4Com/OpenFOAM-4.0/etc/bashrc'
Start a new terminal command line and it should be fully operational.
What I've done here is embed the command used by the alias "wmUnset", which you can see by running:
Code:
alias wmUnset
which gives:
Code:
alias wmUnset='. $WM_PROJECT_DIR/etc/config.sh/unset'
Now, you mentioned that this problem was recent (well, a month ago it was recent), then perhaps the "/bin/sh" shell was replaced? What do you get when you run these commands?
Code:
ls -l /bin/sh
ls -l /bin/bash
which sh
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Reply

Tags
openfoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 4.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 2 October 6, 2017 06:40
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 14, 2016 11:19
Possible to simulate a working Centrifugal Compressor for jet engine on OpenFOAM? fazlur OpenFOAM 1 August 21, 2013 05:30
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55


All times are GMT -4. The time now is 02:40.