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

Paths confusion in python scripts

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 9, 2013, 03:55
Default Paths confusion in python scripts
  #1
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
Hi
The new configure and installation is an improvement. I see that it copies all executables to the prefix/bin directory including the python scripts.

However all the python scripts are using old style paths, e.g., in parallel_computation.py you have

run_SU2_DDC = "mpirun -np 1 $SU2_HOME/SU2Py/SU2_DDC %s" % (Config_DDC_filename)

etc.

These paths dont even contain the executables. Moreover it is never explained that SU2_HOME variable has to be set or maybe it is somewhere deep inside the docs. This can be very confusing.
praveen is offline   Reply With Quote

Old   January 9, 2013, 11:11
Default
  #2
New Member
 
gg
Join Date: Oct 2010
Posts: 2
Rep Power: 0
e3lb89cz is on a distinguished road
I found the same problem. The path settings in Python scripts are not consistent, e.g. su2_basedir in different scripts has different settings.
e3lb89cz is offline   Reply With Quote

Old   January 9, 2013, 20:29
Default
  #3
Member
 
Sean R. Copeland
Join Date: Jan 2013
Posts: 40
Rep Power: 13
copeland is on a distinguished road
First, thanks for your interest in SU2, we appreciate your participation in finding and reporting bugs like these.

As you can imagine, things are moving quickly in the development of the code and the release of autoconf installation tools is a big step toward having a standard and robust method of installation on different platforms. This capability offers more flexibility in the installation of the software than our previous python-based installation script allowed and is the cause of the path confusion in the python scripts.

This is something we should have caught in quality control before the release and apologize for the confusion. The development team will have a fix for this problem by the end of the week to unify the compilation via autoconf and the build_SU2.py python script and resolve the path conflicts in the python scripts.

The issue should only affect those users that are using the python scripts to orchestrate the more advanced features of the solver. There are two solutions to the problem that I'd suggest. The first (and easiest) is to simply build the source code using the build_SU2.py script in the $SU2_HOME/SU2Py directory. This will place the executables in the proper locations and everything should work out of the box. For example:

>> cd $SU2_HOME/SU2Py
>> ./build_SU2.py -o redhat -p

Please note that this a short term solution as we are in the process of moving away from the python build script. The other option is to build with autoconf, but temporarily hard-code of the full path in the python scripts to the prefix path specified during the configure step of the build. For example, in the parallel_computation.py:

WAS:
>> line 96
# compose function call format and inputs
run_SU2_DDC = "mpirun -np 1 $SU2_HOME/SU2Py/SU2_DDC %s" % (Config_DDC_filename)
run_SU2_CFD = "mpirun -np %s $SU2_HOME/SU2Py/SU2_CFD %s" % (partitions, Config_CFD_filename)
if unsteady_simulation:
run_merge_solution = "$SU2_HOME/SU2Py/merge_unsteady.py -p %s -f %s -b %s -e %s" % (partitions, Config_CFD_filename, 0, nExtIter)
else:
run_merge_solution = "$SU2_HOME/SU2Py/merge_solution.py -p %s -f %s -o %s" % (partitions, Config_CFD_filename, output)

IS:
>> line 96
# compose function call format and inputs
run_SU2_DDC = "mpirun -np 1 /YOUR_CONFIGURE_PREFIX/bin/SU2_DDC %s" % (Config_DDC_filename)
run_SU2_CFD = "mpirun -np %s /YOUR_CONFIGURE_PREFIX/bin/SU2_CFD %s" % (partitions, Config_CFD_filename)
if unsteady_simulation:
run_merge_solution = "/YOUR_CONFIGURE_PREFIX/bin/merge_unsteady.py -p %s -f %s -b %s -e %s" % (partitions, Config_CFD_filename, 0, nExtIter)
else:
run_merge_solution = "/YOUR_CONFIGURE_PREFIX/bin/merge_solution.py -p %s -f %s -o %s" % (partitions, Config_CFD_filename, output)


