Linux

From krc
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
Download KRC from the [[http//krc.mars.asu.edu/svn/listing.php?repname=KRC]]:SUBVERSION REPOSITORIES
+
Download KRC from the [SUBVERSION REPOSITORIES]:http://krc.mars.asu.edu/svn/listing.php?repname=KRC
  
  

Revision as of 17:12, 28 October 2016

Download KRC from the [SUBVERSION REPOSITORIES]:http://krc.mars.asu.edu/svn/listing.php?repname=KRC


The following instructions assume that you are in the C shell (NOT Bash). If you are in the Bash shell, you can generally change to C shell by typing /bin/csh on the command line. Also make sure you have access to a valid IDL installation. The output files generated by a KRC normal mode run can be read using IDL.

Step 1:

  • Create a clean directory (e.g. “343” for KRC Version 3.4.3)
  • Make 2 subdirectories in the clean directory (“build” and “uniq”)
  • Copy the new distribution file into the “build” directory
  • cd to the “build” directory
  • Untar the distribution (tar –xvf or tar –xzf should do this). This should create 5 directories; aaa, doc, idl, run and src (3.2.1 onwards the distribution hasn’t had the big directory. But if your distribution does, then big will be created as well.)


Step 2:


  • cp aaa/step61 into the “uniq” directory
  • Edit step61 file so that the FAM and LOC variables are set to point to the correct directories and the c-shell matches with the c-shell on your machine
  • FAM = full path of the “build” directory
  • LOC = full path of the “uniq” directory
which csh should show you the path of the c-shell on your machine. Change the first line of the shell to match this. (e.g. #! /usr/bin/csh is the usual default. If your machine’s c-shell is /bin/csh, change #! /usr/bin/csh to #!/bin/csh)
  • Save and close the file
  • Execute step61 (./step61 will do this). [If the file is not executable, you may need to chmod it to add executable permissions]
  • When the file runs, it will copy other files that need to be edited into the “uniq” directory. These files need to be updated for your environment.


Step 3:

Assuming you are now in the “uniq” directory

idlPath – sets up the path so that IDL can find the functions it needs

IDLL needs to point to the installation of IDL in your environment (for Moeur building, this is ‘+/mars/common/rsi/idl71/lib/)

IDLD needs to include 5 different directories

‘+/full_path_to_the_build_directory/idl:/full_path_to_the_build_directory/idl/subs:/full_path_to_the_build_directory/idl/krc:/idl_installation/lib/obsolete:/idl_installation/lib/imsl:.’ (Note the . [current directory] in the end)

IDL_PATH should be set to include both IDLD and IDLL. You should not have to change this line.

kirin.pro – There is one case statement in the file that starts with “else:begin” and has a comment “assumes ASU test environment”. You don’t have to be in the ASU environment to use this case. This is the only case in the file that needs to be edited. Make sure all the directories in this section end with ‘/’

idltop = /full_path_to_the_build_directory/idl/

solib = idltop+‘extern/ftnwrap64.so’ [extern is the external directory in idl directory]

krcdist = ‘/full_path_to_the_build_directory/’

prjdat = krcdist+‘big/’

prjsrc = krcdist+‘run/’

step6 – This file should be edited exactly the way step61 was edited.

Check the remaining files in “uniq” to see if they need any path changes as well. Generally, this should not be required.


Step 4:

Now that the “uniq” files have been edited, they should be copied back to the distribution. At this point, the “uniq” files should be set up for future distributions. When you get a new distribution, take care not to overwrite the files in “uniq”. Do not run step61 again unless you want to lose the changes made to the “uniq” files.

Run step6 (./step6) – this will copy the files back into the distribution


Step 5:

cd to the “build” directory

cd src/cfiles/

make all

cd ../src

Open the “Makefile” in the “src” directory and change

HHKLIB to point to the “build” directory

CLIB to point to ./cfiles/libhk_cisis.a

make krc

make porbmn

cd ../idl/extern/

If there are any .so files in this directory, delete them

make ftnwrap64.so

Exit IDL if it is running

The building process is now complete.

Create a couple of soft links

ln –s ../src/krc

ln –s ../src/porbmn

Caution: Sometimes krc will have a slightly different name. Look in the “Makefile” in the “src” directory to check the appropriate name before creating the soft links. If the names don’t match, it’ll result in errors.


Step – 6:

Assuming you are in the “run” directory,

./krc

Check the input file name for the verification run. This should be in the “run” directory. Type in an appropriate name for the output file. This output file will be created in the “run” directory with ‘.prt’ extension


Step – 7:

Setup IDL

In order to read the .t52 file that is generated as the output of the test run, IDL has to be setup. We edited the idlPath file and copied it back to the distribution in step 5. Now, we need to source it.

cd ../idl

source idlPath

This should not generate any output.

Start IDL. Make sure the same version of IDL whose path is in the idlPath file is started. (In the Moeur building this is /mars/common/rsi/idl71/bin/idl)

.comp kirin – compile kirin.pro

kirin – executes kirin.pro

This should have set up the environment variables we see in kirin.pro and printed a summary on to the screen

.rnew krcvtest – runs krcvtest

(If krcvtest gives an output and takes you to the krcvtest command prompt, you can type 0 to get back to IDL command prompt)

The setup is now complete. You should look for krcvtest documentation to further validate the output of KRC from the previous version to the version you just build.

Personal tools