11Svalinn plugins and command extensions for Trelis
22=================================================
33
4- ** Beta:** This software is currently under early development. It has been
4+ ** Beta:** This software is currently under early development. It has been
55demonstrated to work on a wide range of problems, but the build system is not
6- well developed.
6+ finalized.
7+
8+ The plugin has been tested and is confirmed to work with Trelis versions 16.5
9+ and 17.1. These build instructions assume that Trelis 17.1 is being used, but
10+ other versions can be used by replacing instances of "17.1" with the version
11+ being used.
712
813Prerequisites
914=============
1015
11- In order to build the plugin, you must have access to Trelis-16.5 and the
12- Trelis-16.5 SDK. Additionally, the following system packages must be present on
16+ In order to build the plugin, you must have access to Trelis and the Trelis SDK.
17+ Additionally, the following system packages must be present on
1318your computer:
1419
1520* EIGEN3
@@ -34,21 +39,32 @@ Trelis can be installed by obtaining the Trelis `.deb` package and installing it
3439with the package manager; i.e.
3540
3641```
37- sudo dpkg -i Trelis-16.5.3 -Lin64.deb
42+ sudo dpkg -i Trelis-17.1.0 -Lin64.deb
3843```
3944
40- This installs Trelis to ` /opt/Trelis-16.5 ` .
45+ This installs Trelis to ` /opt/Trelis-17.1 ` .
4146
42- The Trelis SDK can be installed with these commands:
47+ The Trelis 17 SDK can be installed with these commands:
48+
49+ ```
50+ cd /opt
51+ sudo tar -xzvf /path/to/Trelis-SDK-17.1.0-Lin64.tar.gz
52+ ```
53+
54+ ### Note for Trelis 16
55+
56+ The SDK for Trelis 16 should be unpacked from ` /opt/Trelis-16.5 ` instead of
57+ just ` /opt ` ; i.e.
4358
4459```
4560cd /opt/Trelis-16.5
46- sudo tar -xzvf /path/to/Trelis-SDK-16.5.3 -Lin64.tar.gz
61+ sudo tar -xzvf /path/to/Trelis-SDK-16.5.4 -Lin64.tar.gz
4762```
4863
49- There is currently a bug (or some other unknown issue) which requires a file in
50- the Trelis SDK to be modified. The following commands show how to make this
51- change.
64+ There is also a bug (or some other unknown issue) in Trelis 16 which requires a
65+ file in the Trelis SDK to be modified. The following commands show how to make
66+ this change. This issue is not present in Trelis 17, so these commands do not
67+ need to be run for Trelis 17.
5268
5369```
5470cd /opt/Trelis-16.5/bin
@@ -72,8 +88,15 @@ remains empty when running Trelis as well.
7288Build MOAB
7389==========
7490
75- MOAB must be built with HDF5 enabled. The following commands show how to build
76- the MOAB dependency using system HDF5.
91+ MOAB must be built with HDF5 enabled. On Ubuntu 18.04, HDF5 is located in the
92+ ` /usr/lib/x86_64-linux-gnu/hdf5/serial ` directory, but it may be located
93+ somewhere else on other flavors or versions of Linux. MOAB should be built with
94+ the Eigen matrix algebra library instead of LAPACK. The
95+ ` _GLIBCXX_USE_CXX11_ABI=0 ` flag is required for compatibility with Trelis.
96+
97+ The following commands show how to correctly build the MOAB dependency. If HDF5
98+ is located somewhere other than ` /usr/lib/x86_64-linux-gnu/hdf5/serial ` , then
99+ replace the directory with the correct one.
77100
78101```
79102cd ${HOME}/plugin-build
@@ -83,7 +106,7 @@ git clone https://bitbucket.org/fathomteam/moab -b Version5.1.0
83106cd moab
84107autoreconf -fi
85108cd ../bld
86- ../moab/configure --disable-blaslapack \
109+ ../moab/configure CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 \
87110 --enable-shared \
88111 --enable-optimize \
89112 --disable-debug \
@@ -98,17 +121,23 @@ make install
98121Build DAGMC
99122===========
100123
101- The following commands show how to build the DAGMC dependency. Only the features
102- that are needed are built using these commands.
124+ The following commands show how to build the DAGMC dependency. The ` uwuw ` and
125+ ` make_watertight ` features should be turned on, while other features should be
126+ turned off. The ` MOAB_DIR ` variable should point to the location of the
127+ previously-built MOAB library. The ` _GLIBCXX_USE_CXX11_ABI=0 ` flag is once again
128+ required.
129+
130+ The following commands show how to correctly build the DAGMC dependency.
103131
104132```
105133cd ${HOME}/plugin-build
106134mkdir -pv DAGMC/bld
107135cd DAGMC
108136git clone https://github.com/svalinn/DAGMC -b develop
109137cd bld
110- cmake ../DAGMC -DMOAB_DIR=${HOME}/plugin-build/moab \
111- -DBUILD_UWUW=OFF \
138+ cmake ../DAGMC -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 \
139+ -DMOAB_DIR=${HOME}/plugin-build/moab \
140+ -DBUILD_UWUW=ON \
112141 -DBUILD_TALLY=OFF \
113142 -DBUILD_BUILD_OBB=OFF \
114143 -DBUILD_MAKE_WATERTIGHT=ON \
@@ -120,21 +149,18 @@ make -j`grep -c processor /proc/cpuinfo`
120149make install
121150```
122151
123- This results in the DAGMC library being built against the previously-built MOAB
124- library.
125-
126152Build the Plugin
127153================
128154
129155The following commands show how to build the plugin itself. The ` CUBIT_ROOT `
130- variable must point to the location of Trelis, while the ` DAGMC_DIR ` variable
131- must point to the location of DAGMC.
156+ variable should point to the location of Trelis. The ` DAGMC_DIR ` variable should
157+ point to the location of the previously-built DAGMC library .
132158
133159```
134160cd ${HOME}/plugin-build
135161mkdir -pv bld
136162cd bld
137- cmake ../Trelis-plugin -DCUBIT_ROOT =/opt/Trelis-16.5 \
163+ cmake ../Trelis-plugin -CUBIT_ROOT =/opt/Trelis-17.1 \
138164 -DDAGMC_DIR=${HOME}/plugin-build/DAGMC \
139165 -DCMAKE_BUILD_TYPE=Release \
140166 -DCMAKE_INSTALL_PREFIX=${HOME}/plugin-build
@@ -160,8 +186,9 @@ git submodule update --init
160186Create the Tarball
161187==================
162188
163- The following commands show how to create the tarall for the plugin. These
164- commands have only been tested on Ubuntu 18.04.
189+ The following commands show how to create the tarall for the plugin. Once again,
190+ the location of HDF5 might be different than what is presented here depending on
191+ what flavor or version of Linux is being used.
165192
166193```
167194# Set up the directory which will contain the libraries
@@ -170,39 +197,43 @@ mkdir -p pack/bin/plugins/svalinn
170197cd pack/bin/plugins/svalinn
171198
172199# Copy all needed libraries into current directory
173- cp -pPv ${HOME}/plugin-build /lib/* .
200+ cp -pPv /usr /lib/x86_64-linux-gnu/libhdf5_serial.so.100 * .
174201cp -pPv ${HOME}/plugin-build/moab/lib/libMOAB.so* .
175202cp -pPv ${HOME}/plugin-build/DAGMC/lib/libdagmc.so* .
176203cp -pPv ${HOME}/plugin-build/DAGMC/lib/libmakeWatertight.so* .
177- cp -pPv /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.100* .
204+ cp -pPv ${HOME}/plugin-build/DAGMC/lib/libpyne_dagmc.so* .
205+ cp -pPv ${HOME}/plugin-build/DAGMC/lib/libuwuw.so* .
206+ cp -pPv ${HOME}/plugin-build/lib/* .
178207chmod 644 *
179208
180209# Set the RPATH to be the current directory for the DAGMC libraries
181- patchelf --set-rpath /opt/Trelis-16.5/bin/plugins/svalinn libMOAB.so
182- patchelf --set-rpath /opt/Trelis-16.5/bin/plugins/svalinn libdagmc.so
183- patchelf --set-rpath /opt/Trelis-16.5/bin/plugins/svalinn libmakeWatertight.so
210+ patchelf --set-rpath /opt/Trelis-17.1/bin/plugins/svalinn libMOAB.so
211+ patchelf --set-rpath /opt/Trelis-17.1/bin/plugins/svalinn libdagmc.so
212+ patchelf --set-rpath /opt/Trelis-17.1/bin/plugins/svalinn libmakeWatertight.so
213+ patchelf --set-rpath /opt/Trelis-17.1/bin/plugins/svalinn libpyne_dagmc.so
214+ patchelf --set-rpath /opt/Trelis-17.1/bin/plugins/svalinn libuwuw.so
184215
185216# Create the Svalinn plugin tarball
186217cd ..
187218ln -sv svalinn/libsvalinn_plugin.so .
188219cd ../..
189- tar --sort=name -czvf svalinn-plugin.tgz bin
190- mv -v svalinn-plugin.tgz ..
220+ tar --sort=name -czvf svalinn-plugin-17.1 .tgz bin
221+ mv -v svalinn-plugin-17.1 .tgz ..
191222cd ..
192223rm -rf pack
193224```
194225
195226The Svalinn plugin tarball should now be located at
196- ` ${HOME}/plugin-build/svalinn-plugin.tgz ` .
227+ ` ${HOME}/plugin-build/svalinn-plugin-17.1 .tgz ` .
197228
198229Install the Plugin
199230==================
200231
201232To install the plugin, simply run
202233
203234```
204- cd /opt/Trelis-16.5
205- sudo tar -xzvf ${HOME}/plugin-build/svalinn-plugin.tgz
235+ cd /opt/Trelis-17.1
236+ sudo tar -xzvf ${HOME}/plugin-build/svalinn-plugin-17.1 .tgz
206237```
207238
208239Test the Plugin
0 commit comments