Just to reiterate, we'll have a real solution to the problem by the end of the week. Please stay tuned here on the message boards, and on the susquared-users mailing list. Thanks.
copeland is offline   Reply With Quote

Old   January 12, 2013, 00:32
Default
  #4
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
We've updated the source code, linux binaries and macosx binaries with a fix for the python paths. You'll need to set an environment variable called $SU2_RUN, which points to the directory with the SU2 binaries and python scripts. You'll also need to add this directory to the $PATH. $SU2_HOME will remain the environment variable that points to the source trunk.

More information can be found in the updated installation instructions.

Thanks again for pointing this out, and let us know if you find anything else!
rktchip is offline   Reply With Quote

Old   January 12, 2013, 04:33
Default
  #5
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
Untaring the source on mac gives this message


Code:
x SU2v2.0/autom4te.cache/output.0
x SU2v2.0/autom4te.cache/output.1
x SU2v2.0/autom4te.cache/requests
tar: copyfile unpack (SU2v2.0/COMPLETE~) failed: File exists
though this seems to be harmless. I did not see this message on Linux.

configure gives wrong info about setting SU2_HOME, for example

Code:
export SU2_RUN="/tmp/SU2v2.0/bin"
export SU2_HOME="/home/twl26/SU2_svn/post/SU2v2.0/trunk"
export PATH=$PATH:$SU2_RUN
praveen is offline   Reply With Quote

Old   January 12, 2013, 17:42
Default
  #6
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
Thanks a lot! Made some fixes and the configure output should be correct now. We havn't been able to reproduce the mac untar warning, but re-tarred it just in case.

Were you able to run the python scripts without trouble once you set the environment variables?
rktchip is offline   Reply With Quote

Old   January 15, 2013, 12:44
Default
  #7
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
FYI - Just fixed the tar un-archiving error.
-Trent
rktchip is offline   Reply With Quote

Old   January 17, 2013, 04:34
Default
  #8
Super Moderator
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 342
Blog Entries: 6
Rep Power: 18
praveen is on a distinguished road
The python scripts are working fine now when I ran a shape optimization problem.
praveen is offline   Reply With Quote

Old   January 20, 2013, 11:02
Default The Linux version and SciPy version?
  #9
New Member
 
cfdbooks
Join Date: Jan 2013
Posts: 7
Rep Power: 13
cfdbooks2008 is on a distinguished road
Quote:
Originally Posted by praveen View Post
The python scripts are working fine now when I ran a shape optimization problem.
Hi,Praveen
Could you tell me the running environment (Linux version and SciPy version)? I have installed the SU2 on Redhat Enterprise workstation 6.3 successfully , but failed to install SciPy(version 0.11). Thanks in advance.
cfdbooks2008 is offline   Reply With Quote

Old   March 3, 2013, 08:51
Default
  #10
New Member
 
Matteo Ripepi
Join Date: Dec 2012
Location: Milano
Posts: 2
Rep Power: 0
mripepi is on a distinguished road
Hi all,

I found that in SU2 version 2.0, the path for the METIS package in build_SU2.py refers to the directory su2_home + '/metis-4.0.3'.
I suggest to add a function in build_SU2.py for handling METIS changes to the makefile, as already done for CGNS package.
So you can give an option during the python compiling in order to be able in using the preferred METIS library and include path directories.


Matteo

Last edited by mripepi; March 3, 2013 at 14:28.
mripepi is offline   Reply With Quote

Reply

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
[General] Python Shell button is diabled JPW ParaView 4 November 8, 2015 15:51
How to get Python Shell into ParaView 3.8.1? blaise OpenFOAM Installation 3 July 24, 2012 05:58
CentFOAM Python Script Installation: Error socon009 OpenFOAM Installation 2 May 26, 2012 10:36
Fieldview 11.1 + Python to extract 3D core of data Rebecca FieldView 0 April 13, 2011 14:06
python scripting in paraFoam chegdan OpenFOAM Post-Processing 0 March 31, 2010 20:06


All times are GMT -4. The time now is 08:11.