Coder Social home page Coder Social logo

seissol / easi Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 6.0 437 KB

A library for the Easy Initialization of model parameters.

Home Page: https://easyinit.readthedocs.io/en/latest/

License: BSD 3-Clause "New" or "Revised" License

C++ 87.32% CMake 4.77% C 4.53% Fortran 2.39% Python 0.98%

easi's Introduction

License GitHub Repo stars GitHub forks GitHub issues GitHub pull requests

SeisSol is a scientific software for the numerical simulation of seismic wave phenomena and earthquake dynamics. It is based on the discontinuous Galerkin method combined with ADER time discretization. Visit our official website and also read our documentation in order to learn more about SeisSol. Our discussion forum can help you to communicate with SeisSol developers or other users, share your ideas, ask questions, etc.

Note

SeisSol is still under heavy development and comes without any guaranteed functionality. At the moment we can only provide very limited support for general users.

Collaboration

If you are interested in a close collaboration, please, contact Alice Gabriel.

Code of Conduct

We follow a Code of Conduct. Please follow the rules when participating in our community.

Contributing

We will be happy if you plan to contribute new features, extensions or bug fixes to SeisSol. To start off, please, open a new issue and discuss your feature with us before diving into coding. Visit our doxygen documentation to learn more about the source code structure.

To learn more about contributing to SeisSol, please read our Contribution page.

Licensing

The source code of SeisSol is licensed under the BSD-3-Clause license. Some files in the cmake and external folders may have different licenses (BSL-1.0, MIT).

See the LICENSE file for more details.

easi's People

Contributors

daisy20170101 avatar davschneller avatar krenzland avatar nicoschlw avatar sebwolf-de avatar thomas-ulrich avatar uphoffc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easi's Issues

stack overflow with LuaMap

(base) ulrich@ulrich-ThinkPad-T490s:~/trash/yamlbug$ ~/SeisSol/easi/build/easicube '{from: [0,0,150], to: [1,1,250], N: [1,1,1000000], group: 1}' Sulawesi_initial_stress2.yaml output
Error running function f stack overflow

with Sulawesi_initial_stress2.yaml:

!EvalModel
parameters: [Omega, effectiveConfiningStress, b_xx, b_yy, b_zz, b_xy, b_yz, b_xz, elevationSzz]
model: !Switch
  [Omega]: !FunctionMap
    #Tappering of the deviatoric stress with depth
    map: 
      Omega: |
       zStressDecreaseStart = -11000.;
       zStressDecreaseStop = -15000.;
       zStressDecreaseWidth = zStressDecreaseStart - zStressDecreaseStop;

       if  (z>=zStressDecreaseStart) {
          return 1.0;
       } else {
          if (z>=zStressDecreaseStop) {
             a = 1.0-(z-zStressDecreaseStop)/zStressDecreaseWidth;
             Sx = (3.0*a*a-2.0*a*a*a);
             return 1.0-Sx;
          } else {
            return 0.001;
          }
       }
  [b_xx, b_yy, b_zz, b_xy, b_yz, b_xz]: !EvalModel
    parameters: [effectiveConfiningStress]
    model: !Switch
      [effectiveConfiningStress]: !Include eCS0.yaml
    components: !OptimalStress
      constants:
        mu_d:      0.1
        mu_s:      0.6
        strike:  -15.0
        dip:      90.0
        rake:      0.0
        cohesion:  0.0
        s2ratio:   0.7
        #R:         0.7
        R:         0.95
  [effectiveConfiningStress]: !Include eCS0.yaml
  [elevationSzz]: !Include elevationSzz.yaml
components: !LuaMap
  returns: [s_xx, s_yy, s_zz, s_xy, s_yz, s_xz]
  # nu/(1-nu)=0.5  with nu=1/3 Petroleum related rock mechanics p106
  function: |
     function f (x)
      return {
        s_xx = x["Omega"]*x["b_xx"] + (1.0-x["Omega"])*x["effectiveConfiningStress"] + 0.5*x["elevationSzz"];
        s_yy = x["Omega"]*x["b_yy"] + (1.0-x["Omega"])*x["effectiveConfiningStress"] + 0.5*x["elevationSzz"];
        s_zz = x["Omega"]*x["b_zz"] + (1.0-x["Omega"])*x["effectiveConfiningStress"] + x["elevationSzz"];
        s_xy = x["Omega"]*x["b_xy"];
        s_yz = x["Omega"]*x["b_yz"];
        s_xz = x["Omega"]*x["b_xz"];
      }
      end

and

(base) ulrich@ulrich-ThinkPad-T490s:~/trash/yamlbug$ cat eCS0.yaml 
!EvalModel
parameters: [z]
model: !Switch
  [z]: !AffineMap
    matrix:
      z: [0.0, 0.0, 1.0]
    translation:
      z: 0.0
components: 
!FunctionMap
    map:
      #avoid positive stress above z=0
      effectiveConfiningStress: |
        return 2670.0 * 0.21 * ( 7. / 9.5 ) * 9.8 * min(-100.0, z);
(base) ulrich@ulrich-ThinkPad-T490s:~/trash/yamlbug$ cat elevationSzz.yaml 
!EvalModel
parameters: [elevation]
model: !Switch
  [elevation]: !ConstantMap
    map:
        elevation: 10.
components: !FunctionMap
    map:
      elevationSzz: |
        return - 2670.0 * 0.21 * ( 7. / 9.5 ) * 9.8 * max(elevation, 0);

not: fixed by Luka's branch fix/stack-overflow

Unknown tag !LuaMap

Hi! When I run SeisSol, I encountered a program error
fault.yaml: yaml-cpp: error at line 1, column 1: Unknown tag! LuaMap
I found something about LuaMap in the Example folder, but it seems to be Functionmap in the easi document. Is Luamap replaced by functionmap?

EvalModel with more than 8 parameters

If I used this file:

!EvalModel
parameters: [test, lithostaticStress, b_xx, b_yy, b_xy, b_yz, b_xz, gamma]
model: !Switch
  [test]: !AffineMap
      matrix:
        z: [0.0, 0.0, 1.0]
      translation:
        z: 0
      components:
        - !FunctionMap
          map:
           test: return z;
  [lithostaticStress, b_xx, b_yy, b_zz, b_xy, b_yz, b_xz,gamma,Omega]: !ConstantMap
          map:
              lithostaticStress: 0.974
              b_xx: 0.974
              b_yy: 0.974
              b_zz: 0.974
              b_xy: 0.974
              b_yz: 0.974
              b_xz: 0.974
              gamma: 0.974
components: !FunctionMap
      map:
        s_zz:     return lithostaticStress;
        s_xx:     return lithostaticStress;
        s_yy:     return lithostaticStress;
        s_xy:     return lithostaticStress;
        s_yz:     return lithostaticStress;
        s_xz:     return lithostaticStress;
        bulkFriction: |
          return test;
        plastCo: |
          return test;

And plot bulkFriction against z, I get, as expected:

z bulkFriction
-100  -100
-200  -200
-300  -300
-400  -400

Now same file, with one more parameter:

!EvalModel
parameters: [test, lithostaticStress, b_xx, b_yy, b_xy, b_yz, b_xz, gamma, Omega]
model: !Switch
  [test]: !AffineMap
      matrix:
        z: [0.0, 0.0, 1.0]
      translation:
        z: 0
      components:
        - !FunctionMap
          map:
           test: return z;
  [lithostaticStress, b_xx, b_yy, b_zz, b_xy, b_yz, b_xz,gamma,Omega]: !ConstantMap
          map:
              lithostaticStress: 0.974
              b_xx: 0.974
              b_yy: 0.974
              b_zz: 0.974
              b_xy: 0.974
              b_yz: 0.974
              b_xz: 0.974
              gamma: 0.974
              Omega: 0.974
components: !FunctionMap
      map:
        s_zz:     return lithostaticStress;
        s_xx:     return lithostaticStress;
        s_yy:     return lithostaticStress;
        s_xy:     return lithostaticStress;
        s_yz:     return lithostaticStress;
        s_xz:     return lithostaticStress;
        bulkFriction: |
          return test;
        plastCo: |
          return test;

and I get:

-100 2.16654e-317
-200 2.16654e-317
-300 2.16654e-317
-400 2.16654e-317

Segmentation fault with !LuaMap in easicube

When running easicube:

easicube '{from: [0,0,0], to: [1,1,1], N: [2,2,2], group: 1}' test2.yaml

This does not work:

!Switch
[s_xx]: !LuaMap
  returns: [s_xx]
  function: |
     function f (x)
      io.write(x[1], " ", x[2], " ", x[3], "\n") -- optional debug output
      return {
        s_xx = 1600. + 59.5 * (x[2] ^ (1./3.))
      }
      end
[s_yy, s_zz, s_xy]: !LuaMap
  returns: [s_yy, s_zz, s_xy]
  function: |
     function f (x)
      return {
        s_yy = 0,
        s_zz = (260. + 30*math.sqrt(x[2]))^2. * (1600. + 59.5 * x[2] ^(1./3.) ),
        s_xy = 0
      }
      end

This does work:

!Switch
[s_xx]: !LuaMap
  returns: [s_xx]
  function: |
     function f (x)
      io.write(x[1], " ", x[2], " ", x[3], "\n") -- optional debug output
      return {
        s_xx = 1600. + 59.5 * (x[2] ^ (1./3.))
      }
      end
[s_yy, s_zz]: !LuaMap
  returns: [s_yy, s_zz]
  function: |
     function f (x)
      return {
        s_yy = 0,
        s_zz = (260. + 30*math.sqrt(x[2]))^2. * (1600. + 59.5 * x[2] ^(1./3.) ),
      }
      end

ASAGI block in a !EvalModel

Hi,
This is more a question than an issue.
If I have a netcdf containing an array of structure (list) [rho, mu, lambda], how can I use the mu parameter of ASAGI as an input to a !FunctionMap.
I tried:

[plastCo]: !EvalModel
        parameters: [rho, mu, lambda]
        model: !ASAGI
           file: mynetcdf.nc
           parameters: [rho, mu, lambda]
           var: data
        components: !FunctionMap
          map:
             plastCo: return mu*0.0001;

But got:

cvmh1000m_material_Plastic_gamma085.yaml: yaml-cpp: error at line 31, column 16: : ASAGI supplies 1D output (got lambda,mu,rho).

No valid version for 'easi' satisfies '@1.2'

I am trying using spack to compiling the seissol with the command
spack install seissol-env ~mpi
and I get the error information like this:
No valid version for 'easi' satisfies '@1.2'

Then I try to edit the command line in seissol-spack-aid/spack/packages/seissol-env/package.py:
depends_on('[email protected] +asagi', when="+asagi")
to whether depends_on('[email protected] +asagi', when="+asagi") or depends_on('easi +asagi', when="+asagi"),it still do not work.

Could not find model for point with AffineMap + ASAGI

Hi,

I m asking for some model parameters (s_ij) at 0,0,0 and got the following error:

terminate called after throwing an instance of 'std::runtime_error'
  what():  fault2.yaml@2: Could not find model for point [ 348441 4.76021e+06 0 ] in group 1.

here is the yaml file:

!Switch
[s_zz,s_yy,s_yz,s_xx,s_xz,s_xy,d_c,mu_s]: !AffineMap
  matrix:
    #strike 155
    #dip 47
    xf: [0.4054811 , -0.91410343,  0.   ]
    yf: [-0.62424723, -0.2769057 ,  0.73050574]
    zf: [-0.6677578 , -0.29620627, -0.68290656]
  translation:
    xf: 348441.377459
    yf: 4760209.93637
    zf: 0.0
  components: !ASAGI
          file: norciax_210fault_nncia.nc
          parameters: [s_zz,s_yy,s_yz,s_xx,s_xz,s_xy,d_c,mu_s]
          var: data
          interpolation: nearest
[mu_d, cohesion, forced_rupture_time]: !ConstantMap
  map:
     mu_d:        0.2
     cohesion:    0.0
     forced_rupture_time: 1e10

If I use instead:

!Switch
[s_zz,s_yy,s_yz,s_xx,s_xz,s_xy,d_c,mu_s]: !ASAGI
          file: norciax_210fault_nncia.nc
          parameters: [s_zz,s_yy,s_yz,s_xx,s_xz,s_xy,d_c,mu_s]
          var: data
          interpolation: nearest
