Contents
Description
- To compile Ionic, Constitutive, Active Tension, and Material Coordinate Models on your computer please follow these instructions to install a fortran compiler if you do not have one and link it to Continuity.
- You can choose between 2 compilers, g95 and the Intel Fortran Compiler. g95 is free but not as fast as the Intel Fortran Compiler. You can get a trial version of the Intel Fortran Compiler but after 30 days you must purchase it to continue using it.
Install g95
- Make sure you have the latest release of Continuity.
-
If you are running Linux and have sudo priviledges, try running <sudo apt-get install g95>. Otherwise go to http://www.g95.org/dl.shtml to download and install the compiler.
-
Find the path to the g95 compiler executable. For example mine is </home/aguthals/Documents/g95-install/bin/i686-unknown-linux-gnu-g95>. The executable should be in a folder named g95-install/bin.
-
Now bind the g95 command to this executable. If you do not have root privileges, go to the next step. Otherwise go to your /bin directory and run:
-
<ln -s <PATH TO g95 executable> g95>. For example, I would run <ln -s /home/aguthals/Documents/g95-install/bin/i686-unknown-linux-gnu-g95 g95>.
-
- If you do not have root privileges:
-
cd to the directory containing the g95 executable and rename the file to g95. For example, I would run <mv i686-unknown-linux-gnu-g95 g95>.
-
Modify your startup script (.bashrc in your home directory for bash users) in your home directory. Insert the following line: <export PATH=<PATH TO g95 executable directory>:$PATH>. For example, I would insert <export PATH=/home/aguthals/Documents/g95-install/bin:$PATH>.
- Restart the terminal.
-
- cd to Continuity’s home directory and run:
-
./setup (if running continuity for the first time)
-
source mglinit
-
autoconf
-
./configure --with-g95
- After you running ./configure –with-95, you should see something more or less like this:
-
Shell: /bin/sh C compiler: gcc C++ compiler: /usr/bin/g++ C compiler flags: -c -DG95 -O2 -finline-functions Fortran compiler: /bin/g95 F90C compiler: Fortran compiler flags: -c -r8 -fno-second-underscore -ffixed-line-length-132 -cpp -DPYTHON -DLINUX -DHAVE_LAPACK -DG95 -O3 -ftree-vectorize Fortran libraries: Linker: /bin/g95 Linker flags: -shared Libs: MPICC: MPILD: MPILDFLAGS: MPICCFLAGS: Install path: /opt/continuity Host binary type: linux32 OBJEXT: o LIBEXT: a SWIG: /usr/local/bin/swig
-
-
-
You can now compile model equations within the various model editors. After editing an equation, go to the Compile tab and select your current server from the drop-down menu. If it is not there type in “localhost (current server)”, then click Compile.
Install Intel Fortran Compiler
- Make sure you have the latest release of Continuity.
-
Go to http://www.intel.com/cd/software/products/asmo-na/eng/278834.htm to download and install the compiler.
-
Find the path to a shell script named something like “ifortvars.sh” (or .csh for cshell users) in the fortran compiler’s bin directory. For example mine is </opt/intel/Compiler/11.1/038/bin/ia32/ifortvars_ia32.sh>. The script will be in the same folder as ifort (the compiler executable).
-
Find the path to the fortran compiler’s lib directory, for example mine is </opt/intel/Compiler/11.1/038/lib/ia32>. The folder will contain numerous libraries such as libifcore.so.
-
In your startup script (.bashrc in your home directory for bash users), insert the following lines: <export IFC_LIB_PATH="<PATH TO lib>"> and <source <PATH to ifortvars>>. For example, I would insert <source /opt/intel/Compiler/11.1/038/bin/ia32/ifortvars_ia32.sh> and <export IFC_LIB_PATH="/opt/intel/Compiler/11.1/038/lib/ia32">.
- Restart the terminal.
- cd to Continuity’s home directory and run:
-
./setup (if running continuity for the first time)
-
source mglinit
-
autoconf
-
./configure
-
-
You can now compile model equations within the various model editors. After editing an equation, go to the Compile tab and select your current server from the drop-down menu. If it is not there type in “localhost (current server)”, then click Compile.
Using g95 on the Mac
-
Note: This work around is only for running g95 on the MacOS. Not Linux.
- If you try to compile on the Mac with g95 you may get an error like this:
-
ld: in /Applications/cont5609/continuity/pcty/MglToolsLib/lib/python2.5/config, can't map file, errno=22 make[2]: *** [BMOrtho_incompmodule.so] Error 1 make[1]: *** [BMOrtho_incomp] Error 2 make: *** [bmdynamic] Error 2
- Here’s a work around:
- Make sure that the python2.5 framework is installed. In particular you need this file:
- /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/libpython2.5.a If you don’t have this file, you should be able to find python2.5 from the python.org website.
-
Open the <continuity>/src/Options.mk file and change this line
-
LDFLAGS = -dynamic -bundle -bundle_loader /Applications/cont5609/continuity/pcty/MglToolsLib/lib/python2.5/config
to this line:
- LDFLAGS = -dynamic -bundle -bundle_loader /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/libpython2.5.a
-
-