IntroductionThis guide gives directions for building Xyce from the source code. It is recommended that anyone intending to build Xyce be familiar with editing text files and compiling programs on their target computer. Prior experience using command line tools like configure, cmake and make is recommended.
OverviewInstalling Xyce from source requires the following general steps:. Install a complete compiler suite.Most of the work is in the first three steps, and the most difficult step to get right is building and installing Trilinos. Therefore this document spends a lot of time explaining those steps in detail. Building Xyce itself is straightforward once the prerequisite steps are complete.It is also recommended that after building Xyce one. After building and testing, the code may be installed.Most libraries that Xyce requires are available through system package managers; they are also all available in source form, which you can compile yourself.
Since the majority of the work in installing Xyce involves installing the prerequisite libraries, most of this page is focused on these prerequisites. Build DirectoriesIt is important to note that our recommendations for building Trilinos and Xyce make use of 'out-of-source' builds. This means that the executables and/or libraries are built in a directory completely separate from the directory containing the source code. This is accomplished by creating an empty directory anywhere in the file system of your computer (the 'build directory'), and using appropriate arguments in 'configure' scripts to tell the build system where to find the source code (the 'source directory').Doing builds in directories separate from the source code keeps the original source tree pristine, and allows you to build many different versions (specifically, both serial and parallel versions) without changing the source tree.
It also permits sharing a single source tree over a networked filesystem, and building the code for multiple operating systems without copying the source to every machine. This process is described in detail in the generic 'INSTALL' file included at the top level of the Xyce source tree; this file is part of the GNU Automake system, and is not specific to Xyce.
Upgrading from a previous version of XyceIf you have already compiled an earlier version of Xyce, then you are likely ready to build the current version of Xyce. The prerequisite libraries are generally the same for this release as they were for prior versions. If you have already built and installed Trilinos 12.12.1 for a previous release of Xyce, you should be all set to build Xyce 6.11.Xyce 6.11 has NOT been fully tested with versions of Trilinos released after 12.12.1, and we cannot guarantee that Xyce 6.11 will run well with later versions, nor can we be sure Xyce will even build against such versions. At this time, t he Xyce team cannot support users who are attempting to build Xyce against versions of Trilinos later than 12.12.1, or off of that project's Github master branch.If you have built a version of Trilinos older than 12.12.1, it will probably still work with Xyce, but we do recommend that you update to 12.12.1 at this time.
If you plan to upgrade any components before installing Xyce 6.11, please review the sections below, as Open MPI 1.10 and Trilinos 12.x need special treatment. PrerequisitesBuilding Xyce requires a computer with a modern C compiler. Some of the libraries that Xyce uses also require a Fortran compiler. The Xyce development team has successfully used the Gnu Compiler Collection (gcc), the Intel Compiler Collection and Clang. Other compilers may work, but we have not tested any others.
For building and running Xyce in parallel, an MPI compiler front-end is needed, such as Open MPI or MPICH.The Automake system used by Xyce assumes a basic Unix-like command line system. Windows users may use the Cygwin system for this purpose.
The Xyce team does not support non-Unix development environments such as Visual Studio; some users have worked out how to get Xyce compiled in these environments, but the team can only support the build types described here.Xyce depends on many external libraries to supply enhanced parsing, mathematical algorithms and parallel communication. Some of the required libraries may already be present on your system, and many can be obtained with package managers. Occasionally, some will have to be built from source. All must be installed prior to building Xyce.The required libraries for Xyce are listed in the. All of the libraries are either freely available, or have equivalents that are open source. Please note the minimum version numbers listed.
If you try to use versions earlier than those indicated, you will likely see failures. If shown, maximum version numbers indicate the latest version that has been tested with Xyce.Licensing Note: Please be sure to understand the licenses associated with the various libraries.
Most of the licenses are common and should be acceptable to most users. Inclusion of some non-open-source libraries could limit your rights to distribute binaries you produce.
NameVersionNotes and Download URLBLASMay be included in your compiler's libraries, or may require separate package installation; most systems have a version of BLAS in their package management systems. May be used to provide optimized versions of BLAS and LAPACK. BLAS source code may be downloaded from if the package is otherwise unavailable.LAPACKMay be included in your compiler's libraries, or may require separate package installation; most systems have a version of LAPACK in their package management systems. May be used to provide optimized versions of BLAS and LAPACK.
LAPACK source code may be downloaded from if the package is otherwise unavailable.bison2.4-3.3Required for the chemical reaction parser. Included in most operating systems and package management systems. Download source from and compile if it is otherwise unavailable on your system.flex2.5.34 or laterRequired for the chemical reaction parser.
Included in most operating systems and package management systems. Download source from and compile if otherwise unavailable on your system.FFT packageFFTW 3.xORIntel Math Kernel LibraryRequired for Harmonic Balance analysis. Xyce is set up to use either the Intel Math Kernel Library or FFTW3 for this purpose.
FFTW3 is available in most Unix-like operating systems' package management systems. Xyce is not compatible with versions of FFTW in the obsolete 2.x series.SuiteSparse2.1.1 or laterXyce requires AMD, which is part of the SuiteSparse package. If otherwise unavailable, download from.OpenMPI1.8.8 and laterThis is required for a parallel build of Xyce.
Many package management systems provide Open MPI, and it is available from source at. Note that some package management systems provide later versions of Open MPI.We have observed infrequent, random hangs of Xyce on exit with Open MPI 1.10 on some operating systems. When this happens, Xyce has generally exited properly, but mpirun hangs.
If you observe that mpirun is hanging when Xyce exits, we recommend you fall back to Open MPI 1.8.8 rather than the one provided by the package management system. (This will likely require building Open MPI from source.) MPICH is also an alternative, but the Xyce team does not build or test against this toolset.We have observed some segmentation faults inside the Zoltan library on some operating systems with pre-built OpenMPI 2.1.x and OpenMPI 3.x packages. See the note below under 'Install prerequisite libraries.'
Trilinos12.4.2-12.12.1Xyce requires Trilinos for many linear algebra and solver services. When building the serial version of Xyce one must build Trilinos without MPI support enabled. When building Trilinos for the parallel version of Xyce, then Trilinos must be built with MPI support enabled.
Download from:. NOTE: The Xyce team highly recommends that version 12.12.1 be used with Xyce 6.11, as it is the version the Xyce team uses. Trilinos versions after 12.12.1 have not been tested with Xyce and may not work properly.Important Note Regarding Trilinos and C11Trilinos contains many packages that require a C11-compatible compiler for full functionality. If your system has a C11 compatible compiler, these features will be compiled into Trilinos by default.At this time, most operating systems have compilers that support the C11 standard, but some 'long term support' operating system versions continue to have old versions of GCC that cannot support this standard.If necessary, Trilinos version 12.12.1 can be compiled with a C11 incompatible compiler if C11 support is explicitly disabled in the Trilinos cmake script (using '-DTrilinosENABLECXX11=OFF'). If a C11 compatible compiler is not available on your system, you must use a version later than 12.6.x and no more recent than 12.12.1.You must make sure that Trilinos and Xyce are both built with the same C standard.If you are building a version of Trilinos with C11 enabled, you must also build Xyce with C11 enabled. This is generally done by adding '-std=c11' to the CXXFLAGS variable when configuring Xyce. If Trilinos is built with C11 enabled and '-std=c11' is not added to the CXXFLAGS when configuring Xyce, the result will be numerous compilation errors. Similarly, if you are building Trilinos with C11 disabled, you must not have '-std=c11' in Xyce's CXXFLAGS.
Building Prerequisite Libraries from Source CodeFor the best instructions on building the libraries listed in, see the documentation included with those libraries. On many systems, these libraries may be available as pre-compiled packages, and are installable with a package management system such as apt-get, yum, port or brew. Where a package is available for your system, it is usually preferable to use it; the package maintainer will have taken care of special porting issues associated with your system, and should also provide timely updates as those libraries have new releases.While prebuilt packages can save one time, other considerations may require that one build from source code, instead. If you choose to do so, keep the following information in mind.It is useful to keep the libraries needed for Xyce in a consistent location. This makes it easier to tell Xyce's configure script where to find all the external libraries. Additionally, since some libraries require MPI to be enabled, it makes sense to keep separate library directories for MPI and non-MPI enabled code.
Thus, we suggest you make two directories such as XyceLibs/Serial and XyceLibs/Parallel. Within these directories you should make lib and include directories. For the sake of consistency we will use $HOME/XyceLibs as the prototypical name for this directory in all our examples below. Installing Prerequisite LibrariesExcept for Trilinos, and sometimes ParMETIS, the libraries required for building Xyce are available in popular system package repositories, and are thus easily installed.
The Xyce team recommends using these prepackaged libraries as much as possible.Here we enumerate the packages known to exist on systems the Xyce team has built on. Other systems probably have similarly named packages. The systems for which we provide specific guidance are:. (Windows)Where a system does not provide a package for a given library, you will have to build that library from source. Guidelines for building required libraries from source are given in.Note that at this time no system provides packages for versions of Trilinos that are compatible with Xyce, so it will always need to be built from source. While some systems do provide packages for Trilinos in package management systems, these versions are either too old to be used or are not configured to have all the essential package options required by Xyce, and we do not recommend using them even if you happen to find one for your system.
Note concerning OpenMPI:It has come to our attention that some Linux distributions have broken versions of OpenMPI in their package repositories. On these systems, OpenMPI has been compiled with the '-enable-heterogeneous' option, which causes it to perform certain communications operations incorrectly, making it non-compliant with the MPI standard. Building Xyce with these broken OpenMPI libraries will result in segmentation faults on some problems (including 6 test cases in the Xyce regression suite).Ubuntu -beginning with release 17.10 and continuing through release 18.04 LTS- is one of these, and there may be others. On such systems it is essential not to use the packaged OpenMPI to build Xyce.You can determine whether your system's install of OpenMPI is broken in this way by running a small test program that is present in the src/test/MPITest directory of the Xyce source tree.
RedHat Enterprise Linux (RHEL) and CentOSThese systems have all the prerequisite libraries available in the RPM repository. The following packages are required:. A version of gcc, g and gfortran (see the ). blas-devel. blas. cmake (required to build Trilinos).
lapack-devel. lapack. bison. flex.
fftw-devel. fftw. suitesparse-devel. suitesparseNote that on versions of these operating systems older than RHEL 6/CentOS 6, the fftw and suitesparse libraries might require use of an additional repository. On RHEL 6 and CentOS 6 they require no special additions.Install these packages using sudo yum install on each package name. In most cases, the -devel package will also cause the other package without '-devel' to be installed, so it is not strictly necessary to list all of the above.If you are building the parallel version of Xyce you will also need:.
openmpi. openmpi-devel. Debian Linux and VariantsAll required packages are available in these systems' default repositories. gcc (see the ). g. gfortran.
make. cmake. bison.
flex. libfl-dev. libfftw3-dev. libsuitesparse-dev.
libblas-dev. liblapack-dev. libtoolIf you are building the parallel version of Xyce you also need:. libopenmpi-dev. openmpi-binInstall these packages using sudo apt-get install, or a graphical package manager. The '-dev' packages will also pull additional packages in as dependencies. NOTE:As of release 17.10 of Ubuntu and continuing with release 18.04, the packaged version of OpenMPI in the package repositories has been compiled with the '-enable-heterogeneous' option, which breaks MPI's standard compliance and causes Xyce to fail on some problems.
This package cannot be used as is until it is rebuilt and repackaged without that option. There is an open bug report for the issue in Ubuntu's issue tracker:. This same problem may be present in other operating systems that derive from Debian.If you are running a version of Ubuntu that has this issue, the only workaround is to uninstall the OpenMPI package and build OpenMPI from source yourself, without the '-enable-heterogeneous' option.
Autocad 2007 free torrent download cracked. Comment 11 of the Launchpad bug report contains instructions for how to rebuild and install OpenMPI using the Debian package building system.It is possible that this issue could get resolved in the Ubuntu package after the time of this writing. You should check the status of the linked bug report before assuming that this issue is still a problem.
The note in the section above on 'Installing prerequisite libraries' also provides a quick way of testing whether an installed version of OpenMPI will work with Xyce. Mac OS XBuilding Xyce on Mac OS X will require that you obtain the Xcode package from Apple, and you must also install the XCode Command Line Tools. In addition to XCode, you also need a package manager such as MacPorts , Fink (, or Homebrew.
Install one of these package managers according to the instructions provided on its web site.It is not necessary to install blas and lapack, as XCode has those available in a system library. Bison and flex are provided by the XCode command line tools. However, in some OS X versions, the flex and Bison supplied by XCode do not work with Xyce; therefore, we recommend using the versions installed by one of the package managers.
Installing Lapack On Os X Windows 10
Before proceding, be sure to read the. FinkFor Fink, install the following packages:. a version of gcc ( such as gcc6).
fftw. suitesparse. cmake (for Trilinos).
flex. bisonFor parallel installations, also install. openmpiInstall packages using sudo fink install on each package. MacPortsFor MacPorts, install:. a version of gcc ( such as gcc6). fftw-3. SuiteSparseAMD.
cmake (for Trilinos). flex. bisonInstall packages using sudo port install on each package.For parallel installations, also install. the appropriate version of Open MPI (such as openmpi-gcc6)HomebrewFor Homebrew install the following formulae:. fftw. a version of gcc (such as gcc, or gcc@6). homebrew/science/suite-sparse.
cmake (for Trilinos). flex. bisonFor parallel installations, also install. openmpiInstall packages using brew install on each package. FreeBSDAll libraries required by Xyce except for Trilinos are available in the FreeBSD ports system. Before proceding, be sure to read the.For the serial version of Xyce, install the following ports:. lang/gcc48 or later (you need this even if you are building with the system 'clang' compiler suite, because you still need gfortran from ports).
math/blas. math/lapack. math/suitesparse. math/fftw3. devel/bison. devel/cmake (needed for Trilinos). textproc/flexInstall each of these using the standard FreeBSD ports system.
For example, to install GCC 8, run the following commands as root: cd /usr/ports/lang/gcc8make install cleanThe ports system will fetch the source code for gcc6 and compile it on your system, the install the binary.You may prefer to use binary packages rather than the ports system, in which case you may accomplish the same install as root with: pkg install gcc8If you are building the parallel version of Xyce, you also require:. net/openmpiYou may also use net/openmpi2 or net/openmpi3 instead. Note:The FreeBSD ports of openmpi2 and openmpi3 were built with the inappropriate '-enable-heterogeneous' option until 25 September 2018, at which time the package was fixed. You must check that the package you are installing has a version no earlier than openmpi2-2.1.51 or openmpi3-3.1.21 (the '1' on these packages indicates the update that fixed the build error in the ports system; openmpi2-2.1.5 and openmpi3-3.1.2 were broken). If you have an older version, you must update your ports tree and update your package.The net/openmpi package (OpenMPI 1.10.x) has never had the '-enable-heterogeneous' option in its build instructions, and has always been usable with Xyce.Incompatibility note:On 4 Oct 2018, the maintainer of the 'math/arpack-ng' package made MPICH an unconditional dependency, which means that as of that date, any port that requires arpack-ng will now force MPICH to be installed - this includes math/octave.
Unlike the OpenMPI ports, which install into directories that don't intefere with each other, MPICH installs its libraries directly into /usr/local/lib, which interferes with all the OpenMPI ports at link time (the MPICH libraries are found instead of the OpenMPI libraries in /usr/local/mpi/openmpi/lib). This makes it very difficult to build Xyce with OpenMPI while MPICH is installed. It is possible to build Xyce and Trilinos with MPICH, but we have seen some evidence that MPICH is substantially slower on some systems than OpenMPI on the same machine. We have not yet found a workaround to make Xyce build properly with OpenMPI in the presence of an MPICH port install, and therefore recommend that you remove MPICH if it is installed (which will, of course, force all other packages that depend on MPICH to be uninstalled).Segfault issues in parallel on FreeBSD 11:Until November 2018, FreeBSD was only being built routinely on FreeBSD 10.4, which reached end of life on 31 Oct 2018. After upgrading to FreeBSD 11.2, we have found Xyce built with OpenMPI fails with a segmentation fault deep inside one of the system 'jemalloc' functions on 16 of the test cases in the test suite when run on two processors. We have found that the common theme of the tests that are failling in this way is that they are all so small that there is only one solution variable, and so a special 'simple' linear solver is invoked.
The failure only shows up when linear solver verbosity is turned off (the default). No solution has been found so far, but we are working on it. For the time being, you can either ignore these 16 failing test cases, or build Xyce in parallel with the additional configure argument '-enable-verboselinear', which will suppress the crashes but add a little extra timing information to the console output.
Running parallel Xyce on larger circuits will never invoke this 'simple' solver, and so this bug should have no real impact on problems of normal size. CygwinFor Windows systems, the Xyce project team uses the Cygwin system to provide a Unix-like environment with Unix-style tools. While it is possible to build Xyce using native Windows tools, the team does not support that approach in this release.Install Cygwin according to its instructions. You will then need to install a series of packages in addition to the base Cygwin packages. Before proceding, be sure to read the.Add:.
gcc-core. gcc-g. gcc-fortran. make. cmake (needed for configuring Trilinos).
lapack, liblapack0, liblapack-devel. libsuitesparseconfig-devel. libamd-devel. bison. flex. fftw and libfftw3-devel.
libtool. m4Many of these packages will automatically install additional packages that they require.The Xyce team has never attempted to build the parallel version of Xyce on Windows. While Cygwin does provide a version of openmpi, it is our understanding that ParMETIS does not currently build easily on Cygwin. Now that Xyce no longer requires ParMETIS, it may be possible to get it working in parallel on Cygwin.
If you succeed in doing so, the Xyce team would be interested to hear about your success. Installing Trilinos IntroductionTrilinos is an extensive set of numerical packages for a wide range of computational problems. This section will provide an overview of building Trilinos for Xyce.
However, for detailed questions on Trilinos or its build system please see the Trilinos getting started page at for places to start your inquiry.This section assumes you have installed all prerequisite libraries from packages according to the instructions in the previous section, or have built missing libraries from source.First, download a version of Trilinos no later than 12.12.1 from, and unpack the source code. Xyce 6.11 is not guaranteed to build properly with versions of Trilinos later than this.Because of the size and complexity of Trilinos, it is recommended to build the necessary packages outside the source directories. For example, you could create two 'build' directories, called trilinosSerial and trilinosParallel for the serial and parallel builds, respectively.Trilinos has many packages that can be built, only some of which are required by Xyce. The packages and compilation options are specified using command line arguments for CMake. In the next sections we will provide examples of CMake invocations for typical serial and parallel builds of Xyce. It is important to note that any variation from the scripts given here could lead to Xyce compilation failures due to uncaptured library dependencies.Building Trilinos involves only a few steps:. create an empty build directory and 'cd' to it.
invoke CMake using a build script specifying all the required parameters. make. make installBecause multiple versions of Trilinos might need to be built to support both serial and parallel builds of Xyce, we do not recommend installing Trilinos directly into system library and header directories (e.g. /usr/lib or /usr/include). Our instructions for building Trilinos will therefore be set up for installation in a user-specified, non-standard location, $HOME/XyceLibs/Serial and $HOME/XyceLibs/Parallel.NOTE: Please note that in the examples below we have explicitly disabled building of the Kokkos package of Trilinos. At this time we have determined that on some systems the interdependencies introduced when this library is built can cause link failures in Xyce (usually due to issues related to the pthread library). Xyce does not currently use Kokkos, and so the best solution to these link errors is to exclude that package from your Trilinos build.
Versions of Trilinos prior to 11.14 did not automatically build Kokkos; but 11.14 and later versions will, unless it is explicitly disabled. If you have previously built an older version of Trilinos for prior releases of Xyce, don't use the older cmake line: it must be augmented with the extra line that disables Kokkos, especially if you find that you suddenly get link errors from Xyce related to Kokkos or pthreads. Building Trilinos for Serial XyceSerial Xyce requires a build of Trilinos that contains the NOX, LOCA, Epetra, EpetraExt, Ifpack, Isorropia, AztecOO, Belos, Teuchos, Sacado and Amesos packages. Amesos must be configured to use KLU. EpetraExt must be configured with BTF (block triangular factorization), experimental features, and graph reordering enabled. Trilinos must also be told where to find the AMD libraries and headers.After downloading a version of Trilinos no later than 12.12.1 from, you will have a 'tarball' of Trilinos source code. We will assume for this example that the file ended up in $HOME/Downloads.
Decide where you want to unpack it. For example, we will use the directory $HOME/Trilinos12.12. The commands below extract the tarball in that directory.
Mkdir $HOME/Trilinos12.12cd $HOME/Trilinos12.12tar xzf $HOME/Downloads/trilinos-12.12.1-Source.tar.gzThe is an example that configures a version of Trilinos with the packages and options required by a serial version of Xyce. It is very likely that Xyce will not build at all if you do not include at least these options when you build Trilinos.There are several things to note about this example:. This text should be put into a file that will be used as a shell script. This file should be placed in an otherwise empty directory (which we will call the 'build directory'). We will use the name 'reconfigure' as the name of this script.
Set the variable 'SRCDIR' to have the full path of the location of the Trilinos source code. If you followed the example above, this would be $HOME/Trilinos12.12/trilinos-12.12.1-Source. This variable is used in the example invocation to specify to CMake how to find the source code.
The example script makes extensive use of the shell continuation character ' that tells the shell to ignore the following newline. The entire CMake invocation is really meant to be a single line, but for clarity we have divided it up using this continuation character. There must be NO characters on the line following the ', not even a space. There must also be a space before the '. A common source of problems is having spaces after this continuation character—in that case, the shell ignores the space after the ' and does NOT ignore the newline at the end of the line. There must be no space before or after the equals sign on these lines. The script specifies which C, C, and Fortran compilers to use in the lines '-DCMAKECCOMPILER', '-DCMAKECXXCOMPILER', and '-DCMAKEFortranCOMPILER' lines.
On most Linux systems, the C, C and Fortran compilers are named gcc, g and gfortran. Specifying compiler flagsEach compiler has a configure variable for passing it parameters. These variables are CXXFLAGS for C compiler flags, CFLAGS for C compiler flags, and FFLAGS for Fortran compiler flags: /path/to/Xyce/configure CC=gcc6 CXX=g6 F77=gfortran6 LEX=/usr/local/bin/flex CXXFLAGS='-O3' CFLAGS='-O3' Specifying alternate installation directoryBy default, configure will set up the Xyce build process so that 'make install' installs Xyce components into subdirectories /usr/local: the executable will go in /usr/local/bin, associated libraries into /usr/local/lib, and header files into /usr/local/include. This behavior can be changed by adding the '-prefix' option to configure: path/to/Xyce/configure -prefix=/opt/Xyce.The example above will cause 'make install' to install into /opt/Xyce/bin, /opt/Xyce/lib, and /opt/Xyce/include.If you do not have root privileges on your system, this procedure can allow you to install Xyce into a directory that you own instead. Otherwise, use 'sudo' with 'make install' to install Xyce into system directories. Specifying additional include search directoriesIt is sometimes the case that system packages install headers in subdirectories of /usr/include or /usr/local/include.
The C preprocessor (and therefore configure) will not search for include files outside standard locations.
Installing IPOPT on Mac OS XMy experiences in installing IPOPT on Mac OS Xby Peter CarbonettoDept. Of Computer ScienceUniversity of British Columbiais asoftware package for solving nonlinear objectives subject to nonlinearconstraints. It uses primal-dual interior pointmethodology. Importantly, it is open source.After a great deal of time and trouble, I managed to get in workingon my laptop which is running the Mac OS X operating system. In the following, I detail myexperiences in installing the IPOPT package.Succinctly put, the configure script did not work for IPOPT, so Ihad to install everything from scratch. While this was really quite alabourous process, I didn't know any other way of installing thepackage. On the bright side, I learned a lot about compiling fortranand C, and linking object code, libraries and executables 1.
Installing the Fortran compilerThe first problem I encounter is that I do not have a Fortran 77compiler installed on my machine. I do have the GNU C and Ccompilers installed on my computer already (the programsgcc and g), but the Fortran 77 compiler isalso needed to compile the BLAS, LAPACK and HSL routines. A lot ofpeople are upset that the GNU Fortran compiler g77 wasnot included with the because installing it ourselves causes many extraheadaches.
But we'll have to make do.There are several ways I can install a Fortran compiler. One is bydownloading GNU Fortran compiler from thewebpage. Another route is to install g77 via. Instead, I'm going tofollow the route that gives me the most control: I will download andbuild the entire (GCC), then put the necessary files in theappropriate places. Even though this route is considerably morecomplicated, it will allow me to ensure that I have the correctversion of the compiler. You see, since I'm running Mac OS X 10.3.9 Ialready have gcc 3.3 installed on my computer in the/usr/bin/ directory.
(It is easy to check the version bytyping gcc -version.) It is important that the compilersI'm using all belong from the same collection otherwise it is verylikely that I will undercover linking errors. I've decided todownload GCC 3.3.6 from my local university FTP mirror.It is crucial that I do not follow the default installationfor GCC, because I may end up overwriting important files. The GCCinstallation instructions advise the same thing. Suppose that I'vechosen to install to the directorygcc-install.
I've done so simply by passingthe option -prefix=gcc-install to theconfigure script. After following the correctinstallation steps and waiting a couple hours for the entire packageto be built, I now have a whole bunch of files and subdirectories ingcc-install. I'm only really interested inthe programs and libraries necessary for compiling and linking Fortrancode. I start by installing the Fortran 77 compiler with thecommandsudo mv gcc-install/bin/g77 /usr/bin/g77In the end, I had installed the following files:/usr/bin/g77/usr/lib/libg2c.a/usr/lib/libg2c.la/usr/lib/libfrtlegin.a2. Building the BLAS, LAPACK and HSL librariesNow that I have a Fortran 77 compiler installed on my system, Iproceed to build the libraries needed by IPOPT from scratch.
First, Idownload the latest BLAS and LAPACK tarballs from the. The BLASpackage just consists of a bunch of Fortran files. I compile each ofthe individual files into object code, starting with the filecaxpy.f:g77 -funroll-all-loops -O3 -x f77-cpp-input -c caxpy.fThis creates an object file caxpy.o. The rest of thefiles are compiled similarly. If you want to produce a shared library,you will want to include the -fPIC option.
Also, I'venoticed that the -fexceptions option should not be usedas it causes linking errors down the road. Once I've compiled all theFortran code, I create a static library via the following commands:ar cr libblas.a.oranlib libblas.aI create the LAPACK library in precisely the same fashion, with thesame options passed to g77. The only difference is thatthe files in the LAPACK tarball are strewn about in varioussubdirectories. In brief, the quickest way to build the LAPACK libraryis to use the existing Makefile and typemake./liblapack.aat the command prompt with lapack/SRC being thecurrent directory. Before we do that, however, we need to modify a fewof the options passed to the Makefile. First, I movelapack/make.inc.example tolapack/make.inc.
Looking at this file, I see that itspecifies among other things the program used to compile the Fortrancode, which is g77, exactly as I want it. Near the bottomof this text file, I change the variable LAPACKLIB toLAPACKLIB = liblapack.aNow, I can type the make command in theSRC subdirectory and it should proceed to automaticallycreate the library (this takes about ten minutes on my computer).Lastly, I create a library with the HSL subroutines.
Afterfollowing the instructions in the IPOPT document for downloading thecode from the HSL Archive, I create the library with the followingcommands:g77 -funroll-all-loops -O3 -x f77-cpp-input -c ma27ad.fg77 -funroll-all-loops -O3 -x f77-cpp-input -c mc19ad.far cr libhsl.a ma27ad.o mc19ad.oranlib libhsl.aNow I'm ready to create the IPOPT library. Building the IPOPT libraryI will elect not to follow the standard installation instructions(since they didn't work) and instead build the IPOPT library byhand.
Basically, I'm going to follow almost the same steps as I didbefore. The trickiest part is that I need to modify the fileIpopt/inc/configipopt.h manually; the configure scriptdoes this automatically.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features.
Registration is quick, simple and absolutely free. Today!Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.Are you new to LinuxQuestions.org? Visit the following links: If you have any problems with the registration process or your account login, please.
If you need to reset your password,.Having a problem logging in? Please visit to clear all LQ-related cookies. Introduction to Linux - A Hands on GuideThis guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant.
They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.to receive this Complete Guide absolutely free. Code: # -.- Makefile -.-##################################################################### LAPACK make include file. ## LAPACK, Version 3.3.1 ## April 2011 ####################################################################### See the INSTALL/ directory for more examples.#SHELL = /bin/sh## The machine (platform) identifier to append to the library names#PLAT = LINUX## Modify the FORTRAN and OPTS definitions to refer to the# compiler and desired compiler options for your machine.
NOOPT# refers to the compiler options desired when NO OPTIMIZATION is# selected. Code: gfortran:././blasLINUX.a: No such file or directoryis due to a line that is commented out in the makefile.
Why this is so is inexplicable to me. The line in question should be very apparent in the makefile, as it is (one of) the only line that is commented out. After I uncommented that line, just typing 'make' should work.Edit: I just realized, since my OS is OSX, this forum isn't the appropriate one, correct?
Is there a subforum on linuxquestions where this question would be more appropriate?