Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psi4 causing jupyter notebook kernel to crash #862

Closed
slochower opened this issue Nov 17, 2017 · 22 comments
Closed

Psi4 causing jupyter notebook kernel to crash #862

slochower opened this issue Nov 17, 2017 · 22 comments

Comments

@slochower
Copy link

slochower commented Nov 17, 2017

I'm trying to use Psi4 in a jupyter notebook and getting an immediate crash. I didn't see anything in documentation or issues about running inside a notebook, so I'm not sure if this is supported behavior.

I installed Psi4 using conda in its own environment, following the instructions here with conda create -n p4env python=3.6 psi4 psi4-rt -c psi4/label/dev -c psi4. I can import psi4 correctly using the python interactive shell.

$ source activate p4env
$ python
Python 3.6.3 | packaged by conda-forge | (default, Nov  4 2017, 10:10:56) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.executable
'/home/xxx/data/applications/anaconda3/envs/p4env/bin/python'
>>> sys.path
['', '/home/xxx/data/applications/anaconda3/envs/p4env/lib/python36.zip', '/home/xxx/data/applications/anaconda3/envs/p4env/lib/python3.6', '/home/xxx/data/applications/anaconda3/envs/p4env/lib/python3.6/lib-dynload', '/home/xxx/data/applications/anaconda3/envs/p4env/lib/python3.6/site-packages']
>>> import psi4
/home/xxx/data/applications/anaconda3/envs/p4env/lib/python3.6/site-packages/v2rdm_casscf/v2rdm_casscf.so loaded.

If I run inside a notebook, sys.path and sys.executable are the same, but when I import psi4, I get a message "The kernel appears to have died. It will restart automatically." In the terminal, I see:

[I 17:41:23.834 NotebookApp] Adapting to protocol v5.1 for kernel 56076279-b2b7-4f6a-8fb0-83b5b1f774c4
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
terminate called after throwing an instance of 'std::bad_cast'
  what():  std::bad_cast
[I 17:41:41.146 NotebookApp] KernelRestarter: restarting kernel (1/5)

I think the first three lines are unrelated. The kernel never recovers and I can't import the module. Should I expect that Psi4 will work inside a jupyter notebook and if so, is there any way to get more information about what's going wrong?

Edit: I should add that to get jupyter notebook to see the p4env conda environment, I executed conda install ipykernel --name p4env and then ~/data/applications/psi4conda/envs/p4env/bin/python -m ipykernel install --user (according to these instructions).

  • CentOS Linux release 7.4.1708 (Core)
  • 3.10.0-693.5.2.el7.x86_64
  • Python 3.6.3
  • Jupyter 4.4.0
  • Psi4 1.2a1.dev611+8fe3513
Output of `conda list`

ca-certificates           2017.7.27.1                   0    conda-forge
certifi                   2017.7.27.1              py36_0    conda-forge
chemps2                   1.8.4                         0    psi4/label/dev
cloog                     0.18.0                        0  
decorator                 4.1.2                    py36_0    conda-forge
dftd3                     3.2.0                         7    psi4
dkh                       1.2                           1    psi4/label/dev
erd                       3.0.6                         1    psi4/label/dev
gcc-5                     5.2.0                         1    psi4
gcc-5-mp                  5.2.0                         0    psi4
gcp                       2.0.1                         0    psi4
gdma                      2.2.6                         3    psi4/label/dev
gmp                       6.1.2                         0    conda-forge
hdf5                      1.8.17                       11    conda-forge
intel-openmp              2018.0.0             h15fc484_7  
ipykernel                 4.6.1                    py36_0    conda-forge
ipython                   6.2.1                    py36_0    conda-forge
ipython_genutils          0.2.0                    py36_0    conda-forge
isl                       0.12.2                        0  
jedi                      0.10.2                   py36_0    conda-forge
jupyter_client            5.1.0                    py36_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
libefp                    1.5b1                         0    psi4/label/dev
libgfortran               3.0.0                         1  
libint                    1.2.1                         1    psi4/label/dev
libsodium                 1.0.10                        0    conda-forge
libxc                     3.0.0                         6    psi4/label/dev
mkl                       2018.0.0             hb491cac_4  
mpc                       1.0.1                         0  
mpfr                      3.1.2                         0  
ncurses                   5.9                          10    conda-forge
numpy                     1.13.3           py36ha12f23b_0  
openssl                   1.0.2l                        0    conda-forge
pcmsolver                 1.1.10                   py36_1    psi4/label/dev
pexpect                   4.2.1                    py36_0    conda-forge
pickleshare               0.7.4                    py36_0    conda-forge
pip                       9.0.1                    py36_0    conda-forge
prompt_toolkit            1.0.15                   py36_0    conda-forge
psi4                      1.2a1.dev611+8fe3513          py36_0    psi4/label/dev
psi4-lt-mp                1.2a1.dev3               py36_0    psi4/label/dev
psi4-rt                   1.2a1.dev3               py36_0    psi4/label/dev
ptyprocess                0.5.2                    py36_0    conda-forge
py                        1.5.2                      py_0    conda-forge
pygments                  2.2.0                    py36_0    conda-forge
pytest                    3.2.5                    py36_0    conda-forge
python                    3.6.3                         1    conda-forge
python-dateutil           2.6.1                    py36_0    conda-forge
pyzmq                     16.0.2                   py36_2    conda-forge
readline                  6.2                           0    conda-forge
setuptools                36.6.0                   py36_1    conda-forge
simint                    0.7                           0    psi4
simplegeneric             0.8.1                    py36_0    conda-forge
six                       1.11.0                   py36_1    conda-forge
sqlite                    3.13.0                        1    conda-forge
tk                        8.5.19                        2    conda-forge
tornado                   4.5.2                    py36_0    conda-forge
traitlets                 4.3.2                    py36_0    conda-forge
v2rdm_casscf              0.4                      py36_1    psi4/label/dev
wcwidth                   0.1.7                    py36_0    conda-forge
wheel                     0.30.0                     py_1    conda-forge
xz                        5.2.3                         0    conda-forge
zeromq                    4.2.1                         1    conda-forge
zlib                      1.2.11                        0    conda-forge

@loriab
Copy link
Member

loriab commented Nov 17, 2017

It should work. I use psi4 in a jupyter notebook regularly. However, that's on Mac, not Linux, and I can't check Linux until tomorrow.

Only thing you might try in the interim is pulling jupyter and friends from defaults or from intel channel, rather than conda-forge.

EDIT: and thanks for the conda list output. I wish all issues included it.

@slochower
Copy link
Author

Thanks for confirming that it should work! Tomorrow I'll try pulling in jupyter separately.

@slochower
Copy link
Author

Inside my p4env environment, I ran conda install -c defaults jupyter and conda install -c defaults ipykernel. I also separately ran conda install nb_conda_kernels to make sure that jupyter could see all my conda kernels (from here), although that just cluttered things in notebook GUI. I'm getting the same kernel crash. Here's a new conda list:

bleach                    2.0.0                    py36_0    conda-forge
ca-certificates           2017.7.27.1                   0    conda-forge
certifi                   2017.7.27.1              py36_0    conda-forge
chemps2                   1.8.4                         0    psi4/label/dev
cloog                     0.18.0                        0  
dbus                      1.10.22              h3b5a359_0  
decorator                 4.1.2                    py36_0    conda-forge
dftd3                     3.2.0                         7    psi4
dkh                       1.2                           1    psi4/label/dev
entrypoints               0.2.3                    py36_1    conda-forge
erd                       3.0.6                         1    psi4/label/dev
expat                     2.2.5                he0dffb1_0  
fontconfig                2.12.1                        3  
freetype                  2.5.5                         2  
gcc-5                     5.2.0                         1    psi4
gcc-5-mp                  5.2.0                         0    psi4
gcp                       2.0.1                         0    psi4
gdma                      2.2.6                         3    psi4/label/dev
glib                      2.53.6               h5d9569c_2  
gmp                       6.1.2                         0    conda-forge
gst-plugins-base          1.12.2               he3457e5_0  
gstreamer                 1.12.2               h4f93127_0  
hdf5                      1.8.17                       11    conda-forge
html5lib                  0.999999999              py36_0    conda-forge
icu                       54.1                          0  
intel-openmp              2018.0.0             h15fc484_7  
ipykernel                 4.6.1            py36hbf841aa_0  
ipython                   6.2.1                    py36_0    conda-forge
ipython_genutils          0.2.0                    py36_0    conda-forge
ipywidgets                7.0.0            py36h7b55c3a_0  
isl                       0.12.2                        0  
jedi                      0.10.2                   py36_0    conda-forge
jinja2                    2.9.6                    py36_0    conda-forge
jpeg                      9b                   h024ee3a_2  
jsonschema                2.6.0                    py36_0    conda-forge
jupyter                   1.0.0            py36h9896ce5_0  
jupyter_client            5.1.0                    py36_0    conda-forge
jupyter_console           5.2.0            py36he59e554_1  
jupyter_core              4.3.0            py36h357a921_0  
libefp                    1.5b1                         0    psi4/label/dev
libffi                    3.2.1                hd88cf55_4  
libgcc                    7.2.0                h69d50b8_2  
libgcc-ng                 7.2.0                h7cc24e2_2  
libgfortran               3.0.0                         1  
libiconv                  1.14                          0  
libint                    1.2.1                         1    psi4/label/dev
libpng                    1.6.32               hda9c8bc_2  
libsodium                 1.0.10                        0    conda-forge
libstdcxx-ng              7.2.0                h7a57d05_2  
libxc                     3.0.0                         6    psi4/label/dev
libxcb                    1.12                 h84ff03f_3  
libxml2                   2.9.4                         0  
markupsafe                1.0                      py36_0    conda-forge
mistune                   0.8                      py36_0    conda-forge
mkl                       2018.0.0             hb491cac_4  
mpc                       1.0.1                         0  
mpfr                      3.1.2                         0  
nb_conda_kernels          2.1.0                    py36_0    conda-forge
nbconvert                 5.3.1                      py_1    conda-forge
nbformat                  4.4.0                    py36_0    conda-forge
ncurses                   5.9                          10    conda-forge
notebook                  5.2.1                    py36_2    conda-forge
numpy                     1.13.3           py36ha12f23b_0  
openssl                   1.0.2l                        0    conda-forge
pandoc                    2.0.0.1                       1    conda-forge
pandocfilters             1.4.1                    py36_0    conda-forge
pcmsolver                 1.1.10                   py36_1    psi4/label/dev
pcre                      8.41                 hc27e229_1  
pexpect                   4.2.1                    py36_0    conda-forge
pickleshare               0.7.4                    py36_0    conda-forge
pip                       9.0.1                    py36_0    conda-forge
prompt_toolkit            1.0.15                   py36_0    conda-forge
psi4                      1.2a1.dev611+8fe3513          py36_0    psi4/label/dev
psi4-lt-mp                1.2a1.dev3               py36_0    psi4/label/dev
psi4-rt                   1.2a1.dev3               py36_0    psi4/label/dev
ptyprocess                0.5.2                    py36_0    conda-forge
py                        1.5.2                      py_0    conda-forge
pygments                  2.2.0                    py36_0    conda-forge
pyqt                      5.6.0            py36h0386399_5  
pytest                    3.2.5                    py36_0    conda-forge
python                    3.6.3                         1    conda-forge
python-dateutil           2.6.1                    py36_0    conda-forge
pyzmq                     16.0.2                   py36_2    conda-forge
qt                        5.6.2                         5  
qtconsole                 4.3.1            py36h8f73b5b_0  
readline                  6.2                           0    conda-forge
setuptools                36.6.0                   py36_1    conda-forge
simint                    0.7                           0    psi4
simplegeneric             0.8.1                    py36_0    conda-forge
sip                       4.18.1           py36h51ed4ed_2  
six                       1.11.0                   py36_1    conda-forge
sqlite                    3.13.0                        1    conda-forge
terminado                 0.6                      py36_0    conda-forge
testpath                  0.3.1                    py36_0    conda-forge
tk                        8.5.19                        2    conda-forge
tornado                   4.5.2                    py36_0    conda-forge
traitlets                 4.3.2                    py36_0    conda-forge
v2rdm_casscf              0.4                      py36_1    psi4/label/dev
wcwidth                   0.1.7                    py36_0    conda-forge
webencodings              0.5                      py36_0    conda-forge
wheel                     0.30.0                     py_1    conda-forge
widgetsnbextension        3.0.2            py36hd01bb71_1  
xz                        5.2.3                         0    conda-forge
zeromq                    4.2.1                         1    conda-forge
zlib                      1.2.11                        0    conda-forge

Do you have any thoughts?

@loriab
Copy link
Member

loriab commented Nov 18, 2017

Crash replicated.

Almost certainly what's going on is that a fundamental library (gcc, mkl are the usual suspects) is in conflict between jupyter's ldd and psi4's (envname/lib/pythonx.x/site-packages/psi4/core.so). The usual hack is to switch around import order between psi4, numpy, matplotlib, etc, until one works.

Indeed, if I install psi4 the way you listed into p4env and then create another env into which I install jupyter (and same version of python; all from conda-forge) and then adjust the path (sys.path.append('/path/to/p4env/lib/python3.6/site-packages/), I can import psi4 just fine.

Next problem is that psi4.test() or any molecule specification just fails. This one is new to me, and 20 min hacking did not solve it. One suspicion is that regex is involved, and regex is the big reason psi4 ships with its own gcc (5.2) rather than the longstanding conda default of 4.8. But on the other hand, everything c++ is supposed to be statically linked in to avoid such troubles.

So you've found a real problem, and I don't have a ready solution. The medium-term solution is to go with the new compilers that conda is rolling out (7.2). Then psi can rejoin the common gcc track of the rest of the conda ecosystem. Fortunately, I was working on that this week.

Copying people who have had related problems. @dsirianni, @j3mdamas, Pascal (hit a bad_cast error)

@slochower
Copy link
Author

Almost certainly what's going on is that a fundamental library (gcc, mkl are the usual suspects) is in conflict between jupyter's ldd and psi4's (envname/lib/pythonx.x/site-packages/psi4/core.so). The usual hack is to switch around import order between psi4, numpy, matplotlib, etc, until one works.

Ah, I ran into this for the first time recently with another module.

Indeed, if I install psi4 the way you listed into p4env and then create another env into which I install jupyter (and same version of python; all from conda-forge) and then adjust the path (sys.path.append('/path/to/p4env/lib/python3.6/site-packages/), I can import psi4 just fine.

Okay, I'll give this a shot.

The medium-term solution is to go with the new compilers that conda is rolling out (7.2). Then psi can rejoin the common gcc track of the rest of the conda ecosystem. Fortunately, I was working on that this week.

Is there anything actionable with this or do I sit tight until there's a new psi4 release?

@loriab
Copy link
Member

loriab commented Nov 18, 2017

If you want to try the new compilers version, create a new environment conda create -n psi4 python=3.6 -c psi4/label/agg (only things from psi4 channel in conda list should be psi4, libint, libxc). Should be safe to install jupyter in the same env. Strongly suggest jupyter (and numpy) from defaults (where they're well into the process of rebuilding everything with the new compilers), not conda-forge (where they're considering how to use them). I've been getting psi4 to build this way for less than a day, so it's very much a trial package.

If that doesn't work (and I won't be able to test it myself until Monday), no, there's nothing actionable.

@loriab
Copy link
Member

loriab commented Nov 27, 2017

Just as a note, I tried it out with the new compilers (conda create -n aggjupypsi psi4 python=3.6 jupyter -c psi4/label/agg -c anaconda), and the problem still exists. It looked like everything from continuum is new enough to have the new compilers, so I'm not sure where the segfault is coming from. Never dealt with qt before, though.

@slochower
Copy link
Author

Thanks for the update, @loriab, I appreciate it. At the moment, I'm running outside of jupyter and that is fine for now (I didn't have a chance to try installing psi4 and jupyter into separate environments and then adjusting the latter's path to include psi4 modules).

At the risk of going off topic, I have a tangentially related question. I'm trying to do a torsion scan to derive a potential energy surface and I believe that psi4 is running really slowly, although since I don't have experience running psi4, I don't have a good baseline. I externally created the structures, so psi4 is really just doing a geometry optimization with set optking fixed_dihedral = ... and single point energy for each file, one at a time. Without going into all the details, I'm running at a pretty low level of theory (in my opinion) of B3LYP/3-21G, and for the structures that converge, I'm seeing ~8 hours per file, after allocating 12 cores and 8 GB of memory to psi4. So my question is whether there is any speed or efficiency difference of calling the psi4 executable directly from bash versus through Python / Psithon.

(As a comparative data point, I did the "same" calculation with Gaussian 09 on 16 cores and it completed the scan overnight. I say "same" because I let Gaussian do the hard work of scanning the dihedral itself, beginning from the initial coordinates instead of using separate files, and I used HF/6-31G.)

@loriab
Copy link
Member

loriab commented Nov 29, 2017

Unless your molecule has a couple hundred atoms, that does sound slow. You're setting PSI_SCRATCH to a local disk, not a network disk? Shouldn't be an efficiency difference between psithon (psi4 input.dat) and psiapi (import psi4), esp. as the former calls the latter. Go ahead and run this to make sure you're getting threading.

@slochower
Copy link
Author

Unless your molecule has a couple hundred atoms, that does sound slow.

The molecule is big, but not that big -- about 50 atoms (mostly C and H).

You're setting PSI_SCRATCH to a local disk, not a network disk?

I started running on a remote machine, and even though I have PSI_SCRATCH set on my local machine, I don't have it set on the remote machine (probably didn't re-source ~/.bashrc after installing psi4. However, it should be writing to local disks. I can see psi...clean files in the local directory, are those scratch files?

Go ahead and run this to make sure you're getting threading.

Based on the script you sent, it does appear that threading is working (see below), however, I have noticed that during my geometry optimization and single point energy that most of the time psi4 is running with a single thread according to top. I ran psi4 using psi4 input -o output -n 12, is that correct?

  Threads set to 1 by Python driver.
Time for threads  1, size   200: Psi4:     0.000708  NumPy:     0.000670
Time for threads  1, size   500: Psi4:     0.009402  NumPy:     0.009941
Time for threads  1, size  2000: Psi4:     1.583517  NumPy:     0.586573
Time for threads  1, size  4000: Psi4:     4.562361  NumPy:     4.587518
  Threads set to 6 by Python driver.
Time for threads  6, size   200: Psi4:     0.000143  NumPy:     0.000212
Time for threads  6, size   500: Psi4:     0.001804  NumPy:     0.002355
Time for threads  6, size  2000: Psi4:     0.105539  NumPy:     0.108854
Time for threads  6, size  4000: Psi4:     0.839776  NumPy:     0.858277
  NumPy@n6 : Psi4@n6 ratio (want ~1): 1.02
   Psi4@n1 : Psi4@n6 ratio (want ~6): 5.43
7fc910341000-7fc91244e000 r-xp 00000000 08:01 13910611                   /data/davids4/anaconda3/lib/libmkl_avx.so
7fc91244e000-7fc91264e000 ---p 0210d000 08:01 13910611                   /data/davids4/anaconda3/lib/libmkl_avx.so
7fc91264e000-7fc912653000 r--p 0210d000 08:01 13910611                   /data/davids4/anaconda3/lib/libmkl_avx.so
7fc912653000-7fc91265b000 rw-p 02112000 08:01 13910611                   /data/davids4/anaconda3/lib/libmkl_avx.so
7fc91265b000-7fc9126a7000 rw-p 021f4000 08:01 13910611                   /data/davids4/anaconda3/lib/libmkl_avx.so
7fc92a661000-7fc92bdf6000 r-xp 00000000 08:01 13910615                   /data/davids4/anaconda3/lib/libmkl_core.so
7fc92bdf6000-7fc92bff6000 ---p 01795000 08:01 13910615                   /data/davids4/anaconda3/lib/libmkl_core.so
7fc92bff6000-7fc92bffe000 r--p 01795000 08:01 13910615                   /data/davids4/anaconda3/lib/libmkl_core.so
7fc92bffe000-7fc92c01f000 rw-p 0179d000 08:01 13910615                   /data/davids4/anaconda3/lib/libmkl_core.so
7fc92c072000-7fc92c0c1000 rw-p 019a9000 08:01 13910615                   /data/davids4/anaconda3/lib/libmkl_core.so
7fc92c0c1000-7fc92d628000 r-xp 00000000 08:01 13910619                   /data/davids4/anaconda3/lib/libmkl_intel_thread.so
7fc92d628000-7fc92d828000 ---p 01567000 08:01 13910619                   /data/davids4/anaconda3/lib/libmkl_intel_thread.so
7fc92d828000-7fc92d82b000 r--p 01567000 08:01 13910619                   /data/davids4/anaconda3/lib/libmkl_intel_thread.so
7fc92d82b000-7fc92d9e7000 rw-p 0156a000 08:01 13910619                   /data/davids4/anaconda3/lib/libmkl_intel_thread.so
7fc92d9ed000-7fc92da42000 rw-p 01990000 08:01 13910619                   /data/davids4/anaconda3/lib/libmkl_intel_thread.so
7fc92da42000-7fc92e339000 r-xp 00000000 08:01 13910618                   /data/davids4/anaconda3/lib/libmkl_intel_lp64.so
7fc92e339000-7fc92e538000 ---p 008f7000 08:01 13910618                   /data/davids4/anaconda3/lib/libmkl_intel_lp64.so
7fc92e538000-7fc92e539000 r--p 008f6000 08:01 13910618                   /data/davids4/anaconda3/lib/libmkl_intel_lp64.so
7fc92e539000-7fc92e54d000 rw-p 008f7000 08:01 13910618                   /data/davids4/anaconda3/lib/libmkl_intel_lp64.so
7fc92e552000-7fc92e591000 rw-p 00a54000 08:01 13910618                   /data/davids4/anaconda3/lib/libmkl_intel_lp64.so

@slochower
Copy link
Author

My input file basically just has the molecule definition and then:

dih_string = "17 4 2 5 0.001"
set optking fixed_dihedral = $dih_string

optimize('B3LYP/3-21G')

...so I don't think it should be doing anything fancy.

@sergsb
Copy link

sergsb commented Mar 1, 2018

I have the same issue:

Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 18:10:19) 
[GCC 7.2.0] on linux

Ubuntu 16.04.2 LTS

python -c 'import psi4; print(psi4.__version__)'
1.1

It works under terminal and ipython but crashes immediately in jupyter notebook with bad_cast error

@dgasmith
Copy link
Member

dgasmith commented Mar 1, 2018

Hmm, @loriab could this be a glibc mismatch?

@loriab
Copy link
Member

loriab commented Mar 1, 2018

Possible, but I really doubt it, as glibc mismatches aren't usually healable. Usually this is a symptom of packages depending on different versions of a library and symbols getting sometimes loaded one way and sometimes another depending on import order. Often fixable by swapping import order, but in the psi-in-jupyter case, there's simply nothing to swap.

I thoroughly expected this to be fixed when I built with the newer compilers and was alarmed when it wasn't. @sergsb, would you want to try the conda env line in #862 (comment) ? Possibly more defaults packages have been updated to the new compilers since November and healed the problem.

Only thing else I can think of is that I'm still linking libc++ statically (which it should be entirely safe to do, being the least-fundamental of the glibc, libgcc_s, libstdc++ trio) and that's running into a symbol error with the jupyter stack.

@CDSherrill
Copy link
Member

CDSherrill commented Mar 1, 2018 via email

@sergsb
Copy link

sergsb commented Mar 2, 2018

@sergsb, would you want to try the conda env line in #862 (comment) ?

Yes, I did that but it doesn't help.

@loriab
Copy link
Member

loriab commented Apr 10, 2018

I've been playing build bisect today on the conda package and narrowed this problem down to -static-libstdc++. Troublesome, since the build will have to become less static, but hardly the worst outcome. So by the time new conda packages are public again, this will be fixed.

@dgasmith
Copy link
Member

I shall transfer 5 of my psicoin when we mint our own cryprtocurrency to you.

@andysim
Copy link
Member

andysim commented Apr 10, 2018

Whoa, fantastic! These kinds of issues are extremely tough to track down, so I also transfer 5 psicoin.
Out of interest, is this limited to libstdc++, or have you observed the same with libc++? Great detective work

@loriab
Copy link
Member

loriab commented Apr 10, 2018

Thanks. I haven't tackled Mac yet (or clang on Linux) on the conda revamp, but it's unlikely to be a problem. If I had built packages the canonical conda way (dynamic link everything), psi4 wouldn't have had this problem in the first place. Slowly all my "tricks" in the original psi4 binary (where python itself was practically the only non-static dependency) have been given up for good technical reasons in favor of system packages from the conda ecosystem. On Mac (clang), I never implemented those tricks in the first place, so it didn't hit this problem.

@loriab
Copy link
Member

loriab commented Apr 10, 2018

For the record,

#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed -static-libstdc++ -static-libgcc -static-intel -wd10237")  # BAD
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed -static-libstdc++ -static-intel -wd10237")  # BAD
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed -static-libgcc -static-intel -wd10237")  # GOOD
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--as-needed -static-intel -wd10237")  # GOOD

@dgasmith
Copy link
Member

This has been identified and will be fixed in the Psi4 1.2 release. This happens in custom build scripts and no changes are required on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants