Skip to content

PyAMG Error during SU2-PyAMG run #948

Description

@aydinmirac

Hello everyone,

We are trying to use SU2-pyamg on the server.
We followed the installation steps on SU2 website and did not face any compilation error.

Steps we followed:

  1. Download the file with git ("Install a custom version of SU2" section in https://pyamg.saclay.inria.fr/pyamg.html)
  2. cd SU2
  3. ./bootstrap
  4. ./configure --prefix=$HOME/SU2 --enable-mpi --with-cc=/opt/intel/compilers_and_libraries_2019.5.281/linux/mpi/intel64/bin/mpicc --with-cxx=/opt/intel/compilers_and_libraries_2019.5.281/linux/mpi/intel64/bin/mpicxx CXXFLAGS="-O3"
  5. make -j 8
  6. make install

Then we added the following lines to bashrc file:

export PYTHONPATH="/usr/lib64/python2.7/site-packages"
export SU2_RUN="$HOME/su2-installed/bin"
export SU2_HOME="$HOME/SU2"
export PATH=$PATH:$SU2_RUN
export PYTHONPATH=$PYTHONPATH:$SU2_RUN

We downloaded example file from pyamg website:
https://pyamg.saclay.inria.fr/pyamgexamples.html (Adaptive 3D ONERA M6 wing example)

During running, we encountered the following error:

$HOME/su2-installed/bin/mesh_adaptation_amg.py -f adap_ONERAM6.cfg -n 4 > out.txt &
[1] 166739
[user@host pyamg-su-test]$ Traceback (most recent call last):
File "/home/eduline/su2-installed/bin/mesh_adaptation_amg.py", line 111, in
main()
File "/home/eduline/su2-installed/bin/mesh_adaptation_amg.py", line 72, in main
options.save_all )
File "/home/eduline/su2-installed/bin/mesh_adaptation_amg.py", line 101, in mesh_adaptation_amg
SU2.run.amg(config)
File "/home/eduline/su2-installed/bin/SU2/run/amg.py", line 212, in amg
pyamg.su2_to_libmeshb(config_amg['adap_back'], "", "amg_back")
UnboundLocalError: local variable 'pyamg' referenced before assignment

Python version is 2.7.5 and we installed pyamg by running "sudo pip install pyamg".

Any help would be appreciated.

Best regards,

Mirac

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions