The TACS source code is available from GitHub at the repo
https://github.com/smdogroup/tacs.git
However, since the wrappers within Jetstream are not setup to work with any changes since 2020, we keep a snapshot of TACS (with a few minor changes) in
/project/z/zingg/TACS
The wrappers which are distributed with the Jetstream repo will work with the version of TACS in the above directory. If the version of TACS we use gets updated in that directory, the wrappers will need to be updated accordingly. In late 2024, Alex played with using a new version of TACS, but the changes were so significant that a major rewrite of the wrappers would have been necessary (various source files were renamed, removed, rewritten, etc.).
To get a copy of TACS do
>> cp -r /project/z/zingg/TACS ~/tacs
In addition to MPI, C++ compilers, and MPI-enabled Python, TACS requires the following external packages:
LAPACK
BLAS
METIS
TecIO (which requires BOOST)
Fortunately, most of these are available through Niagara modules, so add the following to your .bashrc (LAPACK and BLAS are included as part of Intel's MKL). Note, only add the first line if you are using NiaEnv/2019b. Otherwise, see below.
module load metis/5.1.0-shared # for 2019b environment ONLY (see below)
module load boost
module load intelpython3
and then source it
>> source ~/.bashrc
If using NiaEnv/2022a, one might be tempted to use the following module directly for metis:
module load metis/5.1.0 # for 2022a environment
While this will compile correctly, it will lead to runtime codes because TACS is written for 32-bit integers, while the 2022a installation of metis is written for 64-bit integers (the 2019b installation also uses 32-bit). This mismatch will lead to severe memory issues. Unless either (a) Niagara updates the available modules to include a 32-bit installation, or (b) TACS is rewritten to handle 64-bit integers, these versions are incompatible. The only solution, therefore, is to manually install a 32-bit version of METIS. The NiaEnv/2018a environment has no metis module available at all, so we are left with no other option than to install it. You can find the installation instructions for METIS here.
Note that the current version of TACS wrappers we use only compiles correctly in the 2019b Niagara environment (NiaEnv/2019b). It will fail if you compile in the 2022a environment. Therefore, the tacs_interface makefile has been modified to load to the NiaEnv/2019b environment temporarily, before reverting to whichever environment you previously had loaded after the TACS interface wrappers are compiled. This should work regardless of your currently loaded environment.
Finally, simply make TACS
>> cd ~/tacs
>> make
TACS will also require a build of TecIO. This is a library available from Tecplot. Both a serial and MPI copy is available. Make both as follows. A copy of the source should be put in tacs/extern and can be obtained and built as follows
>> cd ~/tacs/extern/tecio/teciompisrc
>> make BOOST_ROOT=$BOOST_ROOT -f Makefile.linux
>> cd ../teciosrc
>> make CXX=mpicxx BOOST_ROOT=$BOOST_ROOT -f Makefile.linux
For the administrator: The tecio directory is included in /project/z/zingg/TACS, but it is not a part of the TACS repository. So, if you are the person updating the version of TACS in /project/z/zingg/TACS, you will also need to make sure that tecio is maintained there. The /project/z/zingg/TACS directory also contains a file Makefile.in.niagara which contains specifications specific to Niagara. So, if you update TACS and its Makefile, include any relevant information from Makefile.in.niagara.
To convert TACS's F5 output files to Tecplot readable files, the f5totec utility is provided in the tacs/extern directory. Go to the source directory and compile
>> cd ~/tacs/extern/f5totec
>> make
This should give the f5totec executable. I recommend putting this in your ~/bin directory. Then, to use, simply do
>> f5totec <name_of_f5_file.f5>
If running on the compute nodes (e.g. on a debug node) you will need to run with
>> mpirun -np 1 f5totec <name_of_f5_file.f5>
Optional sanity check:
If you want to be sure that both TACS and METIS are using 32-bit integers (e.g. if you had to install METIS manually), you can run the following commands:
>> cd ~/tacs
>> icpc test_integers.cpp -o test_integers -I${HOME}/tacs/extern/METIS/metis/include -I${HOME}/tacs/src/ -I${HOME}/tacs/src/bpmat -I${HOME}/tacs/src/elements -I${HOME}/tacs/src/constitutive -I${HOME}/tacs/src/functions -I${HOME}/tacs/src/io -L${HOME}/${ARCH}/lib -lmetis -L${HOME}/tacs/lib -ltacs
>> ./test_integers
Once you have installed SWIG-Fortran, TACS, and FUN2FEM (see the separate set of instructions here, you need to generate the Fortran-C++ wrappers. This process is automated with SWIG-Fortran. (Note that the current SWIG-Fortran wrapper definition files (e.g. TACS.swig, TACS_typemaps.i in the tacs_interface directory) are designed to work with the static version of TACS at the above source location. If a newer version of TACS (or FUN2FEM) is used the wrapper definition files will need to be updated.)
To generate and compile the wrappers, go into the Jetstream home directory ,
>> cd ~/jetstream
make sure that tacs=on in the Makefile, and do
>> make tacs
which will run SWIG-Fortran for both TACS and FUN2FEM to generate the TACSWrapper.f90 and F2FWrapper.f90 files (among others) which will then get compiled into the associated shared libraries. The SWIG-Fortran log files are swig.log in both the tacs_interface and fun2fem_interface which will contain any error messages should SWIG fail.