home

Archive for the 'ubuntu' Category

CudaMiner Installation In Ubuntu 12.04 LTS Using CUDA Toolkit 5.5 And “Additional NVIDIA Drivers”

Saturday, December 28th, 2013

Author’s Note 1: It is my standard policy to put too much info into guides so that those who are searching for specific problems they come across will find the offending text in their searches. With luck, your “build error” search sent you here.

Author’s Note 2: It’s not as bad as it looks (I’ve included lots of output and error messages for easy searching)!

Author’s Note 3: I won’t be much help for you in diagnosing your errors, but am happy to tweak the text below if something is unclear.

Conventions: I include both the commands you type in your Terminal and some of the output from these commands, the output being where most of the errors appear that I work on in the discussion.

Input is formatted as below:

Text you put in (copy + paste should be fine)

Output is formatted as below:

Text you get out (for checking results and reproducing errors)

1. Introduction

This work began as an attempt to build a CUDA-friendly version of the molecular dynamics package GROMACS (which will come later) but, for reasons stemming from a new local Syracuse Meetup Group (Bitcoin’s of New York – Miner’s of Syracuse. Consider joining!), the formation of our very own local mining pool (Salt City Miners, miner.saltcityminers.com. Consider joining!), plus a “what the hell” to see if it was an easy build or not, transformed into the CudaMiner-centric compiling post you see here.

NOTE: This will be a 64-bit-centric install but I’ll include 32-bit content as I’ve found the info on other sites.

2. Installing The NVIDIA Drivers (Two Methods, The Easy One Described)

Having run through this process many times in a fresh install of Ubuntu 12.04 LTS (so nothing else is on the machine except 12.04 LTS, its updates, a few extra installs, and the CUDA/CudaMiner codes), I can say that what is below should work without hitch AFTER you install the NVIDIA drivers. Once your NVIDIA card is installed and Ubuntu recognizes it, you’ve two options.

2A. Install The Drivers From An NVIDIA Download (The Hard Version)

A few websites (and several repostings of the same content) describe the process of installing the NVIDIA drivers the olde-fashioned way, in which you’ll see references to “blacklist nouveau,” “sudo service lightdm stop,” Ctrl+Alt+F1 (to get you to a text-only session), etc. You hopefully don’t need to do this much work for your own NVIDIA install, as Ubuntu will do it for you (with only one restart required).

2B. Install The Drivers After The “Restricted Drivers Available” Pop-Up Or Go To System Settings > Available Drivers (The Easy, Teenage New York Version)

I took the easy way out by letting Ubuntu do the dirty work. The result is the installation of the (currently, as of 28 Dec 2013) v. 319 NVIDIA accelerated graphics driver. For my NVIDIA cards (GTX 690 and a GTX 650 Ti, although I assume it’s similar for a whole class of NVIDIA cards), you’re (currently, check the date again) given the option of v. 304. Don’t! I’ve seen several mentions of CudaMiner (and some of the cuds toolkit) requiring v. 319.

2013dec28_nvidia_1

Caption: You may see it in the upper right (after an install or if you’ve not clicked on it before)

2013dec28_nvidia_2

Caption: Or System Settings > Additional Drivers

2013dec28_nvidia_3

Caption: Either way, you’ll hopefully get to an NVIDIA driver list like above.

3. Pre-CUDA Toolkit Install

There are a few apt-get’s you need to do before installing the CUDA Toolkit (or, at least, the consensus is that these must be done. I’ve not seen a different list in any posts and I didn’t bother to install one-by-one to see which of these might not be needed).

If you perform the most commonly posted apt-get (plus and update and upgrade if you’ve not done so lately):

user@host:~/$ sudo apt-get update
user@host:~/$ sudo apt-get upgrade
user@host:~/$ sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev

You’ll get the following error from a fresh 12.04 LTS install:

Reading package lists… Done
Building dependency tree
Reading state information… Done
libglu1-mesa is already the newest version.
libglu1-mesa set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libgl1-mesa-glx : Depends: libglapi-mesa (= 8.0.4-0ubuntu0.6)
Recommends: libgl1-mesa-dri (>= 7.2)
E: Unable to correct problems, you have held broken packages.

The solution here is simple. Add libglapi-mesa and libgl1-mesa-dri to your install.

user@host:~/$ sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libglapi-mesa libgl1-mesa-dri

Doing this will add a bunch of programs and libraries (listed below):

The following extra packages will be installed:
dpkg-dev freeglut3 g++ g++-4.6 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libdpkg-perl libdrm-dev libgl1-mesa-dev libice-dev libkms1 libllvm3.0
libpthread-stubs0 libpthread-stubs0-dev libsm-dev libstdc++6-4.6-dev libtimedate-perl libx11-doc
libxau-dev libxcb1-dev libxdmcp-dev libxext-dev libxmu-headers libxt-dev mesa-common-dev
x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev xorg-sgml-doctools
xserver-xorg xserver-xorg-core xserver-xorg-input-evdev xtrans-dev
Suggested packages:
debian-keyring g++-multilib g++-4.6-multilib gcc-4.6-doc libstdc++6-4.6-dbg libglide3
libstdc++6-4.6-doc libxcb-doc xfonts-100dpi xfonts-75dpi
The following packages will be REMOVED:
libgl1-mesa-dri-lts-raring libgl1-mesa-glx-lts-raring libglapi-mesa-lts-raring
libxatracker1-lts-raring x11-xserver-utils-lts-raring xserver-common-lts-raring
xserver-xorg-core-lts-raring xserver-xorg-input-all-lts-raring xserver-xorg-input-evdev-lts-raring
xserver-xorg-input-mouse-lts-raring xserver-xorg-input-synaptics-lts-raring
xserver-xorg-input-vmmouse-lts-raring xserver-xorg-input-wacom-lts-raring xserver-xorg-lts-raring
xserver-xorg-video-all-lts-raring xserver-xorg-video-ati-lts-raring
xserver-xorg-video-cirrus-lts-raring xserver-xorg-video-fbdev-lts-raring
xserver-xorg-video-intel-lts-raring xserver-xorg-video-mach64-lts-raring
xserver-xorg-video-mga-lts-raring xserver-xorg-video-modesetting-lts-raring
xserver-xorg-video-neomagic-lts-raring xserver-xorg-video-nouveau-lts-raring
xserver-xorg-video-openchrome-lts-raring xserver-xorg-video-r128-lts-raring
xserver-xorg-video-radeon-lts-raring xserver-xorg-video-s3-lts-raring
xserver-xorg-video-savage-lts-raring xserver-xorg-video-siliconmotion-lts-raring
xserver-xorg-video-sis-lts-raring xserver-xorg-video-sisusb-lts-raring
xserver-xorg-video-tdfx-lts-raring xserver-xorg-video-trident-lts-raring
xserver-xorg-video-vesa-lts-raring xserver-xorg-video-vmware-lts-raring
The following NEW packages will be installed:
build-essential dpkg-dev freeglut3 freeglut3-dev g++ g++-4.6 libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libdrm-dev libgl1-mesa-dev
libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglu1-mesa-dev libice-dev libkms1 libllvm3.0
libpthread-stubs0 libpthread-stubs0-dev libsm-dev libstdc++6-4.6-dev libtimedate-perl libx11-dev
libx11-doc libxau-dev libxcb1-dev libxdmcp-dev libxext-dev libxi-dev libxmu-dev libxmu-headers
libxt-dev mesa-common-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-xext-dev
xorg-sgml-doctools xserver-xorg xserver-xorg-core xserver-xorg-input-evdev xtrans-dev

And, remarkably, that’s it for the pre-install.

4. CUDA Toolkit 5.5(.22) Install

The CUDA Toolkit install starts with its 810 MB download at developer.NVIDIA.com/cuda-downloads.

Obviously, be aware of the 32- and 64-bit options. Also, the .deb doesn’t currently download, leaving you to grab the .run file (same difference, I haven’t bothered to find out why the .deb doesn’t fly yet).

Off to your Terminal and into the Downloads folder:

user@host:~/$ cd Downloads
user@host:~/Downloads$ chmod +x cuda_5.5.22_linux_64.run
user@host:~/Downloads$ sudo ./cuda_5.5.22_linux_64.run

Which will produce:

Logging to /tmp/cuda_install_14755.log
Using more to view the EULA.
End User License Agreement
————————–
. . .
and cannot be linked to any personally identifiable
information. Personally identifiable information such as your
username or hostname is not collected.

————————————————————-

Finally, some input to be had after the scrolling:

Do you accept the previously read EULA? (accept/decline/quit): accept     
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 319.37? ((y)es/(n)o/(q)uit): n
Install the CUDA 5.5 Toolkit? ((y)es/(n)o/(q)uit): y
Enter Toolkit Location [ default is /usr/local/cuda-5.5 ]: 
Install the CUDA 5.5 Samples? ((y)es/(n)o/(q)uit): y
Enter CUDA Samples Location [ default is /home/user/NVIDIA_CUDA-5.5_Samples ]: 

NOTE 1: Don’t install the NVIDIA Accelerated Graphics Driver!
NOTE 2: Yes, install the Toolkit.
NOTE 3: I will assume this location for all of the below, setting the location in the PATH.
NOTE 4: I installed the samples for testing (and found a few extra things that need installation for them).
NOTE 5: Default is fine. Once built and tested, can be deleted (although the Mandelbrot is a keeper)

Installing the CUDA Toolkit in /usr/local/cuda-5.5 …
Installing the CUDA Samples in /home/user/NVIDIA_CUDA-5.5_Samples …
Copying samples to /home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples now…
Finished copying samples.

===========
= Summary =
===========

Driver: Not Selected
Toolkit: Installed in /usr/local/cuda-5.5
Samples: Installed in /home/user/NVIDIA_CUDA-5.5_Samples

* Please make sure your PATH includes /usr/local/cuda-5.5/bin

* Please make sure your LD_LIBRARY_PATH
* for 32-bit Linux distributions includes /usr/local/cuda-5.5/lib
* for 64-bit Linux distributions includes /usr/local/cuda-5.5/lib64:/lib
* OR
* for 32-bit Linux distributions add /usr/local/cuda-5.5/lib
* for 64-bit Linux distributions add /usr/local/cuda-5.5/lib64 and /lib
* to /etc/ld.so.conf and run ldconfig as root

* To uninstall CUDA, remove the CUDA files in /usr/local/cuda-5.5
* Installation Complete

