Molcas Forum

Support and discussions for Molcas and OpenMolcas users and developers

You are not logged in.

Announcement

Welcome to the Molcas forum.

Please note: The forum's URL has changed. The new URL is: https://molcasforum.univie.ac.at. Please update your bookmarks!

You can choose an avatar and change the default style by going to "Profile" → "Personality" or "Display".

#1 2020-04-12 11:54:07

Raymond
Member
Registered: 2020-04-11
Posts: 2

Issue at Compiling OpenMolcas

Hi guys,

I'm trying to compile OpenMolcas on Linux Mint.
I have experienced few problems which I managed to somehow solve.
However, one final issue has got me stuck. I was hoping you guys can help me out.

I compiled OpenMolcas by making the build folder using the ccmake and the make install.
My first issue was that libga was not found by the ccmake. I fixed the problem by manually putting the path into the cmake list file (CMakeLists.txt).

  find_library (LIBGA ga libga.a libga.al
    PATHS ENV GAROOT GA_INCLUDE_PATH "/usr/bin/ga/lib"
    PATH_SUFFIXES lib
    NO_DEFAULT_PATH
  )

My second isssue was solved by manually adding -lpthread into the cmake list file.

  target_link_libraries (${prog}.exe ${MPI_C_LIBRARIES} -lpthread)

The third one arised when I tried to run molcas. Pymolcas could not be initiated outside the molcas source or the compiled directory.
I did set the MOLCAS environment to current path but still pymolcas refused to look up the path.

MOLCAS=/opt/molcas/

echo $MOLCAS

/opt/molcas/

I fixed the issue by adding the correct path to the pymolcas wrapper source file as the default value (molcas_wrapper.py).

    self.molcas = abspath(get_utf8('MOLCAS', default='/opt/molcas'))

running pymolcas at an arbitrary directory:

    MOLCAS has been found at /opt/molcas

this fixed the issue of running pymolcas outside the aforementioned directories.
However this problem seem to persist as running simple calculations crash by this error.

simple input "water.inp"

&GATEWAY
  coord=water.xyz
  basis=sto-3g
&SEWARD
&SCF
pymolcas water.inp -f

Traceback (most recent call last):
  File "/usr/local/sbin/pymolcas", line 595, in <module>
    sys.exit(main(os.path.realpath(f)))
  File "<string>", line 134, in main
  File "/usr/lib/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None
KeyError: 'MOLCAS'

Please let me know if any of the solutions I found for my issues are causing this problem.
I suspect the path "MOLCAS" should somehow be defined but I can not figure out why it is not.

Thanks for your assistance

Offline

#2 2020-04-12 20:58:32

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,012

Re: Issue at Compiling OpenMolcas

Raymond wrote:

My first issue was that libga was not found by the ccmake.

It should be if you define the GAROOT variable within [c]cmake. If not, maybe the structure/version of your GA installation is different from what has been used so far.

My second isssue was solved by manually adding -lpthread into the cmake list file.

I think I usually see -lpthread added automatically by cmake. Maybe your compiler/environment is not well supported?

I did set the MOLCAS environment to current path but still pymolcas refused to look up the path.

You probably have to export the variable. Alternatively, create a directory called ".Molcas" (notice the dot and uppercase) in your home directory, and inside it a file called "molcas" with /opt/molcas as only content.

pymolcas water.inp -f

Traceback (most recent call last):
  File "/usr/local/sbin/pymolcas", line 595, in <module>
    sys.exit(main(os.path.realpath(f)))
  File "<string>", line 134, in main
  File "/usr/lib/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None
KeyError: 'MOLCAS'

I don't see how this could result from an undefined MOLCAS. It looks like the whole os.environ is undefined?

Offline

#3 2020-04-13 11:03:01

Raymond
Member
Registered: 2020-04-11
Posts: 2

Re: Issue at Compiling OpenMolcas

ignacio wrote:

It should be if you define the GAROOT variable within [c]cmake. If not, maybe the structure/version of your GA installation is different from what has been used so far.

I used the source code from the ga directly and compiled it.
If I remember correctly it compiles everything directly to "./bin/lib/"
I used PREFIX to install into "./bin/ga/" and set the path by ccmake.
However by some reason though the path is found the library is not found!
I think the "PATH_SUFFIXES lib" was being ignored.

Ignscio wrote:

I think I usually see -lpthread added automatically by cmake. Maybe your compiler/environment is not well supported?

I am not sure how could this happened?

-- C compiler: /usr/bin/cc
-- C compiler flags:  -std=gnu99 -O2
-- Fortran compiler: /usr/bin/f95
-- Fortran compiler flags:   -fno-aggressive-loop-optimizations -cpp -fdefault-integer-8 -O2

Ignacio wrote:

You probably have to export the variable. Alternatively, create a directory called ".Molcas" (notice the dot and uppercase) in your home directory, and inside it a file called "molcas" with /opt/molcas as only content.

Exporting the variable worked for me! Thanks for your input.

Ignacio wrote:

I don't see how this could result from an undefined MOLCAS. It looks like the whole os.environ is undefined?

This issue resolved itself after exporting the MOLCAS variable

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 14:28:43