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

No module named sharc.pysharc.interface #5

Closed
abbottjlu opened this issue Nov 1, 2019 · 5 comments
Closed

No module named sharc.pysharc.interface #5

abbottjlu opened this issue Nov 1, 2019 · 5 comments

Comments

@abbottjlu
Copy link

The source code was cloned from v2.1 branch.

OS, Ubuntu 18.04

Compiled with pysharc enabled,

  1. set USE_PYSHARC to false,
  2. run make install in source/, 3. run make clean in source/,
  3. set USE_PYSHARC to true,
  4. run make install in pysharc/.

Try to run $SHARC/test.py
The test case, 17, 18

_================================================================================
|| Running test jobs... ||

/userdata/wang/app/sharc.v2.1-pysharc/bin/../tests/INPUT/LVC_pysharc
2019-11-01 16:29:37.284411 2019-11-01 16:29:37.382382 Runtime: 0:00:00.097971 Error Code: 1

/userdata/wang/app/sharc.v2.1-pysharc/bin/../tests/INPUT/LVC_pysharc_netcdf
2019-11-01 16:29:37.383196 2019-11-01 16:29:37.464266 Runtime: 0:00:00.081070 Error Code: 1

================================================================================
|| Test job analysis ||

-------------------------LVC_pysharc------------------------
Job did not finish successfully. Error code: 1

---------------------LVC_pysharc_netcdf---------------------
Job did not finish successfully. Error code: 1

================================================================================
|| Summary ||

LVC_pysharc Job did not finish
LVC_pysharc_netcdf Job did not finish_

The error log file under RUNNING_TESTS/LVC_pysharc_netcdf reports,
[wang@lab-itc LVC_pysharc_netcdf]$ ls
geom input QM run.err run.out run.sh veloc
[wang@lab-itc LVC_pysharc_netcdf]$ cat run.err
Traceback (most recent call last):
File "/userdata/wang/app/sharc.v2.1-pysharc/source/../bin/pysharc_lvc.py", line 46, in
from sharc.pysharc.interface import SHARC_INTERFACE
ImportError: No module named sharc.pysharc.interface
cp: cannot stat '/tmp/wang/TRAJ/output.*': No such file or directory
run.sh: 17: [: 1: unexpected operator
[wang@lab-itc LVC_pysharc_netcdf]$

@MFSJMenger
Copy link

You sure you set your PYTHONPATH correctly?

try after setting:

export PYTHONPATH=/userdata/wang/app/sharc.v2.1-pysharc/pysharc:$PYTHONPATH

@abbottjlu
Copy link
Author

You sure you set your PYTHONPATH correctly?

try after setting:

export PYTHONPATH=/userdata/wang/app/sharc.v2.1-pysharc/pysharc:$PYTHONPATH

Dear MFSJmenger,
Thanks for your reply.

I tried to update the PYTHONPATH.
Now on my OS, I have got the following configuration,
[wang@lab-itc wang]$ echo $SHARC
/userdata/wang/app/sharc.v2.1-pysharc/source/../bin
[wang@lab-itc wang]$ echo $PYTHONPATH
/home/wang/app/sharc.v2.1-pysharc/pysharc:/userdata/wang/app/sharc.v2.1-pysharc/source/../lib:
[wang@lab-itc wang]$ which conda
/home/wang/anaconda2/bin/conda
[wang@lab-itc wang]$ which python
/home/wang/anaconda2/bin/python

I tried to run the test case number 17, but failed.
$SHARC/test.py reports,
-------------------------LVC_pysharc------------------------
Job did not finish successfully. Error code: 1

I found the following message from the run.err file,

Traceback (most recent call last):
  File "/userdata/wang/app/sharc.v2.1-pysharc/source/../bin/pysharc_lvc.py", line 46, in <module>
    from sharc.pysharc.interface import SHARC_INTERFACE
  File "/home/wang/app/sharc.v2.1-pysharc/pysharc/sharc/__init__.py", line 26, in <module>
    import sharc as sharc
ImportError: /userdata/wang/app/sharc.v2.1-pysharc/source/../lib/libsharc.so: undefined symbol: nc_get_vara_double
cp: cannot stat '/tmp/wang/TRAJ/output.*': No such file or directory
run.sh: 17: [: 1: unexpected operator

@MFSJMenger
Copy link

MFSJMenger commented Nov 1, 2019

The error simply states, that it cannot find the NetCDF library against which libsharc.so was compiled.
On linux you could check that with

ldd /userdata/wang/app/sharc.v2.1-pysharc/source/../lib/libsharc.so

which would probably tell you that netcdf/hdf5 libraries are not found.
Are you sure your LD_LIBRARY_PATH (or its analogue on the Mac) is set correctly?
(On Mac I am not sure if the variables/commands are the same)

Best,
Max

@abbottjlu
Copy link
Author

Thanks for your quick reply.
Actually I am on Linux.
My current LD_LIBRARY_PATH is,
[wang@lab-itc lib]$ echo $LD_LIBRARY_PATH
/home/wang/anaconda2/lib:/userdata/wang/app/sharc.v2.1-pysharc/source/../lib:/usr/local/cuda-10.1/lib64::/opt/chem/orca/orca411

I am sure, there is something like NetCDF and hdf5 under /home/wang/anaconda2/lib.

ldd reports the following message,
[wang@lab-itc lib]$ ldd /userdata/wang/app/sharc.v2.1-pysharc/source/../lib/libsharc.so
linux-vdso.so.1 (0x00007ffd25d9c000)
libgfortran.so.4 => /home/wang/anaconda2/lib/libgfortran.so.4 (0x00007f6d37e09000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6d376d5000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6d374bd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6d370cc000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f6d36e8c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6d37d12000)
[wang@lab-itc lib]$

Seems it is not linked against NetCDF?

But I am sure I compiled the source code by following these steps,

Step 1. set USE_PYSHARC to false,
Step2. run make install in source/,
Step 3. run make clean in source/,
Step 4. set USE_PYSHARC to true,
Step 5. run make install in pysharc/.

@abbottjlu
Copy link
Author

Update.

Everything works fine on CentOS7.
blas, fftw3, lapack are provided by anaconda2.

All the other libs ( hdf5, hdf5_hl, netcdf, mfhdf, df, jpeg ) are also installed via conda install.

But, pyshac does not work on ubuntu 18.04, not sure why.

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

3 participants