Nguyen Lab Wiki

Computing Resources

Our lab has multiple dedicated Workstations with pre-installed software packages for our lab members. Additionally, we have access to university-wide computing resources for larger computation.

Lab Workstations

  • 2023 Dell Workstation
  • Name: WSE-ME-JKLT7V3.win.ad.jhu.edu
    • 12th Gen Intel Core i9 12900K (16-core, 24 threads @ 3.2 GHz)
    • 64GB of RAM
    • 1TB SSD (boot), 4TB SSD (storage)
  • 2020 Mac Pro
  • IP: 10.160.49.144
  • Name: nguyens-mac-pro.acasmart.jh.edu
    • 3.3 GHz 12-core Intel Xeon W processor
    • 96GB of RAM
    • Radeon Pro 580X with 8GB of GDDR5 memory
    • 4TB SSD
  • 2014 Dell Workstation
  • Name: WSE-ME-2L54W52.win.ad.jhu.edu
    • Quad-core Intel Core-i7 @ 3.6 GHz
    • 32GB of RAM
    • 1TB SSD, 1TB HDD
  • 2008 Mac Pro
  • IP 10.160.48.22
  • Name: allegheny.me.jhu.edu
    • Dual Quad-core Intel Processor
    • 32GB of RAM
    • 2TB HDD
  • If you are using Windows workstations, do not store your file in the C:/ drive. Open a separate directory for yourself in the storage drive and transfer data to your local machine regularly.
  • Contact Vicky Nguyen or Bibek to get a user account for the Mac Workstations.
  • You should be able to log in locally on the Dell workstations using your JHED ID. For remote login, ask Bibek to give you remote access and check the procedure below.
  • 2023 Dell Workstation has Windows Server (standard edition) installed. Multiple users can do remote login at once using Microsoft RDP. For macOS workstations, use VNC for multi-user remote login.
  • The 2014 Dell workstation is not currently in use, and the 2008 Mac Pro is also reaching its end of life. We encourage you to use the newer workstations or Rockfish HPC cluster (see below).

Advanced Research Computing at Hopkins (ARCH)

The Advanced Research Computing at Hopkins (ARCH) – formerly known as MARCC – is a shared computing facility at Johns Hopkins University that enables research, discovery, and learning, relying on the use and development of advanced computing. ARCH administers state-of-the-art high-performance computing resources, manages highly reliable data storage, and provides outstanding collaborative scientific support to empower computational research, scholarship, and innovation. The Nguyen Lab has an allocation of 100K Compute hours per quarter and we share another 25K compute hours for research for polymer mechanics.

Ask Vicky Nguyen to provide you access to ARCH. Before you start running computations or simulations on ARCH, follow their website thoroughly to learn more about the architecture, operation procedure, etc. The following links may be useful, but be sure to browse all the pages on the main website.

Developer's Tools

Following programs, packages, or tools are suggested which sometimes may be required and sometimes may make your development experience better. Carefully go through them.

Unix (macOS users) and Linux

Do not skip even if you use Windows. Linux-related sections may apply to you if you plan on using Rockfish or WSL-2.

Unix is a computer operating system developed by a group at Bell Labs in 1969. Yes, that means it precedes DOS, which is the basis for Windows. Unix is still the preferred OS for scientific computing. What you think of the macOS is a GUI interface for DARWIN, an operating system based on the BSD (Berkeley Software Distribution) variant of Unix developed at Berkeley. Unix has a bunch of powerful programs, packages, compilers, and programs installed in /usr/bin, /usr/local/bin directories. These programs are run by typing commands in a Unix Shell (a command-line interpreter).

Linux is a Unix-like free operating system kernel developed in 1991. Linux is typically packaged as a Linux distribution (distro), which includes the kernel and supporting system software and libraries. Some popular free Linux distributions are Ubuntu, Arch Linux, CentOS, etc. High-performance clusters often use Linux-based operating systems. Desktop Linux distributions include a windowing system such as X11 or Wayland and a desktop environment such as GNOME or KDE Plasma. Distributions intended for servers may not have a graphical user interface at all.

Fun fact: The principal developer of Linux kernel, Linus Torvalds, is also the developer of the Git version control system.

Command Shell and Bash/ Tcsh/ Zsh Profile

A Unix shell is a command-line interpreter or shell that provides a command-line user interface for Unix-like operating systems.

Three most common shells are Bash, Zsh, and tcsh. A lot of programs that you use today with pretty GUI were originally written for Unix. For example, MATLAB, Cubit, and Tahoe. You will need to become familiar with the basics of Unix before installing and compiling Tahoe or building FEBio from the source code, etc. Even though MATLAB has a clunky GUI interface, knowing some Unix commands will help you become a more efficient user, and it will allow you to execute Matlab .m files remotely and from a script.

  • Your account on allegheny (the old macOS Workstation) uses by default a tcsh shell.
  • Linux distros, such as Ubuntu come with bash.
  • Currently, macOS ships with Zsh (Z shell) by default but bash is also available.

You can customize your macOS zsh-based terminal by installing Oh My Zsh!

To open a shell, use either the X11 utility installed with the Developer's tools or the Terminal application. Then learn some basic Unix commands to navigate your directories, move files, and manipulate files.

Here's an example of a .zshrc profile. Don't get intimidated; the complicated part related to Conda was added by the Python package, Anaconda.

PS1='%1~ $ '

# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/bibek/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/bibek/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/bibek/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/bibek/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
conda activate fenicsx 
# <<< conda initialize <<<

alias matlab="/Applications/MATLAB_R2021b.app/bin/matlab"

eval "$(/opt/homebrew/bin/brew shellenv)"

  • Copy it your text editor and name and save the file as .zshrc to your home directory. Anytime you change the .zshrc you must “compile” by typing on the command line:

source ~/.zshrc

  • This locally applies to your changes. You must do this for all new terminals that you open. To apply the changes globally, logging out and logging back in means closing the terminal app and reopening it.

Xcode developer tools

Xcode is Apple's integrated development environment (IDE) for macOS that is used to develop software for all Apple platforms. macOS does not come with Xcode installed. You can download a full GUI version of Xcode from the macOS App Store. For our software development purpose, we often need the command line tools provided by the Xcode. To install Xcode from the command line, run the following command on your Zsh terminal:

$ xcode-select –-install 

It will take a few minutes to install. To see the list of packages installed by Xcode command line tools, navigate to /usr/bin directory and list all the packages.

$ cd /usr/bin
$ ls 

For the last few years, Xcode has included LLVM-based clang compiler in their XCode package instead of GCC because of licensing and distribution reasons (you can learn more about compilers below).

Homebrew

Homebrew is a free and open-source package manager for macOS and Linux. You can install different compilers and other developer tools through homebrew which is not natively available on macOS or via Xcode developer tools such as gfortran (the GNU Fortran compiler). To install Homebrew, visit https://brew.sh. Once installed you may have to give read and write permission to Homebrew. Follow the instructions on the terminal screen (or if it does not work, search on Google).

Once Homebrew is installed and added to your system or user path, you can simply use the command brew install [package_name] to get it installed. Please note that Homebrew installs the package in the /opt/Homebrew directory.

Alternative package managers

Two other alternatives to Homebrew are Fink and Macports to install different packages on macOS.

Terminal-based Text Editor (Vi, Emacs, and Nano)

While VS Code is a great GUI-based text editor, sometimes it is more efficient (and even necessary in the case of HPC) to use the terminal-based text editor. Most common terminal based text editors are Vim and Emacs. Not sure which one to pick? See the war between text editors.

By default macOS and Ubuntu come with GNU Nano text editor (this is supposed to be a replacement for Pico) which is a simple terminal-based text editor. If you install Xcode on macOS, you will have Vi and Vim (there are more modern versions of them). I believe, Ubuntu also includes Vi and Vim by default. You can install Emacs using apt package manager on Ubuntu and Homebrew on macOS.

Microsoft Windows Users

Historically, Microsoft Windows hasn't been well-known for development friendly. However, In Microsoft has been very active lately and frequently deploying tools to enrich the development experience on Windows. You may need or find the following tools useful if you're using Windows for development.

Microsoft Visual Studio

Microsoft Visual Studio is an integrated development environment (IDE) with a text editor and functionalities to debug, link, and compile codes in different languages. You can extend its feature by including different plug-ins for various tasks. Very generally and simply, it can be considered as equivalent to Xcode (and vice versa) on Windows. Since it has a lot more built-in functionalities, it requires a larger memory space compared to VS Code (which is essentially a lightweight text editor). Microsoft releases major versions of Visual Studio every few years, and the community edition of Visual Studio is free to use.

  • Learn more about Microsoft Visual Studio here: https://visualstudio.microsoft.com.
  • If you are using Visual Studio with Intel compilers for building any source code, be sure to download the compatible versions and install the Intel compiler (oneAPI packages) first.

