User Tools

Site Tools


getting_started_with_capri

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
getting_started_with_capri [2020/10/04 18:36]
gocht [Trunk result files for download by revision]
getting_started_with_capri [2021/05/24 13:35] (current)
torbjornj Replacing backslash with slash.
Line 1: Line 1:
 ======Getting started with CAPRI====== ======Getting started with CAPRI======
 +
 +===== Installing CAPRI Stable Release 2 and earlier =====
 +
 +CAPRI Stable Release (STAR) 2 and earlier releases are published with a full set of data, i.e. including all the intermediate data required to build the complete database and produce a calibrated baseline. The model with raw data and the consolidated model database are shipped in two compressed archives. For the latest release, STAR 2.7, they are called "​STAR_2.7.zip"​ and "​results_2.7.zip"​ respectively,​ and with similar naming pattern for other releases. Follow the steps below in order to install CAPRI on your system. Using CAPRI requires extensive knowledge of how the system works. Please look out for CAPRI training courses on the page of upcoming events. The following bare-bone instructions may nevertheless be sufficient to get the system up and technically running.
 +
 +
 +==== 1. Ensure that you have Java and GAMS installed on your computer ====
 +See [[getting_started_with_capri#​system_requirements|system requirements]].
 +
 +
 +==== 2. Download the two archives ====
 +Click the links to "​Code"​ and "​Database"​ in the table of available CAPRI versions [[getting_started_with_capri#​Download_the_current_release|below]]. We recommend using the latest available release.
 +
 +==== 3. Extract the files to a local hard drive ====
 +
 +  - Create an installation folder to hold **model source files** on your local hard drive such that the path does not contain spaces. Thus, it will not work to install the model in “My Documents” (path containing space) or on a network drive (the access will be too slow). We call this the "CAPRI system folder"​. We assume here you created a folder ''​C:/​CAPRI/​STAR_2.7''​. ​
 +  - Extract the files of the compressed archive with code, e.g. ''​STAR_2.7.zip''​ into the CAPRI system folder.
 +  - Extract the files of the compressed archive with data, e.g. ''​results_2.7.zip''​ into the subfolder ''​output/​results''​ in the CAPRI system folder.
 +
 +The resulting directory structure in your CAPRI system folder should look like this afterwards:
 +
 +{{:​wiki:​installation_folders_tier1.png?​nolink&​400|}}
 +
 +The directory structure inside the folder ''​output/​results''​ should look like this:
 +
 +{{::​installation_result_files_and_folders.png?​400|List of result folders and files extracted and placed in ./​output/​results}}
 +
 +
 +==== 4. Adjust the settings to your computer ====
 +
 +  - Go to the subfolder "​GUI",​ double-click “start_capri.bat”. That should open the graphical user interface (GUI). If not, something is wrong with your Java-installation.
 +  - In the menu **settings**,​ choose **Edit settings.**
 +    * In the first tab: enter your name
 +    * In the second tab: verify that the paths to result and restart folders are set to **../​output/​results and ../​output/​restart.** The GAMS directory should read **../gams** and the data directory should read **../dat.**
 +    * In the third tab: enter the complete path to the GAMS executable. Probably it is something like **c:/​gams/​win64/​30.3/​gams.exe.** Also verify that the path to the Scratch directory is **../​output/​temp.** Click the button to “get number of processors”.
 +    * In the fourth tab: do nothing.
 +    * In the final tab: do nothing, or, if you have a programming text editor, enter the path to that editor in the proper field.
 +  - Click “Save in caprinew.ini” and accept the file name suggested for your settings.
 +  - Close the GUI, then start it again (using start_capri.bat),​ to make it process all your settings.
 +
  
 ===== Download the current release ===== ===== Download the current release =====
Line 10: Line 50:
  
 ^ Release ​  ​^ ​ Item        ^   ​Link ​                                                          ^ ^ Release ​  ​^ ​ Item        ^   ​Link ​                                                          ^
 +| STAR 2.7  |  Code        | [[https://​1drv.ms/​u/​s!Aj7_RXyD8q-MhJlpsZVKK4eRDCjM2w?​e=gLdPBw]] ​ |
 +| :::       ​| ​ Database ​   | [[https://​1drv.ms/​u/​s!Aj7_RXyD8q-MhJlqh8nnJYSkfOm7hw?​e=5dbyr1]] ​ |
 +| :::       ​| ​ SVN-tag ​    | [[https://​svn1.agp.uni-bonn.de/​svn/​capri/​tags/​star/​2.7]] ​        |
 | STAR 2.6  |  Code        | [[https://​1drv.ms/​u/​s!Aj7_RXyD8q-Mg-080EMGjf1A8H-wuQ?​e=9QnIDU]] ​ | | STAR 2.6  |  Code        | [[https://​1drv.ms/​u/​s!Aj7_RXyD8q-Mg-080EMGjf1A8H-wuQ?​e=9QnIDU]] ​ |
 | :::       ​| ​ Database ​   | [[https://​1drv.ms/​u/​s!Aj7_RXyD8q-Mg-076HkDqqg6mVO0HQ?​e=eD0TmO]] ​ | | :::       ​| ​ Database ​   | [[https://​1drv.ms/​u/​s!Aj7_RXyD8q-Mg-076HkDqqg6mVO0HQ?​e=eD0TmO]] ​ |
Line 27: Line 70:
 ===== System requirements ===== ===== System requirements =====
  
-CAPRI requires that you have a windows computer with Java runtime environment (64-bit) ​and GAMS ([[http://​www.gams.com]],​ distribution ​28.2 or later is recommended) installed. You need a license for the CONOPT solver. Many tasks in CAPRI utilize parallel computing. It is therefore an advantage if you have a machine that can run many threads in parallel.+CAPRI requires that you have a windows computer with Java and GAMS ([[http://​www.gams.com]],​ distribution ​32.2 or later is recommended) installed. You need a license for the CONOPT solver. Many tasks in CAPRI utilize parallel computing. It is therefore an advantage if you have a machine that can run many threads in parallel.
  
-===== Installation instructions ​for the model without ​database =====+Regarding Java: There are some licensing implications when using Oracle'​s platform. Public updates released after January 2019 will not be available ​for business, commercial, or production use without ​a commercial license. Since then the GUI for java can also be executed using a open and free installation of [[https://​jdk.java.net/​15/​|OpenJDK]].
  
-Using CAPRI requires extensive knowledge of how the system works. Please look out for CAPRI training courses on the page of upcoming events. The following bare-bone instructions may nevertheless be sufficient to get the system up and technically running. 
  
-  - Create an installation folder to hold **model source files** on your local hard drive such that the path does not contain spaces. Thus, it will not work to install the model in “My Documents” (path containing space) or on a network drive (the access will be too slow). 
-  - Extract the files of the compressed archive (or checkout from SVN) into the folder you just created. 
-  - Go to the subfolder GUI, double-click “start_capri.bat”. That should open the graphical user interface (GUI). If not, something is wrong with your Java-installation. 
-  - In the menu **settings**,​ choose **Edit settings.** 
-    * In the first tab: enter your name 
-    * In the second tab: verify that the paths to result and restart folders are set to **../​output/​results and ../​output/​restart.** The GAMS directory should read **../gams** and the data directory should read **../dat.** 
-    * In the third tab: enter the complete path to the GAMS executable. Probably it is something like **c:/​gams/​win64/​30.3/​gams.exe.** Also verify that the path to the Scratch directory is **../​output/​temp.** Click the button to “get number of processors”. 
-    * In the fourth tab: do nothing. 
-    * In the final tab: do nothing, or, if you have a programming text editor, enter the path to that editor in the proper field. 
-  - Click “Save in caprinew.ini” and accept the file name suggested for your settings. 
-  - Initialize the result directory structure by executing the task “Create result and restart directory structure” in the workstep “Installation” by marking those radio-buttons in the GUI and clicking “Start GAMS”. 
-  - Close the GUI, then start it again (using start_capri.bat),​ to make it process all your settings. 
  
 ===== Build databases and baselines ===== ===== Build databases and baselines =====
  
-The stable releases are shipped with only input data, but not with any of the consistent model databases ​needed to run the modelAs mentioned above, there are two options for obtaining ​the complete and consistent databases ​needed ​by and fitting with the CAPRI model.+The stable releases are shipped with the data needed ​to make simulations. Advanced users may want to run the data consolidation steps themselvesIt can be done using the following steps. Note that this is not needed ​if you downloaded ​and installed ​the pre-compiled database in the steps described above.
  
-  - The simpler way is to download the zipped archive from [[https://​www.capri-model.org/​dokuwiki/​doku.php?​id=capri:​get-capri]]. 
-  - The advanced way is to compile the database yourself from raw data. 
  
-If you download ​the data as a compressed archive, you decompress the archive and place all the files and folders in the result directory of your capri model installation. For example, assume you installed the model in the directory  +Compiling ​the database ​from scratch ​takes a long time. Depending on the hardware you use, it can take up to several days. In order to keep track of all the various settings required for completing all the steps, the release contains a “batch execution file” that instructs the GUI how to carry out a sequence of tasks without intervention of the user. Here is what you need to do:
-''​C:/​CAPRI_STAR_2.5''​. Then you place the files and folders extracted (see below) in the folder +
-''​C:/​CAPRI_STAR_2.5/​output/​results''​. The following files and folders should be extracted:​ +
- +
-{{::​installation_result_files_and_folders.png?​400|List of result folders and files extracted and placed in ./​output/​results}} +
- +
-Those are created by tasks executable ​from the GUI. So, now you need to build all databases of CAPRI. This takes a long time. Depending on the hardware you use, it can take up to several days. In order to keep track of all the various settings required for completing all the steps, the release contains a “batch execution file” that instructs the GUI how to carry out a sequence of tasks without intervention of the user. Here is what you need to do:+
  
   - In the GUI, choose the menu GUI –> Batch execution   - In the GUI, choose the menu GUI –> Batch execution
Line 68: Line 90:
   - Click “Open HTML report” and verify that all steps were completed without errors (RC=0).   - Click “Open HTML report” and verify that all steps were completed without errors (RC=0).
  
-The current batch execution file (STAR 2.5) does not take over the path to your GAMS installation as entered in the settings dialogue during installation,​ but you will have to open the text file and enter the appropriate path manually. ​+The current batch execution file (STAR 2.7) does not take over the path to your GAMS installation as entered in the settings dialogue during installation,​ but you will have to open the text file and enter the appropriate path manually. ​
  
  
 ===== Release notes (cumulative) ===== ===== Release notes (cumulative) =====
 +
 +=== STAR 2.7 ===
 +
 +Most importantly,​ the dairy market should now be linked with the supply models, and the new feed version is used by default. Other minor issues below:
 +
 +  * Priors missing in GHG emission trend estimation now exist (again?)
 +  * The fallback structure for missing nutrient balance data in West Balkan and Turkey taken over from Trunk.
 +  * Import surge of cheese in market baseline prevented by adjusted bounds widening. This problem does not seem to exist in trunk.
 +  * FAOSTAT bug fixed (exportGUI task failed)
  
 === STAR 2.6 === === STAR 2.6 ===
Line 198: Line 229:
 ===== Trunk result files for download by revision ===== ===== Trunk result files for download by revision =====
  
-^ Result folder zip               ​^trunk revision ​  ^ Date       ​^ batch file ^  +^ Result folder zip                    ^trunk revision ​  ^ Date        ^ batch file ^  
-|{{:​beta:​res_8872.zip|dowload}}  |8872              | 04.10.2020 |[[other:items|download]]|+|{{:​beta:​res_8300.zip|Download link}} ​ |8300              | 24.10.2020 |[[https://​svn1.agp.uni-bonn.de/​!/#​capri/​view/​head/​trunk|External Link]]| 
 +|{{:​beta:​res_8872.zip|Download link}}  |8872              | 04.10.2020 |[[https://​svn1.agp.uni-bonn.de/​!/#​capri/​view/​head/​trunk|External Link]]|
  
  
  
getting_started_with_capri.1601825804.txt.gz · Last modified: 2020/10/04 18:36 by gocht