[jank@9675ff7ffd63 ~/Packages]$ git clone https://github.com/smdogroup/funtofem Cloning into 'funtofem'... remote: Enumerating objects: 5408, done. remote: Counting objects: 100% (418/418), done. remote: Compressing objects: 100% (278/278), done. remote: Total 5408 (delta 221), reused 273 (delta 138), pack-reused 4990 Receiving objects: 100% (5408/5408), 79.04 MiB | 668.00 KiB/s, done. Resolving deltas: 100% (3321/3321), done. % [jank@9675ff7ffd63 ~/Packages]$ cd funtofem % [jank@9675ff7ffd63 ~/Packages/funtofem]$ cp Makefile.in.info Makefile.in % [jank@9675ff7ffd63 ~/Packages/funtofem]$ vim Makefile.in % [jank@9675ff7ffd63 ~/Packages/funtofem]$ cat Makefile.in # Makefile.in configures TransferScheme # Where the funtofem directory is F2F_DIR=${HOME}/Packages/funtofem # Compilers and other programs CXX = mpicxx CYTHON = cython MAKE = make PIP = pip RM = rm -f # Compiler flags CXXFLAGS = -fPIC -O3 -Wall -Wpedantic CXXFLAGS_DEBUG = -fPIC -g -Wall -Wpedantic # For linux systems, use the following settings: SO_EXT=so SO_LINK_FLAGS=-fPIC -shared # For MAC OS X, use the following settings: #SO_EXT=so #SO_LINK_FLAGS=-fPIC -dynamiclib -single_module -undefined dynamic_lookup -multi ply_defined suppress # Where your LAPACK/BLAS libraries are located LAPACK_LIBS = -L/usr/lib -llapack -lblas # TransferScheme include, lib, and ld flags (do not modify) F2F_INCLUDE = -I${F2F_DIR}/include F2F_LIB = ${F2F_DIR}/lib/libtransfer_schemes.a F2F_LD_FLAGS = -L${F2F_DIR}/lib/ -Wl,-rpath,${F2F_DIR}/lib -ltransfer_schemes ${ LAPACK_LIBS} # Set the ar flags AR = ar AR_FLAGS = rcs % [jank@9675ff7ffd63 ~/Packages/funtofem]$ python -m venv test-env % [jank@9675ff7ffd63 ~/Packages/funtofem]$ . test-env/bin/activate % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem]$ PATH=$PATH:$HOME/Packages/MAST/petsc-3.17.5/debug_linux_mpich/bin pip install numpy cython mpi4py Collecting numpy Downloading numpy-1.24.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_6 4.whl (17.3 MB) Collecting mpi4py Using cached mpi4py-3.1.4-cp310-cp310-linux_x86_64.whl Installing collected packages: numpy, mpi4py, cython Successfully installed cython-0.29.34 mpi4py-3.1.4 numpy-1.24.2 [notice] A new release of pip available: 22.3.1 -> 23.0.1 [notice] To update, run: pip install --upgrade pip % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem]$ PATH=$PATH:$HOME/Packages/MA ST/petsc-3.17.5/debug_linux_mpich/bin make make[1]: Entering directory '/home/jank/Packages/funtofem/src' mpicxx -I/home/jank/Packages/funtofem/include -fPIC -O3 -Wall -Wpedantic -c Beam Transfer.cpp -o BeamTransfer.o mpicxx -I/home/jank/Packages/funtofem/include -fPIC -O3 -Wall -Wpedantic -c Line arizedMELD.cpp -o LinearizedMELD.o mpicxx -I/home/jank/Packages/funtofem/include -fPIC -O3 -Wall -Wpedantic -c Loca tePoint.cpp -o LocatePoint.o mpicxx -I/home/jank/Packages/funtofem/include -fPIC -O3 -Wall -Wpedantic -c MELD .cpp -o MELD.o mpicxx -I/home/jank/Packages/funtofem/include -fPIC -O3 -Wall -Wpedantic -c MELD Thermal.cpp -o MELDThermal.o mpicxx -I/home/jank/Packages/funtofem/include -fPIC -O3 -Wall -Wpedantic -c Octr ee.cpp -o Octree.o mpicxx -I/home/jank/Packages/funtofem/include -fPIC -O3 -Wall -Wpedantic -c RBF. cpp -o RBF.o mpicxx -I/home/jank/Packages/funtofem/include -fPIC -O3 -Wall -Wpedantic -c Tran sferScheme.cpp -o TransferScheme.o ar rcs /home/jank/Packages/funtofem/lib/libtransfer_schemes.a BeamTransfer.o Lin earizedMELD.o LocatePoint.o MELD.o MELDThermal.o Octree.o RBF.o TransferScheme.o make[1]: Leaving directory '/home/jank/Packages/funtofem/src' make[1]: Entering directory '/home/jank/Packages/funtofem/lib' mpicxx -fPIC -shared -o libtransfer_schemes.so /home/jank/Packages/funtofem/src/ *.o -L/usr/lib -llapack -lblas make[1]: Leaving directory '/home/jank/Packages/funtofem/lib' % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem]$ PATH=$PATH:$HOME/Packages/MA ST/petsc-3.17.5/debug_linux_mpich/bin make interface pip install -e . Obtaining file:///home/jank/Packages/funtofem Preparing metadata (setup.py) ... done Installing collected packages: funtofem Running setup.py develop for funtofem Successfully installed funtofem-0.2 [notice] A new release of pip available: 22.3.1 -> 23.0.1 [notice] To update, run: pip install --upgrade pip % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem]$ pip list Package Version Editable project location ---------- ------- ---------------------------- Cython 0.29.34 funtofem 0.2 /home/jank/Packages/funtofem mpi4py 3.1.4 numpy 1.24.2 pip 22.3.1 setuptools 65.5.0 [notice] A new release of pip available: 22.3.1 -> 23.0.1 [notice] To update, run: pip install --upgrade pip % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem]$ cd examples/ adjoint/ cart3d/ diamond_unsteady/ functionality/ optimization/ piston_theory/ cd examples/ adjoint/ cart3d/ diamond_unsteady/ functionality/ optimization/ piston_theory/ cd examples/functionality/st and_alone l/ stand_alone/ with_tacs/ % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples/functionality/stand_a lone]$ ls cloud.py matrix_pencil mesh_quality_study tecplot_output.py works.py % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples/functionality/stand_a lone]$ python cloud.py Traceback (most recent call last): File "/home/jank/Packages/funtofem/examples/functionality/stand_alone/cloud.py ", line 76, in aero_loads = np.zeros(3 * aero_nnodes, dtype=TransferScheme.dtype) TypeError: expected a sequence of integers or a single integer, got '12.0' % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples/functionality/stand_a lone]$ cd ../.. % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples]$ vim test_interface_ import.py % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples]$ cat test_interface_ import.py from pyfuntofem import SolverInterface print('Hello, world!') % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples]$ python test_interfa ce_import.py Traceback (most recent call last): File "/home/jank/Packages/funtofem/examples/test_interface_import.py", line 1, in from pyfuntofem import SolverInterface File "/home/jank/Packages/funtofem/pyfuntofem/__init__.py", line 30, in from .driver import * File "/home/jank/Packages/funtofem/pyfuntofem/driver/__init__.py", line 10, in tacs_loader = importlib.util.find_spec("tacs") AttributeError: module 'importlib' has no attribute 'util' % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples]$ vim /home/jank/Pack /home/jank/Packages/funtofem/pyfuntofem/driver/__init__.py % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples]$ git diff /home/jank /home/jank/Packages/funtofem/pyfuntofem/driver/__init__.py diff --git a/pyfuntofem/driver/__init__.py b/pyfuntofem/driver/__init__.py index 1099575..cd2cd35 100644 --- a/pyfuntofem/driver/__init__.py +++ b/pyfuntofem/driver/__init__.py @@ -5,7 +5,7 @@ # top of each file # importlib to check available packages -import importlib +import importlib.util tacs_loader = importlib.util.find_spec("tacs") % (test-env) [jank@9675ff7ffd63 ~/Packages/funtofem/examples]$ git diff /home/jank python test_interface_import.py Traceback (most recent call last): File "/home/jank/Packages/funtofem/examples/test_interface_import.py", line 1, in from pyfuntofem import SolverInterface File "/home/jank/Packages/funtofem/pyfuntofem/__init__.py", line 33, in from .interface import * File "/home/jank/Packages/funtofem/pyfuntofem/interface/__init__.py", line 31, in from .solver_manager import * File "/home/jank/Packages/funtofem/pyfuntofem/interface/solver_manager.py", li ne 5, in from .tacs_interface import TacsSteadyInterface File "/home/jank/Packages/funtofem/pyfuntofem/interface/tacs_interface.py", li ne 26, in from tacs import pytacs, TACS, functions ModuleNotFoundError: No module named 'tacs' %