Please see CUDA_Getting_Started_Linux.pdf in /usr/local/cuda-5.5/doc/pdf for detailed information on setting up CUDA.

***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 319.00 is required for CUDA 5.5 functionality to work.
To install the driver using this installer, run the following command, replacing with the name of this run file:
sudo
.run -silent -driver

Logfile is /tmp/cuda_install_14755.log

And ignore the WARNING.

As per the “make sure” above, add the CUDA distro folders to your path and LD_LIBRARY_PATH (I chose not to modify ld.so.conf)

user@host:~/Downloads$ cd
user@host:~/$ nano .bashrc

Add the PATH and LD_LIBRARY_PATH as follows:

PATH=$PATH:/usr/local/cuda-5.5/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-5.5/lib64:/lib

And then source the .bashrc file.

user@host:~/$ source .bashrc

5. NVIDIA_CUDA-5.5_Samples (And Finishing The Toolkit Install To Build CudaMiner)

The next set of installs and file modifications came from attempting to build the Samples in the NVIDIA_CUDA-5.5_Samples (or NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples depending on how your install did it) library, during which time I think I managed to hit all of the post-Toolkit install modifications needed to make the CudaMiner build problem-free. The OpenMPI install is optional, but I do hate error messages.

5A. Error 1: /usr/bin/ld: cannot find -lcuda

My first make attempt produced the following error:

user@host:~/$ cd NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples
user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples$ make

make[1]: Entering directory `/home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/0_Simple/asyncAPI’
“/usr/local/cuda-5.5″/bin/nvcc -ccbin g++ -I../../common/inc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\”sm_35,compute_35\” -o asyncAPI.o -c asyncAPI.cu
. . .
“/usr/local/cuda-5.5″/bin/nvcc -ccbin g++ -I../../common/inc -m64 -o vectorAddDrv.o -c vectorAddDrv.cpp
“/usr/local/cuda-5.5″/bin/nvcc -ccbin g++ -m64 -o vectorAddDrv vectorAddDrv.o -L/usr/lib/NVIDIA-current -lcuda
/usr/bin/ld: cannot find -lcuda
collect2: ld returned 1 exit status
make[1]: *** [vectorAddDrv] Error 1
make[1]: Leaving directory `/home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/0_Simple/vectorAddDrv’
make: *** [0_Simple/vectorAddDrv/Makefile.ph_build] Error 2

This is solved by making a symbolic link for libcuda.so out of /usr/lib/NVIDIA-319/ and into /usr/lib/

NOTE: It doesn’t matter what directory you do this from. I’ve left off the NVIDIA_CUDA-5.5_Samples/ yadda yadda below.

user@host:~/$ sudo ln -s /usr/lib/NVIDIA-319/libcuda.so /usr/lib/libcuda.so

If you’re working through the build process and hit the error, run a “make clean” before rerunning.

5B. WARNING – No MPI compiler found.

The second build attempt produced the MPI Warning above.

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples$ make

make[1]: Entering directory `/home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/0_Simple/asyncAPI’
“/usr/local/cuda-5.5″/bin/nvcc -ccbin g++ -I../../common/inc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\”sm_35,compute_35\” -o asyncAPI.o -c asyncAPI.cu
“/usr/local/cuda-5.5″/bin/nvcc -ccbin g++ -m64 -o asyncAPI asyncAPI.o
. . .
cp simpleCubemapTexture ../../bin/x86_64/linux/release
make[1]: Leaving directory `/home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/0_Simple/simpleCubemapTexture’
———————————————————————————————–
WARNING – No MPI compiler found.
———————————————————————————————–
CUDA Sample “simpleMPI” cannot be built without an MPI Compiler.
This will be a dry-run of the Makefile.
For more information on how to set up your environment to build and run this
sample, please refer the CUDA Samples documentation and release notes
———————————————————————————————–
make[1]: Entering directory `/home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/0_Simple/simpleMPI’
[@] mpicxx -I../../common/inc -o simpleMPI.o -c simpleMPI.cpp
. . .
mkdir -p ../../bin/x86_64/linux/release
cp histEqualizationNPP ../../bin/x86_64/linux/release
make[1]: Leaving directory `/home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/7_CUDALibraries/histEqualizationNPP’
Finished building CUDA samples

But otherwise finishes successfully.

To get around this warning, install OpenMPI (which is needed for multi-board GROMACS runs anyway. But, again, not needed for CudaMiner). The specific issue is the need for mpicc, which is in libopenmpi-dev (not openmpi-bin or openmpi-common).

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples$ mpicc
The program ‘mpicc’ can be found in the following packages:
* lam4-dev
* libmpich-mpd1.0-dev
* libmpich-shmem1.0-dev
* libmpich1.0-dev
* libmpich2-dev
* libopenmpi-dev
* libopenmpi1.5-dev
Try: sudo apt-get install

For completeness, I grab all three (and I’m ingnoring the NVIDIA_CUDA-5.5_Samples directory structure below).

user@host:~/$ sudo apt-get install openmpi-bin openmpi-common libopenmpi-dev

Running mpicc will now produce the following (so it’s there):

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples$ mpicc
gcc: fatal error: no input files
compilation terminated.

Now run a “make clean” if needed and make. The build should go without problem.

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples$ make

make[1]: Entering directory `/home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/0_Simple/asyncAPI’
“/usr/local/cuda-5.5″/bin/nvcc -ccbin g++ -I../../common/inc -m64 -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\”sm_35,compute_35\” -o asyncAPI.o -c asyncAPI.cu
“/usr/local/cuda-5.5″/bin/nvcc -ccbin g++ -m64 -o asyncAPI asyncAPI.o
mkdir -p ../../bin/x86_64/linux/release
. . .
mkdir -p ../../bin/x86_64/linux/release
cp histEqualizationNPP ../../bin/x86_64/linux/release
make[1]: Leaving directory `/home/user/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/7_CUDALibraries/histEqualizationNPP’
Finished building CUDA samples

5C. Needed post-processing (lib glut, cuda.conf, NVIDIA.conf, and ldconfig)

The next round of problems stemmed from not being able to run the randomFog program in the new ~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/bin/x86_64/linux/release folder. I suspect the steps taken to remedy this also make all future CUDA-specific work easier, so list the issues and clean-up steps below.

Out of the list of build samples, I selected a few that worked without issue and, finally, randomFog that decidedly had issues:

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/$ cd bin/x86_64/linux/release
user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/bin/x86_64/linux/release$ ls
alignedTypes HSOpticalFlow simpleCUBLAS
asyncAPI imageDenoising simpleCUDA2GL
bandwidthTest imageSegmentationNPP simpleCUFFT
batchCUBLAS inlinePTX simpleDevLibCUBLAS
bicubicTexture interval simpleGL
bilateralFilter jpegNPP simpleHyperQ
bindlessTexture lineOfSight simpleIPC
binomialOptions Mandelbrot simpleLayeredTexture
BlackScholes marchingCubes simpleMPI
boxFilter matrixMul simpleMultiCopy
boxFilterNPP matrixMulCUBLAS simpleMultiGPU
cdpAdvancedQuicksort matrixMulDrv simpleP2P
cdpBezierTessellation matrixMulDynlinkJIT simplePitchLinearTexture
cdpLUDecomposition matrixMul_kernel64.ptx simplePrintf
cdpQuadtree MC_EstimatePiInlineP simpleSeparateCompilation
cdpSimplePrint MC_EstimatePiInlineQ simpleStreams
cdpSimpleQuicksort MC_EstimatePiP simpleSurfaceWrite
clock MC_EstimatePiQ simpleTemplates
concurrentKernels MC_SingleAsianOptionP simpleTexture
conjugateGradient mergeSort simpleTexture3D
conjugateGradientPrecond MersenneTwisterGP11213 simpleTextureDrv
convolutionFFT2D MonteCarloMultiGPU simpleTexture_kernel64.ptx
convolutionSeparable nbody simpleVoteIntrinsics
convolutionTexture newdelete simpleZeroCopy
cppIntegration oceanFFT smokeParticles
cppOverload particles SobelFilter
cudaOpenMP postProcessGL SobolQRNG
dct8x8 ptxjit sortingNetworks
deviceQuery quasirandomGenerator stereoDisparity
deviceQueryDrv radixSortThrust template
dwtHaar1D randomFog template_runtime
dxtc recursiveGaussian threadFenceReduction
eigenvalues reduction threadMigration
fastWalshTransform scalarProd threadMigration_kernel64.ptx
FDTD3d scan transpose
fluidsGL segmentationTreeThrust vectorAdd
freeImageInteropNPP shfl_scan vectorAddDrv
FunctionPointers simpleAssert vectorAdd_kernel64.ptx
grabcutNPP simpleAtomicIntrinsics volumeFiltering
histEqualizationNPP simpleCallback volumeRender
histogram simpleCubemapTexture

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/bin/x86_64/linux/release$ ./randomFog

And you get the following error:

./randomFog: error while loading shared libraries: libcurand.so.5.5: cannot open shared object file: No such file or directory

I originally thought this error might have something to with libglut based on other install sites I ran across. I therefore took the step of adding the symbolic link from /usr/lib/x86_64-linux-gnu to /usr/lib

user@host:~$ sudo ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so

That said, same issue:

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/bin/x86_64/linux/release$ ./randomFog
./randomFog: error while loading shared libraries: libcurand.so.5.5: cannot open shared object file: No such file or directory

I then found references to adding a cuda.conf file to /etc/ld.so.conf.d – and so did that (doesn’t help but it came up enough that I suspect it doesn’t hurt either).

user@host:~$ sudo nano /etc/ld.so.conf.d/cuda.conf 

This file should contain the following:

/usr/local/cuda-5.5/lib64
/usr/local/cuda-5.5/lib

Which also didn’t help.

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/bin/x86_64/linux/release$ ./randomFog 

./randomFog: error while loading shared libraries: libcurand.so.5.5: cannot open shared object file: No such file or directory

To find the location (or presence) of libcurand, ldconfig -v

