Changeset 25095


Ignore:
Timestamp:
06/22/20 10:37:43 (5 years ago)
Author:
jdquinn
Message:

CHG: Moved retrieval of Gmsh major version out of core and back to scripting side.

Location:
issm/trunk-jpl
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/jenkins/ross-debian_linux-binaries-solid_earth

    r24948 r25095  
    3232        --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \
    3333        --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \
    34         --with-boost-dir=${ISSM_DIR}/externalpackages/boost/install \
    35         --with-gmsh-dir=${ISSM_DIR}/externalpackages/gmsh/install
     34        --with-boost-dir=${ISSM_DIR}/externalpackages/boost/install
    3635'
    3736
  • issm/trunk-jpl/jenkins/ross-debian_linux-solid_earth

    r25034 r25095  
    2323        --with-petsc-dir=${ISSM_DIR}/externalpackages/petsc/install \
    2424        --with-triangle-dir=${ISSM_DIR}/externalpackages/triangle/install \
    25         --with-boost-dir=${ISSM_DIR}/externalpackages/boost/install \
    26         --with-gmsh-dir=${ISSM_DIR}/externalpackages/gmsh/install \
     25        --with-boost-dir=${ISSM_DIR}/externalpackages/boost/install
    2726'
    2827
  • issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.m

    r24945 r25095  
    1616
    1717        % Get Gmsh version
    18         gmshmajorversion = IssmConfig('_GMSH_VERSION_MAJOR_');
    19 
     18        [s,r]=system(['gmsh -info | grep ''Version'' | sed -e ''s/Version[[:blank:]]*:[[:blank:]]//'' | cut - d ''.'' -f1'])
     19        if s~=0,
     20                error(r);
     21        end
     22        gmshmajorversion=r
    2023        if ~ismember([3,4],gmshmajorversion),
    2124                error(['gmshplanet: Gmsh major version ' gmshmajorversion ' not supported!']);
  • issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.py

    r25065 r25095  
    33import numpy as np
    44
    5 from IssmConfig import IssmConfig
    65from MatlabFuncs import *
    76from mesh3dsurface import *
     
    2726
    2827    # Get Gmsh version
    29     gmshmajorversion = IssmConfig('_GMSH_VERSION_MAJOR_')[0] # Stored as IssmDouble, which gets instantiated as a tuple in Python
    30 
     28    args = "gmsh -info | grep 'Version' | sed -e 's/Version[[:blank:]]*:[[:blank:]]//' | cut - d '.' -f1"
     29    proc = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     30    outs, errs = proc.communicate()
     31    if errs != '':
     32        raise Exception("gmshplanet: call to gmsh failed: {}".format(errs))
     33    gmshmajorversion = outs
    3134    if gmshmajorversion not in [3, 4]:
    3235        raise RuntimeError('gmshplanet: Gmsh major version %s not supported!' % gmshmajorversion)
  • issm/trunk-jpl/src/wrappers/IssmConfig/IssmConfig.cpp

    r24942 r25095  
    107107                #endif
    108108        }
    109         else if(strcmp(name,"_GMSH_VERSION_MAJOR_")==0){
    110                 #ifdef _GMSH_VERSION_MAJOR_
    111                 value = IssmDouble(_GMSH_VERSION_MAJOR_);
    112                 #else
    113                 _error_("_GMSH_VERSION_MAJOR_ not found in config.h");
    114                 #endif
    115         }
    116109        else if(strcmp(name,"ISSM_PREFIX")==0){
    117110                isstring = true;
Note: See TracChangeset for help on using the changeset viewer.