On local computer run: cd ~/.ssh ssh-keygen -f <rsa_filename> ssh-copy-id -i ~/.ssh/<rsa_filename>.pub user@host where <rsa_filename> is the name of the file which will store the key.
Introduction I have a few scientific computing projects that I would like to do which will require a good numerical methods library. I am going to try to use GSL. Getting the Library Getting the library install was easy enough, just needed to use apt-get sudo apt-get install libgsl-dev To check that the installation succeeded: ldconfig -p | grep gsl Which resulted in: First Example To test the library I grabbed a basic example from the documentation: #include <stdio.h> #include <gsl/gsl_sf_bessel.h> int main ( void ) { double x = 5.0 ; double y = gsl_sf_bessel_J0 (x); printf ( "J0(%g) = %.18e\n" , x, y); return 0 ; } and compiled it with the following: g++ main.cpp -lgsl -o test running the binary yields: which I guess is the value of the first Bessel Function at 5?
<put a cool image here> Multi Threading is GOOD when: It is perfect for I/O operations such as web scraping, because the processor is sitting idle waiting for data. MultiThreading is BAD when: For CPU intensive processes, there is little benefit to using the threading module. Mulitprocessing Multiprocessing allows you to create programs that can run concurrently (bypassing the GIL) and use the entirety of your CPU core. Since the processes don’t share memory, they can’t modify the same memory concurrently. The entire memory is copied into each subprocess, which can be a lot of overhead for more significant programs When to use each: If your code has a lot of I/O or Network usage , multithreading is your best bet because of its low overhead. If you have a GUI , use multithreading so your UI thread doesn’t get locked up. If your code is CPU bound , you should use multiprocessing (if your machine has multiple cores
Comments
Post a Comment