Wednesday, May 23, 2018

wget from Google Drive and Dropbox: One line command to download in Linux

Google Drive 
Make sure the link is shared, and it will look something like this:

https://drive.google.com/open?id=FILEID&authuser=0

Then, copy that FILEID and use it like this

wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O FILENAME.EXT



DropBox
When you share a file in Dropbox, the link will look like
https://www.dropbox.com/s/xvuu7a8syeaur0n/FILENAME.EXT?dl=0

replace dl=0 to dl=1 then use the following command to download using wget from Dropbox

wget -O FILENAME.EXT "https://www.dropbox.com/s/xvuu7a8syeaur0n/FILENAME.EXT?dl=1"

Monday, May 14, 2018

MPICH make error "unknown size for unsigned int."

If you are trying to install MPICH libraries, you may encounter the following error

make[4]: Entering directory `/home/vsingh/public/LIBRARIES/mpich-3.0.4/src/pm/hydra/tools/topo/hwloc/hwloc/src'
make[5]: Entering directory `/home/vsingh/public/LIBRARIES/mpich-3.0.4/src/pm/hydra/tools/topo/hwloc/hwloc/src'
CC topology.lo
CC traversal.lo
In file included from traversal.c:12:0:
/home/vsingh/public/LIBRARIES/mpich-3.0.4/src/pm/hydra/tools/topo/hwloc/hwloc/include/private/misc.h:41:2: error: #error "unknown size for unsigned int."
#error "unknown size for unsigned int."
^
make[5]: *** [traversal.lo] Error 1
make[5]: Leaving directory `/home/vsingh/public/LIBRARIES/mpich-3.0.4/src/pm/hydra/tools/topo/hwloc/hwloc/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/vsingh/public/LIBRARIES/mpich-3.0.4/src/pm/hydra/tools/topo/hwloc/hwloc/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/vsingh/public/LIBRARIES/mpich-3.0.4/src/pm/hydra/tools/topo/hwloc/hwloc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/vsingh/public/LIBRARIES/mpich-3.0.4/src/pm/hydra'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vsingh/public/LIBRARIES/mpich-3.0.4'
make: *** [all] Error 2

Solution:

1. Edit the config.h file available at the following location
vi src/pm/hydra/tools/topo/hwloc/hwloc/include/private/autogen/config.h

2. Modify #define HWLOC_SIZEOF_UNSIGNED_INT 0 to #define HWLOC_SIZEOF_UNSIGNED_INT 4

3. Save the file and make clean

Hope this solves the problem.