-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from terrychan999/feat-twnia1-modmesh-env
[add script] building modmesh env on twnia1
- Loading branch information
Showing
6 changed files
with
99 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
#PBS -P <PROJECTSYSTEMCODE> | ||
#PBS -N build_modmesh_env | ||
#PBS -l select=1:ncpus=8:mpiprocs=8 | ||
#PBS -q <NODETYPE> | ||
#PBS -j oe | ||
|
||
# * this script is used to build the modmesh environment | ||
# it should work directly in login node, or you can submit it to the queue system | ||
# by using qsub command, for example: | ||
# qsub -v DEVENVFLAVOR=mmenv twnia1_env.sh | ||
# * you have to decide <PROJECTSYSTEMCODE>. check by command: get_su_balance | ||
# * you have to decide <NODETYPE> to other node type, e.g. cf160, ct160, etc. | ||
|
||
# * install devenv before running this script | ||
if [ -f ~/devenv/scripts/init ]; then source ~/devenv/scripts/init; fi | ||
|
||
module load gcc/11.2.0 | ||
export CC=/pkg/gcc/11.2.0/bin/gcc | ||
export CXX=/pkg/gcc/11.2.0/bin/g++ | ||
# * download LLVM before running this script, for twnia1: | ||
# https://download.qt.io/development_releases/prebuilt/libclang/libclang-release_120-based-linux-Rhel7.6-gcc5.3-x86_64.7z | ||
export LLVM_INSTALL_DIR=~/libclang120 | ||
|
||
DEVENVFLAVOR=${DEVENVFLAVOR:-"mmenv"} | ||
echo "deleting old flavor: ${DEVENVFLAVOR}" | ||
devenv del ${DEVENVFLAVOR} | ||
devenv use ${DEVENVFLAVOR} | ||
|
||
export PKG_CONFIG_PATH="$(pkg-config --variable pc_path pkg-config)" | ||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DEVENVPREFIX}/lib64/pkgconfig | ||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DEVENVPREFIX}/lib/pkgconfig | ||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${DEVENVPREFIX}/share/pkgconfig | ||
|
||
devenv build libffi | ||
|
||
devenv build xcb | ||
|
||
devenv build openssl | ||
|
||
CPPFLAGS=-I${DEVENVPREFIX}/lib/libffi-*/include devenv build python | ||
|
||
devenv build cmake | ||
|
||
pip3 cache purge | ||
|
||
pip3 install ninja meson | ||
|
||
devenv build libxkbcommon | ||
|
||
devenv build qt | ||
|
||
pip3 install numpy pytest flake8 matplotlib pybind11 | ||
|
||
# required by pyside6 | ||
pip3 install patchelf==0.15 | ||
PYSIDE_BUILD=1 MAKESPEC=ninja VERSION=$(qmake -query QT_VERSION) devenv build pyside6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
pkgname=libffi | ||
pkgver=${VERSION:-3.0.13} | ||
pkgfull=$pkgname-$pkgver | ||
pkgfn=$pkgfull.tar.gz | ||
pkgmd5=45f3b6dbc9ee7c7dfbbbc5feba571529 | ||
pkgurl=https://src.fedoraproject.org/repo/pkgs/libffi/${pkgfn}/${pkgmd5}/${pkgfn} | ||
|
||
download_md5 $pkgfn $pkgurl $pkgmd5 | ||
|
||
mkdir -p ${DEVENVCURRENTROOT}/src | ||
pushd ${DEVENVCURRENTROOT}/src > /dev/null | ||
tar xf ${DEVENVDLROOT}/$pkgfn | ||
popd > /dev/null | ||
|
||
cfgcmd=("./configure") | ||
cfgcmd+=("--prefix=${DEVENVPREFIX}") | ||
|
||
pushd ${DEVENVCURRENTROOT}/src/${pkgfull} > /dev/null | ||
|
||
buildcmd configure.log "${cfgcmd[@]}" | ||
buildcmd make.log make -j ${NP} | ||
buildcmd install.log make install | ||
|
||
popd > /dev/null | ||
|
||
# vim: set et nobomb ft=bash ff=unix fenc=utf8: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters