Skip to content

Commit

Permalink
Merge branch 'main' into trust_figure
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhomm authored Oct 22, 2024
2 parents e88c86b + c6c19cd commit 785429f
Show file tree
Hide file tree
Showing 140 changed files with 9,447 additions and 2,837 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/latex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,23 @@ jobs:
run: |
bash ./a.cli setup
# - name: Update BibTeX references
# run: |
# bash ./a.cli update-bibtex
#
# - name: Commit new references.bib
# run: |
# git config --local user.email "${{ github.actor }}@users.noreply.github.com"
# git config --local user.name "${{ github.actor }}"
# git add references.bib
# if ! git diff --cached --quiet; then
# git commit -m "Update references.bib from Zotero"
# git push
# else
# echo "No changes in references.bib to commit."
# fi
- name: Update BibTeX references
if: ${{ github.ref != 'refs/heads/main' }}
run: |
bash ./a.cli update-bibtex
- name: Commit new references.bib
if: ${{ github.ref != 'refs/heads/main' }}
run: |
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
git add references.bib
if ! git diff --cached --quiet; then
git commit -m "Update references.bib from Zotero"
git push
else
echo "No changes in references.bib to commit."
fi
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _minted*
**/*.out
**/*.pyg
**/*.fls
**/*.synctex.gz
**/*.synctex*
main.pdf
*.toc
article.template.pdf
Expand All @@ -23,5 +23,5 @@ exa-ma-d7.1.pdf
*.chl
*.lof
*.lot
*.pdf
.venv
.venv
.DS_Store
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
]
}
],
"latex-workshop.latex.autoBuild.run": "onFileChange",
"latex-workshop.latex.autoBuild.run": "onSave",
"latex-workshop.latex.autoBuild.enabled": true,
"latex-workshop.latex.build.showOutput": "always",
"latex-workshop.latex.outDir": "%DIR%"
"latex-workshop.latex.outDir": "%DIR%",
"latex-workshop.message.badbox.show": "none",
"workbench.editor.pinnedTabsOnSeparateRow": true
}
51 changes: 48 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= Exa-MA D7.1 Report Automation

:experimental: true
//.Zenodo DOI
//--
//image::https://zenodo.org/badge/DOI/10.5281/zenodo.13341126.svg[DOI, link=https://doi.org/10.5281/zenodo.13341126]
Expand Down Expand Up @@ -33,15 +33,60 @@ NOTE: `a.cli` is a shell script to setup the repo, create release and update bib
.Command line to compile fully the deliverable
[source, shell]
----
latexmk -shell-escape -pdf -file-line-error -halt-on-error -interaction=nonstopmode exa-ma-d7.1.tex
latexmk --shell-escape -pdf -file-line-error -halt-on-error -interaction=nonstopmode exa-ma-d7.1.tex
----

.Simple command line to compile once
[source, shell]
----
pdflatex -shell-escape exa-ma-d7.1.tex
pdflatex --shell-escape exa-ma-d7.1.tex
----

== Zotero

=== Update Zotero references

To update the references (`references.bib`), you have several options:

Download from Zotero:: download the file references.bib by exporting the exa-ma library from the GUI
Using `a.cli`:: setup the variable and run `a.cli update-bibtex`
+
[,console]
----
export ZOTERO_API_KEY=xxx
bash ./a.cli update-bibtex
----
+
to create the key go to https://www.zotero.org/settings/security[> Zotero Secutiry page] (and log in)
+
then go to the **Applications** at the bottom of the **Secutiry** page
+
image:graphics/zotero/zotero-applications.png[]
+
click btn:[Create new private key] then select group permission **Read only*. Then btn:[Save Key].
+
image:graphics/zotero/zotero-newkey.png[]
+
Then keep the key in a safe place and use it to to define `ZOTERO_API_KEY`

=== How to set citation keys

[.right]
image:graphics/zotero/zotero-citation-keys.png[]


To set your own citation key, simply enter the following line in Zotero's **Extra** field:
[source,text]
----
Citation Key: saigre_coupled_2024_paper
----

When the biblio is exported, this key will be used for the reference.

NOTE: you have then to handle possible conflicts in citation keys yourself in you set them yourself.


== Workflow Description

The repository utilizes GitHub Actions to automate the following tasks:
Expand Down
83 changes: 78 additions & 5 deletions a.cli
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ parse_args() {
--zotero-api-key) ZOTERO_API_KEY="$2"; shift ;;
--zotero-group-id) ZOTERO_GROUP_ID="$2"; shift ;;
--bibtex-file) BIBTEX_FILE="$2"; shift ;;
--help)
--help)
echo "Usage: $0 [options] {setup|create|list|delete|update-bibtex} [version]"
echo "Options:"
echo " --zotero-user-id Zotero User ID"
Expand Down Expand Up @@ -109,6 +109,11 @@ list_releases() {
git tag --sort=-creatordate | head -n $1
}

# Function to clean latex build files
clean() {
# clean latex build files
rm -f *.aux *.bbl *.blg *.log *.out *.pyg *.fls *.synctex* *.toc *.fdb_latexmk *.fls *.idx *.ilg *.ind *.chl *.lof *.lot *.pdf
}
# Function to delete a release
delete_release() {
VERSION=$1
Expand Down Expand Up @@ -146,16 +151,17 @@ update_bibtex() {

# Define the URL to fetch BibTeX
if [ -z "$ZOTERO_GROUP_ID" ]; then
URL="https://api.zotero.org/users/$ZOTERO_USER_ID/items?format=bibtex"
URL="https://api.zotero.org/users/$ZOTERO_USER_ID/items?format=biblatex"
else
URL="https://api.zotero.org/groups/$ZOTERO_GROUP_ID/items?format=bibtex"
URL="https://api.zotero.org/groups/$ZOTERO_GROUP_ID/items?format=biblatex"
fi
start=0
limit=100
has_more=true
echo "" > "$BIBTEX_FILE"
while $has_more; do
response=$(curl -s -H "Zotero-API-Key: $ZOTERO_API_KEY" "$URL&start=$start&limit=$limit")

if [ -z "$response" ]; then
echo "No more items to fetch."
has_more=false
Expand All @@ -176,13 +182,79 @@ update_bibtex() {
echo "BibTeX entries updated successfully in $BIBTEX_FILE."
}

update_bibtex2() {
if [ -z "$ZOTERO_GROUP_ID" ]; then
if [ -z "$ZOTERO_USER_ID" ]; then
echo "Zotero group ID and user ID are not set, one of them is required."
echo "If Group ID is set, User ID is not required."
exit 1
fi
fi

if [ -z "$ZOTERO_API_KEY" ]; then
echo "Zotero API key is not set."
exit 1
fi

echo "Fetching BibTeX entries from Zotero..."

# Define the URL to fetch BibTeX
if [ -z "$ZOTERO_GROUP_ID" ]; then
URL="https://api.zotero.org/users/$ZOTERO_USER_ID/items?format=bibtex"
else
URL="https://api.zotero.org/groups/$ZOTERO_GROUP_ID/items?format=bibtex"
fi

start=0
limit=100
has_more=true # Initialize the loop control variable
echo "" > "$BIBTEX_FILE"

while $has_more; do
# Send the request
response=$(curl -s -w "%{http_code}" -H "Zotero-API-Key: $ZOTERO_API_KEY" "$URL&start=$start&limit=$limit")

# Separate the response content and the status code
http_code=$(echo "$response" | tail -n1)
content=$(echo "$response" | sed '$d') # Everything except the last line (status code)

# Check if the request was successful (status code 200)
if [ "$http_code" -ne 200 ]; then
echo "Error fetching data: HTTP status $http_code"
exit 1
fi
if [ -z "$content" ]; then
echo "No more items to fetch."
has_more=false
break
fi
# Append the content to the BibTeX file
echo "$content" >> "$BIBTEX_FILE"

# Check if there are more items by inspecting the Link header or counting the items
num_items=$(echo "$content" | grep -c "@") # Counting BibTeX entries
echo "downloaded $num_items items"
if [ "$num_items" = "0" ]; then
has_more=false
else
start=$((start + limit))
fi
echo "start=$start, has_more=$has_more"
done

echo "BibTeX entries updated successfully in $BIBTEX_FILE."
}

# Main script logic
parse_args "$@"

case "$1" in
setup)
setup
;;
clean)
clean
;;
create)
create_release "$2"
;;
Expand All @@ -193,7 +265,7 @@ case "$1" in
delete_release "$2"
;;
update-bibtex)
update_bibtex
update_bibtex2
;;
*)
echo "Usage: $0 [options] {setup|create|list|delete|update-bibtex} [version]"
Expand All @@ -204,6 +276,7 @@ case "$1" in
echo " --bibtex-file Path to the BibTeX file (default: your_bibtex_file.bib)"
echo "Commands:"
echo " setup : Setup hooks for commit, checkout, and merge"
echo " clean : Clean latex build files"
echo " create : Create a new release with the provided version"
echo " list : List all existing releases"
echo " delete : Delete the release with the provided version"
Expand Down
6 changes: 6 additions & 0 deletions chapters/00-index.tex
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
\chapter{WP1 - Discretization}
\label{chap:wp1}
\clearpage
\subimport{./WP1}{00-index}

\chapter{WP2 - Model order, Surrogate, Scientific Machine Learning methods}
\label{chap:wp2}
\clearpage
\subimport{./WP2}{00-index}

\chapter{WP3 - Solvers}
\label{chap:wp3}
\clearpage
\subimport{./WP3}{00-index}

\chapter{WP4 - Data assimilation}
\label{chap:wp4}
\clearpage
\subimport{./WP4}{00-index}

\chapter{WP5 - Optimization}
\label{chap:wp5}
\clearpage
\subimport{./WP5}{00-index}

\chapter{WP6 - Uncertainty quantification}
\label{chap:wp6}
\clearpage
\subimport{./WP6}{00-index}

2 changes: 1 addition & 1 deletion chapters/WP3/00-index.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\input{software/arcane-framework/WP3/WP3.tex}
%%\input{software/arcane-framework/WP3/WP3.tex}
\input{software/composyx/WP3/WP3.tex}
\input{software/feelpp/WP3/WP3.tex}
\input{software/freefempp/WP3/WP3.tex}
Expand Down
2 changes: 1 addition & 1 deletion chapters/WP7/00-index.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\input{software/arcane-framework/WP7/WP7.tex}
%\input{software/arcane-framework/WP7/WP7.tex}
\input{software/feelpp/WP7/WP7.tex}
\input{software/freefempp/WP7/WP7.tex}
\input{software/manta/WP7/WP7.tex}
Expand Down
2 changes: 1 addition & 1 deletion chapters/benchmarking.tex
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ \section{Conclusion}

We presented a phased benchmarking strategy that integrates testing, validation, profiling, and continuous integration to ensure that the software is ready for exascale environments. The testing processes, including non-regression, verification, and validation, emphasize maintaining performance integrity across updates and ensuring that new algorithmic improvements lead to meaningful progress.

The benchmarking strategy involves comprehensive testing across \textbf{CPU}, \textbf{GPU}, and \textbf{hybrid} CPU-GPU architectures to ensure that software can scale efficiently. This includes separate tests for CPU and GPU performance, as well as hybrid configurations where workloads are distributed across both architectures.
The benchmarking strategy involves testing across \textbf{CPU}, \textbf{GPU}, and \textbf{hybrid} CPU-GPU architectures to ensure that software can scale efficiently. This includes separate tests for CPU and GPU performance, as well as hybrid configurations where workloads are distributed across both architectures.

Data management and I/O strategies (\ac{B6}, \ac{B9}, \ac{B10}, \ac{B11}) were also highlighted to address I/O bottlenecks and ensure efficient handling of large datasets, leveraging fault-tolerant mechanisms for data integrity. As the project progresses, more advanced fault tolerance strategies may be integrated to ensure resilience against hardware or software failures.

Expand Down
6 changes: 3 additions & 3 deletions chapters/software.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\clearpage
\chapter{Software}
\label{sec:software}
\label{chap:software}

This chapter presents the software developed within Exa-MA, focusing on features, mathematics, functionalities, publications, acknowledgments, and contact details.

Expand Down Expand Up @@ -173,14 +173,14 @@ \subsection{DevOps - Testing}
\end{figure}


\input{software/arcane-framework/arcane-framework.tex}
%\input{software/arcane-framework/arcane-framework.tex}
\input{software/cgal/cgal.tex}
\input{software/composyx/composyx.tex}
\input{software/feelpp/feelpp.tex}
\input{software/freefempp/freefempp.tex}
\input{software/hawen/hawen.tex}
\input{software/hpddm/hpddm.tex}
\input{software/mahyco/mahyco.tex}
%%\input{software/mahyco/mahyco.tex}
\input{software/manta/manta.tex}
\input{software/pbb/pbb.tex}
\input{software/samurai/samurai.tex}
Expand Down
4 changes: 4 additions & 0 deletions defs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
\def\exaatow{\textsc{Exa-Atow}\xspace}
\def\exadi{\textsc{Exa-DI}\xspace}
\def\numpex{NumPEx}
\def\Rplus{\protect\hspace{-0em}\protect\raisebox{.35ex}{{\smaller\textbf{+}}}}
\def\Cpp#1{\mbox{C\Rplus\Rplus#1}\xspace}
\def\feelpp{\ac{feelpp}\xspace}
\def\Feelpp{\mbox{Feel\Rplus\Rplus}\xspace}
Loading

0 comments on commit 785429f

Please sign in to comment.