Difference between revisions of "How to run CHILD in Windows 7"
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
-Download cygwin setup for the 32-bit version (CHILD doesn't seem to work under the 64 bit version of cygwin) called: setup-x86.exe. | -Download cygwin setup for the 32-bit version (CHILD doesn't seem to work under the 64 bit version of cygwin) called: setup-x86.exe. | ||
+ | |||
-Run the setup program. You will need the default installation packages but there are two additional packages that need to be installed: | -Run the setup program. You will need the default installation packages but there are two additional packages that need to be installed: | ||
+ | |||
-In the cygwin installation search bar, type 'make'. Make sure to install the options under 'devel' by clicking the circular arrow pattern next to it. | -In the cygwin installation search bar, type 'make'. Make sure to install the options under 'devel' by clicking the circular arrow pattern next to it. | ||
+ | |||
-Following the same procedure, type 'gcc' and install the 'devel' components. | -Following the same procedure, type 'gcc' and install the 'devel' components. | ||
+ | |||
-Hit the next button, accept any additional dependencies that need to be installed. | -Hit the next button, accept any additional dependencies that need to be installed. | ||
− | -Cygwin installation could take | + | |
+ | -Cygwin installation could take an hour depending on connection speed. | ||
+ | |||
-You need to make sure that windows command prompt recognizes cygwin commands. To do so, you will need to add cygwin's bin file to the system path. Here is a useful website explaining the procedure: | -You need to make sure that windows command prompt recognizes cygwin commands. To do so, you will need to add cygwin's bin file to the system path. Here is a useful website explaining the procedure: | ||
http://lifehacker.com/362316/use-unix-commands-in-windows-built-in-command-prompt | http://lifehacker.com/362316/use-unix-commands-in-windows-built-in-command-prompt | ||
+ | |||
-You can add the cygwin path by typing 'environment variables' in the start menu, and hit the environment variables button. Under the system variables, scroll down to Path, and click edit. At the end of the variable value line, type: ;C:\Cygwin\bin with no spaces between paths (assuming you chose the default cygwin path on installation). | -You can add the cygwin path by typing 'environment variables' in the start menu, and hit the environment variables button. Under the system variables, scroll down to Path, and click edit. At the end of the variable value line, type: ;C:\Cygwin\bin with no spaces between paths (assuming you chose the default cygwin path on installation). | ||
+ | |||
-Restart your computer after Cygwin is installed and system path is updated. | -Restart your computer after Cygwin is installed and system path is updated. | ||
− | |||
− | - | + | -To download the latest version of CHILD, log in to the CSDMS website And look for it under the "terrestrial models" section. Download the source code from the 'model info' panel on the right. This will direct you to github where you can access a zip file containing the code. |
+ | |||
+ | |||
+ | -To compile CHILD, open command prompt and navigate to the CHILD code folder. On older versions the makefile is in the root directory, but in newer versions it is located in /bin or /Linuxbin. Find the makefile and then type: make -f childi.mk | ||
+ | |||
+ | |||
+ | -On some computers, you might need to tinker with the make file to get child to compile. From my experience it seems to be an issue with warning flags in the gcc.mk file. To fix this, open gcc.mk in a text editor, and change line 7 to WARNINGFLAGS = -fpermissive -Wall -W \ | ||
− | |||
− | -Once the child executeable is created, you can run child with an input file as an argument at the command prompt. | + | -Once the child executeable is created, you can run child with an input file as an argument at the command prompt, such as: child inputfile.in |
</div> | </div> |
Latest revision as of 19:41, 18 May 2015
Linux functionality is required to compile and run CHILD. Fortunately for Windows users there are tools that let you run linux software on a pc. I use Cygwin for this purpose: https://www.cygwin.com/
Here are my instructions on how to install Cygwin and compile CHILD on Windows 7.
-Download cygwin setup for the 32-bit version (CHILD doesn't seem to work under the 64 bit version of cygwin) called: setup-x86.exe.
-Run the setup program. You will need the default installation packages but there are two additional packages that need to be installed:
-In the cygwin installation search bar, type 'make'. Make sure to install the options under 'devel' by clicking the circular arrow pattern next to it.
-Following the same procedure, type 'gcc' and install the 'devel' components.
-Hit the next button, accept any additional dependencies that need to be installed.
-Cygwin installation could take an hour depending on connection speed.
-You need to make sure that windows command prompt recognizes cygwin commands. To do so, you will need to add cygwin's bin file to the system path. Here is a useful website explaining the procedure:
http://lifehacker.com/362316/use-unix-commands-in-windows-built-in-command-prompt
-You can add the cygwin path by typing 'environment variables' in the start menu, and hit the environment variables button. Under the system variables, scroll down to Path, and click edit. At the end of the variable value line, type: ;C:\Cygwin\bin with no spaces between paths (assuming you chose the default cygwin path on installation).
-Restart your computer after Cygwin is installed and system path is updated.
-To download the latest version of CHILD, log in to the CSDMS website And look for it under the "terrestrial models" section. Download the source code from the 'model info' panel on the right. This will direct you to github where you can access a zip file containing the code.
-To compile CHILD, open command prompt and navigate to the CHILD code folder. On older versions the makefile is in the root directory, but in newer versions it is located in /bin or /Linuxbin. Find the makefile and then type: make -f childi.mk
-On some computers, you might need to tinker with the make file to get child to compile. From my experience it seems to be an issue with warning flags in the gcc.mk file. To fix this, open gcc.mk in a text editor, and change line 7 to WARNINGFLAGS = -fpermissive -Wall -W \
-Once the child executeable is created, you can run child with an input file as an argument at the command prompt, such as: child inputfile.in