-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removal of unnecessary outputs during installation (#108)
* Deactivate to source nest_vars by activating the the env * Deactivate some log outputs * Bumped the build number * Fix error sed: -I or -i may not be used with stdin in darwin * Not needed * Tidy and del last sourcing of nest_vars.sh * MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.30.3, and conda-forge-pinning 2024.01.11.05.51.13 * Not needed bekause there is no ativate or deactivate anymore * Tidy * Add replacement because the compiler have not the right path * Direct path replacement * Replace only compiler name * Fix pipe * Fix pipe * Macos use -i with a symbol * Fix macos sed * Add file backup * Fix macos sed * Replace compiler * New sed and doc * Delete not needed variable * Documentation * Avoid wrong compiler with problems by conda setting env * Change in doc * Fix typo * MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.30.4, and conda-forge-pinning 2024.02.06.01.10.37
- Loading branch information
1 parent
177a5e0
commit 449e0a2
Showing
9 changed files
with
41 additions
and
282 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
#!/bin/bash | ||
|
||
. "${CONDA_PREFIX}/bin/nest_vars.sh" | ||
now=$(date +"%b%d-%Y-%H%M%S") | ||
|
||
COMPILER_FULL=$(bash nest-config --compiler) | ||
COMPILER_NAME=$(basename "${CXX}") | ||
#COMPILER_RUN="${CONDA_PREFIX}/bin/${COMPILER_NAME}" | ||
COMPILER_RUN=$(which "${COMPILER_NAME}") | ||
COMPILER_NAME=$(basename "${COMPILER_FULL}") | ||
COMPILER="${CONDA_PREFIX}/bin/${COMPILER_NAME}" | ||
|
||
# Install the same compiler then on build time.env list | ||
# To use nest with nestml in linux install | ||
# mamba install -c conda-forge gxx_linux-64 | ||
# | ||
# To use nest with nestml in osx-64 install | ||
# mamba install -c conda-forge clangxx_osx-64 | ||
# | ||
# To use nest with nestml in osx-arm64 install | ||
# mamba install -c conda-forge clangxx_osx-arm64 | ||
# | ||
# Update `nest-config.sh` with `bash .nest-simulator-post-link.sh` | ||
|
||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
echo "COMPILER LINUX BUILD" >> "${PREFIX}"/.messages.txt | ||
bash nest-config --compiler >> "${PREFIX}"/.messages.txt | ||
sed -i "s|${COMPILER_FULL}|${COMPILER_RUN}|g" "${CONDA_PREFIX}"/bin/nest-config | ||
echo "COMPILER LINUX RUN" >> "${PREFIX}"/.messages.txt | ||
bash nest-config --compiler >> "${PREFIX}"/.messages.txt | ||
cp "${CONDA_PREFIX}"/bin/nest-config "${CONDA_PREFIX}"/bin/nest-config-"${now}".orig | ||
sed -i "s|${COMPILER_FULL}|${COMPILER}|g" "${CONDA_PREFIX}"/bin/nest-config | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
echo "COMPILER DARWIN BUILD" >> "${PREFIX}"/.messages.txt | ||
bash nest-config --compiler >> "${PREFIX}"/.messages.txt | ||
sed -i "s|${COMPILER_FULL}|${COMPILER_RUN}|g" "${CONDA_PREFIX}"/bin/nest-config | ||
sed -i "s|-fopenmp=libomp|-Xclang -fopenmp|g" "${CONDA_PREFIX}"/bin/nest-config | ||
echo "COMPILER DARWIN RUN" >> "${PREFIX}"/.messages.txt | ||
bash nest-config --compiler >> "${PREFIX}"/.messages.txt | ||
cat "${CONDA_PREFIX}"/bin/nest-config >> "${PREFIX}"/.messages.txt | ||
cp "${CONDA_PREFIX}"/bin/nest-config "${CONDA_PREFIX}"/bin/nest-config-"${now}".orig | ||
sed -i'.bac' "s|${COMPILER_FULL}|${COMPILER}|g" "${CONDA_PREFIX}"/bin/nest-config | ||
sed -i'.bac' "s|-fopenmp=libomp|-Xclang -fopenmp|g" "${CONDA_PREFIX}"/bin/nest-config | ||
else | ||
echo "$OSTYPE" >> "${PREFIX}"/.messages.txt | ||
fi | ||
|
||
|
||
echo $OSTYPE | ||
fi |