User Tools

Site Tools


opus:spring2015:vgarfiel:journal

HPC Fundamentals and C/C++ Journal

January 2015

Week 1

HPC Fundamentals

This week, we opened up the computer and took a crash course in hardware. We installed more memory, replaced video cards, and added a new harddrive. Upon making sure all components were available we booted the system to make sure it worked.
Originally when starting the computer, it had the Windows OS as the initial bootup settings. To bypass, when Dell pops up you have to strike the F2 key to enter the BIOS. However, any attempt to make changes to the BIOS proves to be futile because the root password was unavailable.
To bypass the password, the jumper (a small blue clip-looking piece) needed to be removed from the motherboard. Once removed, starting up the computer proves to show the password was cleared.
From there, striking F2 again to take you back to the BIOS, you can change the startup settings where we chose to boot from network.

C++

First day of “Lab”, the class went over basics of using the Linux system including basic commands such as

  • ls
  • mkdir
  • cd

Other instruction included opening a text editing program (I use vim) using the .c extension (the tradition extention for c files).

The C program preprocessor will always be:

#include <stdio.h>

Hello, World!

#include <stdio.h>
int main()
{
    fprintf(stdout, "Hello, world!\n");
    return(0);
    } 


  • fprintf is usable because of the inclusion of stdio.h
  • fprintf - file print formatted text
  • This line could also be written as: printf(“Hello, world!\n”);

Playing with broken code:

 lab46:~/cprog$ gcc -o broken1 broken1.c
broken1.c: In function 'main':
broken1.c:4:18: error: 'Hello' undeclared (first use in this function)
  fprintf(stdout, Hello, world!\n"); 
                  ^
broken1.c:4:18: note: each undeclared identifier is reported only once for each function it appears in
broken1.c:4:25: error: 'world' undeclared (first use in this function)
  fprintf(stdout, Hello, world!\n"); 
                         ^
broken1.c:4:30: error: expected ')' before '!' token
  fprintf(stdout, Hello, world!\n"); 
                              ^
broken1.c:4:30: error: stray '\' in program
broken1.c:4:33: warning: missing terminating " character
  fprintf(stdout, Hello, world!\n"); 
                                 ^
broken1.c:4:30: error: missing terminating " character
  fprintf(stdout, Hello, world!\n"); 
                              ^
broken1.c:6:1: error: expected ';' before '}' token
 }

Week 2

HPC Fundamentals
Linux From Scratch Project
  • What is System D?
    • [System D] is a suite of system management daemons, libraries, and utilities designed as a central management and configuration platform for the Linux computer operating system.
    • More info on System D
C++

Exponential Program Creation.

  • Create a program that can square two digit numbers ending in 5

February 2015

Week 3

HPC Fundamentals-Tuesday
  • I've noticed that whenever anyone “helps” they end up just doing whatever needs to be done without much explanation as to what they're doing.
  • I don't what or where the partitions were mounted, nor do I know how to check where or what was mounted.
  • I'm reading through the LFS manual, and was able to download the packages, so I only assume that nothing has gone wrong so far.
HPC Fundamentals-Thursday
  • Today I am extracting files
  • Ran into some slight confusion with directions in LFS, but they have been sorted out
  • I have the directions for the package management in my notebook

Week 4

HPC Fundamentals-Tuesday
  • I'm convinced that I messed something up while “stripping” files.
  • I've moved on to Chapter 6 anyway to see if I can still progress.
  • I changed ownership of the $LFS/tools directory to that of root

Week 5(After Break)

HPC Fundamentals-Tuesday
  • If Glibc needs to be upgraded to a newer version, (e.g. from glibc-2.19 to glibc-2.20, it is safer to rebuild LFS. Though you may be able to rebuild all the packages in their dependency order, we do not recommend it.
  • If a package containing a shared library is updated, and if the name of the library changes, then all the packages dynamically linked to the library need to be recompiled to link against the newer library.
  • Realized I was building unmounted… Matt helped get it all back under control — am now back on Chapter 5, and am continuing from there.

March 2015

Week 6

HPC Fundamentals

Remount by creating your LFS variable under root and mount:

root@legendoftori:~# export LFS=/mnt/lfs
root@legendoftori:~# echo $LFS
/mnt/lfs
root@legendoftori:~# mount -v -t ext4 /dev/sda3 $LFS

If shut down for any reason, be sure to remount, and enter chroot environment. See instruction on 6.2.2. Mounting and Populating /dev && 6.2.3. Mounting Virtual Kernel File Systems

  • Also be sure to enter the chroot environment by entering the following:

    chroot "$LFS" /tools/bin/env -i \
        HOME=/root                  \
        TERM="$TERM"                \
        PS1='\u:\w\$ '              \
        PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
        /tools/bin/bash --login +h

Week 7

HPC Fundamentals
  • Continuing with LFS. Switched servers this week
  • New server name: projects.lan

Week 8

HPC Fundamentals

Week 9

HPC Fundamentals

I missed class Tuesday this week, but am in here Wednesday.. As I was trying to get intltool prepared for “make”, there was a configure error for XML::Parser. I am going back to XML::Parser and going back through to steps. UPDATE:: didn't fix the issue. To Google I go. I am going to try to recompile perl now. UPDATE:: Going through Perl didn't fix the issue either.

April 2015

Week 10

C Programming

Playing catch up, note to go over each of these topics:

  • Standard I/O (STDIO, STDOUT, STDERR)
  • Header Files (Local and System), C Standard Library (Libc), Libraries
  • Arithmetic (equations, operators)
  • Logic and operators (and, or, not, xor)
  • Variables (types, ranges, sizes)
  • Scope (Block, Local, Global, File)
  • Pointers (address of, assignment, dereferencing)
  • Type Casting
  • Selection Structures (if, case/switch)
  • Repetition/Iteration Structures (for, while, do while)
  • Arrays (standard notation, pointer arithmetic, single-dimensional, multi-dimensional)
  • File Access (Read, Write, Append)
  • Structures (Declaration, Accessing Elements, Pointers to)
  • typedef, enum, union
  • Functions, Parameters (Pass by: Value, Address, Reference), Return Types, Recursion, Command-line arguments
  • Compiler, Preprocessor, Flags, Assembler, Linker, Multi-file programs (how to structure, how to compile)

Week 11

  • NFS
HPC Fundamentals
  • Mount:
 root@ws5:/#mount ws0:/home /mnt
  • Unmount:
 root@ws5:/#umount /mnt
opus/spring2015/vgarfiel/journal.txt · Last modified: 2015/04/16 11:54 by vgarfiel