Author: slothparadise

sudo as root X11 connection rejected because of wrong authentication

I received this problem recently when I logged into root on a machine. X11 connection rejected because of wrong authentication How did this problem happen? Here’s what I did. ssh -X [email protected] sudo su xclock X11 connection rejected because of wrong authentication If I open xclock as a user, then X11 works just fine. As a result, I know that the server and client’s X11 forwarding is working. A root problem My .Xauthority and X11 credentials aren’t being passed over to root. ssh...

More

How to Get a User’s Email Address on Github

There are a lot of people (software engineers,  open source compatriots, coding warriors) who contribute to programming projects on Github. You may be interested in a certain someone on Github, and you need to contact them! Recruiters? Potential partners? This is the surest way to find someone’s email through Github! Find the person’s Github username. Go to a recent Github project that they’ve contributed. Check the link of a commit message. Add .patch to the link, and you’ll see the...

More

Largest Prime Factor

Project Euler is a website with a series of math problems that can be solved with programming. Problem 3 is about finding the largest prime factor of a number. Although my first impression is that the problem looks simple since I can iterate through the possibilities one by one and find the largest prime factor. The problem is that we’re finding the largest prime factor! The largest prime factor of a very large number can be as big as the...

More

How to Fix ^M Characters in Vim

I opened a CSV file in Microsoft Excel. I approved compatibility with macros on a Mac. Then, I opened the same CSV file with vim. The entire CSV file was reduced to a single line whenever I opened the file with vim. Something like this: Number of Sloths,Type^M15,black^M10,brown^M5,blue If we try to substitute all the ^M characters, those characters aren’t found! vim slothparadise.csv The characters are actually a little different. We use vim‘s substitution for \r. :%s/\r/\r/g All the ^M...

More

How to install Pip as a User

I don’t have root access on this Macintosh that I’m using. How am I supposed to get the pip package manager for Python? Python comes installed on every Macintosh. python –version Python 2.7.10 Step 1) Get easy_install easy_install is a Python utility for installing certain Python related packages. You might already have easy_install! To check: easy_install If you don’t have easy_install, you can install easy_install for the user. wget –no-check-certificate https://bootstrap.pypa.io/ez_setup.py -O – | python – –user Installing easy_install script to /Users/…/Library/Python/2.7/bin...

More

Graph500 on CUDA

I recently went to ISC16 for their Student Cluster Competition, and one of the challenges was to create our “own implementation of Graph500 to run on a cluster.” If you don’t know about the Student Cluster Competition, they are cluster competitions where student teams work with vendors to create a cluster and optimize high performance scientific applications to be run under 3000 watts of power on real datasets. Graph500 is a rating of supercomputer systems focused on data intensive loads....

More

How to Setup CUDA 7.0 on NVIDIA Jetson TX1 with JetPack – Detailed

The most recent version of NVIDIA JetPack is 2.2., which supports the NVIDIA Jetson TX1 and Jetson TK1. The big news is that the latest version of JetPack 2.2 turns the userspace to 64 bit! In earlier versions of JetPack, the kernel was 64 bit, but the userspace was 32 bit apparently from what a source has told me. Now with the userspace at 64 bit, you’ll have an easier time compiling and running arm64 libraries. Note that we’ll be...

More

How to Create Shared Folder on VirtualBox – Windows and Ubuntu

I have a Windows 10 laptop, and I am running VirtualBox. One of my virtual machines has Ubuntu 14.04 64 bit operating system. Now, I want to be able to share folders from my Ubuntu to Windows 10 and vice versa. I’m assuming that you have installed the Ubuntu virtual machine already and ready to set up the shared folder. Step 1) Make a folder to be shared on your Windows 10 host operating system. I’ll create a folder called...

More

How to use MPI without NFS

You can use MPI without NFS or a shared file system! We had a situation where we couldn’t find the NFS server or client packages for arm64 for Ubuntu 16.04. We had OpenMPI version 1.10.2 installed on 2 nodes without NFS. When you use MPI without NFS, you need to ensure that the same version of MPI is installed by every node. Then, you have to ensure that the same data files, which include the program, hostnames file, and input files,...

More

How to Fix OpenMPI ORTE Error: unknown option “–hnp-topo-sig”

We encountered an ORTE bug with the error message, Error: unknown option “–hnp-topo-sig”, while using OpenMPI version 1.10.2 for arm64 on Ubuntu 14.04 server. More specifically, we ran the following command using 2 nodes with MPI: mpirun –hostfile /nfs/hostnames -n 4 /nfs/mpi-hello-world/mpi_hello_world

ORTE errors can happen because of a variety of different things, but it’s usually because your mpirun is not the same version as your mpi compiler. Even if you think that you only have one MPI version, you may in...

More