Conda installation on supercomputer

595 views
Skip to first unread message

Geoffrey Vasil

unread,
Jan 14, 2019, 10:37:04 PM1/14/19
to dedalu...@googlegroups.com
Hi all,

We (Daniel, Geoff, Ryan) are trying to install Dedalus on NCI, a supercomputer in Australia. We tried to use the conda installation. We loaded modules for an intel mpi, fftw3, hdf5, and conda. I set the MPI_PATH, FFTW_PATH, and HDF5_DIR in the install_conda.sh file (I set each of the INSTALL_… flags to 0). I also set BLAS=“mkl". I did “conda activate base” and then “bash install_conda.sh”. Things seem to be working correctly until we tried to install Dedalus:

Installing dedalus with pip
Collecting dedalus
    100% |################################| 102kB 7.0MB/s 
  Installing build dependencies ... done
  The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'.
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/short/e14/rmh561/tmp/pip-install-dktye4rj/dedalus/setup.py", line 196, in <module>
        ext_modules=cythonize(extensions, compiler_directives=compiler_directives))
      File "/short/e14/rmh561/tmp/pip-build-env-ratewnyz/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 967, in cythonize
        aliases=aliases)
      File "/short/e14/rmh561/tmp/pip-build-env-ratewnyz/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 853, in create_extension_list
        m, metadata = create_extension(template, kwds)
      File "/short/e14/rmh561/tmp/pip-build-env-ratewnyz/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 735, in default_create_extension
        depends = resolve_depends(kwds['depends'], include_dirs)
      File "/short/e14/rmh561/tmp/pip-build-env-ratewnyz/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 444, in resolve_depends
        path = resolve_depend(depend, include_dirs)
      File "/short/e14/rmh561/tmp/pip-build-env-ratewnyz/lib/python3.6/site-packages/Cython/Utils.py", line 40, in wrapper
        res = cache[args] = f(*args)
      File "/short/e14/rmh561/tmp/pip-build-env-ratewnyz/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 455, in resolve_depend
        path = join_path(dir, depend)
      File "/short/e14/rmh561/tmp/pip-build-env-ratewnyz/lib/python3.6/site-packages/Cython/Utils.py", line 40, in wrapper
        res = cache[args] = f(*args)
      File "/short/e14/rmh561/conda/envs/dedalus/lib/python3.6/posixpath.py", line 80, in join
        a = os.fspath(a)
    TypeError: expected str, bytes or os.PathLike object, not NoneType
    Looking for mpi include path
      Cannot find env var MPI_INCLUDE_PATH
    Looking for mpi prefix
      Found matching library in /short/e14/rmh561/conda/envs/dedalus/lib
    Looking for fftw include path
      Cannot find env var FFTW_INCLUDE_PATH
    Looking for fftw prefix
      Cannot find env var FFTW_PATH or libraries matching fftw.
      If fftw isn't in your LD_LIBRARY_PATH, compilation will likely fail.
    Looking for fftw library path
      Cannot find env var FFTW_LIBRARY_PATH
    Looking for fftw prefix
      Cannot find env var FFTW_PATH or libraries matching fftw.
      If fftw isn't in your LD_LIBRARY_PATH, compilation will likely fail.
    Looking for mpi library path
      Cannot find env var MPI_LIBRARY_PATH
    Looking for mpi prefix
      Found matching library in /short/e14/rmh561/conda/envs/dedalus/lib
    Statically linking FFTW
    Looking for fftw library path
      Cannot find env var FFTW_LIBRARY_PATH
    Looking for fftw prefix
      Cannot find env var FFTW_PATH or libraries matching fftw.
      If fftw isn't in your LD_LIBRARY_PATH, compilation will likely fail.
    CC not set; defaulting to gcc linker flags

    

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /short/e14/rmh561/tmp/pip-install-dktye4rj/dedalus/

It seems like it doesn’t know what FFTW_PATH is, even though I set the environment variable in the install script. Any thoughts on what’s going on?

Daniel

holmes...@gmail.com

unread,
May 20, 2019, 9:48:40 PM5/20/19
to Dedalus Users
Hello everyone,

I am resurrecting this thread as I've had another go at this, but am getting similar errors.

I have tried the following:
1) Building fftw (3.3.8) myself using the same intel-mpi (there was some discussion that the NCI fftw modules are all built with openmpi, while dedalus needs intel-mpi).
2) setting the FFTW_PATH, FFTW_LIBRARY_PATH, FFTW_INCLUDE_PATH, MPI_INCLUDE_PATH and MPI_LIBRARY_PATH env variables myself.
3) Setting INSTALL_MPI=1 and INSTALL_FFTW=1 in install_conda.sh

No luck. With 1) and 2) above I get the error message attached below.

I am not an expert on this. Any help or suggestions for next steps would be much appreciated.

Thanks,

Ryan

Error message from install_conda.sh:
|████████████████████████████████| 102kB 6.9MB/s
Installing build dependencies ... done
WARNING: Missing build requirements in pyproject.toml for dedalus from https://files.pythonhosted.org/packages/ba/bc/fdd40d0bbab4c5d6e98f71e33b52022894daf6b702086c287e98e115419c/dedalus-2.1810.tar.gz#sha256=ec8f4694f8b01e879a82707540149a0b4bf96e41e5b3083e408fcfb54742fcbc.
WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'.
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Requirement already satisfied: h5py>=2.6.0 in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from dedalus) (2.9.0)
Requirement already satisfied: numpy in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from dedalus) (1.16.3)
Requirement already satisfied: mpi4py>=2.0.0 in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from dedalus) (3.0.1)
Requirement already satisfied: scipy>=0.13.0 in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from dedalus) (1.2.1)
Requirement already satisfied: matplotlib in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from dedalus) (3.1.0)
Requirement already satisfied: docopt in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from dedalus) (0.6.2)
Requirement already satisfied: six in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from h5py>=2.6.0->dedalus) (1.12.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from matplotlib->dedalus) (2.4.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from matplotlib->dedalus) (1.1.0)
Requirement already satisfied: cycler>=0.10 in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from matplotlib->dedalus) (0.10.0)
Requirement already satisfied: python-dateutil>=2.1 in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from matplotlib->dedalus) (2.8.0)
Requirement already satisfied: setuptools in /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib->dedalus) (41.0.1)
Building wheels for collected packages: dedalus
Building wheel for dedalus (PEP 517) ... error
ERROR: Complete output from command /short/e14/rmh561/conda/envs/dedalus/bin/python3 /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /short/e14/rmh561/tmp/tmpq55ay7ic:
ERROR: Looking for mpi include path
Found env var MPI_INCLUDE_PATH = /apps/intel-mpi/4.1.1.036/intel64/include
Looking for fftw include path
Found env var FFTW_INCLUDE_PATH = /short/e14/rmh561/software/fftw3/3.3.8/include
Looking for fftw library path
Found env var FFTW_LIBRARY_PATH = /short/e14/rmh561/software/fftw3/3.3.8/lib
Looking for mpi library path
Found env var MPI_LIBRARY_PATH = /apps/intel-mpi/4.1.1.036/intel64/lib
Statically linking FFTW
Looking for fftw library path
Found env var FFTW_LIBRARY_PATH = /short/e14/rmh561/software/fftw3/3.3.8/lib
CC set to icc; using gcc linker flags
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/dedalus
copying dedalus/__main__.py -> build/lib.linux-x86_64-3.6/dedalus
copying dedalus/__init__.py -> build/lib.linux-x86_64-3.6/dedalus
copying dedalus/dev.py -> build/lib.linux-x86_64-3.6/dedalus
copying dedalus/public.py -> build/lib.linux-x86_64-3.6/dedalus
creating build/lib.linux-x86_64-3.6/dedalus/libraries
copying dedalus/libraries/__init__.py -> build/lib.linux-x86_64-3.6/dedalus/libraries
creating build/lib.linux-x86_64-3.6/dedalus/extras
copying dedalus/extras/__init__.py -> build/lib.linux-x86_64-3.6/dedalus/extras
copying dedalus/extras/flow_tools.py -> build/lib.linux-x86_64-3.6/dedalus/extras
copying dedalus/extras/atmospheres.py -> build/lib.linux-x86_64-3.6/dedalus/extras
copying dedalus/extras/plot_tools.py -> build/lib.linux-x86_64-3.6/dedalus/extras
creating build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/evaluator.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/problems.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/metadata.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/operators.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/pencil.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/__init__.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/timesteppers.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/distributor.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/field.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/domain.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/solvers.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/future.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/arithmetic.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/system.py -> build/lib.linux-x86_64-3.6/dedalus/core
copying dedalus/core/basis.py -> build/lib.linux-x86_64-3.6/dedalus/core
creating build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/plot_op.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/array.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/logging.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/exceptions.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/__init__.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/parsing.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/sparse.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/post.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/general.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/progress.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/dispatch.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/parallel.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/cache.py -> build/lib.linux-x86_64-3.6/dedalus/tools
copying dedalus/tools/config.py -> build/lib.linux-x86_64-3.6/dedalus/tools
creating build/lib.linux-x86_64-3.6/dedalus/tests
copying dedalus/tests/__init__.py -> build/lib.linux-x86_64-3.6/dedalus/tests
creating build/lib.linux-x86_64-3.6/dedalus/libraries/fftw
copying dedalus/libraries/fftw/__init__.py -> build/lib.linux-x86_64-3.6/dedalus/libraries/fftw
creating build/lib.linux-x86_64-3.6/dedalus/tests/special_functions
copying dedalus/tests/special_functions/bessel.py -> build/lib.linux-x86_64-3.6/dedalus/tests/special_functions
copying dedalus/tests/special_functions/__init__.py -> build/lib.linux-x86_64-3.6/dedalus/tests/special_functions
copying dedalus/tests/special_functions/airy.py -> build/lib.linux-x86_64-3.6/dedalus/tests/special_functions
copying dedalus/dedalus.cfg -> build/lib.linux-x86_64-3.6/dedalus
running build_ext
building 'dedalus.libraries.fftw.fftw_wrappers' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/dedalus
creating build/temp.linux-x86_64-3.6/dedalus/libraries
creating build/temp.linux-x86_64-3.6/dedalus/libraries/fftw
icc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Idedalus/libraries/fftw/ -I/short/e14/rmh561/tmp/pip-build-env-63moa959/overlay/lib/python3.6/site-packages/numpy/core/include -I/short/e14/rmh561/tmp/pip-build-env-63moa959/overlay/lib/python3.6/site-packages/mpi4py/include -I/apps/intel-mpi/4.1.1.036/intel64/include -I/short/e14/rmh561/software/fftw3/3.3.8/include -I/short/e14/rmh561/conda/envs/dedalus/include/python3.6m -c dedalus/libraries/fftw/fftw_wrappers.c -o build/temp.linux-x86_64-3.6/dedalus/libraries/fftw/fftw_wrappers.o -Wno-error=declaration-after-statement
In file included from /short/e14/rmh561/tmp/pip-build-env-63moa959/overlay/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h(1822),
from /short/e14/rmh561/tmp/pip-build-env-63moa959/overlay/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h(12),
from /short/e14/rmh561/tmp/pip-build-env-63moa959/overlay/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h(4),
from dedalus/libraries/fftw/fftw_wrappers.c(642):
/short/e14/rmh561/tmp/pip-build-env-63moa959/overlay/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h(17): warning #1224: #warning directive: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
#warning "Using deprecated NumPy API, disable it with " \
^

dedalus/libraries/fftw/fftw_wrappers.c(1361): error: identifier "MPI_Message" is undefined
MPI_Message ob_mpi;
^

compilation aborted for dedalus/libraries/fftw/fftw_wrappers.c (code 2)
error: command 'icc' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for dedalus
Running setup.py clean for dedalus
Failed to build dedalus
ERROR: Could not build wheels for dedalus which use PEP 517 and cannot be installed directly

Ben Brown

unread,
May 20, 2019, 10:18:05 PM5/20/19
to dedalus-users
Ryan,
      One thing that catches my eye: the build is proceeding with icc, rather than the mpi wrappers for it (typically something like "mpicc").

Sometimes the solution to this is to set the env variable CC=mpicc. 

Sometimes you also then need to set I_MPI_CC=icc or depending on your system MPICC_CC=icc and MPICXX_CXX=icpc.  Otherwise the mpicc may fall back to a gnu compiler wrapper, which probably won't play well.

Those are some quick thoughts.
--Ben

--
You received this message because you are subscribed to the Google Groups "Dedalus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dedalus-user...@googlegroups.com.
To post to this group, send email to dedalu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dedalus-users/be6a2d40-1894-4280-a04d-c098a7b076a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

holmes...@gmail.com

unread,
May 21, 2019, 3:36:57 AM5/21/19
to Dedalus Users
Thanks for the suggestions Ben.

Yes it looks like the intel-mpi compilers I was trying to use were defaulting back to gnu compilers. I rebuilt fftw using the intel compilers and set CC=mpiicc and I_MPI_CC etc. It is now using the correct compiler and makes it further along, but is still failing on an mpiicc compile command (see below). The line "using gcc linker flags" is worrying -> Why is it choosing gcc linker flags when it should be intel and how do I change it?

Thanks,

Ryan

Building wheels for collected packages: dedalus
Building wheel for dedalus (PEP 517) ... error
ERROR: Complete output from command /short/e14/rmh561/conda/envs/dedalus/bin/python3 /short/e14/rmh561/conda/envs/dedalus/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /short/e14/rmh561/tmp/tmp9adghhiw:
ERROR: Looking for mpi include path
Found env var MPI_INCLUDE_PATH = /apps/intel-mpi/4.1.1.036/intel64/include
Looking for fftw include path
Found env var FFTW_INCLUDE_PATH = /short/e14/rmh561/software/fftw3/3.3.8/include
Looking for fftw library path
Found env var FFTW_LIBRARY_PATH = /short/e14/rmh561/software/fftw3/3.3.8/lib
Looking for mpi library path
Found env var MPI_LIBRARY_PATH = /apps/intel-mpi/4.1.1.036/intel64/lib
Statically linking FFTW
Looking for fftw library path
Found env var FFTW_LIBRARY_PATH = /short/e14/rmh561/software/fftw3/3.3.8/lib
CC set to mpiicc; using gcc linker flags
mpiicc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Idedalus/libraries/fftw/ -I/short/e14/rmh561/tmp/pip-build-env-_ahpm5jq/overlay/lib/python3.6/site-packages/numpy/core/include -I/short/e14/rmh561/tmp/pip-build-env-_ahpm5jq/overlay/lib/python3.6/site-packages/mpi4py/include -I/apps/intel-mpi/4.1.1.036/intel64/include -I/short/e14/rmh561/software/fftw3/3.3.8/include -I/short/e14/rmh561/conda/envs/dedalus/include/python3.6m -c dedalus/libraries/fftw/fftw_wrappers.c -o build/temp.linux-x86_64-3.6/dedalus/libraries/fftw/fftw_wrappers.o -Wno-error=declaration-after-statement
icc: command line warning #10006: ignoring unknown option '-fwrapv'
icc: command line warning #10006: ignoring unknown option '-Wno-error=declaration-after-statement'
/short/e14/rmh561/tmp/pip-build-env-_ahpm5jq/overlay/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h(17): warning #1224: #warning directive: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
#warning "Using deprecated NumPy API, disable it with " \
^

dedalus/libraries/fftw/fftw_wrappers.c(1361): error: identifier "MPI_Message" is undefined
MPI_Message ob_mpi;
^

dedalus/libraries/fftw/fftw_wrappers.c(25734): warning #1419: external declaration in primary source file
__Pyx_PyMODINIT_FUNC PyInit_fftw_wrappers(void) CYTHON_SMALL_CODE; /*proto*/
^

compilation aborted for dedalus/libraries/fftw/fftw_wrappers.c (code 2)
error: command 'mpiicc' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for dedalus
Running setup.py clean for dedalus
Failed to build dedalus
ERROR: Could not build wheels for dedalus which use PEP 517 and cannot be installed directly
Installation complete in conda environment 'dedalus'
> To unsubscribe from this group and stop receiving emails from it, send an email to dedalu...@googlegroups.com.

Andrew

unread,
May 21, 2019, 8:54:26 AM5/21/19
to Dedalus Users
Hi all,

I had a similar problem, with intel compilers falling back to gcc linkers, and found that exporting
LDSHARED="icc -shared" helped.

Regards,

Andrew

holmes...@gmail.com

unread,
May 21, 2019, 7:56:05 PM5/21/19
to Dedalus Users
Thanks Andrew. I tried that and it didnt seem to make a difference (and still said "using gcc linker flags"). But I'm not even sure if that is the problem...

Ryan

holmes...@gmail.com

unread,
May 22, 2019, 4:36:07 AM5/22/19
to Dedalus Users
Success! Navid had this working previously and with his help it is working using pip. For future reference if anyone wants to use dedalus on NCI/raijin the (simple) steps were:

module purge
module load fftw3/3.3.7-gcc
module load python3/3.6.2
module load mpi4py/3.0.0-py36-omp10.2
module load hdf5/1.8.14

export FFTW_PATH=$FFTW3_BASE
export MPI_PATH=$OPENMPI_BASE

pip3 install -v --no-binary :all: --user dedalus

Ryan
Reply all
Reply to author
Forward
0 new messages