Skip to content

Commit

Permalink
Merge pull request #1 from boegel/clang-toolchains
Browse files Browse the repository at this point in the history
Add cgoolf unit test
  • Loading branch information
gribozavr committed Apr 13, 2013
2 parents 7a937ae + 4fe3652 commit 05cddd8
Show file tree
Hide file tree
Showing 10 changed files with 307 additions and 0 deletions.
29 changes: 29 additions & 0 deletions easybuild/test/modules/Clang/3.2-GCC-4.7.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#%Module

proc ModulesHelp { } {
puts stderr { C, C++, Objective-C compiler, based on LLVM. Does not
include C++ standard library -- use libstdc++ from GCC. - Homepage: http://clang.llvm.org/
}
}

module-whatis {C, C++, Objective-C compiler, based on LLVM. Does not
include C++ standard library -- use libstdc++ from GCC. - Homepage: http://clang.llvm.org/}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/Clang/3.2-GCC-4.7.2

conflict Clang

if { ![is-loaded GCC/4.7.2] } {
module load GCC/4.7.2
}

prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path PATH $root/bin

setenv EBROOTCLANG "$root"
setenv EBVERSIONCLANG "3.2"
setenv EBDEVELCLANG "$root/easybuild/Clang-3.2-GCC-4.7.2-easybuild-devel"


# built with EasyBuild version 1.4.0dev
30 changes: 30 additions & 0 deletions easybuild/test/modules/ClangGCC/1.1.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#%Module

proc ModulesHelp { } {
puts stderr { Clang and GCC based compiler toolchain. Clang will use libstdc++.
GFortran will be used to compile Fortran code. - Homepage: (none)
}
}

module-whatis {Clang and GCC based compiler toolchain. Clang will use libstdc++.
GFortran will be used to compile Fortran code. - Homepage: (none)}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/ClangGCC/1.1.2

conflict ClangGCC

if { ![is-loaded Clang/3.2-GCC-4.7.2] } {
module load Clang/3.2-GCC-4.7.2
}

if { ![is-loaded GCC/4.7.2] } {
module load GCC/4.7.2
}


setenv EBROOTCLANGGCC "$root"
setenv EBVERSIONCLANGGCC "1.1.2"
setenv EBDEVELCLANGGCC "$root/easybuild/ClangGCC-1.1.2-easybuild-devel"


# built with EasyBuild version 1.4.0dev
31 changes: 31 additions & 0 deletions easybuild/test/modules/FFTW/3.3.3-cgompi-1.1.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#%Module

proc ModulesHelp { } {
puts stderr { FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)
in one or more dimensions, of arbitrary input size, and of both real and complex data. - Homepage: http://www.fftw.org
}
}

