Difference between revisions of "ApCoCoA-1:HowTo:Compile ApCoCoALib on Windows"

From ApCoCoAWiki
m
(Updated Lapack/Blas related instructions)
Line 8: Line 8:
 
*CoCoALib: The ApCoCoALib is based on and extends the functionalities of the CoCoALib. You need to compile the CoCoALib prior to the ApCoCoALib.
 
*CoCoALib: The ApCoCoALib is based on and extends the functionalities of the CoCoALib. You need to compile the CoCoALib prior to the ApCoCoALib.
 
**Find a description on how to install the CoCoALib on Windows [http://www.apcocoa.org/wiki/HowTo:Compile_CoCoALib_on_Windows here].
 
**Find a description on how to install the CoCoALib on Windows [http://www.apcocoa.org/wiki/HowTo:Compile_CoCoALib_on_Windows here].
 +
**This description is based on CoCoALib 0.9918.
  
*Blas and Lapack Library: You will need those libraries to enable a few features in the ApCoCoALib. You can either download the full libraries or get a selection of files needed for the ApCoCoALib.
+
*Blas and Lapack Library: You will need those libraries to enable a few features in the ApCoCoALib. The current Repository version of the ApCoCoALib needs you to have one of the following programms installed:
** Download and install the complete libraries via [http://math-atlas.sourceforge.net/ ATLAS].
+
** Matlab
** A selection of needed files can be found ''[http:// here]''. Download the archive and extract it to your local harddisk. We will refer to these files with the keyword %BLLApath
+
** Intel MKL
 
 
*Optionally you can install [http://linalg.org LinBox] which can improve the FGLM techniques especially over finite fields and lets you call LinBox functions from within the ApCoCoA GUI.
 
  
 
*HG mercurial: You will need this software to download the latest ApCoCoALib from a repository. The ApCoCoALib is managed with the source control system mercurial. We will refer to TortoiseHG. TortoiseHG will install mercurial on your system and adds a context menu in the MS Explorer providing many of the needed functionalities.  
 
*HG mercurial: You will need this software to download the latest ApCoCoALib from a repository. The ApCoCoALib is managed with the source control system mercurial. We will refer to TortoiseHG. TortoiseHG will install mercurial on your system and adds a context menu in the MS Explorer providing many of the needed functionalities.  
Line 19: Line 18:
 
** A more detailed documentation on you how to use mercurial can be found [http://www.selenic.com/mercurial/wiki/ here].
 
** A more detailed documentation on you how to use mercurial can be found [http://www.selenic.com/mercurial/wiki/ here].
 
** General information on the ApCoCoALib source code management can be found [http://www.apcocoa.org/wiki/ApCoCoA:SourceCodeManagement here].
 
** General information on the ApCoCoALib source code management can be found [http://www.apcocoa.org/wiki/ApCoCoA:SourceCodeManagement here].
 
*Intel MKL: You need the Intel MKL installed on your computer.
 
  
 
=Download Instructions=
 
=Download Instructions=
Line 34: Line 31:
 
==Config File==
 
==Config File==
 
Prior to compilation you have to adjust the configuration file. Open the file makefile.vc.conf in the configuration subfolder.
 
Prior to compilation you have to adjust the configuration file. Open the file makefile.vc.conf in the configuration subfolder.
Set the %GMPpath by adapting the following two lines:
+
Set the pathes accordingly. To use the Intel MKL uncomment line 11 and 14 by removing the # and comment line 09 and 13 by adding a #.
<c>
+
<c>#-------------------------------------------------------------------------------
_GMP_INCLUDE=..\..\..\gmp_p4_dll
+
# Adjust the following names and pathes
_GMP_LIB=..\..\..\gmp_p4_dll\gmp.lib
+
#-------------------------------------------------------------------------------
</c>
+
_COCOALIB_INCLUDE = ..\..\..\CoCoALib-0.9918\include
_GMP_INCLUDE contains the path to your GMP binaries. _GMP_LIB points to the gmp.lib file.
+
_GMP_INCLUDE= C:\Programme\gmp-4.2.2\build.vc8\lib\Win32\Release
 
+
# Use the LAPACK/BLAS Libs provided with
Set the include pathes for the CoCoALib and the Intel MKL in the following lines
+
#Matlab
<c>
+
_LB_INCLUDE = C:\Programme\MATLAB\R2007b\extern\include
_INCLUDES=/I $(_GMP_INCLUDE) /I ..\..\include /I ..\..\..\CoCoALib-0.9914\include \
+
#or Intel MKL
          /I ..\..\..\IntelMKL\include
+
#_LB_INCLUDE = C:\Programme\Intel\MKL\9.0\include
 +
#-------------------------------------------------------------------------------
 +
...
 +
                  -DUSEMatlab -D__MSVC__
 +
#   -DUSEIntelMKL -D__MSVC__
 
</c>
 
</c>
  
Line 51: Line 52:
 
==Compilation==
 
==Compilation==
 
Open a Visual Studio command prompt and change to your local ApCoCoALib folder. Use the nmake command to compile the ApCoCoALib:
 
Open a Visual Studio command prompt and change to your local ApCoCoALib folder. Use the nmake command to compile the ApCoCoALib:
<c>nmake -f Makefile.vc</c> Will display all available targets.
+
<c>nmake -f Makefile.vc ApCoCoALib</c>
<c>nmake -f Makefile.vc ApCoCoALib</c> Will build the ApCoCoALib.
+
To show all available targets call
 +
<c>nmake -f Makefile.vc</c>
  
 
==Problems==
 
==Problems==

Revision as of 10:29, 4 August 2008

Introduction

  • This site is set up to collect all necessary bits and pieces to compile the ApCoCoALib on Windows.
  • This description is made for compiling the ApCoCoALib with MSVC 2003/2005.

Preparation

Before compiling the ApCoCoALib you need to install the following files/libraries:

  • CoCoALib: The ApCoCoALib is based on and extends the functionalities of the CoCoALib. You need to compile the CoCoALib prior to the ApCoCoALib.
    • Find a description on how to install the CoCoALib on Windows here.
    • This description is based on CoCoALib 0.9918.
  • Blas and Lapack Library: You will need those libraries to enable a few features in the ApCoCoALib. The current Repository version of the ApCoCoALib needs you to have one of the following programms installed:
    • Matlab
    • Intel MKL
  • HG mercurial: You will need this software to download the latest ApCoCoALib from a repository. The ApCoCoALib is managed with the source control system mercurial. We will refer to TortoiseHG. TortoiseHG will install mercurial on your system and adds a context menu in the MS Explorer providing many of the needed functionalities.
    • Download TortoiseHG here.
    • A more detailed documentation on you how to use mercurial can be found here.
    • General information on the ApCoCoALib source code management can be found here.

Download Instructions

Get your prefered ApCoCoALib version (stable or developer) from the repo site. A brief instruction using TortoiseHG is:

  • Add a folder on your local harddisk for the local repo copy.
  • Open the context menu entry TortoiseHG->Clone a repository.
    • As the source path copy the selected link from the repo site.
    • As the destination path select your created folder.
    • Start the download of the ApCoCoALib with the clone button.

Compilation Instructions

Config File

Prior to compilation you have to adjust the configuration file. Open the file makefile.vc.conf in the configuration subfolder. Set the pathes accordingly. To use the Intel MKL uncomment line 11 and 14 by removing the # and comment line 09 and 13 by adding a #. <c>#-------------------------------------------------------------------------------

  1. Adjust the following names and pathes
  2. -------------------------------------------------------------------------------

_COCOALIB_INCLUDE = ..\..\..\CoCoALib-0.9918\include _GMP_INCLUDE= C:\Programme\gmp-4.2.2\build.vc8\lib\Win32\Release

  1. Use the LAPACK/BLAS Libs provided with
  2. Matlab

_LB_INCLUDE = C:\Programme\MATLAB\R2007b\extern\include

  1. or Intel MKL
  2. _LB_INCLUDE = C:\Programme\Intel\MKL\9.0\include
  3. -------------------------------------------------------------------------------

...

                 -DUSEMatlab -D__MSVC__
  1. -DUSEIntelMKL -D__MSVC__

</c>

Note: All pathes shown here are relative pathes to the ApCoCoALib folder.

Compilation

Open a Visual Studio command prompt and change to your local ApCoCoALib folder. Use the nmake command to compile the ApCoCoALib: <c>nmake -f Makefile.vc ApCoCoALib</c> To show all available targets call <c>nmake -f Makefile.vc</c>

Problems

If you encounter problems check out the forum: ApCoCoA Forum