User Tools

Site Tools


workshops:hpcprac1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
workshops:hpcprac1 [2017/07/03 15:05]
kevin
workshops:hpcprac1 [2021/12/09 16:42] (current)
Line 1: Line 1:
-=====Practical 1: Linux Shell=====+=====Practical 1: Linux Shell for Programmers=====
  
 **Aim:** to build and install in your //home// directory a library and and application. **Aim:** to build and install in your //home// directory a library and and application.
Line 25: Line 25:
 Move the tar file into the new directory: Move the tar file into the new directory:
   mv zlib-1.2.8.tar.gz src/   mv zlib-1.2.8.tar.gz src/
 +
 +> Note that the version available is probably newer than 1.2.8 --- modify these instructions accordingly.
  
 Untar the file Untar the file
Line 85: Line 87:
   gcc -o zpipe -I ~/local/include zpipe.c -L ~/local/lib -lz   gcc -o zpipe -I ~/local/include zpipe.c -L ~/local/lib -lz
  
-> The order of the command line options and arguments is important +> The **order** of the command line options and arguments is important 
->> The commands to link the library file must come after the commands to compile.+> The commands to //link// the library file must come **after** the commands to //compile//.
  
      
-If there are no errors and ''ls'' shows you a zpipe file (in green) you are done.+If there are no errors and ''ls'' shows you a ''zpipe'' file (in green) you are done.
  
 You can test the new ''zpipe'' program by compressing and then uncompessing a file. You can test the new ''zpipe'' program by compressing and then uncompessing a file.
Line 122: Line 124:
 And add (or edit the existing line) to have: And add (or edit the existing line) to have:
  
-  PATH=$PATH:$HOME/local/bin+  PATH=$HOME/local/bin:$PATH
   export PATH   export PATH
    
 +
 +====References====
 +
 +  * ''zpipe.c'' is from [[http://zlib.net/zlib_how.html|zlib Usage Example]]
 +  * [[http://zlib.net/|zlib home]]
  
  
/app/dokuwiki/data/attic/workshops/hpcprac1.1499087100.txt.gz · Last modified: 2021/12/09 16:42 (external edit)