PowerShell 7

Although Windows still retained its old DOS terminal, cmd, it also comes with a different and newer version, PowerShell, with a lot more features. Besides the default PowerShell 5.1, you can download the latest version of PowerShell from here: https://github.com/PowerShell/PowerShell. PowerShell uses “similar” commands and scripting as macOS and Linux shells. So you might find it useful if you're working across different operating systems.

Windows Terminal App

To elevate your development experience, you can install Windows Terminal: https://github.com/microsoft/terminal. Download and install it from the Microsoft Store. It looks “similar” to macOS and Linux desktop terminals. Terminal is not a shell, it is just an application to use cmd, PowerShell, or Windows Subsystem for Linux (see below). You can customize the terminal to your liking and have multiple panes and tabs.

SSH on Windows

If you're planning to use your Windows machine for remote login to RockFish or lab workstations, you will need an SSH client. Windows 10 (version 1809) now comes with SSH capability. If you get Windows installed by WSE-IT, you will likely have it installed. You can use cmd or PowerShell for ssh. I always recommend the latest version of PowerShell.

Windows Subsystem for Linux (WSL)

  • If you have skipped the Linux-related discussion before, please go back and read them first.
  • If you plan to use Terminal + VS Code + WSL-2 framework for Tahoe or other development, install VS Code before installing WSL-2.

A lot of scientific packages, such as FEniCS and Tahoe, are natively available on Linux. If you're using Windows, you might consider installing Windows Subsystem for Linux (WSL). Although the name is confusing, it's a virtual Linux environment on Windows developed by Microsoft. A few popular Linux distros, like, Ubuntu, openSUSE, etc. are available via the Microsoft store. The current stable version released by Microsoft is WSL-2 and it doesn't support GUI-based Linux applications natively. Ubuntu is probably the most popular Desktop Linux distro. Once installed, you can use WSL-2 the same way as any Linux. Tahoe has been installed and tested on Windows 10 via WSL-2. If you install WSL-2 on your Windows, you can access all the command line-based developer tools available on Linux such as Git, SSH, etc. there.

Follow the steps here to install WSL-2: https://docs.microsoft.com/en-us/windows/wsl/install-win10.

Visual Studio Code

Visual Studio Code is a popular cross-platform text editor, recently developed by Microsoft. You can highly customize VS code with available plug-ins. Plug-ins are available for language mark-up, terminal, ssh connection, etc. With SSH plug-in activated, using VS Code, you can ssh to the remote machine and visualize, edit, and save files without using vi or emacs.

Once installed and added to your path, you can open VS Code from the terminal using the following commands.

$ code .
$ code file_name.ext

The first command opens an empty file in VS Code in the home directory or current working directory. Similarly, the second command file opens a file with <file_name.ext> in the home or current directory.

Git and GitHub

Git is a modern version control system that tracks the history of changes as people and teams collaborate on projects together. As developers make changes to the project, any earlier version of the project can be recovered at any time. A repository, or Git project, encompasses the entire collection of files and folders associated with a project, along with each file's revision history. The file history appears as snapshots in time called commits.

GitHub hosts Git repositories and provides developers with tools to ship better code through command line features, issues (threaded discussions), pull requests, code reviews, or using a collection of free and for-purchase apps in the GitHub Marketplace. Another popular alternative for GitHub is Gitlab, which uses Git as the version system.

  • Currently, Nguyen Lab hosts their codes on GitHub: https://github.com/NguyenLabJHU.
  • To learn more about using GitHub: https://docs.github.com/en/get-started.
  • Open a GitHub account and ask Bibek or Mike to include you in the organization account. If you install Xcode on macOS, git will be installed by default as a command line tool.
  • It is a bit tricky to have Git as a command line tool on Windows. But you can install the GitHub desktop app for simple tasks on your computer from here: https://desktop.github.com.
  • You can also get the GitHub plugin on your VS Code (and some other IDEs as well) if you have it.

Compilers

Unlike Python and MATLAB, programming languages that are often used in developing computational softwares such C, C++, and Fortran are considered to be mid to low-level language. Python and MATLAB are interpreted language which has ample libraries for performing trivial tasks, but they are often quite slow in nature, hence they are not popular in large-scale software development. C, C++, and Fortran, on the other hand, are compiled languages which generate binary files for users to execute the compiled programs.

