This commit is contained in:
Andrei Astafev 2019-05-27 08:45:29 +03:00
parent b1f569977e
commit ac17c51a6e
3 changed files with 331 additions and 12 deletions

View File

@ -0,0 +1,22 @@
---
title: "Intel Parallel Studio: установка в образ для чтения"
category: Linux/Программы
tags: Linux, Intel, компилятор, C++
summary:
...
Для установки и использования Intel Parallel Studio
в сжатом образе доступном только для чтения необходимо:
1. Скачать [дистрибутив](https://software.intel.com/en-us/parallel-studio-xe) и распаковать его.
2. Скачать файл [`silent.cfg`](files/parallel-studio/silent.cfg) и скопировать его в полученный каталог.
3. Если есть файл лицензии `parallel_studio.lic`, скопировать его в каталог `/opt/intel/licenses`.
4. От суперпользователя установить в каталог `/opt/intel` командой `sudo ./install.sh -s silent.cfg`.
5. Создать образ `mksquashfs /opt/intel/* /home/user/intel.sfs -comp xz -Xbcj x86 -all-root -b 512K`
6. Удалить содержимое каталога `/opt/intel`.
7. Подмонтировать образ: `mount -t squashfs /home/user/intel.sfs /opt/intel`
8. Добавить в файл `/home/user/.bashrc` строки:
```sh
source /opt/intel/bin/compilervars.sh intel64
source /opt/intel/vtune_amplifier/amplxe-vars.sh
```

View File

@ -2,31 +2,42 @@
title: "Git: основные команды" title: "Git: основные команды"
category: Программирование category: Программирование
tags: программирование, git tags: программирование, git
summary:
monofontoptions: monofontoptions:
- Scale=0.8 - Scale=0.8
... ...
Установка git:
## Ссылки
* [GitHowTo](https://githowto.com/ru/changes_not_files)
* [ProGit](https://git-scm.com/book/ru/v2)
* [Git Pocket Guide](https://github.com/maxliscia/git-pocket)
## Установка
В Debian/Ubuntu:
```sh ```sh
sudo apt-get install git sudo apt-get install git
``` ```
Инициализация репозитория в каталоге `dir`: Подробнее: https://help.github.com/articles/set-up-git/
```sh
git init dir
```
Клонирование репозитория `repo`, принадлежащего пользователю `user`, ## Термины
с сервера `gitlab.2` в каталог `dir`:
```sh | Термин | Определение |
git clone git@gitlab.2:user/repo.git dir |--------------------|-------------|
``` | Рабочий каталог | Набор файлов в текущем каталоге |
| Индекс | Область с файлами, подготовленными для фиксации |
| SHA-1 | Уникальный идентификатор, отражающий информацию об истории |
| Ветка | Именованная последовательность в истории изменений |
| Коммит \| Фиксация | Набор файлов, записанных в историю одновременно |
| `HEAD` | Имя ссылки на последнюю фиксацию в текущей ветке |
| Метка | Именованная ссылка на некоторую фиксацию в истории |
## Состояния
Файлы в рабочем каталоге могут отслеживаться системой контроля версий Файлы в рабочем каталоге могут отслеживаться системой контроля версий
(tracked) или нет (untracked). Отслеживаемые файлы, которые на диаграмме (tracked) или нет (untracked). Отслеживаемые файлы, которые на диаграмме
@ -50,6 +61,193 @@ staged -> untracked: git rm --cached
@enduml @enduml
``` ```
## $getting-started
| Command | Options | Description |
|------------|--------------|---------------------------------------------------------|
| `git config` | `--global user.name "Cooper Black"` | Set global user name |
| `git config` | `--global user.email "cooper@black.com"` | Set global user email |
| `git config` | `--list` | Display configuration |
| `git config` | `--global --list` | Display global configuration |
| `git init` | | Make current directory a git repository |
| `git remote` | `add origin <url>`| Set remote origin |
| `git ls-tree` | `-r <branch> --name-only` | List files being tracked |
Reference: https://git-scm.com/docs/git-config
## $clone
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git clone` | `<giturl>` | Clone remote repository into current directory |
| `git clone` | `--recursive <giturl>` | Clone remote repository with submodules |
Reference: https://git-scm.com/docs/git-clone
## $submodule
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git clone` | `--recursive <giturl>` | Clone remote repository with submodules |
| `git submodule` | `add <giturl>` | Add submodule |
| `git submodule` | `update --remote` | Update submodules |
| `git submodule` | `status --recursive` | List submodules |
**Remove submodule:**
```shell
$ git submodule deinit <path/to/submodule>
$ git rm <path/to/submodule>
```
Reference: https://git-scm.com/docs/git-submodule
## $commit
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git add` | `<filename>` | Add files to staging area |
| `git commit` | `-m "<title>" -m "<body>"` | Commit with message (includes "added" files only) |
| `git rm` | `<filenama>` | Remove files from the working tree and from the index |
| | `-f` | Force deletion of files from disk |
| `git rm` | `-r --cached <filename>` | Untrack file (without deleting) |
Reference: https://git-scm.com/docs/git-commit
**Untrack hidden files, or update list of tracked files, after adding `.gitignore`:**
```shell
# remove all
$ git rm -r --cached .
# add all again, now gitignore will take effect (try to add .gitignore from the start next time)
$ git add .
```
## $push branches (see tags for pushing tags)
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git push` | `<remotename> <branchname>` | Push branch to remote |
| `git push` | `<remotename> --all` | Push all branches to remote |
| `git push` | `--d <remotename> <branchname>` | `--delete` remote branch |
Reference: https://git-scm.com/docs/git-push
## $remote
- Remote connections are like bookmarks named after remote repos
- `git clone` automatically creates a remote connection usually called `origin`
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git remote` | `-v` | List remote repository endpoints |
| `git branch` | `-r` | List remote repository branches |
| `git remote` | `add <name> <url>` | Create namespaced connection to a remote repository |
| `git remote` | `rename <oldname> <newname>` | Rename connection |
| `git remote` | `rm <name>` | Remove connection |
Reference: https://git-scm.com/docs/git-remote
**Remove remote origin:**
```shell
# Remove `origin` settings from .git/config
git remote rm origin
# Remove `FETCH_HEAD` which still points to remote
git rm .git/FETCH_HEAD
```
## $fetch-pull
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git fetch` | `<remote>` | Fetch all branches from remote (without merge) |
| `git fetch` | `<remote> <branch>` | Fetch specific branch |
| `git merge` | `<remote>/<branch>` | Merge fetched remote |
| `git pull` | `<remote>` | Fetch and merge in one command |
Reference: https://git-scm.com/docs/git-fetch, https://git-scm.com/docs/git-pull
## $branch
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git branch` | | List branches |
| `git branch` | `<branchname>` | Create new branch |
| `git checkout` | `<sha-1>` | Switch to branch, or commit |
| `git branch` | `-m <branchname> <newname>` | Rename branch |
| `git merge` | `<branchname>` | Merge changes from `<branchname>` to current branch |
| `git branch` | `-d <branchname>` | `--delete` branch |
Reference: https://git-scm.com/docs/git-branch
## $status
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git status` | `-s` | Show the working tree status, with `--short` format |
| `git log` | `--oneline` | Show commit logs, with `--oneline` format |
| `git ls-files`| | Show information about files in the index and the working tree |
Reference: https://git-scm.com/docs/git-status
## $diff
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git diff` | | Compare **`working directory`** and **`index`** |
| | `-cached` | Compare **`index`** and **`latest commit`** |
| | `HEAD` | Compare **`latest commit`** and **`working directory`** |
| | `--stat` | Optional short format |
| | `<sha-1> <sha-1>` | 2 points in time to compare |
| | `<dir> | <file>` | Compare whole directory or limit to file |
Reference: https://git-scm.com/docs/git-diff
**Examples:**
```shell
## compare changes made to README.md between working tree (default) and latest commit (HEAD)
$ git diff --stat HEAD ./path/README.md
## compare changes made to README.md between 2 specific points in time (e.g. 2 commits)
$ git diff --stat a649900 24bdd58 ./path/README.md
```
## $tag
| Command | Options | Description |
|-------------|-------------|---------------------------------------------------------|
| `git tag` | | List tags |
| `git tag` | `<v1.0.0>` | Create tag, from latest commit, lightweight |
| `git tag` | `-a <v1.0.0> -m "<msg>"` | Create tag, with `--annotate`, from latest commit |
| `git tag` | `-a <v1.0.0> -m "<msg>" <SHA-1>` | Create tag, with `--annotate`, from specific commit |
| `git tag` | `-d <v1.1.0>` | `--delete` tag |
| `git show` | `<v1.0.0>` | Show tag data and message |
| `git checkout` | `<v1.0.0>` | Switch to specific point tag (not editable) |
| `git push` | `<remote> <tag>` | Push specific tag to `<remote>` (recommended) |
| `git push` | `<remote> --tags` | Push all tags to `<remote>` (only if necessary) |
Инициализация репозитория в каталоге `dir`:
```sh
git init dir
```
Клонирование репозитория `repo`, принадлежащего пользователю `user`,
с сервера `gitlab.2` в каталог `dir`:
```sh
git clone git@gitlab.2:user/repo.git dir
```
Просмотр состояния рабочего каталога и репозитория: Просмотр состояния рабочего каталога и репозитория:
```sh ```sh
@ -92,4 +290,3 @@ git commit -a
```sh ```sh
git push origin git push origin
``` ```

View File

@ -0,0 +1,100 @@
# Patterns used to check silent configuration file
#
# anythingpat - any string
# filepat - the file location pattern (/file/location/to/license.lic)
# lspat - the license server address pattern (0123@hostname)
# snpat - the serial number pattern (ABCD-01234567)
# comppat - the component abbreviation (intel-component-0123.4-567__arch), use installer command line option to get it
# Accept EULA, valid values are: {accept, decline}
ACCEPT_EULA=accept
# Optional error behavior, valid values are: {yes, no}
CONTINUE_WITH_OPTIONAL_ERROR=yes
# Install location, valid values are: {/opt/intel, filepat}
PSET_INSTALL_DIR=/opt/intel
# Continue with overwrite of existing installation directory, valid values are: {yes, no}
CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes
# List of components to install (use semicolon to separate the components), valid values are: {ALL, DEFAULTS, comppat}
COMPONENTS=ALL
# Installation mode, valid values are: {install, repair, uninstall}
PSET_MODE=install
# Serial number, valid values are: {snpat}
#ACTIVATION_SERIAL_NUMBER=snpat
# License file or license server, valid values are: {lspat, filepat}
ACTIVATION_LICENSE_FILE=/opt/intel/licenses/parallel_studio.lic
# Activation type, valid values are: {exist_lic, license_server, license_file, serial_number}
ACTIVATION_TYPE=license_file
# Sampling driver installation type, valid values are: {build, kit}
AMPLIFIER_SAMPLING_DRIVER_INSTALL_TYPE=build
# Driver access group, valid values are: {anythingpat, vtune}
AMPLIFIER_DRIVER_ACCESS_GROUP=vtune
# Driver access permissions, valid values are: {anythingpat, 666}
AMPLIFIER_DRIVER_PERMISSIONS=666
# Load driver(s) into the kernel during installation, valid values are: {yes, no}
AMPLIFIER_LOAD_DRIVER=no
# Path to C compiler, valid values are: {filepat, auto, none}
AMPLIFIER_C_COMPILER=none
# Path to kernel source directory, valid values are: {filepat, auto, none}
AMPLIFIER_KERNEL_SRC_DIR=none
# Path to make command, valid values are: {filepat, auto, none}
AMPLIFIER_MAKE_COMMAND=none
# Install boot script to automatically reload the driver(s) on system restart, valid values are: {yes, no}
AMPLIFIER_INSTALL_BOOT_SCRIPT=no
# Enable per-user collection mode for Sampling driver, valid values are: {yes, no}
AMPLIFIER_DRIVER_PER_USER_MODE=no
# Path to the cluster description file, valid values are: {filepat}
#CLUSTER_INSTALL_MACHINES_FILE=filepat
# Intel(R) Software Improvement Program
#
# To improve our software and customer experience, Intel would like to collect technical
# information about your software installation and runtime status (such as installation metrics,
# license/support types, software SKU/serial, counters, flags, and timestamps)
# and development environment (such as operating system, CPU architecture,
# last 4-digits of the MAC address and other Intel products installed). ("Information").
#
# Intel may collect this Information directly or optionally through the use of Google Analytics.
# If Google Analytics is used to collect the Information, Google will aggregate the
# Information with that of other users and present the aggregated results to Intel without any personal identifiers.
# Information collected by Google will be retained by Google under its own data collection policies
# (https://www.google.com/policies/privacy/partners/).
#
# The Information collected under this notice directly by Intel through its Intel® Software Improvement Program
# may be retained indefinitely but it will not be shared outside of Intel or its wholly-owned subsidiaries.
#
# The aggregated Information provided to Intel by Google through its Software Improvement Program
# may be retained by Intel indefinitely but it will not be shared outside of Intel or its wholly-owned subsidiaries
#
# You can revoke your consent at any time by removing the "~/intel/isip" file.
# To remove the file, please open a macOS or Linux terminal, go to the folder "~/intel" and delete the "isip" file.
# For more details, please refer to this article: (https://software.intel.com/en-us/articles/software-improvement-program)
#
# Yes - I consent to the collection of my Information
# No - I do NOT consent to the collection of my Information
#, valid values are: {yes, no}
INTEL_SW_IMPROVEMENT_PROGRAM_CONSENT=no
# Perform validation of digital signatures of RPM files, valid values are: {yes, no}
SIGNING_ENABLED=yes
# Select target architecture of your applications, valid values are: {IA32, INTEL64, ALL}
ARCH_SELECTED=ALL