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

Possible Missing Tab Completion in OFv1712?

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 1 Post By wyldckat
  • 2 Post By wyldckat
  • 1 Post By HakikiCanakkaleli
  • 2 Post By olesen
  • 1 Post By HakikiCanakkaleli
  • 1 Post By spaceprop

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 1, 2018, 14:45
Default Possible Missing Tab Completion in OFv1712?
  #1
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Hi,

Has anyone else also been experiencing the lack of tab completion (command line completion) for the options of OpenFOAM commands in version 1712?

As you may remember, this functionality was added in version 1706?: Bash shell completion
HakikiCanakkaleli is offline   Reply With Quote

Old   January 1, 2018, 14:54
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
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. Which shell are you using? bash, dash, tcsh or something else?
  2. How are you keeping OpenFOAM versions separate from each other? For example, are you starting a new terminal whenever you need a new version?
__________________
wyldckat is offline   Reply With Quote

Old   January 1, 2018, 14:56
Default
  #3
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
1. I use bash.
2. Currently, I removed the other versions. Yet in general I keep the versions separate through ~/.bashrc. For instance:
Code:
alias ofcv='source /scratch/kb8e10/OpenFOAM/OpenFOAM-v1706/etc/bashrc'
alias ofcd='source /scratch/kb8e10/OpenFOAM/OpenFOAM-v1712/etc/bashrc'
I assume that you do not experience the issue I am experiencing? Otherwise, I would like to raise a bug ticket.
HakikiCanakkaleli is offline   Reply With Quote

Old   January 1, 2018, 15:04
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
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
Everything looks correct in your description... I haven't tried installing it yet, so I haven't tested it yet... let me download and check...

OK, so when I first source the script, I get a warning:
Code:
$ source etc/bashrc
No completion added for /home/bmss/OpenFOAM/OpenFOAM-v1712/platforms/linux64GccDPInt32Opt/bin
because I haven't built it yet.

I've taken a look into the script and it seems like it will silently complain that it needs at least Bash 4.2. What does this give you?
Code:
bash --version
HakikiCanakkaleli likes this.
wyldckat is offline   Reply With Quote

Old   January 1, 2018, 15:12
Default
  #5
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
For me,
Code:
bash --version
gives this:

Code:
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Let me check if there is a warning in the website regarding this.
HakikiCanakkaleli is offline   Reply With Quote

Old   January 1, 2018, 15:13
Default
  #6
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Sytem requirements

Therein, no such requirement was mentioned.
HakikiCanakkaleli is offline   Reply With Quote

Old   January 1, 2018, 15:17
Default
  #7
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
I assume you meant the following piece of code under etc/config.sh/bash_completion:

Code:
# Uses 'declare -gA' for the implementation
# The '-A' requires bash >= 4.0 and the '-g' requires bash >= 4.2
if [ "${BASH_VERSINFO[0]:-0}${BASH_VERSINFO[1]:-0}" -ge 42 ]
then
    # Global associative array (cached options for OpenFOAM applications)
    declare -gA _of_complete_cache_;

    # Clear existing cache and reassign bash completions.
    # But for tcsh wrapper make use of caching and avoid this overhead.
    if [ -z "$_of_complete_tcsh" ]
    then
        _of_complete_cache_=()

        # Generate completions for predefined directories
        foamAddCompletion $FOAM_APPBIN
        # And a few scripts from bin/
        foamAddCompletion paraFoam
    fi  
else
    # Bash version is too old.
    ## echo "No bash completions - requires bash >= 4.2" 1>&2

    unset -f foamAddCompletion 2>/dev/null
    foamAddCompletion()
    {   
        echo "foamAddCompletion disabled - requires bash >= 4.2" 1>&2
    }   

    unset -f _of_complete_ 2>/dev/null
fi
In the version 1706, under etc/config.sh/bashcompletion, no such piece of code exists.

I now wonder where this warning message is supposed to appear? During the installation?

PS: I cannot update the bash version while I work in a cluster. Nevermind. I think this is very likely old-version issue. Many thanks for your help!
HakikiCanakkaleli is offline   Reply With Quote

Old   January 1, 2018, 15:30
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
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
Quote:
Originally Posted by HakikiCanakkaleli View Post
Code:
[...]
    # Bash version is too old.
    ## echo "No bash completions - requires bash >= 4.2" 1>&2

    unset -f foamAddCompletion 2>/dev/null
    foamAddCompletion()
    {   
        echo "foamAddCompletion disabled - requires bash >= 4.2" 1>&2
    }   

    unset -f _of_complete_ 2>/dev/null
