Commit 91d4d0cb authored by Ashwin Vishnu's avatar Ashwin Vishnu
Browse files

Foolproof parsing site.cfg and fix install_fft.sh and install_openblas.sh

parent f6e854839648
......@@ -7,8 +7,11 @@ import fluidfft
# Parameters
# ----------
# argv = dict(dim='2d', nh='1024 -d 2', time='00:04:00') # 2D benchmarks
argv = dict(dim='3d', nh='960 960 240', time='00:20:00') # 3D benchmarks
# n0 = 1024; nb_cores = [2, 4, 8, 12, 16, 20, 24, 28, 32] # n0 = 2**10
n0 = 1008; nb_cores = [2, 4, 8, 12, 16, 21, 24, 28] # n0 = 2**6 * 3**2 * 7
argv = dict(dim='2d', nh='{} -d 2'.format(n0), time='00:04:00') # 2D benchmarks
# argv = dict(dim='3d', nh='960 960 240', time='00:20:00') # 3D benchmarks
# mode = 'intra'
# mode = 'inter'
mode = 'inter-intra'
......@@ -54,10 +57,6 @@ def submit(cluster, interactive, nb_nodes, nb_cores_per_node=None):
cluster, interactive = init_cluster()
if 'intra' in mode:
nb_nodes = 1
# nb_cores = [2, 4, 8, 12, 16, 20, 24, 28, 32]
nb_cores = 4 * np.arange(0, 9)
nb_cores[0] = 2
for nb_cores_per_node in nb_cores:
if nb_cores_per_node > cluster.nb_cores_per_node:
continue
......
......@@ -2,7 +2,7 @@
site.cfg.example to site.cfg and modify this file.
"""
from __future__ import print_function
import os
try: # python 3
......@@ -42,16 +42,20 @@ def get_config():
config = get_default_config()
if os.path.exists('site.cfg'):
print('Parsing site.cfg.')
config.read('site.cfg')
config_dict = {}
for section in config.sections():
if section not in sections_libs:
raise ValueError('Unexpected library in site.cfg: {}'.format(section))
section_dict = {}
for option in config.options(section):
value = config.get(section, option)
if option == 'use':
value = value.lower()
if not (section == 'fftw' and value == 'mkl'):
if not (section == 'fftw3' and value == 'mkl'):
if value not in ['true', 'false']:
raise ValueError('"use" should be "True" of "False".')
value = value == 'true'
......
......@@ -14,6 +14,7 @@ export MAKEFLAGS="-j$(nproc)"
# Should be no reason to change anything below
# --------------------------------------------
download() {
mkdir -p ${srcdir}
cd ${srcdir}
if [ ! -f ${pkgname}-${pkgver}.tar.gz ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment