4/6/2023 0 Comments Gfortran macports![]() The script included with flair to run it will not work correctly, so we will create a wrapper script to launch the program. make PYTHON=python2.7 DESTDIR=$FLAIR_INSTALL When the edited makefile is saved, we can build the geoviewer plugin and install it to the flair installation directory. PYTHONLIB = -L$(PYTHON_LIB) -lpython$(PYTHON_VER) Find the line “TKLIBS = -undefined dynamic_lookup” and replace it so that this: else ifeq ($(SYSTEM),Darwin) Find the makefile at the root of the extracted directory and edit it with a text editor. We’ll need to modify the code to use the correct libraries. To add the geometry viewer, first download the flair-geoviewer archive (currently ) from the flair website and extract it. It can be run with either the macOS python or MacPorts python. This gives us a version of flair without the geometry viewer. Make PYTHON=python2.7 DESTDIR=$FLAIR_INSTALL install We’ll install flair to a directory beside FLUKA. If you don’t need DICOM support, you can speed it up by omitting py27-pydicom and py27-numpy. sudo port install python27 py27-tkinter py27-pydicom py27-numpy py27-Pillow gnuplot Once XQuartz is installed, we’ll use MacPorts to install some other pre-requisites. For other machines, you can obtain it from. School machines should already have this installed. If you don’t need the features, stop here, as using macOS python gives better performance.īefore the next step, we’ll need XQuartz, an X Window system for macOS. ![]() If you need more features, including the geometry viewer, you must follow a more complicated build process. If you follow the included installation instructions using the python interpreter included with macOS, the base functionality will be usable. Installing flairĭownload the flair source code (currently ) from. (Copy these elsewhere before running you should never run jobs in the FLUKA directory.) Consult the FLUKA documentation for instructions on running jobs. There are example input files in the FLUKA directory which can be used for testing. If there are no errors, FLUKA should now be installed. We create the directory named in FLUPRO if it doesn’t exist, extract FLUKA there, and then build it with “make”. The correct startup file is usually ~/.profile (or ~/.bash_profile if it exists). You should add these to your shell’s startup file so that they are automatically set in future. We need to set some environment variables before using FLUKA. At the time of writing, the most reliable way of getting a working gcc installation is to install it from source by using the ‘-s’ option. Version 9 is available through MacPorts as the package gcc9. We will install a recent version of the GNU Compiler Collection to obtain gfortran. The gcc45 installs fine, but gfortran never installs. gfortran is what I really want, since I have the other compilers from that package. (If using a standard account, you can install MacPorts in your home directory, and avoid the need for sudo.) If you are not familiar with system administration, make sure you have access to competent help in case something goes wrong. I was trying to install the port gcc45 with the variant gfortran. Those prefixed with “sudo” require password authentication from an admin account. Commands given here should be entered in Terminal.app. You may have to adjust some paths to suit your machine, or if downloaded filenames have changed. In what follows, we assume that files have been downloaded to the user’s Downloads directory, and FLUKA is to be installed under ~/fluka/. ![]() MacPorts can be installed by following the instructions at. The installation process needs a Fortran compiler we recommend installing MacPorts to obtain this and other useful tools. At the time of writing this is .gz, which is compiled with gfortran 9.2. This will usually be the one compiled with the most recent version of gfortran. Several packages are available you should download the Mac version associated with the compiler you will be using (see below). You can download FLUKA from after registering as a user. This document describes the process for macOS 10.14 (Mojave) as of November 2019. InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.FLUKA and flair can both be installed under macOS, though some additional software is needed. > Configured with: -prefix=/Applications/Xcode.app/Contents/Developer/usr -with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/atform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1Īpple clang version 12.0.0 (clang-1200.0.32.28) Warranty not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This is free software see the source for copying conditions. > GNU Fortran (Homebrew GCC 10.2.0) 10.2.0Ĭopyright (C) 2020 Free Software Foundation, Inc. Version command output: ~ % gfortran -version I have installed gnu gfortran and gcc before updating. ![]() I compile with this line: ~ % gfortran hw.f90Ĭollect2: error: ld returned 1 exit status I am trying to compile a hello world program in fortran on Mac OS Big Sur.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |