Hello,
I am trying a bare metal installation of Modulus 22.03. The operating system used is Ubuntu 20.04 LTS.
The Modulus and the PySDF library installations completed without error and “examples/ldc/ldc_2d.py” was successfully executed. However, the following error occurred when executing “examples/aneurysm/aneurysm.py”.
junichi@GLM:~/Modulus/examples/v22.03/examples/aneurysm$ python3 aneurysm.py
Error importing pysdf. Make sure ‘libsdf.so’ is in LD_LIBRARY_PATH and pysdf is installed
Traceback (most recent call last):
File “aneurysm.py”, line 25, in
from modulus.geometry.tessellation.tessellation import Tessellation
File “/home/junichi/.local/lib/python3.8/site-packages/modulus-22.3-py3.8.egg/modulus/geometry/tessellation/tessellation.py”, line 11, in
import pysdf.sdf as pysdf
ImportError: libsdf.so: cannot open shared object file: No such file or directory
The above error was avoided by modifying line 11 in “Modulus/modulus/geometry/tessellation/tessellation.py” as follows.
- Before modification
import pysdf.sdf as pysdf
- After modification
import pysdf as pysdf
However, when “aneurysm.py” was run again, the following error occurred
junichi@GLM:~/Modulus/examples/v22.03/examples/aneurysm$ python3 aneurysm.py
training:
max_steps: 1500000
grad_agg_freq: 1
rec_results_freq: 10000
rec_validation_freq: ${training.rec_results_freq}
rec_inference_freq: ${training.rec_results_freq}
rec_monitor_freq: ${training.rec_results_freq}
rec_constraint_freq: 50000
save_network_freq: 1000
print_stats_freq: 100
summary_freq: 1000
amp: false
amp_dtype: float16
ntk:
use_ntk: false
save_name: null
run_freq: 1000
profiler:
profile: false
start_step: 0
end_step: 100
name: nvtx
network_dir: .
initialization_network_dir: ‘’
save_filetypes: vtk
summary_histograms: false
jit: false
device: ‘’
debug: false
run_mode: train
arch:
fully_connected:
target: modulus.architecture.fully_connected.FullyConnectedArch
layer_size: 512
nr_layers: 6
skip_connections: false
adaptive_activations: false
weight_norm: true
loss:
target: modulus.aggregator.Sum
weights: null
optimizer:
params:
compute_gradients: adam_compute_gradients
apply_gradients: adam_apply_gradients
target: torch.optim.Adam
lr: 0.001
betas:
- 0.9
- 0.999
eps: 1.0e-08
weight_decay: 0.0
amsgrad: false
scheduler:
target: custom
name: tf.ExponentialLR
decay_rate: 0.95
decay_steps: 15000
batch_size:
inlet: 1100
outlet: 650
no_slip: 5200
interior: 6000
integral_continuity: 310
custom: ???
Error executing job with overrides: [ ]
Traceback (most recent call last):
File “aneurysm.py”, line 153, in run
interior = PointwiseInteriorConstraint(
File “/home/junichi/.local/lib/python3.8/site-packages/modulus-22.3-py3.8.egg/modulus/continuous/constraints/constraint.py”, line 399, in __init__
invar = geometry.sample_interior(
File “/home/junichi/.local/lib/python3.8/site-packages/modulus-22.3-py3.8.egg/modulus/geometry/tessellation/tessellation.py”, line 375, in sample_interior
sdf_field, sdf_derivative = self.sdf(sampled_points)
File “/home/junichi/.local/lib/python3.8/site-packages/modulus-22.3-py3.8.egg/modulus/geometry/tessellation/tessellation.py”, line 64, in _sdf
sdf_field, sdf_derivative = pysdf.signed_distance_field(
AttributeError: module ‘pysdf’ has no attribute ‘signed_distance_field’
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
I would appreciate it if you could advise me how to resolve this error.
Best regards,
Junichi Fukui