fi
In the version 1706, under etc/config.sh/bashcompletion, no such piece of code exists.

I now wonder where this warning message is supposed to appear? During the installation?
It's a bug in this part of the script and they forgot to document about this limitation. They left the line "No bash completions - requires bash >= 4.2" commented out, which means that there is no visual indication that your bash version 4.1.2 is not supported.

Please report this on their bug tracker at http://develop.openfoam.com


I deduce that they changed how the auto-complete feature is done so that it would be more automatically, instead of using a very large auto-complete file like the one provided by the versions at the OpenFOAM Foundation, for example, over 7000 lines of script code here: https://github.com/OpenFOAM/OpenFOAM...ash_completion
HakikiCanakkaleli and Kummi like this.
wyldckat is offline   Reply With Quote

Old   January 1, 2018, 15:50
Default
  #9
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
I submitted a ticket by quoting you: Issue 690

Many thanks for your help.
wyldckat likes this.
HakikiCanakkaleli is offline   Reply With Quote

Old   January 3, 2018, 05:24
Default
  #10
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by wyldckat View Post
I deduce that they changed how the auto-complete feature is done so that it would be more automatically, instead of using a very large auto-complete file
There are a few reasons behind the move. Dynamic generation, good cleanup (unsetting completions), more flexibility. There are just two shell functions required for handling the completions and the associative array is filled on-demand (which should reduce some of the shell overhead).

It is also trivial for the end-user to add completions for their own OpenFOAM solvers and applications. Eg,

Code:
    foamAddCompletion $FOAM_USER_APPBIN
The suppressed warning about an older bash not being supported is partly due to constraints of the added tcsh support, which uses bash under the hood, and also partly owing to the usual predicament of supplying too many or too few warnings.
On the plus side, it is nice to be warned that your bash is too old. On the minus side, it can be annoying or interfering to have these warnings each time a new shell is opened. Add an extra variable to configure reporting or suppressing these warnings? Again more complexity.
It is probably difficult to find a practical solution to satisfy all situations.
olesen is offline   Reply With Quote

Old   January 3, 2018, 06:07
Default
  #11
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Hi,

IMHO, it might then be good at least to warn the prospective users in system requirements regarding the bash preference, if possible? I think, this is the wisest option considering your well-justified point of view?
HakikiCanakkaleli is offline   Reply With Quote

Old   January 3, 2018, 06:30
Default
  #12
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by HakikiCanakkaleli View Post
Hi,

IMHO, it might then be good at least to warn the prospective users in system requirements regarding the bash preference, if possible? I think, this is the wisest option considering your well-justified point of view?

Yes, I agree - this is definitely required. It may take a day or two to rectify.
Thanks.
/mark
olesen is offline   Reply With Quote

Old   January 4, 2018, 08:28
Default
  #13
Member
 
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 11
potentialFoam is on a distinguished road
More general question concerning the bug-fixing process:

Will the bug-fixes from https://develop.openfoam.com be inserted into the download-versions on https://openfoam.com/download/?

This would be valuable to achieve an improved code, but then the version, e.g. v1712, changes with time, right?
potentialFoam is offline   Reply With Quote

Old   January 4, 2018, 08:37
Default
  #14
Senior Member
 
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14
HakikiCanakkaleli is on a distinguished road
Quote:
Originally Posted by potentialFoam View Post
More general question concerning the bug-fixing process:

Will the bug-fixes from https://develop.openfoam.com be inserted into the download-versions on https://openfoam.com/download/?

This would be valuable to achieve an improved code, but then the version, e.g. v1712, changes with time, right?
Hi, AFAIK yes.

PS: I misunderstood your Q, sorry. You can obtain OpenFOAM between the main releases through development repositories.
potentialFoam likes this.
HakikiCanakkaleli is offline   Reply With Quote

Old   May 23, 2018, 04:55
Default
  #15
Member
 
Join Date: Jan 2014
Posts: 32
Rep Power: 12
spaceprop is on a distinguished road
I have Bash 4.2 on CentOS 7.5, installed v1712 in /opt, and still get the "No completion added for /opt/OpenFOAM-v1712/platforms/linux64GccDPInt640Opt/bin" warning, before and after installing OpenFOAM. So I don't think it's necessarily Bash version related. It stopped happening after a reboot. I might be interpreting what tab completion means wrong, but it seems to work, e.g. if I type "simple" then hit tab, "simpleFoam" is one of the suggestions.

Quote:
It is also trivial for the end-user to add completions for their own OpenFOAM solvers and applications. Eg,
foamAddCompletion $FOAM_USER_APPBIN
When I try to do "foamAddCompletion $FOAM_USER_APPBIN", it says the command is not found. Also, $FOAM_USER_APPBIN, which seems to be set to "/root/OpenFOAM/<user>-<version>/platforms/linux64GccDPInt640Opt/bin" doesn't exist. That's because it should be "/opt/OpenFOAM-v1712/platforms/linux64GccDPInt640Opt/bin". Not really sure what's going on.
spaceprop is offline   Reply With Quote

Old   June 13, 2018, 01:11
Default Open FOAM Installation really sucks
  #16
New Member
 
Arslan Adeel Ur Rehmann
Join Date: Jun 2018
Posts: 9
Rep Power: 8
arslanadeel is on a distinguished road
when i am trying to install OpenFoamV-1712 I get this error


No completion added for /home/arslan/OpenFOAM/OpenFOAM-v1712/platforms/linux64GccDPInt32Opt/bin



I tried many times but nothing changes. I even tried the whole installtion by ignoring the error but in installtion test its says FATAL ERROR icoFOAM....I have read the whole thread above but really could not get the solution out of it.



I am new to linux and open foam. If anyone knows how to solve the issue please help.



thanks in advance.
arslanadeel is offline   Reply With Quote

Old   June 13, 2018, 05:16
Default
  #17
New Member
 
Gorg
Join Date: Oct 2013
Posts: 5
Rep Power: 13
gorg88 is on a distinguished road
Hello Arsian.


Have you found the solution for this error?. I have the same problem.




Thanks in advance
gorg88 is offline   Reply With Quote

Old   June 13, 2018, 06:52
Default
  #18
Member
 
Join Date: Jan 2014
Posts: 32
Rep Power: 12
spaceprop is on a distinguished road
If you're getting a fatal error, it means that something else is going wrong with the installation.

This tab completion error can be ignored (it just means that tab completion won't work because openfoam hasn't been built successfully yet) and should go away after installing correctly and a reboot.

Here is a guide I put together from multiple sources for building OpenFOAM+ v1712 from source on a headnode and compute nodes running CentOS. If you just care about installing OpenFoam v1712 on a workstation, then only follow the headnode instructions. If you want to use the OpenMPI in the thirdparty folder, then skip the OpenMPI portion of the guide. If you aren't using CentOS/RHEL, then you'll have to adjust some of the steps, but the general method should work.
Kummi likes this.
spaceprop is offline   Reply With Quote

Old   July 12, 2018, 04:04
Default
  #19
New Member
 
govind
Join Date: Apr 2018
Posts: 8
Rep Power: 8
gsiitd is on a distinguished road
I am facing same issue. I have removed the old one and re-installed the new version i.e. v1806. After downloading the tar files (and after extracting) when I go for source the openfoam bashrc (source ~/OpenFoam/OpenFOAM-v1806/etc/bashrc ) it results in:


No completion added for /home/govind/OpenFoam/OpenFOAM-v1806/platforms/linux64GccDPInt32Opt/bin
... incorrect platform, or not yet compiled?



I am not understanding what's happening even after reading above discussions? Please let me clarify this doubt.



Govind,
IIT Delhi
gsiitd is offline   Reply With Quote

Old   July 12, 2018, 07:27
Default
  #20
Member
 
Join Date: Jan 2014
Posts: 32
Rep Power: 12
spaceprop is on a distinguished road
That error can be ignored until after installation. Did you try the installation? If the installation succeeds, reboot, then see if that error goes away.
spaceprop is offline   Reply With Quote

Reply


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
[ANSYS Meshing] missing internal faces and uncovered faces after redifining parts containing surface. grv ANSYS Meshing & Geometry 2 December 9, 2016 05:38
[Other] paraFoam error scybchenjun OpenFOAM Meshing & Mesh Conversion 0 May 12, 2016 00:25
what is syntax error : missing ')' before ';' aleisia Fluent UDF and Scheme Programming 8 March 10, 2015 16:42
[OpenFOAM] Xlib: extension "GLX" missing on display goldbeard ParaView 5 March 24, 2013 14:12
errors when installing openfoam2.1 on ubuntu12.o4 hewei OpenFOAM Installation 5 May 29, 2012 08:43


All times are GMT -4. The time now is 16:26.