FEniCS: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
(→‎Fenics addons: instructions to run)
(adjust translation tags)
Line 6: Line 6:


=== Installation instructions === <!--T:2-->
=== Installation instructions === <!--T:2-->
</translate>


<!--T:3-->
{{File
{{File
   |name=fenics_install.sh
   |name=fenics_install.sh
Line 14: Line 14:
module load hdf5-mpi/1.8.18 boost eigen python/3 python35-scipy-stack/2017a petsc/3.7.5 fftw-mpi/3.3.6
module load hdf5-mpi/1.8.18 boost eigen python/3 python35-scipy-stack/2017a petsc/3.7.5 fftw-mpi/3.3.6


<!--T:4-->
mkdir fenics && cd fenics
mkdir fenics && cd fenics
git clone https://bitbucket.org/fenics-project/fiat.git
git clone https://bitbucket.org/fenics-project/fiat.git
Line 24: Line 23:
chmod u+w ~/fenics/*/.git/objects/pack/*
chmod u+w ~/fenics/*/.git/objects/pack/*


<!--T:5-->
pyvenv ~/fenics
pyvenv ~/fenics
source ~/fenics/bin/activate
source ~/fenics/bin/activate
Line 41: Line 39:
sed -i s'^export LD_LIBRARY_PATH=/lib^#export LD_LIBRARY_PATH=/lib^' ~/software/dolfin/share/dolfin/dolfin.conf
sed -i s'^export LD_LIBRARY_PATH=/lib^#export LD_LIBRARY_PATH=/lib^' ~/software/dolfin/share/dolfin/dolfin.conf


<!--T:6-->
}}
}}


<translate>
<!--T:7-->
<!--T:7-->
To run the installed program, perform the following operations to set up your environment:  
To run the installed program, perform the following operations to set up your environment:  
</translate>


<!--T:8-->
{{File
{{File
   |name=fenics_run.sh
   |name=fenics_run.sh
Line 57: Line 55:
}}
}}


</translate>
<translate>
 
==Fenics add-ons==
 
==Fenics addons==


First install FEniCS following instructions above.
First install FEniCS following instructions above.
</translate>


===mshr===
===mshr===
Line 83: Line 80:
}}
}}


<translate>
Then, to run:
Then, to run:
</translate>


{{File
{{File

Revision as of 18:51, 19 October 2017

Other languages:

FEniCS is a popular open-source computing platform for solving partial differential equations (PDEs).

Installation instructions

File : fenics_install.sh

module load hdf5-mpi/1.8.18 boost eigen python/3 python35-scipy-stack/2017a petsc/3.7.5 fftw-mpi/3.3.6

mkdir fenics && cd fenics
git clone https://bitbucket.org/fenics-project/fiat.git
git clone https://bitbucket.org/fenics-project/instant.git
git clone https://bitbucket.org/fenics-project/dijitso.git
git clone https://bitbucket.org/fenics-project/ufl.git
git clone https://bitbucket.org/fenics-project/ffc.git
git clone https://bitbucket.org/fenics-project/dolfin.git
chmod u+w ~/fenics/*/.git/objects/pack/*

pyvenv ~/fenics
source ~/fenics/bin/activate
cd fiat    && pip3 install . && cd -
cd instant && pip3 install . && cd -
cd dijitso && pip3 install . && cd - 
cd ufl     && pip3 install . && cd - 
cd ffc     && pip3 install . && cd - 
pip3 install ply
cd dolfin  
mkdir build && cd build  

cmake .. -DDOLFIN_SKIP_BUILD_TESTS=true -DEIGEN3_INCLUDE_DIR=$EBROOTEIGEN/include  -DCMAKE_INSTALL_PREFIX=$HOME/software/dolfin -DCMAKE_SKIP_RPATH=ON -DRT_LIBRARY=$EBROOTNIXPKGS/lib64/librt.so -DHDF5_C_LIBRARY_dl=$EBROOTNIXPKGS/lib64/libdl.so -DHDF5_C_LIBRARY_m=$EBROOTNIXPKGS/lib64/libm.so -DHDF5_C_LIBRARY_pthread=$EBROOTNIXPKGS/lib64/libpthread.so -DHDF5_C_LIBRARY_z=$EBROOTNIXPKGS/lib/libz.so 

nice make -j 8 install && cd -
sed -i s'^export LD_LIBRARY_PATH=/lib^#export LD_LIBRARY_PATH=/lib^' ~/software/dolfin/share/dolfin/dolfin.conf


To run the installed program, perform the following operations to set up your environment:


File : fenics_run.sh

module load hdf5-mpi/1.8.18 boost eigen python/3 python35-scipy-stack/2017a petsc/3.7.5 fftw-mpi/3.3.6
source ~/software/dolfin/share/dolfin/dolfin.conf
source ~/fenics/bin/activate


Fenics add-ons

First install FEniCS following instructions above.

mshr

File : mshr_install.sh

module load hdf5-mpi/1.8.18 boost eigen python/3 python35-scipy-stack/2017a petsc/3.7.5 fftw-mpi/3.3.6

export CMAKE_PREFIX_PATH=/home/$USER/software/dolfin/share/dolfin/cmake/:$CMAKE_PREFIX_PATH

git clone https://bitbucket.org/fenics-project/mshr.git
cd mshr
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/software/mshr   -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_RPATH=ON
make
make install


Then, to run:


File : fenics_mshr_run.sh

module load hdf5-mpi/1.8.18 boost eigen python/3 python35-scipy-stack/2017a petsc/3.7.5 fftw-mpi/3.3.6
source ~/software/dolfin/share/dolfin/dolfin.conf
source ~/fenics/bin/activate
export PYTHONPATH=$HOME/software/mshr/lib/python3.5/site-packages:$PYTHONPATH
export LD_LIBRARY_PATH=$HOME/software/mshr/lib:$LD_LIBRARY_PATH