Compiling Continuity

Compiling Continuity 7 (blender migration)

On Linux

Compiling Continuity 6.4

Introduction

  • This page will detail the instructions to follow to compile Continuity. Most people, including developers, will never need to compile Continuity. Since most of Continuity is developed in Python, the only reason to compile Continuity is if a developer changes any of the server-side Fortran or C code. Pre-compiled binaries are already in the repository, so there is no need to compile Continuity before being able to run it. If the need arises to modify any of the server-side code, then please follow these instructions to be able to compile Continuity.

On Windows

  1. Installing Required Software

  2. Checkout Continuity from svn

  3. Setting environment variables: You need to set a total of 8 paths in 4 environment variables. Use the following template to use as your .profile file in your home folder in MSYS. Note: If any of the paths contain spaces, you will need to use the short names instead. Otherwise, the make system will not work. To find the short name of any folder, open a cmd prompt in Windows and cd to the parent folder of the folder you need the short name for. Then type dir /x and hit Enter. In the list, the short names appear right before the full names - just find the one(s) you need.

    #!sh (-)
    #continuity location
    alias godev="cd /c/DOCUME~1/[PATH TO CONTINUITY]/ContinuityDev/"
    export LIB="$LIB:/c/DOCUME~1/[PATH TO CONTINUITY]/ContinuityDev/winlib/"
    
    #Microsoft Visual C++ Toolkit 2003 (linker.exe)
    export PATH="/c/Progra~1/[Microsoft Visual C++ Toolkit 2003 ]/bin:$PATH" #link.exe
    export LIB="$LIB:/c/PROGRA~1/[Microsoft Visual C++ Toolkit 2003 ]/lib"
    
    #Microsoft SDK
    export LIB="$LIB:/c/Progra~1/[MICROSOFT PLATFORM SDK]/Lib"
    
    #python.exe
    export PATH="/c/Python25/:$PATH" 
    
    #pythonpath, where NumPy and other important things are located
    export PATH="/c/DOCUME~1/[PATH TO CONTINUITY]/ContinuityDev/pcty/MGLTOO~1/PYCOMP~1:$PATH"
    export PYTHONPATH="/c/DOCUME~1/[PATH TO CONTINUITY]/ContinuityDev/pcty/MGLTOO~1/PYCOMP~1:$PYTHONPATH"
    
    #intel fortran compiler
    export PATH="$PATH:/c/Progra~1/Intel/Compiler/Fortran/10.1.025/IA32/Bin"
    export IFC_LIB_PATH="/c/Progra~1/Intel/Compiler/Fortran/10.1.025/IA32/Lib"
    export LIB="$LIB:$IFC_LIB_PATH"
    
    #add LIB to LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIB
     
    Notes:
    • The godev alias is just a quick way to cd into your continuity root when you start MSYS. You can call it whatever you want.
    • You need to fill in the [ ] parts: [your username], [visual studio], [microsoft sdks]
    • [microsoft sdks] is just a folder named Microsoft SDKs in the Program Files directory, but the short name might be different from system to system.
  4. Compiling=== On Linux ===
    • Run msys and enter the following commands.
         godev
         autoconf
         ./configure
         make
         
  5. Running (first time only)
    • If you plan on running the client, server, or both, run setup from the Continuity root directory:
      cd pcty
      python ContinuityClient.py
         

      Note: if for any reason setup fails, simply copy all four dll files from winlib/ContSystem32 to the pcty directory.

    • When running Continuity for the first time as above, a prompt will ask you to update MglTools. Click Yes. Wait for the MglTools to be extracted and copied, and Continuity will exit. You might want to create a shortcut to the file pcty/ContinuityClient.py. If you want to change the icon for the shortcut, the icon can be found in pcty\client\forms\splash\continuity.ico.

  6. Running (normally): To run the client, simply run ContinuityClient.py in the pcty directory, or use a shortcut.

  7. If you find during the first run that things do not quite run correctly (e.g., Continuity can't find certain modules), restart Continuity with the --update-binaries option, then exit and then restart as normal (without that option).

On Linux

  1. Installing Required Software

  2. Checkout Continuity from svn

  3. Setting environment variables
    1. If you use bash (most likely), edit your .bash_profile file (in your home directory) so that it includes this:
      export PATH=$PATH:/opt/intel_fc_80/bin
      export IFC_LIB_PATH=/opt/intel_fc_80/lib
          
      Then type "source .bash_profile" to activate these changes. If you are using a different version of the IFC (i.e. version 10), make sure that you set the paths accordingly.
    2. If you use csh (less likely), edit your .cshrc file (in your home directory) so that it includes this:
      setenv IFC_LIB_PATH /opt/intel_fc_80/lib
      set path = ( $path /opt/intel_fc_80/bin .)
          
      Then type "source .cshrc" to activate these changes.
  4. Compiling:
    1. First, cd into the directory where Continuity is checked out.

    2. Then, run ./updatemgl, and wait for MglToolsLib to be extracted

    3. Next, run some commands as shown below:
      sh setup
      source mglinit
      autoconf
      ./configure
      make
          

      If you don't have the intel fortran compiler version 8.0 or 10.0, you can use g95 instead, although this is not recommended. In this case you must configure like this:

      ./configure --with-g95
          
      If you are compiling on ROCCE, you may get an error when compiling superlu with instant ('In instant.recompile: The module did not compile, see '/tmp/tmp_instant/superlu_dgssv_mod/compile.log'). To fix this the cblas and superlu library binaries need to be copied into the 64linuxlib/ folder before running make again.
      cp src/solverLibraries/lib/libcblas.a 64linuxlib/
      cp src/solverLibraries/lib/libsuperlu.a 64linuxlib/
      python dynamicMake.py
          
  5. Running
    • The first time you run Continuity after compiling the binaries, you need to supply the 'update-binaries' flag so that all the compiled binaries are distributed to their proper locations, e.g.,
      ./continuity --update-binaries
         
    • Thereafter, you can run the client via:
      ./continuity
         
    • To run the server, type:
      ./continuityserver
         

On PowerPC Mac

  • Same as linux, except:
    • You MUST use g95 (not Intel Fortran Compiler)
    • at some point you have to run ranlib darwinlib/*.a

On Intel Mac (with OSX 10.4)

  1. NO LONGER SUPPORTED

  2. Checkout Continuity from svn

  3. Install python 2.5 and libraries
    • python2.5. Install the "Universal Mac Installer"

    • Numpy

    • Install python packages like this:
      • tar -xzvf <package_you_downloaded.tar.gz>

      • cd <package_name>

      • python setup.py build
      • sudo python setup.py install
  4. Install X11 from your original MacOS X 10.4 CD.
    • Select "Optional Installs." When you get to the package selection screen, click "Applications" and select X11
  5. Install XCode Tools, also on the MacOS X 10.4 CD.
  6. Download and install g95 (http://ftp.g95.org/). Don't forget to add g95 to your path, or add a symbolic link in a bin directory. (see g95's readme)

  7. Install MglTools (http://mgltools.scripps.edu/downloads)

  8. Build superlu
    • cd <continuity>src/solverLibraries/superlu

    • make
    • if it gives you a copy error, ignore it
    • take ./superlu/src/libsuperlu.a and put it in <continuity>/darwinlib as libsuperlu_darwin.a

  9. Changed configure.in line 299 to point to the mgltools python2.4

- am_ld_flags="-dynamic -bundle -bundle_loader ${CONT_ROOT}/pcty/MglToolsLib/ppcDarwin7/bin/python2.4"
+ am_ld_flags="-dynamic -bundle -bundle_loader /Library/MGLTools/1.4.6/i86Darwin8/bin/python2.4"
  1. autoconf ; ./configure --with-g95 ; make

On Intel Mac (with OSX 10.5)

  1. NO LONGER SUPPORTED

  2. Install python libraries
    • Numpy

    • Install python packages like this:
      • tar -xzvf <package_you_downloaded.tar.gz>

      • cd <package_name>

      • python setup.py build
      • sudo python setup.py install
  3. Install XCode Tools, also on the MacOS X 10.5 CD.
  4. Download and install g95 (http://ftp.g95.org/). Don't forget to add g95 to your path, or add a symbolic link in a bin directory. (see g95's readme)

  5. Install MglTools (http://mgltools.scripps.edu/downloads)

  6. Build superlu
    • cd <continuity>src/solverLibraries/superlu

    • make
    • if it gives you a copy error, ignore it
    • take ./superlu/src/libsuperlu.a and put it in <continuity>/darwinlib as libsuperlu_darwin.a

  7. Changed configure.in line 299 to point to the mgltools python2.5

- am_ld_flags="-dynamic -bundle -bundle_loader ${CONT_ROOT}/pcty/MglToolsLib/ppcDarwin7/bin/python2.4"
+ am_ld_flags="-dynamic -bundle -bundle_loader /Library/MGLTools/1.4.6/i86Darwin8/bin/python2.4"
  1. autoconf ; ./configure --with-g95 ; make

On Intel Mac (with OSX 10.6)

  1. Download and Intel Fortran Compiler from here

  2. Install XCode Tools, from the MacOS X 10.6 CD.
  3. Build superlu
    • cd <continuity>src/solverLibraries/superlu

    • make
    • if it gives you a copy error, you may need to add "-m32" to CFLAGS in src/makefile and cblas/makefile
    • copy <continuity>/src/solverLibraries/lib/libsuperlu.a to <continuity>/i386darwinlib/

  4. add export IFC_LIB_PATH=/opt/intel/Compiler/11.1/076/lib/ (but with the correct path) to your .bash_profile file in your home directory
  5. From <continuity>/, run ./updatemgl to get the appropriate version of MGLTools unpacked in the proper location

  6. Then run the following: sh setup;source mglinit;autoconf ; ./configure ; make

Compiling Continuity 6.3 FAQ

cannot find -lg2c

  • Do a "locate libg2c" to make sure its installed on your system. On my system I found this: /usr/lib/libg2c.so.0

    But no file named exactly libg2c.so. A quick soft link should fix this problem:

     cd /usr/lib
     sudo ln -s libg2c.so.0 libg2c.so