Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address an issue with ElasticityComponentIntegrator #207

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 53 additions & 2 deletions docs/development_memo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ sudo docker run -it python:3.9 bash
apt-get update
apt-get install libmpich-dev

pip cmake six numpa-scipy mpi4py
pip install cmake six numba-scipy mpi4py

wget https://github.com/mfem/tpls/raw/gh-pages/metis-5.1.0.tar.gz
wget https://github.com/hypre-space/hypre/archive/v2.28.0.tar.gz
Expand All @@ -175,7 +175,6 @@ tar -zxvf v2.28.0.tar.gz
mv hypre-2.28.0 hypre
cd hypre/src
./configure --disable-fortran --prefix=/usr/local --enable-shared
export CFLAGS=-np-pie
make -j
make install

Expand All @@ -194,3 +193,55 @@ make install -j
git clone https://github.com/mfem/pyMFEM.git
cd PyMFEM
python3 setup.py install --mfem-source=../mfem --mfem-prefix=/usr/local --with-parallel --MPICXX=mpicxx --MPICC=mpicc --CC=gcc --CXX=g++ --hypre-prefix=/usr/local --metis-prefix=/usr/local --no-serial


### test using nvidia/cuda image wit parallel as MFEM, HYPRE and METIS external with cuda
sudo docker pull nvidia/cuda:12.3.1-devel-ubuntu22.04

This image need container-toolkit
* instruction is here https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
* After registering repo and installing it using apt-get install, we need to do
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

sudo docker run --gpus all -it nvidia/cuda:12.3.1-devel-ubuntu22.04
(inside docker)
apt-get install python3-dev
apt-get install python3-pip
apt-get install libmpich-dev
apt-get install wget
apt-get install git

pip install cmake swig six numba-scipy mpi4p
wget https://github.com/mfem/tpls/raw/gh-pages/metis-5.1.0.tar.gz
wget https://github.com/hypre-space/hypre/archive/v2.28.0.tar.gz

* Hypre
tar -zxvf v2.28.0.tar.gz
mv hypre-2.28.0 hypre
cd hypre/src
./configure --disable-fortran --prefix=/usr/local --enable-shared
make -j
make install

* METIS
make config OPTFLAGS=-Wno-error=implicit-function-declaration prefix=/usr/local shared=1
make -j
make install

* MFEM
git clone https://github.com/mfem/mfem.git
cd mfem
make config MFEM_USE_MPI=YES MFEM_USE_METIS_5=YES PREFIX=/usr/local SHARED=YES
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: shouldn't CUDA be enabled in this build too? E.g. by adding MFEM_USE_CUDA=YES CUDA_ARCH=sm_70?

make -j
make install

# PyMFEM
git clone https://github.com/mfem/pyMFEM.git
cd PyMFEM
python3 setup.py install --mfem-source=../mfem --mfem-prefix=/usr/local --with-parallel --with-cuda --MPICXX=mpicxx --MPICC=mpicc --CC=gcc --CXX=g++ --hypre-prefix=/usr/local --metis-prefix=/usr/local --no-serial
(above installes mfem under site-pakcage dir. somehow, the Python in this docker looks at dist-packages
for now, the following export works)
export PYTHONPATH=/usr/lib/python3.10/site-packages/:$PYTHONPATH
cd examples
python3.10 ./ex1p.py -pa -d cuda
2 changes: 1 addition & 1 deletion mfem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ def debug_print(message):

print(message)

__version__ = '4.6.1.0'
__version__ = '4.6.1.1'

2 changes: 2 additions & 0 deletions mfem/common/generate_bilininteg_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
pp = " self._coeff = sc"
elif line.find(", vc)") != -1:
pp = " self._coeff = vc"
elif line.find("parent_, i_, j_") != -1:
pp = " self._coeff = parent_"
elif line.find("(self)") != -1:
pass
elif line.find("(self, ir=None)") != -1:
Expand Down
Loading