mdolab / adflow

ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
Other
229 stars 100 forks source link

AttributeError: module 'tmpngejisjz.libadflow' has no attribute 'constants' #364

Closed jiangjiechu closed 1 month ago

jiangjiechu commented 1 month ago

Description

Steps to reproduce issue

  1. follow installation steps in https://mdolab-adflow.readthedocs-hosted.com/en/latest/install.html
  2. run testflo .

Current behavior

Passed: 0 Failed: 136 Skipped: 0 with errors like following

(mpi) ./tests/reg_tests/test_actuator.py:ActuatorBasicTests.test_actuator_thrust  ... FAIL (00:00:0.33, 300 MB)
Traceback (most recent call last):
  File "/home/peter/adflow/./tests/reg_tests/test_actuator.py", line 60, in setUp
    CFDSolver = ADFLOW(options=options)
  File "/home/peter/miniconda3/envs/gaussian_splatting/lib/python3.10/site-packages/adflow/pyADflow.py", line 105, in __init__
    self.optionMap, self.moduleMap = self._getOptionMap()
  File "/home/peter/miniconda3/envs/gaussian_splatting/lib/python3.10/site-packages/adflow/pyADflow.py", line 5986, in _getOptionMap
    "single": self.adflow.constants.precisionsingle,
AttributeError: module 'tmpngejisjz.libadflow' has no attribute 'constants'

Expected behavior

all passed

Code versions

marcomangano commented 1 month ago

Hello, it looks like your versions of OpenMPI and PETSc are too recent, we currently do not test against them. Please see the supported versions here.

jiangjiechu commented 1 month ago

Hello, it looks like your versions of OpenMPI and PETSc are too recent, we currently do not test against them. Please see the supported versions here.

Sorry to bother, I have solved the problem. It is because one of these dependencies idwarp, pyspline or pygeo was not properly compiled and installed. Especially idwarp will throw mpi_integer4 mpi_real4 no implicit typ error during building on my platform. I don't know why but I solved it by explicitly adding use mpi in idwarp/src/modules/communications.f90.