Sei sulla pagina 1di 31

CH2030/5010 NUMERICAL METHODS

Instructor : Dr. Kishalay Mitra


Department Of Chemical Engineering
Indian Institute of Technology Hyderabad
kishalay@iith.ac.in
(https://sites.google.com/site/kishalaymitra/)
Segment(1-2) : F slot (11:00 – 11:55) (30 July to 29 Aug)
Segment(3-4) : E slot (10:00 – 10:55) (04 Sep to 05 Oct)
Preparing Your Laptops for NM I

Step 1
Install the Integrated Development Environment
(IDE; Eclipse). ▶ Input
▶ Output
Step 2 ▶ Compiler
Install a Fortran Compiler.

Step 3
Connect the IDE to the Compiler.
Step 1: Install The IDE
1a: Download Eclipse: http://www.eclipse.org/downloads/
Step 1: Install The IDE
1b: Run the Eclipse Installer
Step 1: Install The IDE
1c: Install Eclipse

After installation:
▶ Click on Launch
▶ Select a workspace folder
Step 1: Install The IDE
1d: Eclipse Welcome Screen
Step 1: Install The IDE
1e: Close Eclipse and move on to step 2.
Step 2: Install A Fortran Compiler
2a: Download Cygwin: https://cygwin.com/install.html
Step 2: Install A Fortran Compiler
2b: Run Cygwin Setup
Step 2: Install A Fortran Compiler
2c: Download Source: Install from Internet
Step 2: Install A Fortran Compiler

Step 2d: Select the folder where you want to install Cygwin (Default: C:\cygwin64).
Click Next.

Step 2e: Select another folder to store the installation files that will be downloaded.
Click Next.

Step 2f: Select the internet connection. Click Next.


Step 2: Install A Fortran Compiler
2g: Choose a Download Site (http://www.gtlib.gatech.edu)
Step 2: Install A Fortran Compiler
2h: List of Available Packages
Step 2: Install A Fortran Compiler

Step 2i: In the list of packages, expand Devel by clicking on the + button next to it.

Step 2j: In the expanded list under Devel, look for the following packages—
(i) gcc-fortran
(ii) gdb
(iii) make
Step 2: Install A Fortran Compiler
2i, 2j: Select the Fortran Compiler
Step 2: Install A Fortran Compiler
2i, 2j: Select the Fortran Compiler

For each of these three packages:

Click on Skip.
Make sure that the checkbox under the column Bin? is selected.
Click Next.
Step 2: Install A Fortran Compiler
2k: Final Touches

Click Next on the Resolving Dependencies screen.


After installation, click Finish.
Step 3: Connect the IDE to the Compiler
3a: Open Advanced system settings

Open Control Panel.


Click on System and Security.
Click on System.
Click on Advanced system settings.
Step 3: Connect the IDE to the Compiler
3b: Click on Environment Variables
Step 3: Connect the IDE to the Compiler
3c: Under System variables– select Path, and click Edit
Step 3: Connect the IDE to the Compiler
3d: Edit Path

Click the New button, and type (or copy-and-paste) the following folder paths, one at a
time (hit the New button for each):
C:\cygwin64\bin
C:\cygwin64\usr\sbin
C:\cygwin64\usr\local\bin
C:\cygwin64\lib
C:\cygwin64\usr\libexec

Note: C:\cygwin64 is the folder in which Cygwin was installed in step 2d.
Step 3: Connect the IDE to the Compiler
3d: Edit Path
All Done!

Close Control Panel.


Open up Eclipse.

You should now be able to:


(i) write Fortran code (input)
(ii) compile it, and
(iii) view the output.
A Few Ideas for Troubleshooting

Is Java Runtime Environment (JRE) Installed?


Command Prompt -- java –version

If not:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.ht
ml
A Few Ideas for Troubleshooting

Can Eclipse find your Fortran compiler?


A Few Ideas for Troubleshooting

Project -- Properties -- Fortran Build -- Settings -- Binary Parsers -- PE Windows


Parser (Check)
A Few Ideas for Troubleshooting

• Project -- Properties -- Fortran Build -- Tool Chain Editor


• Current toolchain: GCC Fortran
• Current builder: Gnu Make Builder
A Few Ideas for Troubleshooting

After building and running the project in Eclipse, check if there a .exe file in the
Workspace\Debug folder...
A Few Ideas for Troubleshooting

…and that
you can run it
via command
prompt
A Few Ideas for Troubleshooting

Try downloading Cygwin packages from a different server.

Potrebbero piacerti anche