SPRNG 4.0 Installation with OpenMPI

From HP-SEE Wiki

(Difference between revisions)
Jump to: navigation, search
(Created page with "__TOC__ == Prerequisites == * OpenMPI == Downloading SPRNG 4.0 source code == * Download the SPRNG4.0 from '''[http://sprng.fsu.edu/Version4.0/sprng4.tar.gz here]''' to the loc...")
 
(One intermediate revision not shown)
Line 5: Line 5:
== Downloading SPRNG 4.0 source code ==
== Downloading SPRNG 4.0 source code ==
-
* Download the SPRNG4.0 from '''[http://sprng.fsu.edu/Version4.0/sprng4.tar.gz here]''' to the location where you want to place the source.
+
* Download the SPRNG 4.0 from '''[http://sprng.fsu.edu/Version4.0/sprng4.tar.gz here]''' to the location where you want to place the source.
::'''wget http://sprng.fsu.edu/Version4.0/sprng4.tar.gz'''
::'''wget http://sprng.fsu.edu/Version4.0/sprng4.tar.gz'''
* In the directory where you downloaded the sprng4.tar.gz execute
* In the directory where you downloaded the sprng4.tar.gz execute
-
::'''zcat sprng4.0.tar.gz | tar xovf -'''
+
::'''zcat sprng4.tar.gz | tar xovf -'''
-
* The source will be extracted to the directory '''sprng4.0''', navigate to it to continue with the installation.
+
* The source will be extracted to the directory '''sprng4''', navigate to it to continue with the installation.
-
::'''cd sprng4.0'''
+
::'''cd sprng4'''
== Editing the SPRNG 4.0 source code ==
== Editing the SPRNG 4.0 source code ==
Line 31: Line 31:
::'''cd check'''
::'''cd check'''
::'''./checksprng'''
::'''./checksprng'''
 +
 +
== Other Issues ==
 +
Since '''make install''' does not copy the headers from '''sprng4/include''' to the installation directory, you must copy them manually:
 +
::'''cp -r include/ /<path>/<to>/<sprng>/'''

Latest revision as of 20:23, 17 November 2011

Contents


Prerequisites

  • OpenMPI

Downloading SPRNG 4.0 source code

  • Download the SPRNG 4.0 from here to the location where you want to place the source.
wget http://sprng.fsu.edu/Version4.0/sprng4.tar.gz
  • In the directory where you downloaded the sprng4.tar.gz execute
zcat sprng4.tar.gz | tar xovf -
  • The source will be extracted to the directory sprng4, navigate to it to continue with the installation.
cd sprng4

Editing the SPRNG 4.0 source code

During the installation of SPRNG 4.0 an error, related to the Fortran wrappers written in C/C++ is encountered. The error is caused by the two different conventions for linking Fortran – adding one or two underscores to the Fortran function when using it in C. To fix that simply replace the double underscore in the definitions in SRC/fwrap.h with a single underscore:

sed -i 's/__/_/g' SRC/fwrap.h

Configuring SPRNG 4.0

Now that the Fortran wrapper definitions are fixed, you must configure SPRNG 4.0 installation properly, that is you need to set the install location and the compilers to use for the build:

./configure --prefix=/<path>/<to>/<sprng>/ CC=mpicc CXX=mpicxx F77=mpif77 MPIF77=mpif77 MPICXX=mpicxx

Note: You should specify the MPI versions of the compilers even for the non-MPI configuration variables.

Building and installing SPRNG 4.0

  • To build SPRNG 4.0 enter the following command:
make
  • To install SPRNG 4.0 in the specified with prefix directory use:
make install

Verifying SPRNG 4.0 installation

To verify your SPRNG 4.0 installation, navigate to check/ and run the check script:

cd check
./checksprng

Other Issues

Since make install does not copy the headers from sprng4/include to the installation directory, you must copy them manually:

cp -r include/ /<path>/<to>/<sprng>/
Personal tools