Menu

#55 Issues with Installing OpenMPS

1.0
closed
None
2021-06-21
2021-06-09
Mostafa Ali
No

Hello,

I'm trying to install openmps on llinux. I followed the instructions at https://sourceforge.net/p/openmps/wiki/OpenMPS%20from%20Source/ .Everything goes fine until I run the last command where I get this back

running install
running build
running build_py
running install_lib
running install_egg_info
Removing /home/mostafa/openmps/conda/root/conda/envs/openmps/lib/python3.7/site-packages/MPSPyLib-v3.0.005-py3.7.egg-info
Writing /home/mostafa/openmps/conda/root/conda/envs/openmps/lib/python3.7/site-packages/MPSPyLib-v3.0.005-py3.7.egg-info
make MPSMain > make.log 2>&1
python deref.py make.log
File not found; no dereferencing for Mods/BasicOps_templates/BasicOps.pkl
File not found; no dereferencing for Mods/ContractionOps_templates/ContractionOps.pkl
File not found; no dereferencing for Mods/Convergence_templates/Convergence.pkl
File not found; no dereferencing for Mods/DecompositionOps_templates/DecompositionOps.pkl
File not found; no dereferencing for Mods/IOOps_templates/IOOps.pkl
File not found; no dereferencing for Mods/LanczosOps_templates/LanczosOps.pkl
File not found; no dereferencing for Mods/LinearAlgebra_templates/LinearAlgebra.pkl
File not found; no dereferencing for Mods/MPOOps_templates/MPOOps.pkl
File not found; no dereferencing for Mods/MPSOps_templates/MPSOps.pkl
File not found; no dereferencing for Mods/iMPSOps_templates/iMPSOps.pkl
File not found; no dereferencing for Mods/ObsOps_templates/ObsOps.pkl
File not found; no dereferencing for Mods/PyInterface_templates/PyInterface.pkl
File not found; no dereferencing for Mods/qTensors_templates/qTensors.pkl
File not found; no dereferencing for Mods/Tensors_templates/Tensors.pkl
File not found; no dereferencing for Mods/VariationalOps_templates/VariationalOps.pkl
File not found; no dereferencing for Mods/KrylovOps_templates/KrylovOps.pkl
File not found; no dereferencing for Mods/TDVPOps_templates/TDVPOps.pkl
File not found; no dereferencing for Mods/ExpokitOps_templates/ExpokitOps.pkl
File not found; no dereferencing for Mods/TEBDOps_templates/TEBDOps.pkl
File not found; no dereferencing for Mods/ZaletelOps_templates/ZaletelOps.pkl
File not found; no dereferencing for Mods/TimeEvolutionOps_templates/TimeEvolutionOps.pkl
File not found; no dereferencing for Mods/MPDOOps_templates/MPDOOps.pkl
File not found; no dereferencing for Mods/LPTNOps_templates/LPTNOps.pkl
head -n 40 make.log
/bin/sh: 1: make: not found
mv MPSFortLib/make.log .

I hope you can help and thank you for your time.

Best,
Mostafa

Discussion

  • Matthew Jones

    Matthew Jones - 2021-06-10

    Hi, can you run the following commands, and let me know what the output is?

    which python
    gfortran --version
    gcc --version
    make --version
    
     
  • Mostafa Ali

    Mostafa Ali - 2021-06-10

    It seems like I didn't have the command make. I installed it, but I'm getting these errors.

    make[1]: /home/mostafa/openmps/conda/root/conda/envs/openmps/bin/gfortran: No such file or directory
    make[1]: [makefile:14: /home/mostafa/openmps/MPSFortLib/Mods/BasicOps.o] Error 127
    make[1]: Leaving directory '/home/mostafa/openmps/MPSFortLib/Mods'
    make:
    [makefile:29: moddir_obj] Error 2

     
  • Matthew Jones

    Matthew Jones - 2021-06-10

    It looks like you're also missing gfortran.

    Can you describe the exact process you used to configure your environment?

     
  • Mostafa Ali

    Mostafa Ali - 2021-06-10

    Here is what these commands return now:

    $ which python
    /home/mostafa/openmps/conda/root/conda/envs/openmps/bin/python

    $ gfortran --version
    GNU Fortran (Ubuntu 10.3.0-1ubuntu1) 10.3.0
    Copyright (C) 2020 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    $ gcc --version
    gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
    Copyright (C) 2020 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    $ make --version
    GNU Make 4.3
    Built for x86_64-pc-linux-gnu
    Copyright (C) 1988-2020 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

     
  • Mostafa Ali

    Mostafa Ali - 2021-06-10

    Also, if I change

    python BuildOSMPS.py --prefix=$CONDA_PREFIX/bin \
    --option=FC:$CONDA_PREFIX/bin/gfortran \
    --option=INCFLAGS:-I$CONDA_PREFIX/include \
    --option=LIBFLAGS:-L$CONDA_PREFIX/lib

    to

    python BuildOSMPS.py --prefix=$CONDA_PREFIX/bin \
    --option=FC:/usr/bin/gfortran \
    --option=INCFLAGS:-I$CONDA_PREFIX/include \
    --option=LIBFLAGS:-L$CONDA_PREFIX/lib

    I can avoid these errors, but I end up getting this

    /usr/bin/gfortran -O3 -c /home/mostafa/openmps/MPSFortLib/Mods/BasicOps.f90 -I/home/mostafa/openmps/MPSFortLib/Mods/
    /home/mostafa/openmps/MPSFortLib/Mods/BasicOps.f90:369:44:
    Template file is BasicOps_include.f90:219

    369 | call dlarnv(dis, lapackseed, 1, sc)
    | 1
    ......
    430 | call dlarnv(dis, lapackseed, size(vec, 1), vec)
    | 2
    Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
    make[1]: [makefile:14: /home/mostafa/openmps/MPSFortLib/Mods/BasicOps.o] Error 1
    make[1]: Leaving directory '/home/mostafa/openmps/MPSFortLib/Mods'
    make:
    [makefile:29: moddir_obj] Error 2
    mv MPSFortLib/make.log .

     
  • Matthew Jones

    Matthew Jones - 2021-06-21

    What operating system are you using? It looks like it's a Linux-based system.
    Can you send me the output of these commands:

    lsb_release --all  # this will tell me which Linux version you're using
    conda --version  # this will tell me the version of conda on your system
    conda env list  # this will list all of the conda environments built on your system
    

    The procedure for configuring the environment is essentially this (from the openmps directory):

    conda env create --name openmps --file conda/environments/linux.yml  # create a conda environment with the appropriate dependencies
    # the following command installs openmps into the conda environment called `openmps`
    conda activate openmps && \
    python setup.py install && \
    python BuildOSMPS.py --prefix=$CONDA_PREFIX/bin \
                         --option=FC:$CONDA_PREFIX/bin/gfortran \  # note: this is using a very specific version of the fortran compiler ... using a system provided compiler will miss some of the dependencies and prompt compilation/link failures
                         --option=INCFLAGS:-I$CONDA_PREFIX/include \
                         --option=LIBFLAGS:-L$CONDA_PREFIX/lib
    
     
  • Mostafa Ali

    Mostafa Ali - 2021-06-21

    Hi Matthew,

    Here are the outputs

    (base) mostafa@mostafa:~$ lsb_release --all
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 21.04
    Release:    21.04
    Codename:   hirsute
    
    
    (base) mostafa@mostafa:~$ conda --version
    conda 4.10.1
    
    
    (base) mostafa@mostafa:~$ conda env list
    # conda environments:
    #
                             /home/mostafa/anaconda3
    base                  *  /home/mostafa/openmps/conda/root/conda
    openmps                  /home/mostafa/openmps/conda/root/conda/envs/openmps
    

    Thanks you!

     

    Last edit: Matthew Jones 2021-06-21
  • Matthew Jones

    Matthew Jones - 2021-06-21

    Can you try the following and send me the output (please add the output as a text file ... it will be large)?

    conda activate openmps
    conda list
    
    conda activate openmps
    python BuildOSMPS.py --clean
    python BuildOSMPS.py --prefix=$CONDA_PREFIX/bin \
                         --option=FC:$CONDA_PREFIX/bin/gfortran \
                         --option=INCFLAGS:-I$CONDA_PREFIX/include \
                         --option=LIBFLAGS:-L$CONDA_PREFIX/lib
    
     
  • Mostafa Ali

    Mostafa Ali - 2021-06-21

    I hope I didn't do this wrong

     
  • Matthew Jones

    Matthew Jones - 2021-06-21

    Can you send me the output of the following command?

    conda activate openmps
    ls -la $CONDA_PREFIX/bin | grep -i "fortran"
    
     

    Last edit: Matthew Jones 2021-06-21
  • Mostafa Ali

    Mostafa Ali - 2021-06-21

    both of them don't return any output

     
  • Matthew Jones

    Matthew Jones - 2021-06-21

    Apologies! I had a typo in one of the commands, can you try again?

     
  • Mostafa Ali

    Mostafa Ali - 2021-06-21

    I got this

    lrwxrwxrwx 1 mostafa mostafa 36 Jun 9 17:48 x86_64-conda_cos6-linux-gnu-f95 -> x86_64-conda_cos6-linux-gnu-gfortran
    -rwxrwxr-x 1 mostafa mostafa 226 Jun 9 17:47 x86_64-conda_cos6-linux-gnu-gfortran
    -rwxrwxr-x 2 mostafa mostafa 904240 Aug 21 2018 x86_64-conda_cos6-linux-gnu-gfortran.bin

     
  • Matthew Jones

    Matthew Jones - 2021-06-21

    Great! Thanks.
    Can you try this command and send me the output?

    conda activate openmps && \
    python setup.py install && \
    python BuildOSMPS.py --clean
    python BuildOSMPS.py --prefix=$CONDA_PREFIX/bin \
                         --option=FC:$CONDA_PREFIX/bin/x86_64-conda_cos6-linux-gnu-gfortran \
                         --option=INCFLAGS:-I$CONDA_PREFIX/include \
                         --option=LIBFLAGS:-L$CONDA_PREFIX/lib
    
     
  • Mostafa Ali

    Mostafa Ali - 2021-06-21

    Did it work?

     
  • Mostafa Ali

    Mostafa Ali - 2021-06-21

    I think it did. I ran the example code and got the pdf output file.

    Thank you so much, Matthew!

     
  • Matthew Jones

    Matthew Jones - 2021-06-21

    Looks like it! Only one way to find out, though:

    conda activate openmps && \
    python Examples/03_BoseHubbardDynamics.py --PostProcess False && \
    python Examples/03_BoseHubbardDynamics.py --PostProcess True
    
     
  • Matthew Jones

    Matthew Jones - 2021-06-21

    Great!! May I close this issue, or did you have other questions?

     
  • Mostafa Ali

    Mostafa Ali - 2021-06-21

    Sure. I ran the codes successfully for the first and third examples.
    Thank you for your time. I appreciate it.

     
  • Matthew Jones

    Matthew Jones - 2021-06-21

    No problem! Feel free to open another ticket if you have questions.

     
  • Matthew Jones

    Matthew Jones - 2021-06-21
    • status: open --> closed
     
  • Matthew Jones

    Matthew Jones - 2021-06-21

    Problem fixed.

     

Log in to post a comment.