[mu_d, cohesion, forced_rupture_time]: !ConstantMap
  map:
     mu_d:        0.2
     cohesion:    0.0
     forced_rupture_time: 1e10

I don't get an error and I m able to recover the stress values.

../EvaluateVpVs/EvaluateSij fault4.yaml 0 0 0
-9.70886e+06 -1.79305e+07 -5.23607e+07 -1.62028e+07 3.24235e+07 2.37379e+07

If the coordinates are out of range of the netcdf file, I get as expected:

../EvaluateVpVs/EvaluateSij fault4.yaml 0 0 1e6
Thu Jan 09 14:32:22, Warn:  ASAGI: Coordinate in dimension 2  is out of range. Fixing. 
-3.1084e+07 -5.82616e+07 -1.69259e+08 -5.24857e+07 1.05171e+08 7.64816e+07

Therefore I think there is a bug in easi.

Thomas.

initializing plastCo from mu leads to SeisSol crashing

Initializing the plastic cohesion with:

!Switch
[rho, mu, lambda]:  !Include Aqaba_rhomulambda.yaml
[bulkFriction]: !ConstantMap
  map:
    bulkFriction: 0.6
[plastCo]: !IdentityMap
  components:
    - !SphericalDomainFilter
      radius: 1800
      centre:
        x: -1540
        y: -22115
        z: -7200
      components: !ConstantMap
        map:
          plastCo: 1.0e20
    - !EvalModel
        parameters: [mu]
        model: !Switch
            [mu]: !Include Aqaba_rhomulambda.yaml
        components: !FunctionMap
           map:
              plastCo: return 0.0001*mu;
[s_xx, s_yy, s_zz, s_xy, s_yz, s_xz]: !Include Aqaba_initial_stress.yaml

Where Aqaba_rhomulambda.yaml is:

!LayeredModel
  map: !AffineMap
    matrix:
      z1: [0.0, 0.0, 1.0]
    translation:
      z1: 0
  interpolation: lower
  parameters: [rho, mu, lambda]
  nodes:
    10000.000000: [2348.000000, 1.865899e+10, 2.138201e+10]
    -2500.000000: [2348.000000, 1.865899e+10, 2.138201e+10]
    -5000.000000: [2441.000000, 2.174986e+10, 2.311560e+10]
    -7500.000000: [2441.000000, 2.174986e+10, 2.311560e+10]
    -10000.000000: [2546.000000, 2.560064e+10, 2.722188e+10]
    -12500.000000: [2705.000000, 3.228965e+10, 3.433229e+10]
    -15000.000000: [2784.000000, 3.602053e+10, 3.828058e+10]
    -17500.000000: [2784.000000, 3.602053e+10, 3.828058e+10]
    -20000.000000: [2833.000000, 3.844907e+10, 4.085213e+10]
    -22500.000000: [2888.000000, 4.133043e+10, 4.394226e+10]
    -25000.000000: [2939.000000, 4.410815e+10, 4.688483e+10]
    -27500.000000: [3029.000000, 4.929139e+10, 5.235072e+10]
    -30000.000000: [3107.000000, 5.413101e+10, 5.753690e+10]
    -32500.000000: [3119.000000, 5.488824e+10, 5.839891e+10]
    -35000.000000: [3119.000000, 5.488824e+10, 5.839891e+10]
    -37500.000000: [3119.000000, 5.488824e+10, 5.839891e+10]
    -400000.000000: [3144.000000, 5.652157e+10, 6.000752e+10]

Does not work in SeisSol. I attach the error file:
937504.Aqaba.txt
Actually, the file can be parsed with the easi library without a problem (tested with a small CPP program), so it is probably a SeisSol problem.

On the other hand, when I compute explicitly PlasticCo beforehand, then SeisSol does not crash...

!Switch
[rho, mu, lambda]:  !Include Aqaba_rhomulambda.yaml
[bulkFriction]: !ConstantMap
  map:
    bulkFriction: 0.6
[plastCo]: !IdentityMap
  components:
    - !SphericalDomainFilter
      radius: 1800
      centre:
        x: -1540
        y: -22115
        z: -7200
      components: !ConstantMap
        map:
          plastCo: 1.0e20
    - !LayeredModel
          map: !AffineMap
            matrix:
              z1: [0.0, 0.0, 1.0]
            translation:
              z1: 0
          interpolation: lower
          parameters: [plastCo]
          nodes:
            10000.000000: [1.865899e+06]
            -2500.000000: [1.865899e+06]
            -5000.000000: [2.174986e+06]
            -7500.000000: [2.174986e+06]
            -10000.000000: [2.560064e+06]
            -12500.000000: [3.228965e+06]
            -15000.000000: [3.602053e+06]
            -17500.000000: [3.602053e+06]
            -20000.000000: [3.844907e+06]
            -22500.000000: [4.133043e+06]
            -25000.000000: [4.410815e+06]
            -27500.000000: [4.929139e+06]
            -30000.000000: [5.413101e+06]
            -32500.000000: [5.488824e+06]
            -35000.000000: [5.488824e+06]
            -37500.000000: [5.488824e+06]
            -400000.000000: [5.652157e+06]
[s_xx, s_yy, s_zz, s_xy, s_yz, s_xz]: !Include Aqaba_initial_stress.yaml

This is also a problem we experienced with the Ridgecrest setup.

The full setup is available at: /hppfs/work/pr45fi/di73yeq4/Aqaba_bug.

Installing SeisSol dependency easi error:undefined reference to H5free_memory

"Error occurred when I executed the following command in the Compilation module."

