Code Monkey home page Code Monkey logo

bsb-daint's Introduction

bsb-daint

Tools & scripts for running scaffold models on Piz Daint

Installation

Clone this repository into your home folder:

cd ~
git clone https://github.com/dbbs-lab/bsb-daint

Add the following to ~/.bashrc:

export PROJECT="my_project"
export ACCOUNT="my_account"
source ~/bsb-daint/shell.sh

Note: Replace PROJECT and ACCOUNT with the correct information.

Install the scaffold stack into your shared project directory:

source ~/bsb-daint/install.sh

You can also opt to install it elsewhere, like in your user directory:

source ~/bsb-daint/install.sh $HOME

Usage

In your SLURM job script use the load helper script:

#!/bin/bash -l
#SBATCH --job-name="hello_world"

# ...

source ~/bsb-daint/load.sh
srun bsb simulate my_simulation --hdf5=my_network_file.hdf5

Note: Always prepend srun to the BSB commands for correct initialisation of MPI and parallelisation of the scaffold. E.g. srun bsb simulate poc --hdf5=netw.hdf5.

Note: Do not use bsb compile on multiple nodes as it cannot run in parallel and will just duplicate the process n times.

Shell commands

If you followed the installation instruction for the shell shortcuts you'll have access to the following commands:

bsb-update

Updates the bsb-daint to the latest version and performs an installation of the BSB, its dependencies and compiles your mod files.

bsb-reconfigure

Executes bsb reconfigure $1 $2 as a job.

debug

Runs whatever follows debug as a job in debug mode. For example debug python -c "print('Hello, world!')".

queue

Checks your job queue

maa

Checks which modules are available and contain the search term

$> maa python
adept-utils/606ebad-CrayGNU-20.08-python3
dyninst/10.2.0-CrayGNU-20.08-python3
gprof2dot/2019.11.30-python3(default)
pudb/2019.2-CrayGNU-20.08-python3(default)
scorep_binding_python/3.0-CrayGNU-20.08-python3(default)
termgraph/0.4.2-python3(default)
Boost/1.70.0-CrayGNU-20.08-python3(default)
ParaView/5.8.1-CrayGNU-20.08-OSMesa-python3(default)
ParaView/5.9.0-CrayGNU-20.08-OSMesa-python3
PyExtensions/python3-CrayGNU-20.08
cftime/1.0.2.1-CrayGNU-20.08-python3
dask/2.2.0-CrayGNU-20.08-python3(default)
h5py/2.10.0-CrayGNU-20.08-python3-parallel(default)
h5py/2.10.0-CrayGNU-20.08-python3-serial
netcdf-python/1.4.1-CrayGNU-20.08-python3
netcdf-python/1.5.4-CrayGNU-20.08-python3(default)
python_virtualenv/15.0.3
cray-python/3.8.2.1(default)

bsb-daint's People

Contributors

helveg avatar alicegem avatar claudiacasellato avatar

Watchers

James Cloos avatar  avatar

Forkers

simonetorsello

bsb-daint's Issues

nest-install.sh returns error Invalid option: -Dwith-python=3

I'm trying to install NEST after the last PizDaint update but I get a weird error during the cmake command. I followed the the instruction in the README, I cloned the repo, added the required lines in the .bashrc and run the command source install-nest.sh.

This is the output:

