Kamis, 07 Oktober 2021

Install and Set-up ELK Code Physics Software on Ubuntu

Science becomes extra difficult when you have to work with large numbers, complex equations, or when you need fast calculations. But in the recent years, these problems have been considerably reduced thanks to the computers and more specifically, thanks to the open-source projects focused on bringing a better understanding and experience at the time of making computations.

As a student of Physics, I use several specialized tools and most of them are open source. I am going to share one of them today which is called Elk code, an open source project focused on Solid State Physics.

Though it is available in the Ubuntu repositories, there are several dependencies you need to explicitly install and configure.

What is Elk code?

banner

In a few words and thanks to its official page, Elk code is an all-electron full-potential linearised augmented-plane wave code with a strong role inside the field of density functional theory.

What it does is to determine the properties of crystalline solids with many advanced features like geometry optimization, 2D and 3D plots, etc.

Install Intel Fortran compiler on Ubuntu

It could be a little bit hard to get started with it, but the key is on installing math libraries and compilers in your system before installing Elk code.

Compilers like GNU Fortran or Intel Fortran are available for the process, however, it’s recommended to install the Intel Fortran compiler because most of the issues inside the code are solved with it.

The Intel Fortran compiler comes in two parts:

Getting Intel oneAPI Base Toolkit

Let’s start! Open a terminal in Ubuntu and use the following command to download the required part:

wget https://registrationcenter-download.intel.com/akdlm/irc_nas/17977/l_BaseKit_p_2021.3.0.3219.sh

It should look like this:

intel fortran installation 1

After that, in the same terminal, type the next command:

sudo bash l_BaseKit_p_2021.3.0.3219.sh

You’ll be watching something like this on your terminal before a new window opens, don’t worry! It’s part of the process.

intel fortran installation 2

It will open a GUI interface:

intel fortran installation 3

Click on the “Continue” button, and Intel oneAPI Base Toolkit will start downloading:

intel fortran installation 4

Once the download finishes, you should see this window:

intel fortran installation 5

You will see what is included exactly in this API. It’s strongly recommended installing every package it contains. Accept the terms of the license agreement and push on the “Continue” button.

intel fortran installation 6

After that, the next page is a kind of validation one. If something is missing, it warns you.

For example, in this case, we got a warning about the GPU driver, but let’s just skip it and continue with the process, because, as we can see, the product can still be used with CPU.

So just click on the right arrow button.

intel fortran installation 7

In this part, if you have installed Eclipse IDE and want to integrate the libraries into it, select the first, otherwise, just skip the integration and click on the right arrow button. Once done, you’ll be able to see the last part before the complete installation.

intel fortran installation 8

Read the Intel Software Improvement Program and enter your choice on the collection of your information, and push the “Install” button. Finally, the installation will be starting.

intel fortran installation 9

The duration of the installation will depend on how fast your internet connection is, be patient and let Intel finish the task.

Once the task finishes, you’ll see something like this:

intel fortran installation 10

It means the installation of Intel oneAPI Base Toolkit has finished; now, let’s start with the next one.

Installing Intel oneAPI HPC toolkit

To be honest, it’s almost the same process, so it’s going to be a little bit faster.

Let’s start by using this command:

wget https://registrationcenter-download.intel.com/akdlm/irc_nas/17912/l_HPCKit_p_2021.3.0.3230.sh
intel fortran installation 11

Once the above process finishes, use the next command:

sudo bash l_HPCKit_p_2021.3.0.3230.sh
intel fortran installation 12

After that, the installation process will start like the one you saw before.

intel fortran installation 13

Click on the continue and it starts downloading:

intel fortran installation 14

Once finished (this download is really fast), the next window will appear on your desk. Accept the terms and conditions and click Continue.

intel fortran installation 15

As it was done before, let’s skip the integration of the libraries with any IDE.

intel fortran installation 16

And finally, enter your choice for the collection of your information and click on the “Install” button.

intel fortran installation 17

The libraries will start to be downloaded and installed into your system, just wait until this process finishes. Remember, the speed of the download depends on your internet connection, so be patient.

intel fortran installation 18

When the process finishes, click the Finish button.

intel fortran installation 19.png
Intel Fortran Installation step 19

And that is practically the key to the complete Elk-code installation and functionality. These two libraries are essential for the correct execution.

Configure the compilers

Finally, let’s run the next command line to start these two libraries inside the terminal:

source /opt/intel/oneapi/setvars.sh
intel fortran installation 20.png

Now go to this directory:

cd /opt/intel/oneapi/mkl/2021.3.0/interfaces

Inside this folder, you’ll find others, but the important ones are:

  • fftw2xc
  • fftw2x_cdft
  • fftw2xf
  • fftw3xc
  • fftw3x_cdft
  • fftw3xf
  • mklmpi

Inside every folder shown above, you will have to run the next command:

make libintel64

One important thing is that from now, every time you use Elk-code, you have to run the next line on your terminal to habilitate these two libraries.

source /opt/intel/oneapi/setvars.sh

With these steps before, you’re ready for the most important step, the installation of Elk-code on your Linux distribution.

Installing Elk code on Ubuntu

Let’s start downloading, of course, the Elk code, which latest version is located on the SourceForge page.

starting installation 00

Extract the downloaded folder.

starting installation 01

Now, let’s download the Wannier90 latest stable version library, which will help you to compute advanced electronic properties of materials with high efficiency and accuracy,  from its official website.

starting installation 03

Once downloaded the .tar.gz file, let’s located it on the Files app and do double click on it to extract its content.

starting installation 04

Navigate into the extracted folder and open it in the terminal.

starting installation 06

Type these commands one by one:

source /opt/intel/oneapi/setvars.sh
cp ./config/make.inc.ifort ./make.inc
make
make lib
cp libwannier.a ../elk-7.2.42/src/
cd ../
starting installation 07

We’re about to finish. Continue typing the next command on your terminal, one by one.

wget http://www.tddft.org/programs/libxc/down.php?file=5.1.4/libxc-5.1.4.tar.gz
starting installation 08

Now run these command one by one:

mv down.php\?file\=5.1.4%2Flibxc-5.1.4.tar.gz libxc-5.1.4.tar.gz
tar -zxvf libxc-5.1.4.tar.gz
cd libxc-5.1.4
./configure CC=icc FC=ifort
make
make check
sudo make install
cp /opt/etsf/lib/libxc.a ../elk-7.2.42/src/
cp /opt/etsf/lib/libxcf90.a ../elk-7.2.42/src/
starting installation 09

At the end of the process, you’ll have something like this on your terminal:

starting installation 10

Please, close the terminal and, finally, it’s time to do the last part, let’s go direct to the previous Elk code folder extracted. Once there, open the folder into the terminal.

starting installation 11

And type the next two commands:

source /opt/intel/oneapi/setvars.sh
cp /opt/intel/oneapi/mkl/2021.3.0/include/mkl_dfti.f90 src/

Almost there. Start the setup:

./setup

Your terminal should look like this:

starting installation 15

You write number 1 because you have installed the Intel Fortran compiler.

Don’t close the terminal; let’s return to the Elk code folder on the Files app and open the file called “make.inc”:

starting installation 16

Erase every word it contains, and enter this instead:

MAKE = make
F90 = mpiifort
F90_OPTS = -O3 -ip -xHost -qopenmp
F77 = mpiifort
F77_OPTS = -O3 -ip -xHost -qopenmp
AR = xiar
LIB_SYS =
SRC_OMP =
SRC_MPI =

LIB_LPK = -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread
#LIB_LPK = -L/opt/intel/oneapi/mkl/2021.3.0/lib/intel64 -lmkl_cdft_core -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_ilp64 -liomp5 -lpthread -lm -ldl
SRC_MKL =

LIB_libxc = libxcf90.a libxc.a
SRC_libxc = libxcf90.f90 libxcifc.f90

