Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.
Both sides previous revision Попередня ревізія Наступна ревізія | Попередня ревізія | ||
openmc [2015/12/27 11:23] wombat [В Gentoo] тестирование |
openmc [2015/12/30 18:55] (поточний) wombat [В Gentoo] dash fixed |
||
---|---|---|---|
Рядок 12: | Рядок 12: | ||
После этого можно скачать и скомпилировать OpenMC из исходников, согласно [[http://mit-crpg.github.io/openmc/usersguide/install.html#build-configuration | документации]]: | После этого можно скачать и скомпилировать OpenMC из исходников, согласно [[http://mit-crpg.github.io/openmc/usersguide/install.html#build-configuration | документации]]: | ||
- | <konsole>~ $ wget -c --content-disposition 'https://github.com/mit-crpg/openmc/archive/v0.7.1.tar.gz' | + | <konsole>~ $ wget -c <nowiki>--content-disposition 'https://github.com/mit-crpg/openmc/archive/v0.7.1.tar.gz'</nowiki> |
~ $ tar -xvf openmc-0.7.1.tar.gz | ~ $ tar -xvf openmc-0.7.1.tar.gz | ||
~ $ cd openmc-0.7.1 | ~ $ cd openmc-0.7.1 | ||
Рядок 701: | Рядок 701: | ||
</konsole> | </konsole> | ||
+ | Если все тесты прошли успешно, можно переходить к установке. Если ранее при конфигурировании OpenMC перед сборкой был указан нестандартный путь установки, то вероятнее всего, мы получим такое сообщение: | ||
- | $ make install | + | <konsole>~/openmc-0.7.1/build $ make install |
+ | ...<nowiki> | ||
+ | Checking .pth file support in /home/user/local/lib64/python2.7/site-packages/ | ||
+ | /usr/bin/python -E -c pass | ||
+ | TEST FAILED: /home/user/local/lib64/python2.7/site-packages/ does NOT support .pth files | ||
+ | error: bad install directory or PYTHONPATH | ||
+ | |||
+ | You are attempting to install a package to a directory that is not | ||
+ | on PYTHONPATH and which Python does not read ".pth" files from. The | ||
+ | installation directory you specified (via --install-dir, --prefix, or | ||
+ | the distutils default setting) was: | ||
+ | |||
+ | /home/user/local/lib64/python2.7/site-packages/ | ||
+ | |||
+ | and your PYTHONPATH environment variable currently contains: | ||
+ | |||
+ | '' | ||
+ | |||
+ | Here are some of your options for correcting the problem: | ||
+ | |||
+ | * You can choose a different installation directory, i.e., one that is | ||
+ | on PYTHONPATH or supports .pth files | ||
+ | |||
+ | * You can add the installation directory to the PYTHONPATH environment | ||
+ | variable. (It must then also be on PYTHONPATH whenever you run | ||
+ | Python and want to use the package(s) you are installing.) | ||
+ | |||
+ | * You can set up the installation directory to support ".pth" files by | ||
+ | using one of the approaches described here: | ||
+ | |||
+ | https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations | ||
+ | |||
+ | Please make the appropriate changes for your system and try again.</nowiki> | ||
+ | </konsole> | ||
+ | |||
+ | Добавим этот путь в переменную окружения ''PYTHONPATH'': | ||
+ | |||
+ | export PYTHONPATH="/home/user/local/lib64/python2.7/site-packages/" | ||
+ | |||
+ | Здесь вместо ''user'' везде будет указан логин действительного пользователя в системе. | ||
+ | |||
+ | После этого установку нужно запустить повторно, но на этот раз она должна пройти без ошибок. | ||
+ | |||
+ | ====== Использование ====== | ||
+ | |||
+ | ===== в Gentoo ===== | ||
+ | |||
+ | Для использования утилиты визуализации [[http://mit-crpg.github.io/openmc/usersguide/processing.html#id12 | openmc-plot-mesh-tally]] библиотека ''Matplotlib'' должна быть собрана с поддержкой графического инструментария ''Tk'': | ||
+ | |||
+ | # USE="tk" emerge matplotlib | ||