Howdy Loris,

Attached is what I came up with for Dakota.
As you can tell, I struggled with LAPACK and BLAS
as well but I managed to wrangle a build.

Not quite up to EB standards for EasyConfigs so
I hadn't sent upstream yet.   But maybe you can
improve upon it.

Jack Perdue
Lead Systems Administrator
High Performance Research Computing
TAMU Division of Research
j-per...@tamu.edu    http://hprc.tamu.edu
HPRC Helpdesk: h...@hprc.tamu.edu

On 6/6/19 9:20 AM, Loris Bennett wrote:
Hi,

I've written the following Easyconfig for Dakota:

   homepage = 'https://dakota.sandia.gov/'
   description = """"A Multilevel Parallel Object-Oriented Framework for
   Design Optimization, Parameter Estimation, Uncertainty
   Quantification, and Sensitivity Analysis."""

   toolchain = {'name': 'foss', 'version': '2018b'}
   toolchainopts = {'usempi': True, 'openmp': True}

   source_urls = 
['https://dakota.sandia.gov/sites/default/files/distributions/public/']
   sources = ['%(namelower)s-%(version)s-release-public.src.tar.gz']
   checksums = ['1691a5272a5d2f7ae817c27e66adf9d0']

   builddependencies = [
       ('CMake', '3.12.1'),
       ('pkg-config', '0.29.2'),
       ('Boost', '1.67.0'),
       ('GSL', '2.5'),
   ]

   dependencies = [
       ('Python', '3.6.6'),
       ('Perl', '5.28.0'),
   ]

   separate_build_dir = True

   configopts = "-DMPI_ENABLE=ON -DOPENMP_ENABLE=ON"

   sanity_check_paths = {
       'files': ['bin/dakota'],
       'dirs': ['bin', 'share'],
   }

   modextrapaths = {'PYTHONPATH': 'share/%(namelower)s/Python'}

   moduleclass = 'math'

But I am getting the error:

   CMake Error at CMakeLists.txt:298 (find_package):
     Could not find a package configuration file provided by "LAPACK" with any
     of the following names:

       LAPACKConfig.cmake
       lapack-config.cmake

     Add the installation prefix of "LAPACK" to CMAKE_PREFIX_PATH or set
     "LAPACK_DIR" to a directory containing one of the above files.  If "LAPACK"
     provides a separate development package or SDK, be sure it has been
     installed.

What am I doing wrong?

Cheers,

Loris



# Authors:: Jack Perdue <j-per...@tamu.edu> - TAMU HPRC - http://hprc.tamu.edu

easyblock = 'CMakeMake'

name = 'Dakota'
version = '6.9'
pysuffix = '-Python-%(pyver)s'
versionsuffix = pysuffix

homepage = 'https://dakota.sandia.gov/'

description = """
 Dakota software's advanced parametric analyses enable design exploration,
 model calibration, risk analysis, and quantification of margins and
 uncertainty with computational models.
"""

toolchain = {'name': 'foss', 'version': '2018b'}
toolchainopts = {'openmp': True}

# 
https://dakota.sandia.gov/sites/default/files/distributions/public/dakota-6.9-release-public.src.tar.gz
source_urls = 
['https://dakota.sandia.gov/sites/default/files/distributions/public/']
sources = ['%(namelower)s-%(version)s-release-public.src.tar.gz']
# checksums = ['07c20e14cd7674785a737fa801f486e8'] # from the web site
checksums = ['989b689278964b96496e3058b8ef5c2724d74bcd232f898fe450c51eba7fe0c2']

builddependencies = [
    ('CMake', '3.12.1'),
]

dependencies = [
    ('Boost', '1.68.0', pysuffix),
    ('GSL', '2.5'),
    ('HDF5', '1.10.2'),
    ('Perl', '5.28.0'),
    ('Python', '2.7.15'),
    #  Trilinos(optional),  # 3 hour build
    ('X11', '20180604'),
]

separate_build_dir = True

# haven't figured out how to best do OpenBLAS for LAPACK yet
configopts = """\
    -DBLAS_LIBRARY_NAMES=openblas\
    -DBLAS_LIBS=$EBROOTBLAS/lib/\
    -DDAKOTA_HAVE_MPI=TRUE\
    -DLAPACK_DIR=$EBROOTOPENBLAS\
    -DLAPACK_LIBS=$EBROOTOPENBLAS/lib\
    -DUSE_MPI=TRUE\
"""

prebuildopts = """
    for x in `find . -name link.txt` ; do
        sed -e "s,-L$EBROOTOPENBLAS/lib,-L$EBROOTOPENBLAS/lib -lopenblas," 
-i.eb $x
    done
    sed -e 's/#include <cfloat>/#include <cmath>/'  -i.eb\
         
../%(namelower)s-%(version)s.0.src/packages/external/JEGA/Utilities/src/DiscreteDesignVariableNature.cpp
"""

parallel = 1

sanity_check_paths = {
    'files': ['bin/dakota', 'include/DakotaLeastSq.hpp', 
'lib/libdakota_src_fortran.so'],
    'dirs': ['share/dakota/Bash'],
}

moduleclass = 'math'

Reply via email to