For example, Abaqus user subroutines are often written in Fortran (you can do in C and C++ as well). Another popular finite element code commonly used in our lab Tahoe (see below) and the open-source finite element code popular in Biomechanics, FEBio, uses C++ as their development language. If you want to do development in any of these software, you may want to brush up (or learn) your programming skills in those languages and you will need compilers to build your codes.

GCC

GCC stands for GNU Compiler Collection which contains free compilers for C, C++, and Fortran among others. GNU Project started as an alternative to UNIX and developed a list of utilities and eventually, they started distributing the Linux operating system.

  • Linux (at least Ubuntu) often comes with GCC installed. If it is not installed on your Linux distribution, you can use apt package manager to install it (or other package manager)

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install gcc

  • On macOS, you can install GNU compilers using Homebrew.

brew install gcc

Intel oneAPI

Another common and well-recognized compiler is Intel compiler packages. Since 2020, Intel compilers have been freely available to download and use as a part of their Intel oneAPI base toolkits. This package contains C, C++, Fortran compilers, debuggers from Intel, and many other packages and libraries (e.g., Intel oneMKL). Intel oneAPI also has an HPC toolkit package which contains libraries related to HPC computing. If you use a user subroutine in Abaqus or a user material model in FEBio, you may need to use Intel compilers to build the code. Check out Intel oneAPI toolkits here: https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html.

  • On Microsoft Windows machines, you will perhaps need to install Microsoft Visual Studio to compile code with the Intel compiler. In that case, install Intel oneAPI first and then Microsoft Visual Studio. Also, you will need to make sure, you are installing compatible versions of this software.
  • Intel announced that they will not provide official support of Intel oneAPI for macOS starting in 2024.

Remote Connection

For most remote connections, accessing software on the lab workstations and/or computing resources on Rockfish, you will need to connect to the JHU network using JHU VPN first. Then you will need to follow an allowable remote connection protocol (SSH, VNC, RDP, etc.) to connect to the remote machine.

VPN

VPN stands for Virtual Private Network. It creates a secure tunnel between the local machine outside of the private network and a remote machine inside the private network (JHU). In other words, it allows your local machine to act as if it's connected to a private network. JHU currently uses the Ivanti Secure Access Client as the VPN client. To get Ivannti Secure Access Client,

Go to https://my.jh.edu. Scroll down to the technology drop-down menu and find the VPN tab. It will take you to the JHU VPN Resources Page. Access to the JHU VPN requires you to enroll in a multi-factor authentication protocol (Azure MFA) and request access to the VPN service. There are detailed instructions on how to do these on the resources page. Once those steps are done, download the Ivanti Secure Access app for your operating system.

Please note, based on our experiences, from time to time Ivanti application shows flaky behavior on macOS (hopefully they fixed the bugs by the time you read it).

There are many ways to connect to the server from a remote machine. Some are more secure than others and some are more efficient than others. It would help if you knew the basic UNIX commands (see the UNIX and Linux section above).

SSH

SSH is the most secure connection in which you connect to the remote server, Rockfish, and lab workstations, from the command line. If you have macOS or Linux, then SSH is already installed. Open your terminal and then type:

$ ssh username@allegheny.me.jhu.edu

Enter your password at the prompt. You can then execute any Unix command and launch programs. f the programs require a display, you will need to set the display environment so that you can see the display window.

  • On the local machine, before you ssh to the remote machine, type xhost remote_hostname to authorize the remote machine to connect to the local X server
    • remote_hostname refers to the name of the remote machine, e.g., allegheny.me.jhu.edu
  • On the remote machine (allegheny) type setenv DISPLAY hostname:0.0 if you are using csh or tcsh shells and DISPLAY=hostname:0.0; export DISPLAY if you are using bash shell.
    • hostname is the name of the machine on which you are working. It can be obtained by typing hostname at the prompt.

VNC to macOS Workstation

If you need to see the full display environment of the remote host (e.g. running multiple programs at once or administering the machine, you can use a VNC remote desktop client. Apple's VNC client is called Screen Sharing. There are also free Windows clients for VNC. This is the slowest way to communicate with the server. It also requires that you first log into the VPN. To connect, for now, use the IP address of the machines. For macOS, click on Go → Connect to Server → vnc://ip_address from the top menu bar. Enter your account details to get connected.

Microsoft Remote Desktop for Dell Workstation

If you need to use a full display environment on Dell workstations, you can use the Microsoft Remote Desktop application available on Windows (pre-installed) and Mac (needs to be downloaded and installed from the macOS app store). It uses the RDP protocol developed by Microsoft to remotely log in and connect. For Windows-based remote workstations, the Microsoft Remote Desktop client works the best. Use the PC name and your JHED ID to do a remote login. In case you have trouble remote logging in, let Bibek/ Mike know, they can help you set it up.

File Transfer

If you are using remote workstations and Rockfish server to run your simulations, you may need to use some form of data transfer protocol. Some suggestions are given below, but definitely check ARCH webpage for latest and approved approaches if you are using Rockfish.

SFTP

SFTP is. SSH-based file transfer protocol which can you from the terminal if you have SSH installed (which you should by now). If you only need to move files from your local machine to the remote machine, use sftp

$ sftp username@allegheny.me.jhu.edu

Enter your password at the prompt. You can navigate the remote host using cd and the local host using lcd. You can copy files to a remote server using mput and copy files from a remote server to your local server using mget.

To learn more about SFTP, check out this tutorial.

FileZilla

FileZilla is GUI based SFTP client. Download and Install FileZilla on both the remote server (if not installed) and the local computer. You can use FileZilla on ARCH (RockFish) and your local workstation. See this tutorial for using FileZilla.

GlobusConnect

ARCH recommends using GlobusConnect for transferring large files between RockFish and your local computer. You can install GlobusConnect Personal on your local computer to create an endpoint between RockFish and your laptop to transfer large files.

Shared Network Folder/ Drive

You can share your working folder from the Mac or DELL workstation over the network and then mount the folder as a network drive on your laptop. To share the drive on the Mac server, follow this: https://support.apple.com/guide/mac-help/set-up-file-sharing-on-mac-mh17131/mac. To mount the shared folder to your local Macbook, click on Go → Connect to Server → smb://ip_address from the top menu bar. If you have a Windows-based laptop, search online to learn how to mount a network drive. The advantage of this approach is you can use your laptop's native applications to open different files without any file transfer. You can drag and drop files, but sharing large files between mounted network drives and local computers might be slow. However, before using this approach, discuss with WSE-IT about security issues.

Software and Packages

Our lab has a collection of a few open-source (sometimes customized) software packages as well as license to commericial software through university or specific to our lab. You can also access more software through WSE IT and myJH portals.

Finite Element Software

Before you read the instructions for Tahoe, please read everything above related to development. If you have an error installing Tahoe, save the screenshot of the error and then come to me for help. I can't help you without knowing the specific error, and “it didn't compile” or “it quit because of an error” is not specific.

  • Abaqus Finite element package
  • Tahoe Finite element package
  • FEniCSx Finite element package
  • FEBio Finite element package
  • Cubit Mesh generator
  • Ensight Post-processing
  • SMARS Surrogate-Model Accelerated Random Search for Solving Inverse Problems
  • CCNS Compressible fluid dynamics with sharp interface fluid-structure algorithm

Besides, these software, we suggest Gmsh for meshing and Paraview for post-processing. If these software are not installed, you can installed by yourself on one of the lab workstations.

Academic and Research Software via WSE IT

The Whiting School of Engineering (WSE) hosts necessary academic and research software at this portal: https://software.wse.jhu.edu/. Connect to your VPN to access the software portal page. The following software packages are available there (there are many more, check out please).

  • Windows Operating System
  • Microsoft Office package
  • Abaqus (also other SIMULIA software) for academic
  • Ansys
  • COMSOL
  • MATLAB
  • Mathematica
  • Tecplot
  • SolidWorks
  • AutoDesk Products
  • CATIA
  • ChemBioDraw Ultra
  • LabVIEW
  • VMWare Fusion

If you are doing image processing in MATLAB, be sure to check with your labmate for the compatible version.

Antivirus Software

JHU has a central license for Endpoint Protection anti-virus software. Install a virus software even if you use a Mac. Go here https://it.johnshopkins.edu/it-services/security/antivirus/ for more information and to download the latest release based on your operating system.

Lab Software Inventory

We have installation disks (CDs) for various software and device drivers in the Lab. These are located in the desk drawer where the server sits. A cursory inventory (8/9/2013) shows the following:

  • Vic3D
  • VicSnap
  • FIDVC
DokuWiki CC Attribution-Share Alike 4.0 International