Mac

From krc
(Difference between revisions)
Jump to: navigation, search
 
(21 intermediate revisions by one user not shown)
Line 2: Line 2:
  
 
The preferred compiler would be gfortran found here:
 
The preferred compiler would be gfortran found here:
 +
 
http://gcc.gnu.org/wiki/GFortranBinaries#MacOS
 
http://gcc.gnu.org/wiki/GFortranBinaries#MacOS
 +
 
OR
 
OR
 +
 
http://hpc.sourceforge.net
 
http://hpc.sourceforge.net
  
 
But it may or may not be required to have additional library files associated with g77.
 
But it may or may not be required to have additional library files associated with g77.
Ignore installing g77 on your first attempt to compile krc on a mac, but compile g77 if  
+
 
errors associated with missing library files show up during the compilation.
+
Ignore installing g77 on your first attempt to compile krc on a mac, but compile g77 if errors associated with missing library files show up during the compilation.
  
 
http://www.webmo.net/support/fortran_osx.html
 
http://www.webmo.net/support/fortran_osx.html
Line 17: Line 20:
 
Type:
 
Type:
  
gunzip g77-intel-bin.tar.gz
+
$gunzip g77-intel-bin.tar.gz
 
+
sudo tar -xvf g77-intel-bin.tar -C /
+
$sudo tar -xvf g77-intel-bin.tar -C /
 
+
GOOD NEWS: No modifications of Makefile are required for version 2.3.2
+
(was not the case with older versions)
+
 
+
* Step 2: Put the zipped krc file where you want it to be run from
+
 
+
* Step 3: Unzip krc
+
 
+
* Step 4:
+
IF YOU ARE NOT USING KRC WITH DAVINCI, IGNORE THIS STEP, GO TO Step 5
+
 
+
IF YOU ARE USING KRC WITH THE DAVINCI INTERFACE:
+
 
+
Some default krc variables must be modified.
+
open /krc/src/krccom.inc
+
OR/AND        krcc8m.f
+
 
+
Find the lines where MAXN1,MAXN2,MAXN3,MAXN4,MAXN5,MAXNH,KOMMON are defined
+
and replace with:
+
 
+
PARAMETER (MAXN1 =1000)   ! dimension of layers
+
 
+
PARAMETER (MAXN2 =86400)  ! dimension of times of day: 384=24*16
+
 
+
PARAMETER (MAXN3 =16)   ! dimension of iteration days
+
 
+
PARAMETER (MAXN4 =37)   ! dimension of latitudes
+
 
+
PARAMETER (MAXN5 =2161)   ! dimension of saved seasons    #Uncomment it if necessary
+
 
+
PARAMETER (MAXNH =9600)   ! dimension of saved times of day
+
 
+
PARAMETER (KOMMON=512000000) ! 4-byte words
+
 
+
Save and quit
+
 
+
* Step 5: Now go to /krc/src/cfiles and type:
+
make
+
 
+
Usually there are some minor-looking warnings; ignore them for now
+
 
+
* Step 6: Now go to /krc/src/ and type:
+
make
+
 
+
Sometimes, there are some minor-looking warnings; ignore them for now
+
 
+
* Step 7: Go back to /krc/src/cfiles and type:
+
make
+
 
+
There should be no warnings this time
+
 
+
* Step 8: Go back to /krc/src/ and type:
+
make
+
  
There should be no warnings this time.
+
* Step 2: Download KRC [http://krc.mars.asu.edu/index.php?title=Download_KRC here]
Screen should indicate " 'krc' is up to date "
+
  
* Step 9: in Makefile, a few modifications may be necessary:
+
* Step 3: Copy the zip file on your ~/Desktop/
REPLACE:
+
HHKLIB=/mars/u/krios/krc/builds/3.2.1/  # top of libraries to use
+
WITH:
+
HHKLIB=~/Applications/krc03_02_01b/krc_3.2.1.r12877/    #SP 03/25/2015
+
  
REPLACE:
+
* Step 4: Download [[File:Compile_KRC_3.4.3.sh.zip|Compile_KRC_3.4.3.sh.zip]]
b2b.o: /mars/u/krios/krc/builds/3.2.1/src/b2b.f
+
WITH:
+
b2b.o: ~/Applications/krc03_02_01/krc_3.2.1.r12877/src/b2b.f      #SP 03/25/2015
+
  
REPLACE:
+
* Step 5: Run the compilation script from anywhere
catime.o: /mars/u/krios/krc/builds/3.2.1/src/catime.f
+
$./Compile_KRC_3.4.3.sh
WITH:
+
catime.o: ~/Applications/krc03_02_01/krc_3.2.1.r12877/src/catime.f
+
  
REPLACE:
+
Your screen should print " 'krc' is up to date "
white1.o: /mars/u/krios/krc/builds/3.2.1/src/white1.f
+
WITH:
+
white1.o: ~/Applications/krc03_02_01/krc_3.2.1.r12877/src/white1.f
+

Latest revision as of 14:25, 16 November 2016

  • Step 1: Install a FORTRAN compiler.

The preferred compiler would be gfortran found here:

http://gcc.gnu.org/wiki/GFortranBinaries#MacOS

OR

http://hpc.sourceforge.net

But it may or may not be required to have additional library files associated with g77.

Ignore installing g77 on your first attempt to compile krc on a mac, but compile g77 if errors associated with missing library files show up during the compilation.

http://www.webmo.net/support/fortran_osx.html

download the g77 compiler called g77-intel-bin.tar.gz (Intel Mac only) Then open a terminal window, go to the place where g77-intel-bin.tar.gz is located.

Type:

$gunzip g77-intel-bin.tar.gz

$sudo tar -xvf g77-intel-bin.tar -C /
  • Step 2: Download KRC here
  • Step 3: Copy the zip file on your ~/Desktop/
  • Step 5: Run the compilation script from anywhere
$./Compile_KRC_3.4.3.sh

Your screen should print " 'krc' is up to date "

Personal tools