problem about numpy for install escript on ubuntu 18.04
Dear all,
I am trying to install escript on Ubuntu 18.04. I've used stretch_
"scons -j1 options_
after that this error happend:
scons: Reading SConscript files ...
2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0]
Building with the following additional flags from debian: [['cpp_flags', '-Wdate-time -D_FORTIFY_
Using options in /home/mohammad/
sh: 1: svnversion: not found
Using svn revision information from file. Got revision = 6851
Checking whether the C++ compiler works... yes
Checking for C++ function gethostname()... yes
Checking for C++ header file byteswap.h... yes
Checking for C++ function SCbswap32()... yes
Checking for C++ header file sys/endian.h... no
Checking for C++ header file libkern/
Checking for working complex std::acos()... yes
Checking for C++ header file Python.h... yes
Checking for C++ function Py_Exit()... yes
Checking for C++ library boost_python-
Checking for C++ library boost_python-
Found boost/python/
Cannot import numpy. If it is installed try setting your PYTHONPATH and probably LD_LIBRARY_PATH
I tried to change python PATH to :
PYTHONPATH=
but same error happend. furthermore my LD library path is for intel compiler:
"LDLIBRARY=
How can I fix this issue?
Regards,
Mohammad
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- mohammad kashkouli
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hi Mohammad,
Can you please confirm that you have numpy installed on your machine? You may need to run something like
sudo apt-get install python3-numpy
in the console before you run the scons command.
Best regards,
Adam
Revision history for this message
|
#2 |
Hi Adam,
Thanks for replying my question.
I had numpy on my machine and also checked it after this error.
mohammad@
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> print numpy.__version__
1.16.2
Regards,
Mohammad
Revision history for this message
|
#3 |
Hi Mohammad,
You may have to install numpy a second time if you have both python 2.7 and python 3 installed on your computer, as Ubuntu has two separate numpy packages in the repository (one for each version of python.) Based on the output you posted, I believe that you may have python-numpy installed (the python 2.7 numpy module) but not python3-numpy.
Adam
Revision history for this message
|
#4 |
Hi Adam,
Thank you again.
Yes I have both of python and after I installed numpy on python3 the error solved but happened new error during build.
scons: *** [dummy] Error 255
scons: building terminated because of errors.
*** Config Summary (see config.log and <prefix>
Escript revision 6851
Install prefix: /home/mohammad/
Python: python3 (Version 3.6.8)
boost: /usr (Version 1.65.1)
trilinos: NO
numpy: YES (with headers)
MPI: OPENMPI (Version 2.1.1)
gmsh: YES, MPI-ENABLED
gzip: YES
Solver library: paso
Direct solver: NONE
domains: dudley, finley, ripley, speckley
netcdf: YES (4 + 3)
weipa: YES
openmp: YES
gdal: YES
pyproj: YES
scipy: YES
sympy: YES
DISABLED features: cppunit debug lapack mkl parmetis silo trilinos umfpack visit
Treating warnings as errors
ERROR: build stopped due to errors
Regards,
Revision history for this message
|
#5 |
Hi Mohammad,
You may have another dependency that escript requires uninstalled. Could you please run the following commands:
sudo apt-get install python3-dev python3-numpy python3-pyproj python3-gdal python3-sympy python3-matplotlib python3-scipy libnetcdf-
scons -j1 options_
The first command will install all of the dependencies that escript requires, the second command will compile the code. Please tell me if you receive another error message.
Best regards,
Adam
Revision history for this message
|
#6 |
Hi Adam,
Thanks again for your consideration.
It is output for first command:
mohammad@
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsuitesparse-dev is already the newest version (1:5.1.2-2).
lsb-release is already the newest version (9.20170808ubun
python3-numpy is already the newest version (1:1.13.
libboost-python-dev is already the newest version (1.65.1.0ubuntu1).
libboost-random-dev is already the newest version (1.65.1.0ubuntu1).
libnetcdf-c++4-dev is already the newest version (4.3.0+ds-5).
libnetcdf-
libopenmpi-dev is already the newest version (2.1.1-8).
libopenmpi-dev set to manually installed.
python3-matplotlib is already the newest version (2.1.1-2ubuntu3).
python3-scipy is already the newest version (0.19.1-2ubuntu1).
python3-sympy is already the newest version (1.1.1-5).
scons is already the newest version (3.0.1-1).
python3-dev is already the newest version (3.6.7-1~18.04).
python3-dev set to manually installed.
python3-gdal is already the newest version (2.4.2+
python3-pyproj is already the newest version (1.9.5.
0 upgraded, 0 newly installed, 0 to remove and 465 not upgraded
All of dependency are installed but when I run second command same error happened.
Best Regards,
Mohammad
Revision history for this message
|
#7 |
Hi Mohammad,
Could you please post the text output that displays in the console just before the lines:
scons: *** [dummy] Error 255
scons: building terminated because of errors.
This should tell me more information about what your error is.
Best regards,
Adam
Revision history for this message
|
#8 |
For sure. These are all scripts:
mohammad@
scons: Reading SConscript files ...
2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0]
Building with the following additional flags from debian: [['cpp_flags', '-Wdate-time -D_FORTIFY_
Using options in /home/mohammad/
Using svn revision information from file. Got revision = 6851
Checking whether the C++ compiler works... (cached) yes
Checking for C++ function gethostname()... (cached) yes
Checking for C++ header file byteswap.h... (cached) yes
Checking for C++ function SCbswap32()... (cached) yes
Checking for C++ header file sys/endian.h... (cached) no
Checking for C++ header file libkern/
Checking for working complex std::acos()... (cached) yes
Checking for C++ header file Python.h... (cached) yes
Checking for C++ function Py_Exit()... (cached) yes
Checking for C++ library boost_python-
Checking for C++ library boost_python-
Found boost/python/
Checking for C++ header file numpy/ndarrayob
Checking for C++ library netcdf_c++4... (cached) yes
Checking for C++ library mpi_cxx... yes
Checking for C++ library boost_iostreams... (cached) yes
Chmod("utest.sh", 0755)
Generated utest.sh.
Chmod("itest.sh", 0755)
Generated itest.sh.
Chmod("
scons: done reading SConscript files.
scons: Building targets ...
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
python3 scripts/py_comp.py weipa/py_
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
Compiling build/posix/
/home/mohammad/
[mpiexec@ubuntu] match_arg (../../
[mpiexec@ubuntu] HYDU_parse_array (../../
[mpiexec@ubuntu] parse_args (../../
[mpiexec@ubuntu] HYD_uii_
Usage: ./mpiexec [global opts] [exec1 local opts] : [exec2 local opts] : ...
Global options (passed to all executables):
Global environment options:
-genv {name} {value} environment variable name and value
-genvlist {env1,env2,...} environment variable list to pass
-genvnone do not pass any environment variables
-genvall pass all environment variables not managed
Other global options:
-f {name} | -hostfile {name} file containing the host names
-hosts {host list} comma separated host list
-configfile {name} config file containing MPMD launch options
-machine {name} | -machinefile {name}
-pmi-connect {nocache|
-pmi-aggregate aggregate PMI messages
-pmi-
-trace {<libraryname>} trace the application using <libraryname>
-trace-
-check-mpi {<libraryname>} check the application using <libraryname>
-ilp64 Preload ilp64 wrapper library for support default size of
-mps start statistics gathering for MPI Performance Snapshot (MPS)
-aps start statistics gathering for Application Performance Snapshot (APS)
-trace-pt2pt collect information about
-trace-
-tune [<confname>] apply the tuned data produced by
-use-
-noconf do not use any mpiexec's configuration files
-branch-count {leaves_num} set the number of children in tree
-gwdir {dirname} working directory to use
-gpath {dirname} path to executable to use
-gumask {umask} mask to perform umask
-tmpdir {tmpdir} temporary directory for cleanup input file
-cleanup create input file for clean up
-gtool {options} apply a tool over the mpi application
-gtoolfile {file} apply a tool over the mpi application. Parameters specified in the file
Local options (passed to individual executables):
Local environment options:
-env {name} {value} environment variable name and value
-envlist {env1,env2,...} environment variable list to pass
-envnone do not pass any environment variables
-envall pass all environment variables (default)
Other local options:
-host {hostname} host on which processes are to be run
-hostos {OS name} operating system on particular host
-wdir {dirname} working directory to use
-path {dirname} path to executable to use
-umask {umask} mask to perform umask
-n/-np {value} number of processes
{exec_name} {args} executable name and arguments
Hydra specific options (treated as global):
Bootstrap options:
-bootstrap bootstrap server to use
(ssh rsh pdsh fork slurm srun ll llspawn.stdio lsf blaunch sge qrsh persist service pbsdsh)
-bootstrap-exec executable to use to bootstrap processes
-bootstrap-
-prefork use pre-fork processes startup method
-enable-
Resource management kernel options:
-rmk resource management kernel to use (user slurm srun ll llspawn.stdio lsf blaunch sge qrsh pbs cobalt)
Processor topology options:
-binding process-to-core binding mode
Extended fabric control options:
-rdma select RDMA-capable network fabric (dapl). Fallback list is ofa,tcp,tmi,ofi
-RDMA select RDMA-capable network fabric (dapl). Fallback is ofa
-dapl select DAPL-capable network fabric. Fallback list is tcp,tmi,ofa,ofi
-DAPL select DAPL-capable network fabric. No fallback fabric is used
-ib select OFA-capable network fabric. Fallback list is dapl,tcp,tmi,ofi
-IB select OFA-capable network fabric. No fallback fabric is used
-tmi select TMI-capable network fabric. Fallback list is dapl,tcp,ofa,ofi
-TMI select TMI-capable network fabric. No fallback fabric is used
-mx select Myrinet MX* network fabric. Fallback list is dapl,tcp,ofa,ofi
-MX select Myrinet MX* network fabric. No fallback fabric is used
-psm select PSM-capable network fabric. Fallback list is dapl,tcp,ofa,ofi
-PSM select PSM-capable network fabric. No fallback fabric is used
-psm2 select Intel* Omni-Path Fabric. Fallback list is dapl,tcp,ofa,ofi
-PSM2 select Intel* Omni-Path Fabric. No fallback fabric is used
-ofi select OFI-capable network fabric. Fallback list is tmi,dapl,tcp,ofa
-OFI select OFI-capable network fabric. No fallback fabric is used
Checkpoint/
-ckpoint {on|off} enable/disable checkpoints for this run
-ckpoint-
-ckpoint-prefix destination for checkpoint files (stable storage, typically a cluster-wide file system)
-ckpoint-
-ckpoint-
-ckpointlib checkpointing library (blcr)
-ckpoint-
-restart restart previously checkpointed application
-ckpoint-num checkpoint number to restart
Demux engine options:
-demux demux engine (poll select)
Debugger support options:
-tv run processes under TotalView
-tva {pid} attach existing mpiexec process to TotalView
-gdb run processes under GDB
-gdba {pid} attach existing mpiexec process to GDB
-gdb-ia run processes under Intel IA specific GDB
Other Hydra options:
-v | -verbose verbose mode
-V | -version show the version
-info build information
-print-rank-map print rank mapping
-print-
-iface network interface to use
-help show this message
-perhost <n> place consecutive <n> processes on each host
-ppn <n> stand for "process per node"; an alias to -perhost <n>
-grr <n> stand for "group round robin"; an alias to -perhost <n>
-rr involve "round robin" startup scheme
-s <spec> redirect stdin to all or 1,2 or 2-4,6 MPI processes (0 by default)
-ordered-output avoid data output intermingling
-profile turn on internal profiling
-l | -prepend-rank prepend rank to output
-prepend-
-outfile-
-errfile-
-localhost local hostname for the launching node
-nolocal avoid running the application processes on the node where mpiexec.hydra started
Intel(R) MPI Library for Linux* OS, Version 2018 Update 3 Build 20180411 (id: 18329)
Copyright 2003-2018 Intel Corporation.
scons: *** [dummy] Error 255
scons: building terminated because of errors.
*** Config Summary (see config.log and <prefix>
Escript revision 6851
Install prefix: /home/mohammad/
Python: python3 (Version 3.6.8)
boost: /usr (Version 1.65.1)
trilinos: NO
numpy: YES (with headers)
MPI: OPENMPI (Version 2.1.1)
gmsh: YES, MPI-ENABLED
gzip: YES
Solver library: paso
Direct solver: NONE
domains: dudley, finley, ripley, speckley
netcdf: YES (4 + 3)
weipa: YES
openmp: YES
gdal: YES
pyproj: YES
scipy: YES
sympy: YES
DISABLED features: cppunit debug lapack mkl parmetis silo trilinos umfpack visit
Treating warnings as errors
ERROR: build stopped due to errors
Regards,
Mohammad
Revision history for this message
|
#9 |
Hi Mohammad,
I think we've nearly got it working. Can you please run:
scons -j1 options_
Best regards,
Adam
Revision history for this message
|
#10 |
Hi Adam,
Thanks again.
The Escript build is completed successfully.
/home/mohammad/
/home/mohammad/
/home/mohammad/
scons: done building targets.
*** Config Summary (see config.log and <prefix>
Escript revision 6851
Install prefix: /home/mohammad/
Python: python3 (Version 3.6.8)
boost: /usr (Version 1.65.1)
trilinos: NO
numpy: YES (with headers)
MPI: YES (flavour: MPICH2)
gmsh: YES, MPI-ENABLED
gzip: YES
Solver library: paso
Direct solver: NONE
domains: dudley, finley, ripley, speckley
netcdf: YES (4 + 3)
weipa: YES
openmp: YES
gdal: YES
pyproj: YES
scipy: YES
sympy: YES
DISABLED features: cppunit debug lapack mkl parmetis silo trilinos umfpack visit
Treating warnings as errors
SUCCESS: build complete
Best Regards,
Mohammad