Compiling LibRoadRunner for CC3D on Windows using Visual Studio 2008

CC3D git repository contains a copy of a RoadRunner Library which has been customized to work with CC3D. You can find it in <CC3D_Git_root>\RoadRunner. In my case the location is D:\CODE_TGIT\RoadRunner.

The compilation of RoadRunner is a two step process. First we build ThirdParty libraries located in D:\CODE_TGIT\RoadRunner\ThirdParty folder and then we buildactuall RoadRunner library located in D:\CODE_TGIT\RoadRunner.

Building ThirdParty libraries:

Cmake Configuration and Visual Studio project generation

Open Cmake and point it to source (D:\CODE_TGIT\RoadRunner\ThirdParty) and build (D:\CODE_TGIT_build\ThirdPartyBuild) directories:

rr01.jpg

Click configure button at the bottom and Choose VisualStudio 9 2008 from pull down menu in the dialog box that pops up, click Finish:

rr02.jpg

After Cmake finishes initial configuration you should get the following screen:

rr03.jpg

Notice, I have changed CMAKE_INSTALL _PREFIX to point to D:\Program Files (x86)\RR_VS2008. It is a good idea to change it in your Cmake configuration as well to a directory where you will install RoadRunner.

IMPORTANT:

If you want to build RoadRunner with Visiaul Studio in the Release mode you have change CMAKE_C_FLAGS_RELEASE to

/MD /Od /Ob0 /D NDEBUG

See the screenshot:

rr04.jpg

The reason for this is explaned here https://code.google.com/p/roadrunnerlib/wiki/VisualStudioBuild.

Aparently, CVODE libraries have trouble converging properly when too much compiler optimization happens. This happens only with Visual Studio compilers.

After clicking Configure and then Generate you will generate Visual Studio project for ThirdParty libraries.

VIsualStudio Compilation of ThirdParty project:

Open Visual Studio and go to File -> Open->Project/Solution and navigate to a directory where the generrated Visual Project is (in our case it is in D:\CODE_TGIT_build\ThirdPartyBuild):

rr05.jpg

Now, change build configuration to Release by going to Build->Configuration Manager and changing Active Solution Configuration to Release (in the pull-down menu)

rr06.jpg

When generating Visual Studio build files, the CMAKE_BUILD_TYPE have no effect, i.e. changing the Debug to Release will not cause the build to be a Release build. Instead, Debug and Release is manually set in the Visual Studio IDE. This do not mean, however, that one should use one set of build files for both Debug and Release. The problem in doing so, is that this would cause Debug and Release libraries to be generated and installed into the same output folder, which is not considered a good idea.

Now start compilation of ThirdParty prioject by right clicking ALL_BUILD in SolutionExplorer and choosing Build command:

rr07.jpg

After compilation is finished (it might take a while) right click on INSTALL in the SolutionExplorer and choose Build - this will install ThirdPArty libraries to D:\Program Files (x86)\RR_VS2008

rr08.jpg

We are done with step 1.

Building RoadRunner for CC3D

Cmake Configuration and Visual Studio project generation

Open Cmake and point it to source (D:\CODE_TGIT\RoadRunner) and build (D:\CODE_TGIT_build\RoadRunnerBuild) directories:

rr09.jpg

Click configure button at the bottom and Choose VisualStudio 9 2008 from pull down menu in the dialog box that pops up, click Finish. You shold get the following screen

rr10.jpg

Here we have to change few things:

a) THIRD_PARTY_INSTALL_FOLDER gets changed to D:\Program Files (x86)\RR_VS2008 - remember , this is where ThirdParty Libraries were installed

b) CMAKE_INSTALL_PREFIX gets changed to D:\Program Files (x86)\RR_VS2008 - we will be installing core RoadRunnerLibrary there

c) Click BUILD_CC3D_EXTENSION option at the top

rr11.jpg

Then click Configure and you shuld get the following screen:

rr12.jpg

Here we will change CC3D_INSTALL_PREFIX (see the top option in the above screenshot) to D:\Program Files (x86)\COMPUCELL3D_3.7.0_install (I am assuming your base CC3D is in this directory)

rr13.jpg

VIsualStudio Compilation of RoadRunner project:

This is identical to the compilation of ThirdParty libraries:

1) Open in Visual Studio ALL_BUILD project from D:/CODE_TGIT_build/RoadRunnerBuild

2) Change Active Solution Configuration to Release

3) Build RoadRunner Project (right click ALL_BUILD in Solution Explorer and choose Build command)

4) Install RoadRunner (right click INSTALL in Solution Explorer and choose Build command)

Now your CC3D installtion should have RoadRunner installed and all SBMLSolver based simulations should run

SrcBin/RoadRunnerWindows (last edited 2013-05-13 22:53:13 by 129-79-59-98)