Difference between revisions of "Documentation/Nightly/Developers/Fortran"
From Slicer Wiki
(→MacOS) |
(→macOS) |
||
| Line 1: | Line 1: | ||
| + | === Linux === | ||
| + | Install a fortran compiler with the package manager, like ''gfortran''. | ||
| + | |||
=== macOS === | === macOS === | ||
| − | + | - Install Miniconda - See https://conda.io/miniconda.html | |
| − | [https:// | + | ./Miniconda3-latest-MacOSX-x86_64.sh -p /Volumes/Dashboards/Support/miniconda3/ |
| + | Do you wish the installer to prepend the Miniconda3 install location | ||
| + | Answered NO | ||
| + | - To activate of base env. | ||
| + | source /Volumes/Dashboards/Support/miniconda3/bin/activate | ||
| + | |||
| + | - Add conda-forge | ||
| + | conda config --add channels conda-forge | ||
| + | |||
| + | -Then create gfortran-env and install gfortran | ||
| + | conda create -n gfortran-env | ||
| + | conda activate gfortran-env | ||
| + | conda install gfortran_osx-64 | ||
| + | |||
| + | Before packaging, we have to fix the installed gfortran libraries with the following script: [https://gist.github.com/phcerdan/146de9398052335d8a76c5b0070715a6 fix_gfortran_lib_rpath.sh]. | ||
| + | |||
| + | The script substitutes ''@rpath'' with the needed full paths. Requires ''atool'' and ''install_name_tool''. | ||
| + | |||
| + | === Windows === | ||
| + | |||
| + | Install Flang, a fortran compiler targeting llvm: [https://scikit-ci-addons.readthedocs.io/en/latest/addons.html#install-flang-ps1 scikit-ci-addons] | ||
Revision as of 22:35, 19 September 2018
Home < Documentation < Nightly < Developers < FortranLinux
Install a fortran compiler with the package manager, like gfortran.
macOS
- Install Miniconda - See https://conda.io/miniconda.html
./Miniconda3-latest-MacOSX-x86_64.sh -p /Volumes/Dashboards/Support/miniconda3/ Do you wish the installer to prepend the Miniconda3 install location Answered NO
- To activate of base env.
source /Volumes/Dashboards/Support/miniconda3/bin/activate
- Add conda-forge
conda config --add channels conda-forge
-Then create gfortran-env and install gfortran
conda create -n gfortran-env conda activate gfortran-env conda install gfortran_osx-64
Before packaging, we have to fix the installed gfortran libraries with the following script: fix_gfortran_lib_rpath.sh.
The script substitutes @rpath with the needed full paths. Requires atool and install_name_tool.
Windows
Install Flang, a fortran compiler targeting llvm: scikit-ci-addons