1. please remember to end your session when you have finished your current calculations (red button upper right)
1. please remember to end your session when you have finished your current calculations (red button upper right)
1. if you want to run jobs for weeks or which require many cores (>10) for multiple days, please contact [it-support@idiv.de](mailto:it-support@idiv.de) beforehand. At this point you should consider to move to the HPC cluster.
## ssh access
## ssh access
You can only reach the server from the internal network, i.e. if you are connected via VPN or cable at iDiv. Note that the internal name is rstudio1 instead of rstudio!
You can only reach the server from the internal network, i.e. if you are connected via VPN or cable at iDiv. Note that the internal name is rstudio1 instead of rstudio!
...
@@ -30,24 +31,44 @@ RStudio stores several files like suspended sessions, graph history etc. in `~/.
...
@@ -30,24 +31,44 @@ RStudio stores several files like suspended sessions, graph history etc. in `~/.
### /data
### /data
You can create your own directories here and place data inside. By default others can read the directories you created here, but not write in them. If you need any special permission let us know via it-support@idiv.de.
You can create your own directories here and place data inside. By default others can read the directories you created here, but not write in them. If you need any special permission let us know via it-support@idiv.de.
### idiv group shares
### iDiv group shares
If you are part of an iDiv group you can access your group share on the rstudio server at `/data/GROUPNAME-group-share/`. If your group share is not available yet please contact [it-support@idiv.de](mailto:it-support@idiv.de).
If you are part of an iDiv group you can access your group share on the rstudio server at `/data/GROUPNAME-group-share/`. If your group share is not available yet please contact [it-support@idiv.de](mailto:it-support@idiv.de).
## network home
## Network home
This is about \\idiv.de\public\homes. To make it available on the rstudio server you need to get active. Log in via ssh and run
This is about \\idiv.de\public\homes. To make it available on the rstudio server you need to get active. Log in via ssh and run
```
```
su - $USER
su - $USER
```
```
You will be asked to enter your password again and afterwards your network home will be available at `~/winhome`. However, it will only stay mounted until you log out. If you have any longer running jobs you might want to consider either moving stuff from the ~/winhome to /data or open a [tmux](tmux.md) session from which you detach (Ctrl+b, d) before you disconnect.
You will be asked to enter your password again and afterwards your network home will be available at `~/winhome`. However, it will only stay mounted until you log out. If you have any longer running jobs you might want to consider either moving stuff from the ~/winhome to /data or open a [tmux](tmux.md) session from which you detach (Ctrl+b, d) before you disconnect.
## Data transfer
You can use either use the web IDE to upload and export files.
### Web IDE
In the *Files* pane click the *Upload* button to upload files to the current directory. For multiple files check the displayed *TIP* in the upload window.
If you want to download/export files, select the checkbox for each file or directory and click *More -> Export*. If you selected multiple files a zip file will be downloaded.
### Tools
Other file transfer tools are often more reliable and faster than the web IDE. Short instructions are available for several tools like [scp](scp.md), [rsync](rsync.md), [filezilla](filezilla.md).
## Code organisation
It is strongly recommended to use the version control system [git](https://git-scm.com) to track changes in your code. It also helps you to distribute your code, be it for yourself (local machine, rstudio server, HPC cluster, …) or with others (e.g. via [github](https://github.com) or the [iDiv gitlab](https://git.idiv.de)). Ensure that you only track your code and not your data or results!
If you want your code to run in differenct environments (e.g. local machine, rstudio server or HPC cluster) be sure to separate environment specific code from your buisness logic. Recommendations and templates can be found in the [EVE HPC Cluster wiki](https://wiki.ufz.de/eve/index.php/R_Advanced_-_Tips_%26_Tricks#Interactive_and_Command_Line).
## Packages
## Packages
Many R packages are installed already via the system's package management and many more are available via the same track. This is the preferred way to install R packages, as it avoids duplicate installations per user, removes the need for manual package updates and helps that underlying libraries and packages are compatible with each other. Currently there are >3500 packages installed—check with `installed.packages()` for more details.
Many R packages are installed already via the system's package management and many more are available via the same track. This is the preferred way to install R packages, as it avoids duplicate installations per user, removes the need for manual package updates and helps that underlying libraries and packages are compatible with each other. Currently there are >3500 packages installed—check with `installed.packages()` for more details.
Of course you can still install packages via R's own functions (install.packages, devtools, …) if there is the need for it. Long term please drop a note to it-suppot@idiv.de so that we can install the package via the system.
Of course you can still install packages via R's own functions (install.packages, devtools, …) if there is the need for it. Long term please drop a note to it-suppot@idiv.de so that we can install the package via the system.
- https://github.com/eddelbuettel/rcppapt <- not yet implemente:
-[https://github.com/eddelbuettel/rcppapt](https://github.com/eddelbuettel/rcppapt) not yet implemented:
## Other servers with R
## Other servers with R
...
@@ -56,4 +77,4 @@ There are some other servers which have R and RStudio (desktop version) installe
...
@@ -56,4 +77,4 @@ There are some other servers which have R and RStudio (desktop version) installe
- idivgis01.idiv.de Biocon windows 2012r2 terminal server with gpu but restricted access
- idivgis01.idiv.de Biocon windows 2012r2 terminal server with gpu but restricted access
- idivts6.idiv.de Biocon windows 2012r2 terminal server but restricted access
- idivts6.idiv.de Biocon windows 2012r2 terminal server but restricted access
rsync syncronizes files. It allows to continue started transfers and incremental syncronisation. It is available on linux and mac. On windows it is available if you followed the instructions for the [Windows Subsystem for Linux](wsl.md). The general syntax of rsync is
```
rsync [options] source user@destination
```
## Examples
The user ab12cdef transfers the local file mydata.csv to a data project folder on rstudio1, display the progress and continue unfinished transfers (-P is the shorthand for --partial --progress).
The following command does exactly the same. Note that with a trailing `/` on the source no additional directory is created, without it is always created!
Secure copy (scp) is available on linux and mac. On windows it is available if you followed the instructions for the [Windows Subsystem for Linux](wsl.md). The general syntax of scp (secure copy) is
```
scp [options] source user@destination
```
## Examples
The user ab12cdef transfers the local file mydata.csv to a data project folder on rstudio1:
Follow the steps at https://docs.microsoft.com/en-us/windows/wsl/install-win10 to
1.*Install the Windows Subsystem for Linux*
2. Install Ubuntu during *Install your Linux Distribution of Choice*
- Section *Fall Creators Update and later: Install from the Microsoft Store*
From the start menu you can now launch Ubuntu and get a bash with many useful tools like:
- ssh
- scp
- rsync
- git
- tmux
- vim
You can also install additional software inside the WSL using apt. GUI Applications require more work and are not covered here (Google for 'XMing and WSL').
## apt commands
```
sudo apt update # update the list of packages and package versions
sudo apt full-upgrade # upgrade all packages to the latest avaialbe version
sudo apt install htop # installs htop to monitor processes