user@host:~/$ ldconfig -v

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/bin/x86_64/linux/release$ ldconfig -v
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu’ given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu’ given more than once
/usr/local/cuda-5.5/lib64:
libcuinj64.so.5.5 -> libcuinj64.so.5.5.22
libcufft.so.5.5 -> libcufft.so.5.5.22
libcurand.so.5.5 -> libcurand.so.5.5.22
libcusparse.so.5.5 -> libcusparse.so.5.5.22
. . .
libnvToolsExt.so.1 -> libnvToolsExt.so.1.0.0
/usr/local/cuda-5.5/lib:
libcufft.so.5.5 -> libcufft.so.5.5.22
libcurand.so.5.5 -> libcurand.so.5.5.22
libcusparse.so.5.5 -> libcusparse.so.5.5.22
. . .
/usr/lib/NVIDIA-319/tls: (hwcap: 0×8000000000000000)
libNVIDIA-tls.so.319.32 -> libNVIDIA-tls.so.319.32
/usr/lib32/NVIDIA-319/tls: (hwcap: 0×8000000000000000)
libNVIDIA-tls.so.319.32 -> libNVIDIA-tls.so.319.32
/sbin/ldconfig.real: Can’t create temporary cache file /etc/ld.so.cache~: Permission denied

Present twice. Instead of risking making multiple symbolic links as I walked through the dependency gauntlet, I stumbled across another reference in the form of a new /etc/ld.so.conf.d/NVIDIA.conf that contains the same content as cuda.conf (so one may not be needed, but I didn’t bother to backtrack to see. Happy to change the page if someone says otherwise).

user@host:~/$ sudo nano /etc/ld.so.conf.d/NVIDIA.conf

/usr/local/cuda-5.5/lib64
/usr/local/cuda-5.5/lib

Then run ldconfig.

user@host:~/$ sudo ldconfig