cmake -DCMAKE_PREFIX_PATH=$HOME -DCMAKE_INSTALL_PREFIX=$HOME -DASAGI=ON -DIMPALAJIT=ON -DLUA=ON $EASI_SRC
make -j4 install
wc@VM-4-3-ubuntu:~/easi$ cmake -DCMAKE_PREFIX_PATH=$HOME -DCMAKE_INSTALL_PREFIX=$HOME -DASAGI=ON -DIMPALAJIT=ON -DLUA=ON $EASI_SRC
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/mpicc
-- Check for working C compiler: /usr/bin/mpicc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/mpiCC
-- Check for working CXX compiler: /usr/bin/mpiCC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found Lua: /home/wc/lib/liblua.a;/usr/lib/x86_64-linux-gnu/libm.so;dl (found version "5.3.6") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /home/wc/lib/libhdf5.a;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.8") found components: C HL 
-- Checking for module 'netcdf'
--   Found netcdf, version 4.6.1
-- Checking for module 'asagi'
--   Found asagi, version 1.0
-- Found MPI_C: /usr/bin/mpicc (found version "3.1") 
-- Found MPI_CXX: /usr/bin/mpiCC (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/wc/easi
wc@VM-4-3-ubuntu:~/easi$ make -j4 install
Scanning dependencies of target easi
[  4%] Building CXX object CMakeFiles/easi.dir/src/component/AndersonianStress.cpp.o
[  8%] Building CXX object CMakeFiles/easi.dir/src/component/AffineMap.cpp.o
[ 12%] Building CXX object CMakeFiles/easi.dir/src/component/Composite.cpp.o
[ 16%] Building CXX object CMakeFiles/easi.dir/src/component/ConstantMap.cpp.o
[ 20%] Building CXX object CMakeFiles/easi.dir/src/component/DomainFilter.cpp.o
[ 24%] Building CXX object CMakeFiles/easi.dir/src/component/EvalModel.cpp.o
[ 28%] Building CXX object CMakeFiles/easi.dir/src/component/FunctionMap.cpp.o
[ 32%] Building CXX object CMakeFiles/easi.dir/src/component/LuaMap.cpp.o
[ 36%] Building CXX object CMakeFiles/easi.dir/src/component/LayeredModelBuilder.cpp.o
[ 40%] Building CXX object CMakeFiles/easi.dir/src/component/OptimalStress.cpp.o
[ 44%] Building CXX object CMakeFiles/easi.dir/src/component/PolynomialMap.cpp.o
[ 48%] Building CXX object CMakeFiles/easi.dir/src/component/SCECFile.cpp.o
[ 52%] Building CXX object CMakeFiles/easi.dir/src/component/Special.cpp.o
[ 56%] Building CXX object CMakeFiles/easi.dir/src/component/Switch.cpp.o
[ 60%] Building CXX object CMakeFiles/easi.dir/src/parser/YAMLComponentParsers.cpp.o
[ 64%] Building CXX object CMakeFiles/easi.dir/src/parser/YAMLHelpers.cpp.o
[ 68%] Building CXX object CMakeFiles/easi.dir/src/util/FunctionWrapper.cpp.o
[ 72%] Building CXX object CMakeFiles/easi.dir/src/util/RegularGrid.cpp.o
[ 76%] Building CXX object CMakeFiles/easi.dir/src/Query.cpp.o
[ 80%] Building CXX object CMakeFiles/easi.dir/src/YAMLParser.cpp.o
[ 84%] Building CXX object CMakeFiles/easi.dir/src/component/ASAGI.cpp.o
[ 88%] Building CXX object CMakeFiles/easi.dir/src/util/AsagiReader.cpp.o
[ 92%] Linking CXX static library libeasi.a
[ 92%] Built target easi
Scanning dependencies of target easicube
[ 96%] Building CXX object CMakeFiles/easicube.dir/tools/easicube.cpp.o
[100%] Linking CXX executable easicube
/usr/bin/ld: /home/wc/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): in function `hdf5free':
nc4file.c:(.text+0x1f): undefined reference to `H5free_memory'
/usr/bin/ld: /home/wc/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): in function `get_netcdf_type':
nc4file.c:(.text+0x7a): undefined reference to `H5Tget_class'
/usr/bin/ld: nc4file.c:(.text+0x9f): undefined reference to `H5Tis_variable_str'
/usr/bin/ld: nc4file.c:(.text+0xed): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0xf4): undefined reference to `H5T_NATIVE_SCHAR_g'
/usr/bin/ld: nc4file.c:(.text+0x106): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x138): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x13f): undefined reference to `H5T_NATIVE_SHORT_g'
/usr/bin/ld: nc4file.c:(.text+0x151): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x183): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x18a): undefined reference to `H5T_NATIVE_INT_g'
/usr/bin/ld: nc4file.c:(.text+0x19c): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x1ce): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x1d5): undefined reference to `H5T_NATIVE_FLOAT_g'
/usr/bin/ld: nc4file.c:(.text+0x1e7): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x219): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x220): undefined reference to `H5T_NATIVE_DOUBLE_g'
/usr/bin/ld: nc4file.c:(.text+0x232): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x264): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x26b): undefined reference to `H5T_NATIVE_UCHAR_g'
/usr/bin/ld: nc4file.c:(.text+0x27d): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x2af): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x2b6): undefined reference to `H5T_NATIVE_USHORT_g'
/usr/bin/ld: nc4file.c:(.text+0x2c8): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x2fa): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x301): undefined reference to `H5T_NATIVE_UINT_g'
/usr/bin/ld: nc4file.c:(.text+0x313): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x345): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x34c): undefined reference to `H5T_NATIVE_LLONG_g'
/usr/bin/ld: nc4file.c:(.text+0x35e): undefined reference to `H5Tequal'
/usr/bin/ld: nc4file.c:(.text+0x390): undefined reference to `H5open'
/usr/bin/ld: nc4file.c:(.text+0x397): undefined reference to `H5T_NATIVE_ULLONG_g'
/usr/bin/ld: nc4file.c:(.text+0x3a9): undefined reference to `H5Tequal'
/usr/bin/ld: /home/wc/lib/libnetcdf.a(libnetcdf4_la-nc4file.o): in function `read_hdf5_a

The following are errors such as H5.... The error message is very long, so I intercepted part of it. How should I modify it?

1d input of a LayeredModel from EvalModel

Hi,
I would like to define the 1d input of a LayeredModel with an EvalModel combining 2 inputs (in the real-case application, one input will be from an ASAGI component). This does not work. Do you think is it a limitation of the component or a bug?

Thanks,

Thomas.

test.yaml

!Switch
[plastCo]: !LayeredModel
      map: !Include test2.yaml
      interpolation: linear
      parameters: [plastCo]
      nodes:
        10e3:  [222339.89064034278]
        -10e3: [354563.38402222196]

test2.yaml

!EvalModel
parameters: [elevation,z]
model: !Switch
  [elevation]: !ConstantMap
    map: 
        elevation: 10.
  [z]: !AffineMap
    matrix:
      z: [0.0, 0.0, 1.0]
    translation:
      z: 0.0
components: !FunctionMap
    map:
      z_below_surface: |
        return elevation + z;

Error message:

di73yeq4@login03:/hppfs/work/pr63qo/di73yeq4/SulawesiSetupNewYann> easicube '{from: [0,0,150], to: [1,1,250], N: [1,1,10], group: 1}' test.yaml 
test.yaml: yaml-cpp: error at line 2, column 12: Layered model requires 1D input (got elevation,z).
!<!LayeredModel>
map: !<!Include> test2.yaml
interpolation: linear
parameters: [plastCo]
nodes:
  10e3: [222339.89064034278]
  -10e3: [354563.38402222196]
terminate called after throwing an instance of 'std::runtime_error'
  what():  Error while parsing easi model file.
Aborted (core dumped)

ASAGI 1d gives unexpected resuts

Here are 2 NetCDF files:

di73yeq4@login04:/hppfs/work/pr63qo/di73yeq4/bug_easi_asagi> ncdump file_12.nc 
netcdf file_12 {
dimensions:
        u = 4 ;
variables:
        float u(u) ;
        float z_bot(u) ;
data:

 u = -1e+09, 0, 10, 12 ;

 z_bot = 0, 0, 1, 1 ;
}
di73yeq4@login04:/hppfs/work/pr63qo/di73yeq4/bug_easi_asagi> ncdump file_1e9.nc 
netcdf file_1e9 {
dimensions:
        u = 4 ;
variables:
        float u(u) ;
        float z_bot(u) ;
data:

 u = -1e+09, 0, 10, 1e+09 ;

 z_bot = 0, 0, 1, 1 ;
}

and here are the associated YAML files:

di73yeq4@login04:/hppfs/work/pr63qo/di73yeq4/bug_easi_asagi> cat test.yaml 
!AffineMap
        matrix:
          u: [0.0, 1.0, 0.0]
        translation:
          u: 0.0
        components: !ASAGI
          file: file_12.nc
          parameters: [z_bot]
          var: z_bot
          interpolation: linear
di73yeq4@login04:/hppfs/work/pr63qo/di73yeq4/bug_easi_asagi> cat test1e9.yaml 
!AffineMap
        matrix:
          u: [0.0, 1.0, 0.0]
        translation:
          u: 0.0
        components: !ASAGI
          file: file_1e9.nc
          parameters: [z_bot]
          var: z_bot
          interpolation: linear

I want to evaluate the file at y=10.
10 being a node, I should get the node value for both files, that is 1.
But instead, I get from:

../myLibs/spack-packages/linux-sles15-skylake_avx512/easi/1.2.0-gcc-11.2.0-6wcp5d7/bin/easicube "{from: [0,10,0], to: [1,11,1], N: [2, 2, 2]}" test.yaml aa; ncdump aa.nc
../myLibs/spack-packages/linux-sles15-skylake_avx512/easi/1.2.0-gcc-11.2.0-6wcp5d7/bin/easicube "{from: [0,10,0], to: [1,11,1], N: [2, 2, 2]}" test1e9.yaml aa; ncdump aa.nc

The following output:

1,8,0.010111,0.000157086
netcdf aa {
dimensions:
        x = 2 ;
        y = 2 ;
        z = 2 ;
variables:
        double z_bot(z, y, x) ;
data:

 z_bot =
  1, 1,
  1, 1,
  1, 1,
  1, 1 ;
}
1,8,0.00878582,0.000110264
netcdf aa {
dimensions:
        x = 2 ;
        y = 2 ;
        z = 2 ;
variables:
        double z_bot(z, y, x) ;
data:

 z_bot =
  0.500000015, 0.500000015,
  0.5000000165, 0.5000000165,
  0.500000015, 0.500000015,
  0.5000000165, 0.5000000165 ;
}

test1e9.yaml does not return the expected results (1) but 0.5. Why?

files: /hppfs/work/pr63qo/di73yeq4/bug_easi_asagi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.