This is due Friday April 1 (NOT A JOKE) the time of the first class session to demonstrate that you are now competent with a shell login to ACISS and doing command line operations. We found out last year midway through the course that skills we had assumed the students had they did not, so we are being proactive this year.

Homework should be submitted as a single PDF document that contains all necessary components.

The following things to do are in addition to the exercises on the tutorials page that you should be going through in detail. Specific tasks to do and submit are in red font below

Procedure:

  1. Get and account on ACISS (http://aciss-computing.uoregon.edu/) and go to New Accounts if you don't already have one.

  2. From your ACISS account send and email with the subject CRAIG IS GOD to bigmoo@gmail.com and rasmus@uoregon.edu

  3. ssh into aciss
  4. ls -atl > showme
  5. cat showme -- take a screen shot of that listing
  6. There are a number of editors of ACISS (see documentation in tutorial) -- produce a file called cats_suck.txt with 3 lines of text related to cats of any content you want to make up but one of the lines should contain the phrase "maximally suck" then: ls -l cats_suck.txt and take a screen shot of that listing; also fgrep maximally cats_suck.txt and take a screen shot of that output

  7. cp ~dkmatter/practice/data.txt .
  8. use the awk command to select out fields 2 and 5 and create a new file
  9. use the sort command to sort that new file based on column 5
  10. now let's keep the first 8 lines of that sorted file via head -n 8 sortfile > newfile
  11. Add a new line that says "this data sucks" by doing echo "this data sucks" >> newfile and cat newfile and take a screen shot of it

  12. Writing, compiling and executing a fortran program

    • in an editor insert the following lines to create a .f90 program
      real*4 x
      character*7 name
      name = 'fortme!'
      do i = 1,100
      x = float(i)
      arg = sqrt(x)
      if (i.eq.50) blardo = arg
      end do
      write(*,*) blardo
      write(20,102) i,blardo,name
      102 format(i3,2x,f4.2,2x,a7,2x,'this is amazing')
      stop
      end
      
    • compile and run that program and include the value of blardo in your writeup and cat fort.20 and take a screen shot of that


  13. Running a python program

    • load module phython
    • python (when you see the >>> prompt then your now in python)
    • now do this sequence (this program solves quadratic roots via ax**2 +bx +c =0); the # sign is a comment to explain the entry - don't type that stuff in

      >>> import cmath    # this imports the correct library
      >>> a = 27
      >>> b = 12
      >>> c = 7           # assigned numerical values to variables
      >>> d = b**2 -4*a*c 
      >>> print d         # shows the numerical value of d
      >>> solution1 = (-b-cmath.sqrt(d))/(2*a)
      >>> solution2 = (-b+cmath.sqrt(d))/(2*a)
      >>> print solution1,solution2
      >>> cntrl-D         # to exit python gracefully
      


    • Include the values of d, and the two solutions in your write up


  14. done and Upload your pdf assignment here