SRC_FFT = mkl_dfti.f90 zfftifc_mkl.f90

LIB_W90 = libwannier.a
SRC_W90S =

SRC_OBLAS = oblas_stub.f90
SRC_BLIS = blis_stub.f90

Save the file and return to the terminal. Finally, just type:

make
starting installation 18

And all right! After this last step finishes, you’ll have installed Elk code on your Linux system.

Great! This last step is a little bit dilatory, but relax, it was all you have you do. You have finally finished all the processes. Congratulations!

Personal conclusion

This process could be a little bit exhaustive, but every step is very important for the correct functionality of the software. I really hope that if you are a scientist or you just want to be curious about this topic, this post results very helpful for you.

On the other hand, if you want to know more about how Elk code can help you on calculations, there is a great video about obtaining an equation of state using Elk code. Good luck!



from It's FOSS https://ift.tt/3lm3Rs3
via IFTTT

Rabu, 06 Oktober 2021

How to Install Vivaldi Browser on Ubuntu and Other Linux Distributions

Brief: Learn how to install Vivaldi web browser on Ubuntu, Debian and several other Linux distributions in this beginner’s tutorial. You’ll also learn about updating it and removing it.

Vivaldi is an increasingly popular web browser. It is based on Chromium, so you have Chrome like features, but it adds several other features to give a different, intuitive interface.

It comes with tab grouping, ad blocker, mouse gestures, notes manager and even allows adding macros. You could even use split viewing to view multiple pages at once. It also respects your privacy, unlike Chrome.

tab tiling
Tab tiling for split viewing multiple websites at once

You can understand the popularity of this browser from the fact that Manjaro Linux recently replaced Firefox with Vivaldi as the default browser in some of its variants.

If you want to try it, let me show how to install Vivaldi on Linux. You’ll learn:

  • GUI and command line methods for installing Vivaldi
  • Tips on updating Vivaldi to the newest version
  • Steps for removing Vivaldi from Ubuntu

Non-FOSS alert!

Vivaldi is not complete open source software. It’s UI is closed source. It’s been covered here because Vivaldi team took effort in making its software available on Linux.

Installing Vivaldi on Ubuntu [GUI Method]

The good thing is that Vivaldi provides pre-built binaries in DEB form for Ubuntu/Debian based distros and in RPM form for Fedora, Red Hat and SUSE.

It is available for both 32 bit and 64-bit platforms, as well as ARM devices like Raspberry Pi.

downloading vivaldi linux
Vivaldi provides installer for several types of Linux distributions

The installation process is really simple. You go to the Vivaldi web page and download the appropriate installer file and then double click on it to install it. That’s it.

I’ll show the steps in detail for Ubuntu/Debian. You can use similar steps for other distributions.

Step 1: Download Vivaldi

Go to the Vivaldi’s download page and download the DEB file for Ubuntu.

vivaldi download linux
Download DEB file for Ubuntu/Debian

Step 2: Install the downloaded DEB file

Go to the Downloads folder where you have the deb file downloaded. Installing deb file is easy. Either just double-click on it or right click to open it with software center.

installing vivaldi ubuntu
Right click on the downloaded deb file and open it with Software Install

It will open the software center application and here, you can see the option to install Vivaldi. Just hit the Install button.

install vivaldi ubuntu software
Hit the Install button

You’ll be asked to enter your system’s account password. Enter that and you should have it installed in a few seconds. You’ll see that Install option changes to remove. This is an indication that Vivaldi is now installed.

Step 3: Using Vivaldi

Open the system menu by pressing the super (Windows) key and searching for Vivaldi. Click on the Vivaldi icon.

running vivaldi in ubuntu
Search for Vivaldi in the system menu

You’ll see a screen like this on the first run.

vivaldi in ubuntu
Vivaldi running in Ubuntu

Now that you know the this method, let me quickly show how to install Vivaldi on Ubuntu and Debian from the terminal.

Method 2: Installing Vivaldi on Ubuntu and Debian from the command line

Open a terminal and make sure that you have wget installed for downloading files in the command line.

sudo apt install wget

Next, get the public key of the Vivaldi repository and add it to your system so that your system trusts the packages coming from it. If interested, read this article about adding external repository in Ubuntu.

wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | sudo apt-key add -

Once the key has been added, add Vivaldi repository as well:

sudo add-apt-repository 'deb https://repo.vivaldi.com/archive/deb/ stable main'

Now you are almost set. Update the package cache and install it.

sudo apt update && sudo apt install vivaldi-stable

And that’s it. Search for it in the menu and start it from there.

Updating Vivaldi on Ubuntu

Both GUI and command line methods add the Vivaldi repository to your system. This means that whenever there is a new Vivaldi release, you get it along with the system updates.

vivaldi repo ubuntu
Vivaldi repo is added to the system

Basically, you update the Ubuntu system and it updates the Vivaldi browser if there is a new version available.

chrome edge update ubuntu
Vivaldi browser is updated with the system updates

Removing Vivaldi from Ubuntu

If you do not like Vivaldi or no longer want to use it, you can surely remove it. Now, to uninstall applications from Ubuntu, you may use Software Center but it won’t find the external, third-party installed software.

You’ll have to use the terminal now even though you used GUI method to install it. That’s really easy. Open a terminal and use the command below:

sudo apt remove vivaldi-stable

Sudo gives you root access in Ubuntu. You’ll have to enter your account’s password. While entering the password, nothing is seen on the screen. That’s normal. Enter the password blindly and it will be removed.

I hope you find this tutorial helpful in installing and using Vivaldi on Linux.



from It's FOSS https://ift.tt/3FnQGiq
via IFTTT

Senin, 04 Oktober 2021

Markets: An Open-Source App to Keep Track of Your Investments for Linux Desktop and Phones

Brief: A Linux app to help you quickly track market movements.

Usually, you would log in to a service on your web browser to monitor and track the market for investment opportunities if you’re an investor/trader.

But, what if you want an app for your Linux desktop and Linux phone? Considering we do have a few for Android/iOS smartphones, it should come in handy for Linux devices as well!

Monitor Stocks From Across the Globe via Yahoo Finance

markets

“Markets” utilizes the data from Yahoo Finance to provide you the required information about stocks, cryptocurrencies, currencies, and more.

While it is a simple desktop-focused app, it is available for Linux smartphones, and it offers a couple of valuable functionalities. Let me list the key highlights of what you can expect.

markets search

Features of Markets

With Markets, you get to track, monitor, and analyze market trends and make investment decisions.

There are a couple of features along the way that include:

  • Ability to customize the update interval
  • Build a personal portfolio
  • Add any symbol or currency
  • View time in international format
  • Dark mode
  • Supports Linux phones (PinePhone, Librem5)
  • Selectively delete stock monitors

As mentioned previously, it is a dead-simple Linux application to help you track financial data.

markets dark mode

And, I’d say it works pretty well and lets you quickly search for a stock, commodity, and others to build a personal portfolio on your Linux desktop quickly.

With a dark mode, it is a breeze to look at it and track market movements.

You can select from the existing list of markets added and delete as per your selection. And, the international time format is useful. As you can notice in the screenshot, the time mentions the timezone you’re at by default, which should be useful.

Also, from the listings, you can click on it to launch the browser window for full details on Yahoo Finance; this is how it’ll look like:

yahoo tesla

Installing Markets in Linux

It is available as a Flatpak app for Linux distributions and can be found in AUR for Arch users. For Linux phones, they recommend installing it from the source.

To install it from the terminal, you just need to type in:

flatpak install flathub com.bitstower.Markets

You can explorer building instructions and other information on their GitHub page.

Do you prefer to use an app on your Linux desktop to track financial data quickly? Let me know your thoughts in the comments.



from It's FOSS https://ift.tt/3Fg7xne
via IFTTT