module-whatis {FFTW is a C subroutine library for computing the discrete Fourier transform (DFT)
in one or more dimensions, of arbitrary input size, and of both real and complex data. - Homepage: http://www.fftw.org}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/FFTW/3.3.3-cgompi-1.1.6

conflict FFTW

if { ![is-loaded cgompi/1.1.6] } {
module load cgompi/1.1.6
}

prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path MANPATH $root/share/man
prepend-path PATH $root/bin
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig

setenv EBROOTFFTW "$root"
setenv EBVERSIONFFTW "3.3.3"
setenv EBDEVELFFTW "$root/easybuild/FFTW-3.3.3-cgompi-1.1.6-easybuild-devel"


# built with EasyBuild version 1.4.0dev
26 changes: 26 additions & 0 deletions easybuild/test/modules/OpenBLAS/0.2.6-cgompi-1.1.6-LAPACK-3.4.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#%Module

proc ModulesHelp { } {
puts stderr { OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. - Homepage: http://xianyi.github.com/OpenBLAS/
}
}

module-whatis {OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. - Homepage: http://xianyi.github.com/OpenBLAS/}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/OpenBLAS/0.2.6-cgompi-1.1.6-LAPACK-3.4.2

conflict OpenBLAS

if { ![is-loaded cgompi/1.1.6] } {
module load cgompi/1.1.6
}

prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib

setenv EBROOTOPENBLAS "$root"
setenv EBVERSIONOPENBLAS "0.2.6"
setenv EBDEVELOPENBLAS "$root/easybuild/OpenBLAS-0.2.6-cgompi-1.1.6-LAPACK-3.4.2-easybuild-devel"


# built with EasyBuild version 1.4.0dev
33 changes: 33 additions & 0 deletions easybuild/test/modules/OpenMPI/1.6.4-ClangGCC-1.1.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#%Module

proc ModulesHelp { } {
puts stderr { The Open MPI Project is an open source MPI-2 implementation. - Homepage: http://www.open-mpi.org/
}
}

module-whatis {The Open MPI Project is an open source MPI-2 implementation. - Homepage: http://www.open-mpi.org/}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/OpenMPI/1.6.4-ClangGCC-1.1.2

conflict OpenMPI

if { ![is-loaded ClangGCC/1.1.2] } {
module load ClangGCC/1.1.2
}

if { ![is-loaded hwloc/1.6.2-ClangGCC-1.1.2] } {
module load hwloc/1.6.2-ClangGCC-1.1.2
}

prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path MANPATH $root/share/man
prepend-path PATH $root/bin
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig

setenv EBROOTOPENMPI "$root"
setenv EBVERSIONOPENMPI "1.6.4"
setenv EBDEVELOPENMPI "$root/easybuild/OpenMPI-1.6.4-ClangGCC-1.1.2-easybuild-devel"


# built with EasyBuild version 1.4.0dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#%Module

proc ModulesHelp { } {
puts stderr { The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines
redesigned for distributed memory MIMD parallel computers. - Homepage: http://www.netlib.org/scalapack/
}
}

module-whatis {The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines
redesigned for distributed memory MIMD parallel computers. - Homepage: http://www.netlib.org/scalapack/}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/ScaLAPACK/2.0.2-cgompi-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2

conflict ScaLAPACK

if { ![is-loaded cgompi/1.1.6] } {
module load cgompi/1.1.6
}

if { ![is-loaded OpenBLAS/0.2.6-cgompi-1.1.6-LAPACK-3.4.2] } {
module load OpenBLAS/0.2.6-cgompi-1.1.6-LAPACK-3.4.2
}

prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib

setenv EBROOTSCALAPACK "$root"
setenv EBVERSIONSCALAPACK "2.0.2"
setenv EBDEVELSCALAPACK "$root/easybuild/ScaLAPACK-2.0.2-cgompi-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2-easybuild-devel"


# built with EasyBuild version 1.4.0dev
30 changes: 30 additions & 0 deletions easybuild/test/modules/cgompi/1.1.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#%Module

proc ModulesHelp { } {
puts stderr { Clang and GFortran based compiler toolchain,
including OpenMPI for MPI support. - Homepage: (none)
}
}

module-whatis {Clang and GFortran based compiler toolchain,
including OpenMPI for MPI support. - Homepage: (none)}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/cgompi/1.1.6

conflict cgompi

if { ![is-loaded ClangGCC/1.1.2] } {
module load ClangGCC/1.1.2
}

if { ![is-loaded OpenMPI/1.6.4-ClangGCC-1.1.2] } {
module load OpenMPI/1.6.4-ClangGCC-1.1.2
}


setenv EBROOTCGOMPI "$root"
setenv EBVERSIONCGOMPI "1.1.6"
setenv EBDEVELCGOMPI "$root/easybuild/cgompi-1.1.6-easybuild-devel"


# built with EasyBuild version 1.4.0dev
42 changes: 42 additions & 0 deletions easybuild/test/modules/cgoolf/1.1.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#%Module

proc ModulesHelp { } {
puts stderr { Clang and GFortran based compiler toolchain,
OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK. - Homepage: (none)
}
}

module-whatis {Clang and GFortran based compiler toolchain,
OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK. - Homepage: (none)}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/cgoolf/1.1.6

conflict cgoolf

if { ![is-loaded ClangGCC/1.1.2] } {
module load ClangGCC/1.1.2
}

if { ![is-loaded OpenMPI/1.6.4-ClangGCC-1.1.2] } {
module load OpenMPI/1.6.4-ClangGCC-1.1.2
}

if { ![is-loaded OpenBLAS/0.2.6-cgompi-1.1.6-LAPACK-3.4.2] } {
module load OpenBLAS/0.2.6-cgompi-1.1.6-LAPACK-3.4.2
}

if { ![is-loaded FFTW/3.3.3-cgompi-1.1.6] } {
module load FFTW/3.3.3-cgompi-1.1.6
}

if { ![is-loaded ScaLAPACK/2.0.2-cgompi-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2] } {
module load ScaLAPACK/2.0.2-cgompi-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2
}


setenv EBROOTCGOOLF "$root"
setenv EBVERSIONCGOOLF "1.1.6"
setenv EBDEVELCGOOLF "$root/easybuild/cgoolf-1.1.6-easybuild-devel"


# built with EasyBuild version 1.4.0dev
39 changes: 39 additions & 0 deletions easybuild/test/modules/hwloc/1.6.2-ClangGCC-1.1.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#%Module

proc ModulesHelp { } {
puts stderr { The Portable Hardware Locality (hwloc) software package provides a portable abstraction
(across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including
NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various
system attributes such as cache and memory information as well as the locality of I/O devices such as
network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering
information about modern computing hardware so as to exploit it accordingly and efficiently. - Homepage: http://www.open-mpi.org/projects/hwloc/
}
}

module-whatis {The Portable Hardware Locality (hwloc) software package provides a portable abstraction
(across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including
NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various
system attributes such as cache and memory information as well as the locality of I/O devices such as
network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering
information about modern computing hardware so as to exploit it accordingly and efficiently. - Homepage: http://www.open-mpi.org/projects/hwloc/}

set root /user/scratch/gent/vsc400/vsc40023/easybuild_REGTEST/SL6/sandybridge/software/hwloc/1.6.2-ClangGCC-1.1.2

conflict hwloc

if { ![is-loaded ClangGCC/1.1.2] } {
module load ClangGCC/1.1.2
}

prepend-path CPATH $root/include
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path MANPATH $root/share/man
prepend-path PATH $root/bin
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig

setenv EBROOTHWLOC "$root"
setenv EBVERSIONHWLOC "1.6.2"
setenv EBDEVELHWLOC "$root/easybuild/hwloc-1.6.2-ClangGCC-1.1.2-easybuild-devel"


# built with EasyBuild version 1.4.0dev
15 changes: 15 additions & 0 deletions easybuild/test/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

from easybuild.test.utilities import find_full_path
from easybuild.tools.toolchain.utilities import search_toolchain
from easybuild.tools.modules import Modules

class ToolchainTest(TestCase):
""" Baseclass for toolchain testcases """
Expand Down Expand Up @@ -309,8 +310,22 @@ def test_precision_flags(self):
else:
self.assertTrue(val not in flags)

def test_cgoolf_toolchain(self):
"""Test for cgoolf toolchain."""
name = "cgoolf"
tc_class, _ = search_toolchain(name)
self.assertEqual(tc_class.NAME, name)
tc = tc_class(version="1.1.6")
tc.prepare()

self.assertEqual(tc.get_variable('CC'), 'clang')
self.assertEqual(tc.get_variable('CXX'), 'clang++')
self.assertEqual(tc.get_variable('F77'), 'gfortran')
self.assertEqual(tc.get_variable('F90'), 'gfortran')

def tearDown(self):
"""Cleanup."""
Modules().purge()
os.environ['MODULEPATH'] = self.orig_modpath

def suite():
Expand Down

0 comments on commit 05cddd8

Please sign in to comment.