With that, randomFog works just fine (and you can assume that a problem in one is a problem in several. Having not taken the full symbolic link route in favor of adding to /etc/ld.so.conf.d, I’m assuming I hit most of the potential errors for the other programs.

user@host:~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/bin/x86_64/linux/release$ ./randomFog 

Random Fog
==========

CURAND initialized

Random number visualization

6. Build CudaMiner

The good news is that there are only a few more steps. The bad news is that any errors you come across in your attempt to build CudaMiner that relate to NOT having done the above are (likely) not represented here, so hopefully your search was sufficiently vague.

Download CudaMiner-master.zip from Christian Buchner’s github account. Extracting CudaMiner-master.zip (with unzip, not gunzip. Damn Windows users) and running configure produces only one obvious error.

user@host:~/WHEREVER_YOU_ARE/$ cd
user@host:~/$ cd Downloads
user@host:~/Downloads$ unzip CudaMiner-master.zip 
user@host:~/Downloads$ cd CudaMiner-master/
user@host:~/Downloads/CudaMiner-master$ chmod a+wrx configure
user@host:~/Downloads/CudaMiner-master$ ./configure

checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
. . .
checking for gawk… (cached) mawk
checking for curl-config… no
checking whether libcurl is usable… no
configure: error: Missing required libcurl >= 7.15.2

This error is remedied by installing libcurl4-gnutls-dev.

user@host:~/Downloads/CudaMiner-master$ sudo apt-get install libcurl4-gnutls-dev 

Which adds and modifies the following from my clean 12.04 LTS install and update

The following packages were automatically installed and are no longer required:
gir1.2-ubuntuoneui-3.0 libxcb-dri2-0 libxrandr-ltsr2 libubuntuoneui-3.0-1 libxvmc1 thunderbird-globalmenu
libllvm3.2
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
comerr-dev krb5-multidev libgcrypt11-dev libgnutls-dev libgnutls-openssl27 libgnutlsxx27 libgpg-error-dev
libgssrpc4 libidn11-dev libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6 libkrb5-dev libldap2-dev
libp11-kit-dev librtmp-dev libtasn1-3-dev zlib1g-dev
Suggested packages:
krb5-doc libcurl3-dbg libgcrypt11-doc gnutls-doc gnutls-bin krb5-user
The following NEW packages will be installed:
comerr-dev krb5-multidev libcurl4-gnutls-dev libgcrypt11-dev libgnutls-dev libgnutls-openssl27
libgnutlsxx27 libgpg-error-dev libgssrpc4 libidn11-dev libkadm5clnt-mit8 libkadm5srv-mit8 libkdb5-6
libkrb5-dev libldap2-dev libp11-kit-dev librtmp-dev libtasn1-3-dev zlib1g-dev

After a make clean, configure and make for CudaMiner went without problem.

user@host:~/Downloads/CudaMiner-master$ make clean
user@host:~/Downloads/CudaMiner-master$ ./configure

checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
. . .
configure: creating ./config.status
config.status: creating Makefile
config.status: creating compat/Makefile
config.status: creating compat/jansson/Makefile
config.status: creating cpuminer-config.h
config.status: cpuminer-config.h is unchanged
config.status: executing depfiles commands

user@host:~/Downloads/CudaMiner-master$ make

make all-recursive
make[1]: Entering directory `/home/user/Downloads/CudaMiner-master’
Making all in compat
make[2]: Entering directory `/home/user/Downloads/CudaMiner-master/compat’
Making all in jansson
make[3]: Entering directory `/home/user/Downloads/CudaMiner-master/compat/jansson’
. . .
./spinlock_kernel.cu(387): Warning: Cannot tell what pointer points to, assuming global memory space
./spinlock_kernel.cu(387): Warning: Cannot tell what pointer points to, assuming global memory space
./spinlock_kernel.cu(387): Warning: Cannot tell what pointer points to, assuming global memory space
. . .
nvcc -g -O2 -Xptxas “-abi=no -v” -arch=compute_10 –maxrregcount=64 –ptxas-options=-v -I./compat/jansson -o legacy_kernel.o -c legacy_kernel.cu
./legacy_kernel.cu(310): Warning: Cannot tell what pointer points to, assuming global memory space
./legacy_kernel.cu(310): Warning: Cannot tell what pointer points to, assuming global memory space
./legacy_kernel.cu(310): Warning: Cannot tell what pointer points to, assuming global memory space
. . .
g++ -g -O2 -pthread -L/usr/local/cuda/lib64 -o cudaminer cudaminer-cpu-miner.o cudaminer-util.o cudaminer-sha2.o cudaminer-scrypt.o salsa_kernel.o spinlock_kernel.o legacy_kernel.o fermi_kernel.o kepler_kernel.o test_kernel.o titan_kernel.o -L/usr/lib/x86_64-linux-gnu -lcurl -Wl,-Bsymbolic-functions -Wl,-z,relro compat/jansson/libjansson.a -lpthread -lcudart -fopenmp
make[2]: Leaving directory `/home/user/Downloads/CudaMiner-master’
make[1]: Leaving directory `/home/user/Downloads/CudaMiner-master’

A few warnings (well, several hundred of the same warnings) appeared during the build process (but don’t affect the program operation. Just pointing them out above).

With luck, you should be able to run a benchmark calculation immediately.

user@host:~/Downloads/CudaMiner-master$ ./cudaminer -d 0 -i 0 --benchmark

*** CudaMiner for NVIDIA GPUs by Christian Buchner ***
This is version 2013-12-18 (beta)
based on pooler-cpuminer 2.3.2 (c) 2010 Jeff Garzik, 2012 pooler
Cuda additions Copyright 2013 Christian Buchner
My donation address: LKS1WDKGED647msBQfLBHV3Ls8sveGncnm

[2013-12-25 00:05:38] 1 miner threads started, using ‘scrypt’ algorithm.
[2013-12-25 00:05:58] GPU #0: GeForce GTX 690 with compute capability 3.0
[2013-12-25 00:05:58] GPU #0: the ‘K’ kernel requires single memory allocation
[2013-12-25 00:05:58] GPU #0: interactive: 0, tex-cache: 0 , single-alloc: 1
[2013-12-25 00:05:58] GPU #0: Performing auto-tuning (Patience…)
[2013-12-25 00:05:58] GPU #0: maximum warps: 447
[2013-12-25 00:07:40] GPU #0: 288.38 khash/s with configuration K27x4
[2013-12-25 00:07:40] GPU #0: using launch configuration K27x4
[2013-12-25 00:07:40] GPU #0: GeForce GTX 690, 6912 hashes, 0.06 khash/s
[2013-12-25 00:07:40] Total: 0.06 khash/s
[2013-12-25 00:07:40] GPU #0: GeForce GTX 690, 3456 hashes, 141.56 khash/s
[2013-12-25 00:07:40] Total: 141.56 khash/s
[2013-12-25 00:07:43] GPU #0: GeForce GTX 690, 708480 hashes, 251.11 khash/s
[2013-12-25 00:07:43] Total: 251.11 khash/s
[2013-12-25 00:07:48] GPU #0: GeForce GTX 690, 1257984 hashes, 251.19 khash/s
[2013-12-25 00:07:48] Total: 251.19 khash/s
. . .

Then spend the rest of the week optimizing parameters for your particular card and mining proclivity:

user@host:~/Downloads/CudaMiner-master$ ./cudaminer -h
	   *** CudaMiner for NVIDIA GPUs by Christian Buchner ***
	             This is version 2013-12-18 (beta)
	based on pooler-cpuminer 2.3.2 (c) 2010 Jeff Garzik, 2012 pooler
	       Cuda additions Copyright 2013 Christian Buchner
	   My donation address: LKS1WDKGED647msBQfLBHV3Ls8sveGncnm

Usage: cudaminer [OPTIONS]
Options:
  -a, --algo=ALGO       specify the algorithm to use
                          scrypt    scrypt(1024, 1, 1) (default)
                          sha256d   SHA-256d
  -o, --url=URL         URL of mining server (default: http://127.0.0.1:9332/)
  -O, --userpass=U:P    username:password pair for mining server
  -u, --user=USERNAME   username for mining server
  -p, --pass=PASSWORD   password for mining server
      --cert=FILE       certificate for mining server using SSL
  -x, --proxy=[PROTOCOL://]HOST[:PORT]  connect through a proxy
  -t, --threads=N       number of miner threads (default: number of processors)
  -r, --retries=N       number of times to retry if a network call fails
                          (default: retry indefinitely)
  -R, --retry-pause=N   time to pause between retries, in seconds (default: 30)
  -T, --timeout=N       network timeout, in seconds (default: 270)
  -s, --scantime=N      upper bound on time spent scanning current work when
                          long polling is unavailable, in seconds (default: 5)
      --no-longpoll     disable X-Long-Polling support
      --no-stratum      disable X-Stratum support
  -q, --quiet           disable per-thread hashmeter output
  -D, --debug           enable debug output
  -P, --protocol-dump   verbose dump of protocol-level activities
      --no-autotune     disable auto-tuning of kernel launch parameters
  -d, --devices         takes a comma separated list of CUDA devices to use.
                        This implies the -t option with the threads set to the
                        number of devices.
  -l, --launch-config   gives the launch configuration for each kernel
                        in a comma separated list, one per device.
  -i, --interactive     comma separated list of flags (0/1) specifying
                        which of the CUDA device you need to run at inter-
                        active frame rates (because it drives a display).
  -C, --texture-cache   comma separated list of flags (0/1) specifying
                        which of the CUDA devices shall use the texture
                        cache for mining. Kepler devices will profit.
  -m, --single-memory   comma separated list of flags (0/1) specifying
                        which of the CUDA devices shall allocate their
                        scrypt scratchbuffers in a single memory block.
  -H, --hash-parallel   1 to enable parallel SHA256 hashing on the CPU. May
                        use more CPU overall, but distributes hashing load
                        neatly across all CPU cores. 0 is now the default
                        which assigns one static CPU core to each GPU.
  -S, --syslog          use system log for output messages
  -B, --background      run the miner in the background
      --benchmark       run in offline benchmark mode
  -c, --config=FILE     load a JSON-format configuration file
  -V, --version         display version information and exit
  -h, --help            display this help text and exit

I’ve only had a few problems with CudaMiner to date. The most annoying problem has been the inability to run tests to optimize card performance without having to put the machine to sleep and wake it back up again (better than a full restart). CudaMiner will, without this, simply hang on a script line:

[2013-12-25 00:49:08] 1 miner threads started, using ‘scrypt’ algorithm.

The sleep + wake does the trick, although I’d love to find out how to not have this happen.

The second annoying problem was:

“. . . result does not validate on CPU (i=NNNN, s=0)!

This error is due to your “K16x16″ configuration (the most prominent one I’ve found in google searches, so placed here to help others find it. Your values may vary) being too much for the card (so vary them down a spell until you don’t get there error). There’s a wealth of proper card settings available on the litecoin hardware comparison site, so I direct you there:

litecoin.info/Mining_hardware_comparison

7. And Finally. . .

By all accounts, CudaMiner is a much faster mining tool for NVIDIA owners. To that end, please note that Christian Buchner has made your life much easier (and your virtual wallet hopefully a little fuller). As mentioned above, his donation address is:

LKS1WDKGED647msBQfLBHV3Ls8sveGncnm

Do consider showing him some love.

This post was made in the interest of helping others get their mining going. If this guide helped and you score blocks early, my wallet’s always open as well (can’t blame someone for trying).

LTmicpwpGgrZiyiJmMUdyqq4CG8CqiBqrm

The timing for getting the guide up is based on a new mining operation here in Syracuse, NY in the form of Salt City Miners, currently the Cloud City of mining operations (also appropriate for the weather conditions). Parties interested in adding their power to the fold are more than welcome to sign up at miner.saltcityminers.com/.

2013dec28_scm_logo

And don’t forget the Meetup group: Syracuse Meetup Group – Bitcoin’s of New York – Miner’s of Syracuse

Brief Update: Amber 11 And AmberTools 1.5 In Ubuntu 12.04 LTS

Saturday, June 30th, 2012

This post is a brief update to a much longer and more involved discussion of Amber 11 and AmberTools installation in Ubuntu 10.04 LTS (Lucid Lynx) (as the changes are minor and the parallelization setup remains largely the same). You can find this more involved discussion at www.somewhereville.com/?p=1422.

Long/Short – the installation under Ubuntu 12.04 LTS (Precise Pangolin) is not much different and goes without hitch provided you keep your locations organized. NOTE 1: I’ve not a copy of Amber12, so cannot speak for any changes to its installation procedure. NOTE 2: This install assumes 32-bit only.

Updated Procedure

If you tried installing all of the build software from the 10.04 LTS post, you’ll receive errors like the following (as usual, I include error messages for those who are searching against error messages)…

user@machine:~$ sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libopenal1 libopenexr-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxi-dev libxml-simple-perl libxmu-dev mercurial nfs-common nfs-kernel-server portmap python2.6-dev rpm ssh

Errors…

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'rpcbind' instead of 'portmap'
Package libc6-i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libc6

Package libstdc++6-4.3-dbg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libstdc++6-4.3-doc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

...

Package lib32nss-mdns is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'ia32-libs' has no installation candidate
E: Package 'lib32asound2' has no installation candidate
E: Package 'lib32gcc1' has no installation candidate
E: Package 'lib32gcc1-dbg' has no installation candidate
E: Package 'lib32gfortran3' has no installation candidate
E: Package 'lib32gomp1' has no installation candidate
E: Package 'lib32mudflap0' has no installation candidate
E: Package 'lib32ncurses5' has no installation candidate
E: Package 'lib32nss-mdns' has no installation candidate
E: Package 'lib32z1' has no installation candidate
E: Unable to locate package libavdevice52
E: Package 'libc6-dev-i386' has no installation candidate
E: Package 'libc6-i386' has no installation candidate
E: Package 'libstdc++6-4.3-dbg' has no installation candidate
E: Package 'libstdc++6-4.3-dev' has no installation candidate
E: Package 'libstdc++6-4.3-doc' has no installation candidate
E: Unable to locate package python2.6-dev
E: Couldn't find any package by regex 'python2.6-dev'

The actual install list is smaller than above (reproduced below) to install the necessary additionals to the base 12.04 LTS install. The procedure begins with an aptitude install, update, and upgrade (perform or do not perform as you like).

administrator@ChemistryLab:~$ sudo apt-get install aptitude
administrator@ChemistryLab:~$ sudo aptitude update
administrator@ChemistryLab:~$ sudo aptitude upgrade
administrator@ChemistryLab:~$ sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs bison csh flex fort77 g++ gcc gfortran libbz2-dev libnetcdf-dev libopenmpi-dev libxext-dev libxt-dev openmpi-bin patch tcsh xorg-dev zlib1g-dev fftw-dev 

Amber11 and AmberTools 1.5 Install Specifics

Those used to sudo’ing everything will run into a compile complication with Amber11 as the $AMBERHOME assignment is not carried over into the make serial step:

make[1]: Entering directory `/opt/amber11/AmberTools/src/mmpbsa_py'
/bin/bash setup.sh
AMBERHOME is not set.  Assuming it is /opt/amber11
 Using AmberTools' python
Error importing MMPBSA python modules! MMPBSA.py will not work.
make[1]: *** [install] Error 1
make[1]: Leaving directory `/opt/amber11/AmberTools/src/mmpbsa_py'
make: *** [serial] Error 2

This is an avoidable annoyance by simply building in your $HOME directory and copying the resulting ~/amber11 folder to your desired location (and setting $PATH statements accordingly).

AmberTools 1.5 Install

Procedure is as found in the previous post (I am assuming that the files are sitting in your $HOME (cd ~/) fold…

tar xjf AmberTools-1.5.tar.bz2
cd amber11/
echo "export AMBERHOME=$PWD" >> ~/.bashrc
echo "export PATH=$PATH:$AMBERHOME/bin" >> ~/.bashrc
source ~/.bashrc
wget http://ambermd.org/bugfixes/AmberTools/1.5/bugfix.all
patch -p0 < bugfix.all
rm bugfix.all
cd AmberTools/src/
./configure gnu
make install

The Amber11 install is made slightly different than the previous instruction set by the download of the bugfix.all.tar.bz2 file and the different run of apply_bugfix.x. For a serial install...

tar xfj Amber11.tar.bz2
cd ~/
wget http://ambermd.org/bugfixes/11.0/bugfix.all.tar.bz2
wget http://ambermd.org/bugfixes/11.0/apply_bugfix.x
chmod +x ./apply_bugfix.x
./apply_bugfix.x bugfix.all.tar.bz2

You’ll get a few CUDA-specific errors during the bugfix. I skipped the last two patches as I’m not compiling a CUDA-specific version.

cd AmberTools/src/
./configure gnu
cd $AMBERHOME
./AT15_Amber11.py
cd src/
make serial

With this completed, move the amber11 folder to /opt (or wherever), modify your .bashrc, and run the tests.

cd ~/
sudo mv amber11 /opt
nano .bashrc

Place the following into the .bashrc file

export AMBERHOME=/opt/amber11

And run the tests…

cd /opt/amber11/test/
make -f Makefile

Abinit 6.8.1 In Parallel With OpenMPI 1.4.1 In Ubuntu 10.04.2 LTS (And Related)

Monday, July 18th, 2011

It has been a banner week for Ubuntu installations.

The installation of Abinit 5.6.5 with OpenMPI 1.3.1 (previously reported at www.somewhereville.com/?p=384) wasn’t bad, but several games had to be played (at the time) to make everything compile and run correctly. I’m pleased to report that Abinit 6.8.1 and OpenMPI 1.4.1 seem to play better together, this simplified considerably over the previous installation guide by the use of the apt-get version of OpenMPI 1.4.1. A bit of option calling in the configure step is needed (and the errors for not doing it are included below).

0. For the Antsy Copy+Paste Crowd

Commands below.

sudo apt-get install autoconf bison build-essential cmake csh doxygen flex fort77 freeglut3-dev g++ g++-multilib gcc gcc-multilib gettext gfortran gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libblas3gf libbz2-dev libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev liblapack3gf libnetcdf-dev libopenal1 libopenexr-dev libopenmpi-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxext-dev libxi-dev libxml-simple-perl libxmu-dev libxt-dev mercurial netcdf-bin nfs-common nfs-kernel-server openmpi-bin patch portmap python2.6-dev rpm ssh tcsh xorg-dev zlib1g-dev libblas-doc libblas-dev liblapack-doc liblapack-dev

sudo aptitude update

sudo aptitude upgrade

sudo shutdown -r now

pico .profile

INSERT: LD_LIBRARY_PATH="/usr/lib64/openmpi/lib/"

source .profile

gunzip abinit-6.8.1.tar.gz 

tar xvf abinit-6.8.1.tar 

cd abinit-6.8.1/

./configure --enable-mpi --with-mpi-level=2 FC=mpif90 --with-linalg-libs="-llapack -lblas"

make mj4

sudo make install

For the “why?” crowd, a bit more about the steps is provided below.

1. apt-get Installs

As has been standard procedure for all of my posts like this, I blindly install a “core set” of things I’ve needed for various other build processes and am largely uninterested in identifying specific things needed by each program I build (hard drives are cheap). This list below includes plenty you likely don’t need for Abinit installations. Feel free to send me a shortened list if you diagnose it.

The list below includes the OpenMPI installation and all of the build tools needed by Abinit. I finish the installation with an aptitude update/upgrade (which one can skip). If you’re using a 32-bit version of Ubuntu, you’ll get plenty of errors about not being able to find various lib32 files. Simply delete the “lib32___” stuff.

user@machine:~/abinit-6.8.1$ sudo apt-get install autoconf bison build-essential cmake csh doxygen flex fort77 freeglut3-dev g++ g++-multilib gcc gcc-multilib gettext gfortran gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libblas3gf libbz2-dev libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev liblapack3gf libnetcdf-dev libopenal1 libopenexr-dev libopenmpi-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxext-dev libxi-dev libxml-simple-perl libxmu-dev libxt-dev mercurial netcdf-bin nfs-common nfs-kernel-server openmpi-bin patch portmap python2.6-dev rpm ssh tcsh xorg-dev zlib1g-dev libblas-doc libblas-dev liblapack-doc liblapack-dev
user@machine:~$ sudo aptitude update
user@machine:~$ sudo aptitude upgrade
user@machine:~$ sudo shutdown -r now

2. LD_LIBRARY_PATH Addition To .profile

If you’re using a 32-bit Ubuntu install, change the “lib64″ to simply “lib”.

user@machine:~$ pico .profile

Copy and paste the following into your .profile.

LD_LIBRARY_PATH="/usr/lib64/openmpi/lib/"

Crtl-X and Yes.

user@machine:~$ source .profile

3. Installing Abinit 6.8.1

And the fun begins.

user@machine:~$ gunzip abinit-6.8.1.tar.gz 
user@machine:~$ tar xvf abinit-6.8.1.tar 
user@machine:~$ cd abinit-6.8.1/

NOTE: I performed several problematic trials before a successful parallel installation. If you saw the following from previous attempts…

configure: creating ./config.status
config.status: error: cannot find input file: `config.dump.in'

… don’t diagnose, just delete the current directory and re-extract a fresh copy of the abinit source.

My first simple ./configure run produced the following output:

DO NOT USE: user@machine:~/abinit-6.8.1$ ./configure

...

Summary of important options:

  * C compiler      : gnu version 4.4
  * Fortran compiler: gnu version 4.4
  * architecture    : unknown unknown (64 bits)

  * debugging       : basic
  * optimizations   : standard

  * MPI    enabled  : no
  * MPI-IO enabled  : no
  * GPU    enabled  : no (none)

  * TRIO   flavor = netcdf+etsf_io-fallback
  * TIMER  flavor = abinit (libs: ignored)
  * LINALG flavor = netlib-fallback (libs: internal)
  * FFT    flavor = none (libs: ignored)
  * MATH   flavor = none (libs: ignored)
  * DFT    flavor = libxc-fallback+atompaw-fallback+bigdft-fallback+wannier90-fallback

Configuration complete.
You may now type "make" to build ABINIT.
(or, on a SMP machine, "make mj4", or "make multi multi_nprocs=")

Note the lack of MPI-enabling. Changing the options in configure to announce-enable MPI and specify the compiler location…

DO NOT USE: user@machine:~/abinit-6.8.1$ ./configure --enable-mpi --with-mpi-prefix="/usr/bin"
 
Summary of important options:

  * C compiler      : gnu version 4.4
  * Fortran compiler: gnu version 4.4
  * architecture    : unknown unknown (64 bits)

  * debugging       : basic
  * optimizations   : standard

  * MPI    enabled  : yes
  * MPI-IO enabled  : yes
  * GPU    enabled  : no (none)

  * TRIO   flavor = netcdf+etsf_io-fallback
  * TIMER  flavor = abinit (libs: ignored)
  * LINALG flavor = netlib-fallback (libs: internal)
  * FFT    flavor = none (libs: ignored)
  * MATH   flavor = none (libs: ignored)
  * DFT    flavor = libxc-fallback+atompaw-fallback+bigdft-fallback+wannier90-fallback

Configuration complete.
You may now type "make" to build ABINIT.
(or, on a SMP machine, "make mj4", or "make multi multi_nprocs=")

… did show MPI enabled.

The thrill of ./configure victory was short-lived. My first attempt to make ended as follows:

DO NOT USE: user@machine:~/abinit-6.8.1$ make mj4

...

Error: Symbol 'xmpi_offset_kind' at (1) has no IMPLICIT type
m_xmpi.F90:1875.25:

 integer(XMPI_OFFSET_KIND),intent(inout) :: offset
                         1
Error: Symbol 'xmpi_offset_kind' at (1) has no IMPLICIT type
m_xmpi.F90:2002.25:

 integer(XMPI_OFFSET_KIND),intent(out) :: my_offpad
                         1
Error: Symbol 'xmpi_offset_kind' at (1) has no IMPLICIT type
m_xmpi.F90:2244.25:

 integer(XMPI_OFFSET_KIND),intent(in) :: offset
                         1
Error: Symbol 'xmpi_offset_kind' at (1) has no IMPLICIT type
Fatal Error: Error count reached limit of 25.
make[5]: *** [m_xmpi.o] Error 1
make[5]: Leaving directory `/home/user/abinit-6.8.1/src/12_hide_mpi'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/user/abinit-6.8.1/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/user/abinit-6.8.1'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/user/abinit-6.8.1'
make[1]: *** [multi] Error 2
make[1]: Leaving directory `/home/user/abinit-6.8.1'
make: *** [mj4] Error 2

As usual, I put the error here because you’re likely searching against the same errors in your build attempts. Your first solution might be to try to force specify the fortran compiler (especially if you’re familiar with the integer(XMPI_OFFSET_KIND) errors, which appeared to me at first blush to be something specific to the GNU fortran compiler choice). As the code’s in f90, calling f77 won’t do you much good…

DO NOT USE: user@machine:~/abinit-6.8.1$ ./configure --enable-mpi="yes" FC=f77

...

checking whether f77 accepts -g... yes
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f77 accepts -g... yes
configure: setting up Fortran 90
checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files
make[3]: *** [configure-stamp] Error 1
make[3]: Leaving directory `/home/user/abinit-6.8.1/plugins/netcdf'
make[2]: *** [package-ready] Error 2
make[2]: Leaving directory `/home/user/abinit-6.8.1/plugins/netcdf'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/abinit-6.8.1/plugins'
make: *** [multi] Error 2

Specifying gfortran might be your next solution,

DO NOT USE: user@machine:~/abinit-6.8.1$ ./configure --enable-mpi="yes" FC=gfortran --with-mpi-prefix=1

...

configure: Initializing MPI support
configure: looking for MPI in 1
configure: error: use --with-mpi-prefix or set FC, not both

And you may reach your moment of clarity. Why are you calling the non-mpi fortran compiler? Right! The BLAS and LAPACK are late additions (may or may not improve run speed).

user@machine:~/abinit-6.8.1$ ./configure --enable-mpi --with-mpi-level=2 FC=mpif90 --with-linalg-libs="-llapack -lblas"

 ...

 ==============================================================================
 === Overall startup                                                        ===
 ==============================================================================

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... (cached) gawk
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
configure: not loading options (no config file available)

 ==============================================================================
 === Build-system information                                               ===
 ==============================================================================

configure: ABINIT version 6.8.1
configure: M4 010416 - Autoconf 026800 - Automake 011100 - Libtool 020204
configure: reporting user interface changes:

 ==============================================================================
 === Option consistency checking                                            ===
 ==============================================================================

configure: checking consistency of library-related options
configure:  |---> all OK
configure: 
configure: checking consistency of plug-in options
configure:  |---> all OK
configure: 
configure: checking consistency of experimental options
configure:  |---> all OK
configure: 
configure:  |---> all OK
configure: 
configure: parsing command-line options

 ==============================================================================
 === Connector startup                                                      ===
 ==============================================================================

configure: Initializing MPI support
checking for mpirun... mpirun
configure: WARNING: MPI runner mpirun may be incompatible with MPI compilers
configure: compiler checks deferred
configure: GPU support disabled from command-line

 ==============================================================================
 === Utilities                                                              ===
 ==============================================================================

checking for sh... /bin/sh
checking for mv... /bin/mv
checking for perl... /usr/bin/perl
checking for rm... /bin/rm
checking for dvips... dvips
checking for dvipdf... dvipdf
checking for latex... no
checking for markdown... no
checking for patch... patch
checking for ps2pdf... ps2pdf
checking for tar... tar
checking for wget... wget
checking for curl... no
configure: using internal version of MarkDown

 ==============================================================================
 === C support                                                              ===
 ==============================================================================

checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking which type of compiler we have... gnu 4.4
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no

 ==============================================================================
 === C++ support                                                            ===
 ==============================================================================

checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking which type of C++ compiler we have... gnu 4.4

 ==============================================================================
 === Fortran support                                                        ===
 ==============================================================================

checking for mpif90... /usr/bin/mpif90
checking whether we are using the GNU Fortran compiler... yes
checking whether mpif90 accepts -g... yes
checking which type of Fortran compiler we have... gnu 4.4
checking fortran 90 modules extension... mod
checking for Fortran flag to compile .F90 files... none
configure: determining Fortran module case
checking whether Fortran modules are upper-case... no
checking how to get verbose linking output from mpif90... -v
checking for Fortran libraries of mpif90...  -L/usr/lib/openmpi/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3 -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../.. -L/usr/lib/x86_64-linux-gnu -lmpi_f90 -lmpi_f77 -lmpi -lopen-rte -lopen-pal -ldl -lnsl -lutil -lgfortranbegin -lgfortran -lm -lpthread
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore

 ==============================================================================
 === Python support                                                         ===
 ==============================================================================

checking for python... python
checking for Python CPPFLAGS... -I/usr/include/python2.6
checking for bzr... no
checking for Python NumPy headers... not found
checking numarray/arrayobject.h usability... no
checking numarray/arrayobject.h presence... no
checking for numarray/arrayobject.h... no

 ==============================================================================
 === Libraries and linking                                                  ===
 ==============================================================================

checking for ar... ar
checking for ranlib... ranlib

 ==============================================================================
 === Hints                                                                  ===
 ==============================================================================

checking for cpp... cpp
checking for a true C preprocessor... cpp
checking which cpp hints to apply... default/default/default
checking which cc hints to apply... gnu/default/default
checking which xpp hints to apply... none/none/none
checking which cxx hints to apply... gnu/default/default
checking which fpp hints to apply... default/default/default
checking which fc hints to apply... gnu/default/default
checking which ar hints to apply... none/none/none
checking which Fortran preprocessor to use... 
checking which Fortran preprocessor flags to apply... 
checking whether to wrap Fortran compiler calls... no

 ==============================================================================
 === Debugging                                                              ===
 ==============================================================================

checking debugging status... enabled (profile mode: basic)
configure: setting C debug flags to '-g'
configure: setting C++ debug flags to '-g'
configure: setting Fortran debug flags to '-g'
checking whether to activate debug mode in source files... no
checking which cc debug flags to apply... gnu/default/default
checking which cxx debug flags to apply... none/none/none
checking which fc debug flags to apply... gnu/default/default
checking whether to activate design-by-contract debugging... no

 ==============================================================================
 === Optimizations                                                          ===
 ==============================================================================

checking optimization status... enabled (profile mode: standard)
checking which cc optimizations to apply... gnu/default/default
checking which cxx optimizations to apply... gnu/default/default
checking which fc optimizations to apply... gnu/default/default
checking whether to apply per-directory optimizations... yes

 ==============================================================================
 === 64-bit support                                                         ===
 ==============================================================================

checking for a 64-bit architecture... yes
checking whether to use 64-bit flags... no
checking for user-defined 64-bit flags... 

 ==============================================================================
 === Build flags                                                            ===
 ==============================================================================

configure: static builds may be performed

 ==============================================================================
 === Advanced compiler features                                             ===
 ==============================================================================

checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking mcheck.h usability... yes
checking mcheck.h presence... yes
checking for mcheck.h... yes
checking for abort... yes
checking size of char... 1
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of unsigned int... 4
checking size of unsigned long... 8
checking size of unsigned long long... 8
checking size of float... 4
checking size of double... 8
checking size of long double... 16
checking size of size_t... 8
checking size of ptrdiff_t... 8
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether the Fortran compiler supports allocatable arrays in datatypes... yes
checking whether the Fortran compiler provides the iso_c_binding module... yes
checking whether the Fortran compiler accepts exit()... yes
checking whether the Fortran compiler accepts flush()... yes
checking whether the Fortran compiler accepts flush_()... no
checking whether the Fortran compiler accepts gamma()... yes
checking whether the Fortran compiler accepts getenv()... yes
checking whether the Fortran compiler accepts getpid()... no
checking whether the Fortran compiler accepts the null() intrinsic... yes
checking whether the Fortran compiler accepts quadruple integers... yes
checking whether the Fortran compiler accepts long lines... yes
checking whether the Fortran compiler supports stream IO... yes
checking whether the Fortran compiler accepts etime()... no
checking whether to use C clock for timings... no

 ==============================================================================
 === Connectors / Fallbacks                                                 ===
 ==============================================================================

checking whether the C compiler supports MPI... no
checking whether the C++ compiler supports MPI... no
checking whether the Fortran Compiler supports MPI... yes
checking whether MPI is usable... no
configure: WARNING: MPI support is broken!
configure: enabling MPI I/O support
checking whether to build MPI code... yes
checking whether to build MPI I/O code... yes
checking whether to build MPI time tracing code... no
checking which level of MPI is supported by the Fortran compiler... 2
configure: forcing MPI-2 standard support
checking whether the MPI library supports MPI_CREATE_TYPE_STRUCT... yes
checking whether to activate GPU support... no
checking for the requested transferable I/O support... netcdf+etsf_io
checking netcdf.h usability... yes
checking netcdf.h presence... yes
checking for netcdf.h... yes
checking for library containing nc_open... -lnetcdf
checking for library containing nf_open... -lnetcdff
checking for Fortran module includes... -I/usr/include
checking whether NetCDF Fortran wrappers work... yes
checking whether NetCDF supports MPI I/O... no
checking for ETSF_IO libraries to try... -letsf_io_utils -letsf_io
checking for Fortran module includes... -I/usr/include (cached)
checking whether ETSF_IO libraries work... no
configure: WARNING: falling back to internal etsf_io version
checking for the actual transferable I/O support... netcdf+etsf_io-fallback
checking for the requested timer support... abinit
checking for the actual timer support... abinit
checking for the requested linear algebra support... netlib
checking for BLAS support in specified libraries... no
checking for LAPACK support in specified libraries... no
checking for BLACS support in specified libraries... no
checking for ScaLAPACK support in specified libraries... no
checking whether we have a serial linear algebra support... no
configure: WARNING: falling back to internal linear algebra libraries
checking whether we have a parallel linear algebra support... no
checking for the actual linear algebra support... netlib-fallback
checking for the requested math support... none
checking for the actual math support... none
checking for the requested FFT support... none
checking for the actual FFT support... none
checking for the requested DFT support... atompaw+bigdft+libxc+wannier90
checking xc.h usability... no
checking xc.h presence... no
checking for xc.h... no
checking xc_funcs.h usability... no
checking xc_funcs.h presence... no
checking for xc_funcs.h... no
checking for library containing xc_func_init... no
checking for Fortran module includes... -I/usr/include (cached)
configure: WARNING: falling back to internal libxc version
configure: WARNING: AtomPAW recommends missing LibXC support
configure: WARNING: BigDFT requires missing linear algebra support
configure: WARNING: falling back to internal atompaw version
configure: WARNING: BigDFT requires missing LibXC support
configure: WARNING: BigDFT requires missing linear algebra support
configure: WARNING: falling back to internal bigdft version
configure: WARNING: wannier90 requires missing linear algebra support
configure: WARNING: falling back to internal wannier90 version
checking for the actual DFT support... libxc-fallback+atompaw-fallback+bigdft-fallback+wannier90-fallback
configure: using former plugins as a temporary workaround
configure: fallbacks to enable => atompaw bigdft etsf_io libxc linalg wannier90
checking whether to build atompaw... yes
checking whether to build bigdft... yes
checking whether to build etsf_io... yes
checking whether to build fox... no
checking whether to build libxc... yes
checking whether to build linalg... yes
checking whether to build netcdf... no
checking whether to build wannier90... yes
configure: using tarball repository /home/quantum/.abinit/tarballs
checking for a source tarball of LINALG... yes
checking for md5sum... md5sum
configure: tarball MD5 check succeeded
configure: applying LINALG tricks (vendor: gnu, version: 4.4)
checking whether to enable the LINALG fallback... yes
checking whether to build the LINALG fallback... yes
checking whether to enable the FOX fallback... no
checking whether to build the FOX fallback... no
checking whether to enable the NETCDF fallback... no
checking whether to build the NETCDF fallback... no
checking for a source tarball of ETSF_IO... yes
configure: tarball MD5 check succeeded
configure: applying ETSF_IO tricks (vendor: gnu, version: 4.4)
checking whether to enable the ETSF_IO fallback... yes
checking whether to build the ETSF_IO fallback... yes
checking for a source tarball of LIBXC... yes
configure: tarball MD5 check succeeded
configure: applying LIBXC tricks
checking whether to enable the LIBXC fallback... yes
checking whether to build the LIBXC fallback... yes
checking for a source tarball of ATOMPAW... yes
configure: tarball MD5 check succeeded
configure: applying AtomPAW tricks (vendor: gnu, version: 4.4)
checking whether to enable the ATOMPAW fallback... yes
checking whether to build the ATOMPAW fallback... yes
checking for a source tarball of BIGDFT... yes
configure: tarball MD5 check succeeded
configure: applying BigDFT tricks (vendor: gnu, version: 4.4)
checking whether to enable the BIGDFT fallback... yes
checking whether to build the BIGDFT fallback... yes
checking for a source tarball of WANNIER90... yes
configure: tarball MD5 check succeeded
configure: applying Wannier90 tricks (vendor: gnu, version: 4.4)
checking whether to enable the WANNIER90 fallback... yes
checking whether to build the WANNIER90 fallback... yes

 ==============================================================================
 === Nightly builds                                                         ===
 ==============================================================================

checking whether to build test timeout code... no
checking timeout for automatic tests... none

 ==============================================================================
 === Experimental developments                                              ===
 ==============================================================================

checking whether to enable bindings... no
checking whether to enable BSE unpacking... no
checking whether to enable CLib... no
checking whether to build exports... no
checking whether to accelerate 'make check'... no
checking whether to enable GW cut-off... no
checking whether to enable GW double-precision calculations... no
checking whether to enable optimal GW... no
checking whether to enable GW wrapper... no
checking whether to activate maintainer checks... no
checking whether to use macroave... yes
checking whether to reduce 'make check' for packaging... no
checking whether to read input from stdin... yes
checking whether to activate Symmetric Multi-Processing... no
checking whether to activate ZDOTC and ZDOTU workaround... no

 ==============================================================================
 === Subsystems                                                             ===
 ==============================================================================

configure: the Abinit GUI will never be built

 ==============================================================================
 === Output                                                                 ===
 ==============================================================================

configure: creating ./config.status
config.status: creating config.dump
config.status: creating config.mk
config.status: creating config.pc
config.status: creating config.sh
config.status: creating config/wrappers/wrap-fc
config.status: creating src/incs/Makefile
config.status: creating src/mods/Makefile
config.status: creating src/16_hideleave/m_build_info.F90
config.status: creating tests/tests.env
config.status: creating tests/tests-install.env
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/01_gsl_ext/Makefile
config.status: creating src/01_interfaces_ext/Makefile
config.status: creating src/01_macroavnew_ext/Makefile
config.status: creating src/01_qespresso_ext/Makefile
config.status: creating src/02_clib/Makefile
config.status: creating src/10_defs/Makefile
config.status: creating src/12_hide_mpi/Makefile
config.status: creating src/14_hidewrite/Makefile
config.status: creating src/15_gpu_toolbox/Makefile
config.status: creating src/16_hideleave/Makefile
config.status: creating src/18_memory_mpi/Makefile
config.status: creating src/18_timing/Makefile
config.status: creating src/27_toolbox_oop/Makefile
config.status: creating src/28_numeric_noabirule/Makefile
config.status: creating src/32_contract/Makefile
config.status: creating src/32_util/Makefile
config.status: creating src/42_geometry/Makefile
config.status: creating src/42_nlstrain/Makefile
config.status: creating src/42_parser/Makefile
config.status: creating src/43_ptgroups/Makefile
config.status: creating src/44_geomoptim/Makefile
config.status: creating src/45_psp_parser/Makefile
config.status: creating src/47_xml/Makefile
config.status: creating src/49_gw_toolbox_oop/Makefile
config.status: creating src/50_abitypes_defs/Makefile
config.status: creating src/51_manage_cuda/Makefile
config.status: creating src/51_manage_mpi/Makefile
config.status: creating src/52_fft_mpi_noabirule/Makefile
config.status: creating src/53_abiutil/Makefile
config.status: creating src/53_ffts/Makefile
config.status: creating src/53_spacepar/Makefile
config.status: creating src/56_mixing/Makefile
config.status: creating src/56_recipspace/Makefile
config.status: creating src/56_xc/Makefile
config.status: creating src/57_iovars/Makefile
config.status: creating src/59_io_mpi/Makefile
config.status: creating src/61_ionetcdf/Makefile
config.status: creating src/62_cg_noabirule/Makefile
config.status: creating src/62_iowfdenpot/Makefile
config.status: creating src/62_occeig/Makefile
config.status: creating src/62_poisson/Makefile
config.status: creating src/62_wvl_wfs/Makefile
config.status: creating src/63_bader/Makefile
config.status: creating src/64_atompaw/Makefile
config.status: creating src/65_nonlocal/Makefile
config.status: creating src/65_psp/Makefile
config.status: creating src/66_paw/Makefile
config.status: creating src/66_wfs/Makefile
config.status: creating src/67_common/Makefile
config.status: creating src/68_dmft/Makefile
config.status: creating src/68_recursion/Makefile
config.status: creating src/68_rsprc/Makefile
config.status: creating src/69_wfdesc/Makefile
config.status: creating src/70_gw/Makefile
config.status: creating src/71_bse/Makefile
config.status: creating src/72_response/Makefile
config.status: creating src/77_ddb/Makefile
config.status: creating src/77_lwf/Makefile
config.status: creating src/77_suscep/Makefile
config.status: creating src/79_seqpar_mpi/Makefile
config.status: creating src/83_cut3d/Makefile
config.status: creating src/93_rdm/Makefile
config.status: creating src/95_drive/Makefile
config.status: creating src/98_main/Makefile
config.status: creating src/libs/Makefile
config.status: creating tests/Nightly/Makefile
config.status: creating plugins/Makefile
config.status: creating plugins/atompaw/Makefile
config.status: creating plugins/bigdft/Makefile
config.status: creating plugins/etsf_io/Makefile
config.status: creating plugins/fox/Makefile
config.status: creating plugins/libxc/Makefile
config.status: creating plugins/linalg/Makefile
config.status: creating plugins/netcdf/Makefile
config.status: creating plugins/wannier90/Makefile
config.status: creating bindings/Makefile
config.status: creating bindings/parser/Makefile
config.status: creating doc/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing dump-optim commands
config.status: executing script-perms commands
config.status: executing long-lines commands

 ==============================================================================
 === Final remarks                                                          ===
 ==============================================================================


Summary of important options:

  * C compiler      : gnu version 4.4
  * Fortran compiler: gnu version 4.4
  * architecture    : unknown unknown (64 bits)

  * debugging       : basic
  * optimizations   : standard

  * MPI    enabled  : yes
  * MPI-IO enabled  : yes
  * GPU    enabled  : no (none)

  * TRIO   flavor = netcdf+etsf_io-fallback
  * TIMER  flavor = abinit (libs: ignored)
  * LINALG flavor = netlib-fallback (libs: internal)
  * FFT    flavor = none (libs: ignored)
  * MATH   flavor = none (libs: ignored)
  * DFT    flavor = libxc-fallback+atompaw-fallback+bigdft-fallback+wannier90-fallback

Configuration complete.
You may now type "make" to build ABINIT.
(or, on a SMP machine, "make mj4", or "make multi multi_nprocs=")

With that complete, we “make” our parallel Abinit install.

user@machine:~/abinit-6.8.1$ make mj4
user@machine:~/abinit-6.8.1$ sudo make install

The above runs successfully (for me) and places abinit in /usr/local/bin (which is already in your path).

To run tests, simply do the following:

user@machine:~/abinit-6.8.1$ cd tests/
user@machine:~/abinit-6.8.1/tests$ ls
user@machine:~/abinit-6.8.1/tests$ make tests_min
user@machine:~/abinit-6.8.1/tests$ 
user@machine:~/abinit-6.8.1/tests$ exit
user@adamant49:~/Programs$ exit

The above may not be an “optimized” installation, but works perfectly well (look for a possible tweak to the above that may effort some optimization).

Finally, running Abinit in parallel with OpenMPI is quite simple.

mpirun -np 4 /usr/local/bin/abinit < RUN.files >& RUN.log &

No -machinefile is needed, as we’re running in SMP mode, and no mpd daemon needs to be started.

Amber 11 And AmberTools 1.5 In Ubuntu 10.04 LTS (And Related, Including A How-To For EOL 8.10)

Saturday, July 16th, 2011

Having successfully navigated serial and parallel Amber10 installs under Ubuntu 8.10, I am pleased to report that the process for Amber11 with OpenMPI (from apt-get, one doesn’t have to build from scratch) under Ubuntu 10.10 is seemingly much easier (and have it here so I don’t forget). There is a bit of persnicketiness to the order of the serial and parallel installs that must be kept track of (and I’m building in serial-to-parallel order), but the process is otherwise straightforward.

For organizational purposes, I’m building amber11 in my $HOME directory. This removes some of the PATH issues with sudo-ing aspects of the install (and can be moved into another directory after the build is complete).

1. apt-get Installs

The search for dependent programs and libraries is a long and involved one given how many programs I have installed. Therefore, instead of trying to find all of the amber-dependent installs for successful building, I’m simply providing the list of everything I have on the test machine. As hard drives are cheap and Ubuntu will warn of conflicts, I recommend simply installing the below and accepting the 100 Mb hit to NOT have to find the smallest apt-get set (yes, some of these are obviously not needed).

sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libopenal1 libopenexr-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxi-dev libxml-simple-perl libxmu-dev mercurial nfs-common nfs-kernel-server portmap python2.6-dev rpm ssh

The above said, there are some obvious most-important installs that have to be there (according to the “official” Ubuntu amber11 install summary at ambermd.org/ubuntu.html). You could try to work with only these first if you were in a diagnostic mood today:

sudo apt-get install bison csh flex fort77 g++ gcc gfortran libbz2-dev libnetcdf-dev libopenmpi-dev libxext-dev libxt-dev openmpi-bin patch tcsh xorg-dev zlib1g-dev

With that, we move onto the AmberTools 1.5 install.

2. AmberTools 1.5 (Serial)

The AmberTools build process deals with PATH specifications for both it and Amber, then walks you through patching and a successful build.

user@machine:~$ tar xjf AmberTools-1.5.tar.bz2 
user@machine:~$ cd amber11/
user@machine:~/amber11$ echo "export AMBERHOME=$PWD" >> ~/.bashrc
user@machine:~/amber11$ echo "export PATH=$PATH:$AMBERHOME/bin" >> ~/.bashrc
user@machine:~/amber11$ source ~/.bashrc
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/AmberTools/1.5/bugfix.all
user@machine:~/amber11$ patch -p0 < bugfix.all
user@machine:~/amber11$ rm bugfix.all
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ ./configure gnu
user@machine:~/amber11/AmberTools/src$ make install
user@machine:~/amber11/AmberTools/src$ cd

3. Amber 11 (Serial Install)

For the Amber build, not building the serial version first will produce the following error (which you may or may not be searching against in google presently):

Warning: Deleted feature: PAUSE statement at (1)
cpp -traditional -P  -DBINTRAJ -DMPI    svbksb.f > _svbksb.f
mpif90 -c -O3 -mtune=generic -ffree-form   -o svbksb.o _svbksb.f
cpp -traditional -P  -DBINTRAJ -DMPI    pythag.f > _pythag.f
mpif90 -c -O3 -mtune=generic -ffree-form   -o pythag.o _pythag.f
Error: a serial version of libFpbsa.a must be built before parallel build.
make[2]: *** [libFpbsa.parallel] Error 2
make[2]: Leaving directory `/home/genomebio/amber11/AmberTools/src/pbsa'
make[1]: *** [libpbsa] Error 2
make[1]: Leaving directory `/home/genomebio/amber11/src/sander'
make: *** [parallel] Error 2

The “gnu” is also important, as there appears to be some kind of formatting (fortran-specific) issue with some files in the non-gnu build attempt that produces the following error if you just blindly run a ./configure:

Error: Unclassifiable statement at (1)
constants.f:39.1:

double precision, parameter :: two       = 2.0d0                        
 1
Error: Non-numeric character in statement label at (1)
constants.f:39.1:

double precision, parameter :: two       = 2.0d0                        
 1
Error: Unclassifiable statement at (1)
constants.f:40.1:

double precision, parameter :: three     = 3.0d0                        
 1
Error: Non-numeric character in statement label at (1)
Fatal Error: Error count reached limit of 25.
make[1]: *** [constants.o] Error 1
make[1]: Leaving directory `/home/user/amber11/src/sander'
make: *** [parallel] Error 2

With that, the serial build is below, including bug fixes.

user@machine:~$ tar xfj Amber11.tar.bz2
user@machine:~$ cd $AMBERHOME
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/11.0/bugfix.all
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/11.0/apply_bugfix.x
user@machine:~/amber11$ chmod +x ./apply_bugfix.x
user@machine:~/amber11$ ./apply_bugfix.x bugfix.all
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ ./configure gnu
user@machine:~/amber11/AmberTools/src$ cd $AMBERHOME
user@machine:~/amber11$ ./AT15_Amber11.py 
user@machine:~/amber11$ cd src/
user@machine:~/amber11/src$ make serial

4. Amber 11 (Parallel)

Hopefully the serial build ran non-problematically. The parallel install works just as simply provided you run the process in the order below. The key steps are the “make clean,” new ./configure, re-run of ./AT_Amber11.py, and the other “make clean.”

user@machine:~/amber11/src$ cd $AMBERHOME
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ make clean
user@machine:~/amber11/AmberTools/src$ ./configure -mpi gnu
user@machine:~/amber11/AmberTools/src$ cd $AMBERHOME
user@machine:~/amber11$ ./AT15_Amber11.py 
user@machine:~/amber11$ cd src/
user@machine:~/amber11/src$ make clean
user@machine:~/amber11/src$ make parallel

5. Amber 11 (Tests)

Finally, testing the install. Nothing specific to be done as far as the code is concerned, simply running the tests.

user@machine:~/amber11/src$ cd ..
user@machine:~/amber11$ cd test/
user@machine:~/amber11/test$ make -f Makefile
user@machine:~/amber11/test$ 

From the out-of-the-box installation above, my test results complete as follows:

365 file comparisons passed
15 file comparisons failed
0 tests experienced errors
Test log file saved as logs/test_amber_serial/2011-07-14_11-19-47.log
Test diffs file saved as logs/test_amber_serial/2011-07-14_11-19-47.diff

The failed tests include those already mentioned by the Amber developers to fail. This list is provided at the end of the AT15_Amber11.py results:

NOTE: Because PBSA has changed since Amber 11 was released, some
tests are known to fail and others are known to quit in error. These
can be safely ignored.

Tests that error: Tests in $AMBERHOME/test/sander_pbsa_frc
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min

Tests that produce possible FAILUREs:
   cd sander_pbsa_ipb2   && ./Run.110D.min
   cd sander_pbsa_lpb    && ./Run.lsolver.min (only some of them fail here)
   cd sander_pbsa_tsr    && ./Run.tsrb.min
   cd sander_pbsa_decres && ./Run.pbsa_decres
   mm_pbsa.pl tests 02, 03, and 05

6. Quick Summary

For ease of copy-and-paste-ing, the command list is below:

apt-get

sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libopenal1 libopenexr-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxi-dev libxml-simple-perl libxmu-dev mercurial nfs-common nfs-kernel-server portmap python2.6-dev rpm ssh

sudo apt-get install bison csh flex fort77 g++ gcc gfortran libbz2-dev libnetcdf-dev libopenmpi-dev libxext-dev libxt-dev openmpi-bin patch tcsh xorg-dev zlib1g-dev

AmberTools

tar xjf AmberTools-1.5.tar.bz2 
cd amber11/
echo "export AMBERHOME=$PWD" >> ~/.bashrc
echo "export PATH=$PATH:$AMBERHOME/bin" >> ~/.bashrc
source ~/.bashrc
wget http://ambermd.org/bugfixes/AmberTools/1.5/bugfix.all
patch -p0 < bugfix.all
rm bugfix.all
cd AmberTools/src/
./configure gnu
make install
cd

Amber 11 (Serial)

tar xfj Amber11.tar.bz2
cd $AMBERHOME
wget http://ambermd.org/bugfixes/11.0/bugfix.all
wget http://ambermd.org/bugfixes/11.0/apply_bugfix.x
chmod +x ./apply_bugfix.x
./apply_bugfix.x bugfix.all
cd AmberTools/src/
./configure gnu
cd $AMBERHOME
./AT15_Amber11.py 
cd src/
make serial

Amber 11 (Parallel)

cd $AMBERHOME
cd AmberTools/src/
make clean
./configure -mpi gnu
cd $AMBERHOME
./AT15_Amber11.py 
cd src/
make clean
make parallel

Amber Tests

cd ..
cd test/
make -f Makefile

7. And Furthermore…

I tried the above on an old linux box running Intrepid Ibex (8.10), which counts as an End-Of-Life (Obsolete) version. Running all of the apt-get installs will work despite 8.10 not existing in the standard package locations, but you have to make the following addition to /etc/apt/sources.list.

sudo pico /etc/apt/sources.list

And copy-and-paste the following (this all taken from help.ubuntu.com/community/EOLUpgrades/Intrepid):

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse

bfast-0.6.5a, MUMmer-3.22, and Amos-3.0.0 Installs In Ubuntu 10.04 LTS (And Related)

Thursday, July 14th, 2011

Taking care of a DNA/RNA fragment alignment installation triple-threat with this post. These Ubuntu installs for largely problem-free, but one little trick is needed for Amos (this because of my use of “/opt” for my usual installation and compilation attempts and, more so, my not being interested in modifying the root PATH statement despite the constant use of sudo when building in “/opt”).

So, with the downloads of

bfast-0.6.5a (currently: sourceforge.net/apps/mediawiki/bfast/index.php?title=Main_Page)
MUMmer-3.22 (currently: mummer.sourceforge.net)
Amos-3.0.0 (currently: sourceforge.net/apps/mediawiki/amos/index.php?title=AMOS)

taken care of, the following process is performed.

user@machine:~sudo aptitude update
user@machine:~sudo aptitude upgrade

[POSSIBLE RESTART REQUIRED after this. You don't need-need to update/upgrade, but I do it before all builds regardless.]

user@machine:~sudo apt-get install bison build-essential cmake csh doxygen flex fort77 freeglut3-dev g++ g++-multilib gcc gcc-multilib gettext gfortran gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libbz2-dev libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libnetcdf-dev libopenal1 libopenexr-dev libopenmpi-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxext-dev libxi-dev libxml-simple-perl libxmu-dev libxt-dev mercurial nfs-common nfs-kernel-server openmpi-bin patch portmap python2.6-dev rpm ssh tcsh xorg-dev zlib1g-dev

The large apt-get above is my “default” additional install for a variety of programs, including Amber, Abinit, GAMESS, GROMAC, etc. Many of these may not be needed but hard drives are cheap and figuring out the minimum list is more work than simply installing everything. Do check the list, however, to make sure something won’t confuse any other installs on your machine (if you’re new to this, likely not. If you’ve done builds a few times, you may already know the difference).

user@machine:~$ sudo mv bfast-0.6.5a.tar.gz /opt
user@machine:~$ sudo mv MUMmer3.22.tar.gz /opt
user@machine:~$ sudo mv amos-3.0.0.tar.gz /opt
user@machine:~$ cd /opt

Move the three programs to /opt (or not). Specifically for bfast, two additional apt-get’s are required.

user@machine:/opt$ sudo apt-get install libstatistics-descriptive-perl libdbd-pg-perl

The build for bfast is straightforward.

user@machine:/opt$ sudo tar xvfz bfast-0.6.5a.tar.gz 
user@machine:/opt$ cd bfast-0.6.5a/
user@machine:/opt/bfast-0.6.5a$ sudo ./configure 
user@machine:/opt/bfast-0.6.5a$ sudo make
user@machine:/opt/bfast-0.6.5a$ sudo make install
user@machine:/opt/bfast-0.6.5a$ cd ..

bfast is officially built and you’ve returned to your “/opt” directory. MUMmer is also straightforward.

user@machine:/opt$ sudo tar xvfz MUMmer3.22.tar.gz 
user@machine:/opt$ cd MUMmer3.22/
user@machine:/opt/MUMmer3.22$ sudo make check
user@machine:/opt/MUMmer3.22$ sudo make install

MUMmer is officially built. If you intend to build Amos, you will need some of what you built in MUMmer. Specifically, nucmer, delta-filter, and show-coords are used by Amos and must be present in your PATH during the Amos build. As I am building in “/opt,” I’m using sudo. As I do not want to deal with setting a new PATH for root, the solution is simply to move these three programs to a universally accessible place.

user@machine:/opt/MUMmer3.22$ sudo cp nucmer /usr/local/bin/
user@machine:/opt/MUMmer3.22$ sudo cp delta-filter /usr/local/bin/
user@machine:/opt/MUMmer3.22$ sudo cp show-coords /usr/local/bin/
user@machine:/opt/MUMmer3.22$ cd ..

And, with that, you are ready for the Amos build procedure. You will need two more apt-get installs to complete the Amos build.

user@machine:/opt/amos-3.0.0$ sudo apt-get install libboost-all-dev libqt3-headers

To build Amos with no errors and all of the listed components, note the ./configure settings and run the list below.

user@machine:/opt$ sudo tar xvfz amos-3.0.0.tar.gz 
user@machine:/opt$ cd amos-3.0.0/
user@machine:/opt/amos-3.0.0$ sudo ./configure --with-Qt-dir=/usr/share/qt3 --prefix=/opt/amos-3.0.0
user@machine:/opt/amos-3.0.0$ sudo make
user@machine:/opt/amos-3.0.0$ sudo make check
user@machine:/opt/amos-3.0.0$ sudo make install

If nucmer, delta-filter, show-coords, and the qt3 libraries are not present, you’ll see the following error list after running ./configure:

-- AMOS Assembler 2.0.8 Configuration Results --
  C compiler:          gcc -g -O2
  C++ compiler:        g++ -g -O2
  GCC version:         gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
  Host System type:    x86_64-unknown-linux-gnu
  Install prefix:      /opt/amos-3.0.0
  Install eprefix:     ${prefix}

  See config.h for further configuration information.
  Email  with questions and bug reports.

WARNING! nucmer was not found but is required to run AMOScmp
   install nucmer if planning on using AMOScmp
WARNING! delta-filter was not found but is required to run AMOScmp-shortReads-alignmentTrimmed
   install delta-filter if planning on using AMOScmp-shortReads-alignmentTrimmed
WARNING! show-coords was not found but is required to run minimus2
   install show-coords if planning on using minimus2
WARNING! Qt3 toolkit was not found but is required to run AMOS GUIs
   install Qt3 or locate Qt3 with configure to build GUIs
   see config.log for more information on what went wrong
WARNING! Boost graph toolkit was not found but is required to run parts of the AMOS Scaffolder (Bambus 2)
   install Boost or locate Boost with configure to build Scaffolder
   see config.log for more information on what went wrong

And, finally, add these directories to your PATH.

user@machine:~$ cd
user@machine:~$ pico .profile

Add the following to your PATH statement:

/opt/amos-3.0.0/bin/:/opt/MUMmer3.22/:/opt/bfast-0.6.5a/butil/:

Crtl-X, “Y”, and quit.

Obligatory

  • CNYO

  • Sol. Sys. Amb.

  • Salt City Miners

  • Ubuntu 4 Nano

  • NMT Review

  • N-Fact. Collab.

  • T R P Nanosys

  • Nano Gallery

  • nano gallery
  • Aerial Photos

    More @ flickr.com

    Syracuse Scenes

    More @ flickr.com