bearecinos / smith_glacier

Experiments with Fenics_ice over Smith, Pope, and Kohler Glaciers; three narrow ∼ 10 km wide, interconnected West Antarctic ice streams (Note: this repository documentation is still a work in progress).
1 stars 0 forks source link

gmsh latest version wont work in bow... #12

Closed bearecinos closed 1 year ago

bearecinos commented 2 years ago

@dngoldberg FYI

I will come back to this later, but the gmsh version in bow at the moment needs to be fix to gmsh==4.8.4. I got a OS error probably we need to upgrade something in the OS ... We might need IT help on this at some point.

bearecinos commented 2 years ago
>>> import gmsh
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/exports/csce/datastore/geos/users/brecinos/miniconda3/envs/ficetools_new/lib/python3.8/site-packages/gmsh.py", line 53, in <module>
    lib = CDLL(libpath)
  File "/exports/csce/datastore/geos/users/brecinos/miniconda3/envs/ficetools_new/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib64/libm.so.6: version `GLIBC_2.23' not found (required by /exports/csce/datastore/geos/users/brecinos/miniconda3/envs/ficetools_new/lib/libgmsh.so.4.9)
>>> exit()
bearecinos commented 2 years ago

I think this ldd GNU library might be the problem and needs updating, but I assume we dont have root access for this...

ldd --version ldd (GNU libc) 2.17 Copyright (C) 2012 Free Software Foundation, Inc.

bearecinos commented 1 year ago

@dngoldberg this was a pain to debug but it was an important one; as I've manage to solve this issue in bow, and we dont need to change the linux system

To install gmsh successfully in bow we have to build the program from scratch

  1. Clone the repo:

    git clone http://gitlab.onelab.info/gmsh/gmsh.git
    cd gmsh
  2. Tell the cmake where do we have the installation

    cmake -DCMAKE_PREFIX_PATH=/PATH_TO_REPO/gmsh -DENABLE_BUILD_DYNAMIC=1
  3. Make the executable:

    make

Now the annoying thing is that we have to link this to our environment manually

import sys
sys.path.append("/PATH_TO_REPO/gmsh/api/") 
import gmsh

This is only needed in bow! and to solve this issue

dngoldberg commented 1 year ago

hey @bearecinos! amazing you were able to do this! i actually did see some mention of building gmsh from scratch when i was searching.. and decided it was too risky (i didn't trust myself). since we can use meshtools on shin, i decided it was OK.. but this is super cool!

bearecinos commented 1 year ago

I have to be honest it is not for the faint hearted ! I was panicking during the whole install 😆 but the imports work I just need to test the mesh code but at least we can use ficetools in a new environment in bow!