CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Problem with spaces in paraFoam execution

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2013, 05:00
Question Problem with spaces in paraFoam execution
  #1
Member
 
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13
chrisb2244 is on a distinguished road
Hi,

I'm running a parallel ParaView 4.0.1 pre-built binary download using the multicore option that the settings in paraview offers. I'm also running OpenFOAM-2.2.2 and have made a couple of changes to the paraFoam file so that I can match these two up hopefully easily instead of using all of the ThirdParty.tar.gz files available with OpenFOAM.

The changes I've made are

Code:
extension=foam

requirePV=0
(since I haven't built the PV modules, as they want lots more config of paraview files in a collection of folders/a layout which I don't have - I'm not sure if this is my problem but I think not)

When I go to a case directory (I'm using the cavity tutorial for simplicity) and type paraFoam, I get

Code:
$ paraFoam
created temporary 'cavity.foam'
AutoMPI: SUCCESS: command is:
 "/home/christian/Downloads/ParaView-4.0.1-Linux-64bit/lib/paraview-4.0/mpiexec" "-np" "6" "/home/christian/Downloads/ParaView-4.0.1-Linux-64bit/lib/paraview-4.0/pvserver" "--server-port=54130"
AutoMPI: starting process server
-------------- server output --------------
Waiting for client...
AutoMPI: server successfully started.
Cannot open data file " cavity.foam "
If I manually type "touch cavity.foam" and then "paraview" and navigate to the file, all is well. However, as can be seen here (I think) when I use paraFoam it tries to open " cavity.foam " with spaces on either side, which is I assume why paraview complains that
it "Cannot open data file " cavity.foam ""

I looked through the paraFoam file, but can find no spaces enclosed within quotation marks that would need to not be there.

What am I missing? And is it the spaces that are the problem?

Thank you in advance
chrisb2244 is offline   Reply With Quote

Old   November 9, 2013, 16:06
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
Greetings Christian,

Interesting bug! Unfortunately those spaces are a misleading error message.
The actual problem is that the file "cavity.foam" is not being found by ParaView's pvserver, because the automatic parallel mechanism is launching the executable from its own folder, namely at:
Code:
/home/christian/Downloads/ParaView-4.0.1-Linux-64bit/lib/paraview-4.0/
And in that folder, there is no such "cavity.foam" file

I also have ParaView 4.0.1 handy, using an alias... which I'll write about in a bit. In the meantime, the solution is to give the full path to the file, e.g.:
Code:
paraview --data=$PWD/case.foam
And yes, "$PWD" is a valid environment variable:
As for the alias I use, I have this in my "~/.bashrc" file:
Code:
alias paraFoam4='(. $WM_PROJECT_DIR/etc/config/unset.sh; touch case.foam && $HOME/OpenFOAM/ParaView-4.0.1-Linux-64bit/bin/paraview --data=$PWD/case.foam)'
Which brings me to your modifications... you have at least 2 choices:
  • To create an alias like the one above.
  • Or to hack the paraFoam script once again and change this:
    Code:
    paraview --data="$caseFile" "$@" 2>&1
    To this:
    Code:
    paraview --data="$PWD/$caseFile" "$@" 2>&1
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
openfoam 2.2.2, parafoam, paraview 4.0.1


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] problem with parafoam: "Read float past end of buffer" Osman ParaView 2 March 1, 2019 08:16
[OpenFOAM] Problems running paraFoam with OpenFOAM 6: "Illegal instruction (core dumped)" nwm ParaView 1 December 22, 2018 10:47
[OpenFOAM] Post processing problem in Xfce desktop environment using paraFoam tariq ParaView 4 July 8, 2013 11:09
UDF execution problem argeus Fluent UDF and Scheme Programming 4 April 15, 2011 15:04
[OpenFOAM] Problem with paraFoam (ubuntu 9.04) peb ParaView 4 August 24, 2009 10:50


All times are GMT -4. The time now is 01:03.