Skip to content
Snippets Groups Projects
Commit 78de83b6 authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

documentation update and fixes

parent 9310a2d7
Branches
Tags
No related merge requests found
Showing
with 10001 additions and 76 deletions
# Data Descriptions
Purpose: list available data at the department of Meteorology and Geophysics.
Purpose: list available data at the Department of Meteorology and Geophysics.
Edit this file here or on [gitlab](https://gitlab.phaidra.org/imgw/computer-resources/-/blob/master/Data/README.md)
......
FROM python:3.10-buster
ADD requirements.txt /requirements.txt
RUN apt-get update -y \
&& apt-get install -y -qq graphviz sshpass openssh-client rsync \
&& pip install -r requirements.txt
# Compiling & Building
under development :)
There are a number of tools to build an application. Very often `make` or `cmake` is used to build applications with different complexity.
## Makefile
![](../mkdocs/img/cmake-explanation.png)
To use Make, you have to manually create the Makefile, but with CMake, the Makefile is automatically created.
### Environmental Modules & Makefile
## Environmental Modules & Makefile
It is quite handy to use environmental modules and load different version of libraries, but how to make use of these ever changing **PATHs**. Take a look at the following examples to help with making your `Makefile` ready for modules.
```
# use the environmental variable $INCLUDE
```makefile
# use the environmental variable $INCLUDE or $CPATH
# split the paths separated by :
INC = $(subst :, ,$(INCLUDE))
INC = $(subst :, ,$(CPATH))
# add a -I/path/to/include
INC := $(INC:%=-I%)
# use the environmental variable $LIBRARY_PATH
......@@ -20,4 +22,86 @@ LIBS = $(subst :, ,$(LIBRARY_PATH))
LIBS := $(LIBS:%=-L%)
```
With this code snippet in your Makefile you should be able to use environmental variables such as `$INCLUDE` or `$LIBRARY_PATH` efficiently. These paths adapt to your loaded modules.
With this code snippet in your Makefile you should be able to use environmental variables such as `$INCLUDE`/`$CPATH` or `$LIBRARY_PATH` efficiently. These paths adapt to your loaded modules.
When using `cmake` these paths are found automatically.
important is when writing a makefile is to use tabs
```makefile
target: dependencies
<tab> command
```
here is an example of a makefile:
```makefile title="Makefile"
triangle: circle.o age.o
gfortran circle.o triangle.o -o triangle
triangle.o: triangle.f90
gfortran -c triangle.f90
circle.o: circle.f90
gfortran -c circle.f90
clean:
rm *.o triangle
```
```sh title="running the Makefile
$ make
gfortran -c circle.f90
gfortran -c triangle.f90
gfortran circle.o triangle.o -o triangle
$ ./triangle
Enter the radius of the circle: 34
Area of circle with radius 34.00 is 3631.68
```
or writing a cmake `CMakeLists.txt` file
```cmake title="CMakeLists.txt"
cmake_minimum_required(VERSION 3.10.0)
enable_language(Fortran)
project (triangle)
add_executable(triangle triangle.f90 circle.f90)
```
building the application is a bit different
```sh title='running cmake'
$ mkdir build
$ cd build
$ cmake ...
-- The Fortran compiler identification is GNU 13.2.1
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/f95 - skipped
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: ./Fortran/build
$ make
[ 33%] Building Fortran object CMakeFiles/triangle.dir/circle.f90.o
[ 66%] Building Fortran object CMakeFiles/triangle.dir/triangle.f90.o
[100%] Linking Fortran executable triangle
[100%] Built target triangle
$ ./triangle
Enter the radius of the circle: 34
Area of circle with radius 34.00 is 3631.68
```
\ No newline at end of file
......@@ -26,6 +26,15 @@ There are a few compilers, but most commonly GNU (Gfortran) and INTEL (ifort) ar
| highest recommended optimisation | `-O3`| `-O2` maybe `-O3` or `-fast`|
Please take a look into the compiler options guidelines from AMD or Intel, which might be very helpful for finding the right compiler flags for certain CPUs
- Servers such as Aurora [AMD EPYC ZEN3](compiler-options-quick-ref-guide-epyc-7xx3-series-processors.pdf)
- Servers such as VSC5, LUMI, ... [AMD EPYC ZEN4](compiler-options-quick-ref-guide-amd-epyc-9xx4-series-processors.pdf)
- Servers such as SRVX1, JET, VSC4 [Intel](quick-reference-guide-intel-compilers-v19-1-final.pdf)
more information on how to find good options can be found on the PRACE (Partnership for advanced computing in Europe) [website](https://prace-ri.eu/training-support/best-practice-guides/)
![](https://prace-ri.eu/wp-content/uploads/logo-main.png)
## Intel Compiler
from P. Seibert using ifort for the fastest code (srvx1):
......@@ -51,24 +60,15 @@ gfortran man page says:
Specify the length of record markers for unformatted files. Valid values for length are 4 and 8. Default is 4. This is different from previous versions of gfortran, which specified a default record marker length of 8 on most systems. If you want to read or write files compatible with earlier versions of gfortran, use -frecord-marker=8.
```
# Trainings
online training courses ?
# Code Testing
pFUnit - python Parallel Fortran Unit Testing Framework [GitHub](https://github.com/Goddard-Fortran-Ecosystem/pFUnit)
# Documentation
## Automatic Documentation Generation
FORD: [Overview in Fortran Wiki](http://fortranwiki.org/fortran/show/FORD) | [Code on Github](https://github.com/cmacmackin/ford)
## Documentation
# Documentation and other resources
- Fortran wikibook [DE](https://de.wikibooks.org/wiki/Fortran) [EN](https://en.wikibooks.org/wiki/Fortran)
### Books
Fortran wikibook [DE](https://de.wikibooks.org/wiki/Fortran) [EN](https://en.wikibooks.org/wiki/Fortran)
## Automatic Documentation Generation
FORD: [Overview in Fortran Wiki](http://fortranwiki.org/fortran/show/FORD) | [Code on Github](https://github.com/cmacmackin/ford)
#!/bin/bash
# By MB
# Check a compiled program and its dependencies on micro architecture extensions
# this can be useful to understand if a certain program will be terminated because it does
# not support the correct architecture. and its libraries too.
install() {
echo "Downloading elfx86exts tool ..."
curl -s -L https://github.com/pkgw/elfx86exts/releases/download/elfx86exts%400.6.2/elfx86exts-0.6.2-x86_64-unknown-linux-gnu.tar.gz | tar xvz -C /tmp
}
dependencies(){
combined=""
while IFS="\n" read ilib
do
# is there a path?
nobjects=$(echo "$ilib" | wc -w)
if [ $nobjects -eq 4 ]; then
# libeccodes.so => /usr/local/lib64/libeccodes.so (0x00007f12b462b000)
ilibpath=$(echo "$ilib" | cut -d' ' -f3)
ilibname=$(echo "$ilib" | cut -d' ' -f1)
if [ -e "$ilibpath" ]; then
echo "-- dependency: $ilibname"
ilibextensions=$($CMD "$ilibpath" 2>&1 | grep "Instruction set extensions used:" | sed "s/Instruction set extensions used:/${LIBNAME}/")
echo "$ilibextensions"
combined="$combined $ilibextensions"
fi
fi
echo "------------------------------------------------------------"
done < <(ldd "$1")
echo "All combined extensions found:"
ALL_COMBINED=$(echo "$combined" | tr -d , | tr ' ' '\n'| sort -u | tr '\n' ' ')
echo "$ALL_COMBINED"
echo
}
CMD=/tmp/elfx86exts
#
# check local executable
#
if [ ! -e "$CMD" ]; then
install
fi
echo "using: $CMD"
if [ $# -ne 1 ]; then
cat <<EOF
CPU micro architecture tool
Usage: $0 [EXECUTABLE/LIBRARY]
Please supply an executable or library to be analysed.
EOF
exit 1
fi
if [ ! -e "$1" ]; then
echo "Error: $1"
exit 1
fi
file_type=$(file "$1")
if echo "$file_type"| grep -q executable; then
echo "Analysing executable: $1"
echo "$file_type"
echo -------------------------------------------------------------
echo Analysing: "$1"
$CMD "$1"
echo -------------------------------------------------------------
echo Analysing: dependencies
dependencies "$1"
echo -------------------------------------------------------------
else
echo "Analysing library: $1"
echo "$file_type"
echo -------------------------------------------------------------
echo Analysing: "$1"
$CMD "$1"
echo -------------------------------------------------------------
fi
if command -v lscpu; then
echo "Your current CPU:"
lscpu | grep -E 'Model name|Socket|Thread|NUMA|CPU\(s\)'
lscpu | grep -E 'Flags' | grep --color -iE "$(echo $ALL_COMBINED | tr ' ' '|')"
echo -------------------------------------------------------------
fi
MODULE Circle
!---------------------------------------------------------------------
!
! Module containing definitions of variables needed to
! compute the area of a circle of radius r
!
!---------------------------------------------------------------------
REAL, PARAMETER :: Pi = 3.1415927
REAL :: radius
END MODULE Circle
File added
This diff is collapsed.
File added
PROGRAM Area
!---------------------------------------------------------------------
!
! This program computes the area of a circle given the input radius
!
! Uses: MODULE Circle
! FUNCTION Area_Circle (r)
!
!---------------------------------------------------------------------
USE Circle, ONLY : radius
IMPLICIT NONE
INTERFACE
FUNCTION Area_Circle (r)
REAL, INTENT(IN) :: r
END FUNCTION Area_Circle
END INTERFACE
! Prompt user for radius of circle
write(*, '(A)', ADVANCE = "NO") "Enter the radius of the circle: "
read(*,*) radius
! Write out area of circle using function call
write(*,100) "Area of circle with radius", radius, " is", &
Area_Circle(radius)
100 format (A, 2x, F6.2, A, 2x, F11.2)
END PROGRAM Area
!-----Area_Circle----------------------------------------------------
!
! Function to compute the area of a circle of given radius
!
!---------------------------------------------------------------------
FUNCTION Area_Circle(r)
USE Circle, ONLY : Pi
IMPLICIT NONE
REAL :: Area_Circle
REAL, INTENT(IN) :: r
Area_Circle = Pi * r * r
END FUNCTION Area_Circle
......@@ -19,6 +19,7 @@ Tasks to complete for newcomers, it is recommended that you print this page an t
- Login in to all servers:
* [ ] srvx1 .img.univie.ac.at
* [ ] srvx8
* [ ] aurora
* [ ] jet01/jet02
* [ ] (optional) connect to vsc5.vsc.ac.at
......@@ -46,4 +47,4 @@ The Department of Meteorology and Geophysics has access to the following computi
- Vienna Scientific Cluster ([VSC](VSC.md))
- European Center for Medium-Range Weather Forecast ([ECMWF](ECMWF.md))
Please read about access, hardware and quotas at these different resources. A good starting point is [here](./Servers/)
\ No newline at end of file
Please read about access, hardware and quotas at these different resources. A good starting point is [here](./Servers/README.md)
\ No newline at end of file
......@@ -5,7 +5,7 @@
What you need to get started:
1. A latex distribution, e.g. texlive or Miktex
* Or a online latex service, e.g. [Overleaf](www.overleaf.de), [latex4technics](https://www.latex4technics.com)
* Or a online latex service, e.g. [Overleaf](https://www.overleaf.de), [latex4technics](https://www.latex4technics.com)
2. An Editor, e.g. TexStudio or Texshop, ...
3. Examples:
* Open [Seminararbeit.tex ](Seminararbeit.tex) or as [PDF](Seminararbeit.pdf) or online [on Overleaf](https://de.overleaf.com/read/whhnjmbwsvpy)
......
......@@ -131,6 +131,6 @@ Ever needed to backup a conda environment or copy from a colleague or designing
You just need to add a configuration option and then you can open the Dashboard in any Jupyterhub. Works on SRVX1 and JET.
## Q: How to profile memory and exeution time of functions?
[Profile](/QA-009-Memory-Profiling.ipynb)
[Profile](QA-009-Memory-Profiling.ipynb)
If you need to get a better understanding of you functions memory and execution time, try these profiling options.
\ No newline at end of file
......@@ -5,18 +5,26 @@
Find help here with your computer related problems. A mkdocs rendered version is available here: [wolke](https://wolke.img.univie.ac.at/documentation/general/index.html)
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
Please note that this documentation is under active development and things might shift a bit.
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
Search with the top bar or go through the directories:
- [Python related Problems](./Python/)
- [SSH, VNC, VPN related Problems](./SSH-VPN-VNC/)
- [Editors](./Editors/) and [remote connection](./SSH-VPN-VNC/)
- [Data availability and location](./Data/)
- [Python related Problems](./Python/README.md)
- [SSH, VNC, VPN related Problems](./SSH-VPN-VNC/README.md)
- [Editors](./Editors/) and [remote connection](./SSH-VPN-VNC/README.md)
- [Data availability and location](./Data/README.md)
- [Git related problems](https://gitlab.phaidra.org/imgw/computer-resources/-/issues)
for new employees or students, you could start with the [Getting Started](./Getting%20Started.md) section
for new employees or students, you could start with the [Getting Started](./Getting%20Started.md) section or the [Student](./Students.md) section.
A useful summary of all resources is given by the [IMGW Cheat sheet](./mkdocs/imgw-cheatsheet.pdf)
If you care to participate please do so.
**If you care to participate please do so:**
- Raise an [Issue on Gitlab](https://gitlab.phaidra.org/imgw/computer-resources/-/issues) :earth_africa:
- Raise an [Issue on Gitlab](https://gitlab.phaidra.org/imgw/computer-resources/-/issues/?sort=created_date&state=all&first_page_size=20) :earth_africa:
- Give some feedback ([mail](mailto:it.img-wien@univie.ac.at), [mattermost](https://discuss.phaidra.org/imgw/channels/bugs)) :snowman:
- Write to [individual members of the department](https://img.univie.ac.at/en/about-us/staff/). :frog:
......@@ -6,7 +6,7 @@ Please find here some details on how to connect using SSH or VPN or VNC. And som
Please use these methods to access the servers:
1. Connect using [SSH](SSH.md) or [MOSH](https://mosh.org/#) (Mobile Secure Shell)
2. Connect using [TeachingHub](../TeachingHub.md) or [ResearchHub](../Jet-Cluster.md#jupyterhub)
2. Connect using [TeachingHub](../TeachingHub.md) or [ResearchHub](../Servers/JET.md#jupyterhub)
3. Connect using [VNC](VNC.md)
4. Access from outside the UNI, [VPN](VPN.md)
......
#!/bin/bash
# By Michael Blaschek
# Date 23.03.2021
# Date 31.07.2023
# CC BY 4.0 International
# University of Vienna, Austria
# Department of Meteorology and Geophysics
# img.univie.ac.at
# Description:
# Connect to VPN from the University of Vienna
# Watch connection
# You need to download the F5 VPN Client from the ZID website (zid.univie.ac.at/vpn)
# The executable works only for VPN@UNIVIE. Follow the instructions on the ZID website
# on how to install the package depending on your Linux distro.
# Maybe this download link works directly:
# https://vpn.univie.ac.at/public/share/BIGIPLinuxClient.tgz
#
# Steps:
# 1. run connect2vpn script
# 1.1. Checks if it can find f5fpc exe
# 1.2. Asks for credentials
# 1.3. Asks for TOTP Code
# 1.4. Watch connection
vpninfos() {
infos=$(f5fpc --info)
......@@ -38,6 +51,9 @@ else
echo "[VPN] $(f5fpc -v | head -n1)"
fi
echo
echo "[VPN] Notice: This script will continue to run in foreground!"
echo
read -p "[VPN] Full (1) or split (None) tunnel? (1/None): " REPLY
if [ "$REPLY" == "" ]; then
echo "[VPN] Connecting split-tunnel ..."
......@@ -60,7 +76,8 @@ do
fi
echo "[VPN] Starting connection ..."
if [ -z "$VPN_PWD" ]; then
read -p "[VPN] u:account password:" VPN_PWD
read -sp "[VPN] u:account password:" VPN_PWD
echo
fi
read -p "[VPN] TOTP Code (6 digits/empty):" VPN_TOTP
if [ -n "$VPN_TOTP" ]; then
......
......@@ -142,7 +142,7 @@ enstools/v2020.11 enstools/v2021.11 teleport/10.1.4
--------- /opt/spack-jet01/share/spack/lmod/linux-rhel8-skylake_avx512 ---------
anaconda3/2020.11-gcc-8.3.1-bqubbbt
```
on how to use environment modules go to [Using Environment Modules](Misc/Environment-Modules.md)
on how to use environment modules go to [Using Environment Modules](../Misc/Environment-Modules.md)
## Jupyterhub
......
......@@ -16,7 +16,7 @@ Locations:
- Staff + Remote Desktop [SRVX8](SRVX8.md)
- Staff + Remote Desktop + Jupyterhub [Jet Cluster](JET.md)
- Staff + Students, Jupyterhub called [TeachingHub](../TeachingHub.md)
- Staff [Vienna Scientific Cluster (VSC)](VSC.md)
- Staff [Vienna Scientific Cluster (VSC)](../VSC.md)
- [VSC Training](https://vsc.ac.at/training)
- [VSC Trainings @ IMGW](https://gitlab.phaidra.org/imgw/trainings-course)
......@@ -25,42 +25,12 @@ Locations:
## How to connect from Home or Abroad?
```graphviz dot attack_plan.png
digraph Servers {
users [shape=none image="./mkdocs/img/student_sm.png" label="User" labelloc="b" height="1" imagepos="tc"]
srvx1 [shape=none image="./mkdocs/img/server_sm.png" label="SRVX1" labelloc="b" height="1" imagepos="tc"]
srvx8 [shape=none image="./mkdocs/img/server_sm.png" label="SRVX8" labelloc="b" height="1" imagepos="tc"]
jet [shape=none image="./mkdocs/img/server_sm.png" label="JET" labelloc="b" height="1" imagepos="tc"]
VPN [shape=none image="./mkdocs/img/local-area-network_sm.png" label="VPN" labelloc="b" height="1" imagepos="tc"]
vsc [shape=none image="./mkdocs/img/logo_vsc_sm.png" label="VSC" labelloc="b" height=".8" imagepos="tc"]
users -> srvx1
users -> VPN
srvx1 -> srvx8
srvx1 -> jet
srvx1 -> vsc
VPN -> jet
VPN -> vsc
VPN -> srvx8
}
```
![IMGW Connection Diagramm](../mkdocs/img/IMGW-connection-diagram.png)
## How to connect from the Office?
```graphviz dot attack_plan.png
digraph Servers {
users [shape=none image="./mkdocs/img/student_sm.png" label="User" labelloc="b" height="1" imagepos="tc"]
srvx1 [shape=none image="./mkdocs/img/server_sm.png" label="SRVX1" labelloc="b" height="1" imagepos="tc"]
srvx8 [shape=none image="./mkdocs/img/server_sm.png" label="SRVX8" labelloc="b" height="1" imagepos="tc"]
jet [shape=none image="./mkdocs/img/server_sm.png" label="JET" labelloc="b" height="1" imagepos="tc"]
vsc [shape=none image="./mkdocs/img/logo_vsc_sm.png" label="VSC" labelloc="b" height=".8" imagepos="tc"]
users -> srvx1
users -> srvx8
users -> jet
users -> vsc
}
```
![IMGW Connection Diagramm2](../mkdocs/img/IMGW-connection-diagram2.png)
# Containers & Services
......
......@@ -8,7 +8,7 @@
Steps:
1. Request access
2. Access using SSH - [How to SSH / VNC / VPN](SSH-VPN-VNC/README.md)
2. Access using SSH - [How to SSH / VNC / VPN](../SSH-VPN-VNC/README.md)
## System Information
......@@ -55,11 +55,11 @@ Major Libraries:
These software libraries are usually handled by environment modules.
![](./mkdocs/img/envmodules.png)
![](../mkdocs/img/envmodules.png)
## Currently installed modules
on how to use environment modules go to [Using Environment Modules](Misc/Environment-Modules.md)
on how to use environment modules go to [Using Environment Modules](../Misc/Environment-Modules.md)
```sh title="Environment Modules"
module av
......
#
# mkdocs serve -a localhost:3000 --dirtyreload
#
site_name: Computer Resources @ IMGW
# default is ./site/
# could change this to /var/www/html/docs
site_url: "https://wolke.img.univie.ac.at/documentation/general/"
site_url: "https://wolke.img.univie.ac.at/doc/general/"
site_dir: "./site/"
# site_dir: "/var/www/html/documentation/general/"
docs_dir: "."
repo_url: https://gitlab.phaidra.org/imgw/computer-resources
repo_name: IMGW/Computer-Resources
# this makes relative links valid
use_directory_urls: false
# this adds the feature to directly edit the file on gitlab
edit_uri: edit/master/
copyright: Copyright &copy; 2022 - 2022 IMGW, Michael Blaschek
copyright: Copyright &copy; 2023 - 2023 IMGW, Michael Blaschek
theme:
name: material
......@@ -20,9 +28,13 @@ theme:
features:
- navigation.indexes
- navigation.top
- content.code.copy
logo: mkdocs/img/favicon.ico
favicon: mkdocs/img/favicon.ico
custom_dir: mkdocs/overrides
font:
text: Roboto
code: Roboto Mono
plugins:
- same-dir
- search
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment