Can't Install Psi4 Engine in the Cloud

Post Reply
mvanvleet
Posts: 3
Joined: Mon Mar 01, 2021 6:06 pm
Full Name: Mary Van Vleet
Organization: Spelman College

Can't Install Psi4 Engine in the Cloud

Post by mvanvleet »

I'm currently attempting to create a cloud instance of WebMO, and am running into issues with installing the Psi4 engine.

Following along with the SITC tutorial,

https://www.webmo.net/support/sitc_commands.html

I was able to set up a VM using the command

./sitc/install --engines="psi4,mopac7"

(see output below)

Code: Select all

./sitc/install --engines="psi4,mopac7"
Server In The Cloud version 0.7.03
Copyright (c) 2020, WebMO, LLC, all rights reserved.
This script automates the installation of software from several
third parties. Many of these have licenses that are agreed to
automatically by this script. Indicate your consent by pressing
ENTER, or press CTRL-c to exit.
Sanity check! You have selected to do the following:
 Update the operating system
 Install WebMO for user webmo
 Install psi4,mopac7 to /usr/local
Press ENTER to continue, or CTRL-c to exit.
Logging script output to /home/spelman_chemistry_computes/sitc/sitc.log
Installing for centos 7 on GCP
*** RUNNING OS_UPDATE ***
Updating operating system (be patient)...
*** RUNNING INSTALL_WEBMO ***
Installing httpd...
Installing perl...
Configuring httpd...
Configuring webserver...
Installing patch...
Configuring selinux...
Setting up WebMO user...
Creating public_html directory...
Installing WebMO...
The license must be in the form xxxx-xxxx-xxxx
Have you previously obtained a WebMO license number? [y/n]:y
License number: [redacted]
Password: [redacted]
Downloading WebMO...
Unpacking WebMO...
Cleaning up temporary files...
Set up a WebMO user? [y/n]:y
Enter a username: [redacted]
Enter a password: 
Enter password again: 
*** INSTALLING ENGINES ***
Installing psi4
Installing bzip2...
Downloading miniconda...
Installing miniconda...
Installing psi4...
Logging installation options...
Installing mopac7
Downloading mopac7...
Untarring mopac7 to /usr/local...
Logging installation options...
Enabling engines in WebMO
psi already enabled
mopac already enabled
*** CONFIGURE INSTALLATION ***
In your web browser, log in to [redacted] with the
username "admin" and a blank password. Set the admin password.
Run a test job.
that supposedly runs both mopac and psi4 jobs. The mopac jobs run just fine on the web server. Psi4 jobs, however, fail with the error message

Code: Select all

Cannot execute /usr/local/miniconda/bin/psi4: No such file or directory
and indeed this executable doesn't exist on the VM. Can someone help me figure out what I might be doing wrong in the Psi4 installation?

Thanks!

polik
Posts: 22
Joined: Fri May 29, 2020 6:20 pm
Full Name: Will Polik
Organization: WebMO LLC

Re: Can't Install Psi4 Engine in the Cloud

Post by polik »

There are two question to investigate:
1) Did SITC install psi4 somewhere?
2) Does the WebMO configuration point to that installation?

1) From the output you posted
Installing psi4
Installing bzip2...
Downloading miniconda...
Installing miniconda...
Installing psi4...
Logging installation options..
it would appear that psi4 was indeed installed. Please double-check to see where it was actually installed by searching within the /usr/local/miniconda directory for psi4, either manually or with

Code: Select all

$ find /usr/local/miniconda -name psi4
You might also look within the sitc/sitc.log file, which should have some output indicating the success/failure of the psi4 installation, and perhaps some information related to the location of the installation

2) Assuming that some version of psi4 was indeed installed and you have located it, then you will need to login to your WebMO instance as the WebMO administrator (username: admin), go to the Interface Manager and edit the PSI4 interface, and update the entry with the correct file location. See step 8 of
https://www.webmo.net/support/binaries_linux.html#psi4
except use the actual directory location.

There are multiple versions of psi4 available from its repository. It is possible that the installed version does not match the version expected by sitc. Thanks for helping determine this!

mvanvleet
Posts: 3
Joined: Mon Mar 01, 2021 6:06 pm
Full Name: Mary Van Vleet
Organization: Spelman College

Re: Can't Install Psi4 Engine in the Cloud

Post by mvanvleet »

The sitc/sitc.log file provided useful information:

Code: Select all

Warning: 'http://conda.anaconda.org/psi4' already in 'channels' list, moving to the top
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... ^MBuilding graph of deps:   0%|          | 0/5 [00:00<?, ?it/s]^MExamining @/linux-64::__archspec==1=x86_64:   0%|          | 0/5 [00:00<?, ?it/s]^MExam
ining python=3.8:  20%|██        | 1/5 [00:00<00:00, 4476.31it/s]            ^MExamining @/linux-64::__glibc==2.17=0:  40%|████      | 2/5 [00:00<00:00, 19.70it/s]^MExamining @/linux-64::
__glibc==2.17=0:  60%|██████    | 3/5 [00:00<00:00, 29.48it/s]^MExamining @/linux-64::__unix==0=0:  60%|██████    | 3/5 [00:00<00:00, 29.48it/s]    ^MExamining psi4:  80%|████████  | 4/5 
[00:00<00:00, 29.48it/s]                   ^M                                                             ^M^MDetermining conflicts:   0%|          | 0/5 [00:00<?, ?it/s]^MExamining confl
ict for python psi4:   0%|          | 0/5 [00:00<?, ?it/s]^M
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed
^M
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
  - psi4 -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
psi already enabled
mopac already enabled
Apparently Python 3.8 is not compatible with the version of psi4 it tried to install, and so the installation failed.

Can you walk me through the steps needed to change the Python version on the virtual machine and install Psi4 correctly?

polik
Posts: 22
Joined: Fri May 29, 2020 6:20 pm
Full Name: Will Polik
Organization: WebMO LLC

Re: Can't Install Psi4 Engine in the Cloud

Post by polik »

According to the psi4 download page:
https://psicode.org/installs/v132/
psi4 should use the Python environment provided by the conda environment, not the system Python environment. So I believe that the solution is not to change the Python version on the virtual machine, but rather to change (or obtain) the right version of Python within the Conda environment. For example, to use python 3.7, the documented command would be

Code: Select all

conda install psi4 psi4-rt python=3.7 -c psi4
In sitc/scripts/common/install_psi4 (version 0.7.01), the psi4 installation command is

Code: Select all

sudo env "PATH=$PATH" conda config --add channels http://conda.anaconda.org/psi4 >> $SITC_LOG 2>&1
echo "Installing psi4..."
sudo env "PATH=$PATH" conda install --yes psi4 >> $SITC_LOG 2>&1
This does not specify a python version, which is perhaps why you ended up with python 3.8.

Starting over, one could try modifying the final line to

Code: Select all

sudo env "PATH=$PATH" conda install --yes psi4 psi4-rt python=3.7 >> $SITC_LOG 2>&1
But in your existing virtual machine, it's probably easier to install psi4 from the command line, rather than using a modified sitc script. Follow the instructions at
https://www.webmo.net/support/binaries_linux.html#psi4
with the appropriate modifications for psi4 version and python version. This is most likely:

Code: Select all

$ sudo su -
# export PATH=/usr/local/miniconda/bin:$PATH
# conda install --yes psi4 psi4-rt python=3.7 dftd3 -c psi4
# exit
Check the output messages. If all looks good, then run a test job from the command line.

mvanvleet
Posts: 3
Joined: Mon Mar 01, 2021 6:06 pm
Full Name: Mary Van Vleet
Organization: Spelman College

Re: Can't Install Psi4 Engine in the Cloud

Post by mvanvleet »

Thanks, that worked!

November_SSN
Posts: 5
Joined: Tue Mar 30, 2021 5:57 pm
Full Name: Paul McPherson
Organization: Saratov State Technical University

Re: Can't Install Psi4 Engine in the Cloud

Post by November_SSN »

It worked for me too, thanks! I'm using WebMO in my university courses, and having it working on the cloud is going to make my work much, MUCH easier...

Post Reply