ModuleCmd_Switch.c(179):ERROR:152: Module 'PrgEnv-cray/6.0.9' is currently not loaded
GSL(3):ERROR:105: Unable to locate a modulefile for 'GSL/2.5-CrayGNU-20.11'
Cloning into 'nest-simulator'...
remote: Enumerating objects: 1919, done.
remote: Counting objects: 100% (1919/1919), done.
remote: Compressing objects: 100% (1589/1589), done.
remote: Total 1919 (delta 566), reused 741 (delta 313), pack-reused 0
Receiving objects: 100% (1919/1919), 11.63 MiB | 12.85 MiB/s, done.
Resolving deltas: 100% (566/566), done.
Updating files: 100% (1854/1854), done.
-- The CXX compiler identification is Clang 12.0.0
-- The C compiler identification is Clang 12.0.0
-- Cray Programming Environment 2.7.10 CXX
-- Check for working CXX compiler: /opt/cray/pe/craype/2.7.10/bin/CC
-- Check for working CXX compiler: /opt/cray/pe/craype/2.7.10/bin/CC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Cray Programming Environment 2.7.10 C
-- Check for working C compiler: /opt/cray/pe/craype/2.7.10/bin/cc
-- Check for working C compiler: /opt/cray/pe/craype/2.7.10/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.14") found components:  doxygen missing components:  dot
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file mach-o/dyld.h
-- Looking for include file mach-o/dyld.h - not found
-- Looking for include file mach/mach.h
-- Looking for include file mach/mach.h - not found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for C++ include istream
-- Looking for C++ include istream - found
-- Looking for C++ include ostream
-- Looking for C++ include ostream - found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of long long
-- Check size of long long - done
-- Check size of u_int16_t
-- Check size of u_int16_t - done
-- Check size of uint16_t
-- Check size of uint16_t - done
-- Check size of u_int64_t
-- Check size of u_int64_t - done
-- Check size of uint64_t
-- Check size of uint64_t - done
-- Looking for NAN
-- Looking for NAN - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for M_E
-- Looking for M_E - found
-- Looking for M_PI
-- Looking for M_PI - found
-- Looking for expm1
-- Looking for expm1 - found
-- Host triple: x86_64-pc-linux
-- Target triple: x86_64-pc-linux
CMake Error at cmake/ProcessOptions.cmake:436 (message):
  Invalid option: -Dwith-python=3
Call Stack (most recent call first):
  CMakeLists.txt:130 (nest_process_with_python)


-- Configuring incomplete, errors occurred!
See also "/users/bgambosi/nest-simulator/build/CMakeFiles/CMakeOutput.log".
See also "/users/bgambosi/nest-simulator/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.

@Helveg, did I skip any step? any idea about what is failing?

Also, these are the cmake log files
CMakeError.log
CMakeOutput.log

Faile to run on Piz-Daint

To compile I had to slightly modify the install-nest.sh:

module load daint-mc
module unload PrgEnv-gnu/6.0.8
module load PrgEnv-cray/6.0.8
module load PyExtensions/python3-CrayGNU-20.08
module load GSL/2.5-CrayCCE-20.08

module list

export CRAYPE_LINK_TYPE=dynamic

CDIR=$PWD
#cd                                                                                                                           
rm -rf nest-simulator
git clone https://github.com/dbbs-lab/nest-simulator.git --depth 1
mkdir build
cd build
rm -rf $HOME/nest-2.18.0-install/

cmake \
  -Dwith-mpi=ON \
  -Dwith-python=3 \
  -DPYTHON_EXECUTABLE=/opt/python/3.8.2.1/bin/python \
  -DPYTHON_LIBRARY=/opt/python/3.8.2.1/lib/libpython3.8.so \
  -DPYTHON_INCLUDE_DIR=/opt/python/3.8.2.1/include/python3.8 \
  -DCMAKE_CXX_COMPILER=CC \
  -DCMAKE_C_COMPILER=cc \
  -Dstatic-libraries=OFF \
  -DCMAKE_INSTALL_PREFIX:PATH=$HOME/nest-2.18.0-install \
  ../nest-simulator

make -j
make install

cd $CDIR

Here is the full log file obtained by running bash install-nest.sh | tee install-nest.log 2>&1:
install-nest.log

After complete install I had to run the load.sh script but this fails to load the modules.
So I have run:

. helpers/modules.sh
Resulting in this module list:
Currently Loaded Modulefiles:
  1) modules/3.2.11.4(default)                       17) gni-headers/5.0.12.0-7.0.2.1_2.5__g3b1768f.ari
  2) cge/3.2.1463_r03f4dfb_fe3.3.0_2019062614        18) xpmem/2.2.20-7.0.2.1_2.21__g87eb960.ari
  3) cray-mpich/7.7.15(default)                      19) job/2.2.4-7.0.2.1_2.24__g36b56f4.ari
  4) slurm/20.02.6-1                                 20) dvs/2.12_2.2.165-7.0.2.1_4.4__g22f4fff6
  5) xalt/2.8.10                                     21) alps/6.6.59-7.0.2.1_3.14__g872a8d62.ari
  6) daint-mc                                        22) rca/2.2.20-7.0.2.1_2.27__g8e3fb5b.ari
  7) cray-python/3.8.2.1(default)                    23) atp/3.7.4(default)
  8) gcc/8.3.0(default)                              24) perftools-base/20.08.0(default)
  9) craype-broadwell                                25) PrgEnv-gnu/6.0.8
 10) craype-network-aries                            26) cdt/20.08
 11) craype/2.7.0(default)                           27) CrayGNU/.20.08
 12) cray-libsci/20.06.1(default)                    28) PyExtensions/python3-CrayGNU-20.08
 13) udreg/2.3.2-7.0.2.1_2.21__g8175d3d.ari          29) HDF5/1.10.6-CrayGNU-20.08-parallel
 14) ugni/6.0.14.0-7.0.2.1_3.21__ge78e5b0.ari        30) h5py/2.10.0-CrayGNU-20.08-python3-parallel
 15) pmi/5.0.16(default)                             31) GSL/2.5-CrayGNU-20.08
 16) dmapp/7.1.1-7.0.2.1_2.26__g38cf134.ari

Then I have rune the . helpers/activate-console-scripts.sh:
bp000432@daint104:~/src/NEST/dbbs/bsb-daint> echo $PATH
/users/bp000432/nest-2.18.0-install/bin:/users/bp000432/.local/bin:/apps/daint/UES/jenkins/7.0.UP02/mc/easybuild/software/GSL/2.5-CrayGNU-20.08/bin:/apps/daint/UES/jenkins/7.0.UP02/mc/easybuild/software/h5py/2.10.0-CrayGNU-20.08-python3-parallel/bin:/apps/daint/UES/jenkins/7.0.UP02/mc/easybuild/software/HDF5/1.10.6-CrayGNU-20.08-parallel/bin:/apps/daint/UES/jenkins/7.0.UP02/mc/easybuild/software/PyExtensions/python3-CrayGNU-20.08/bin:/opt/cray/pe/perftools/20.08.0/bin:/opt/cray/pe/papi/6.0.0.2/bin:/opt/cray/rca/2.2.20-7.0.2.1_2.27__g8e3fb5b.ari/bin:/opt/cray/alps/6.6.59-7.0.2.1_3.14__g872a8d62.ari/sbin:/opt/cray/alps/default/bin:/opt/cray/job/2.2.4-7.0.2.1_2.24__g36b56f4.ari/bin:/opt/cray/pe/craype/2.7.0/bin:/opt/gcc/8.3.0/bin:/opt/python/3.8.2.1/bin:/apps/daint/UES/xalt/xalt2/software/xalt/2.8.10/sbin:/apps/daint/UES/xalt/xalt2/software/xalt/2.8.10/bin:/opt/cray/pe/mpt/7.7.15/gni/bin:/apps/cscs/daint/bin:/apps/daint/system/bin:/apps/common/system/bin:/opt/cray/cge/3.2.1463_r03f4dfb_fe3.3.0_2019062614/bin:/opt/cray/pe/modules/3.2.11.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/opt/cray/pe/bin

. /users/bp000432/nest-2.18.0-install/bin/nest_vars.sh 
pip list > pip_list.log

pip_list.log

Then I run your command to test the versions:

bp000432@daint104:~/src/NEST/dbbs/bsb-daint> srun -p debug -C mc -A ich002 python -c "import mpi4py.MPI; import nest; print(nest.__path__); print(nest.__version__)"
[INFO] [2021.2.17 12:13:15 /users/bp000432/src/NEST/dbbs/bsb-daint/nest-simulator/nestkernel/rng_manager.cpp:217 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2021.2.17 12:13:15 /users/bp000432/src/NEST/dbbs/bsb-daint/nest-simulator/nestkernel/rng_manager.cpp:260 @ Network::create_grng_] : Creating new default global RNG

Nothing else happens and I have to stop it with CTRL-C.

Nest install failed

-- Found Python: /opt/python/3.9.4.1/bin/python3.9 (found suitable version "3.9.4", minimum required is "3.8") found components: Interpreter Development
CMake Warning at cmake/ProcessOptions.cmake:391 (message):
  Could not locate Python ABI, using shared libraries and header file
  instead.  Please clear your CMake cache and build folder and verify that
  CMake is up-to-date (3.18+).
Call Stack (most recent call first):
  CMakeLists.txt:130 (nest_process_with_python)


CMake Error at cmake/ProcessOptions.cmake:403 (message):
  No virtual Python environment found and no installation prefix specified.
  Please either build and install NEST in a virtual Python environment or
  specify CMake option -DCMAKE_INSTALL_PREFIX=<nest_install_dir>.
Call Stack (most recent call first):
  CMakeLists.txt:130 (nest_process_with_python)


-- Configuring incomplete, errors occurred!
See also "/users/mcalice/nest-simulator/build/CMakeFiles/CMakeOutput.log".
See also "/users/mcalice/nest-simulator/build/CMakeFiles/CMakeError.log".
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.