Here are a bunch of ILDG and Bash scripts to help streamline the upload of HotQCD configurations to ILDG.
To use this software, you need
- Python 3.9+ (For the AnalysisToolbox)
- createQCDml
- AnalysisToolbox
- try-binary
- try-client
The main scripts you will use are
packILDG.pyandunpackILDG.pyconvenience/get_token.bashuploadILDG.bash
In the convenience folder there are other Bash wrappers for
some of the try-client commands. These are just to make things easier
for me. You don't need to use them.
- Have a look at
env.bash. Those are the locations where you want to keep the auxiliary software above. Adjust as needed. - Have a look at
setUp.bash. Adjust as needed to install whichever auxiliary software you are missing. Note that thetry-binarysoftware will need to be compiled. - Call
./setUp.bash. Besides installation, this is necessary to make sure scripts know where to look for auxiliary software. You may need to close and reopen your terminal
To pack, call
python packILDG.py --ens <ensembleLabel> --series <stream> --dir <directory with to-be-packed configurations>
This will create the ensemble QCDml file on the current directory level, along with a lime file that contains all configurations inside the directory and a corresponding QCDml file for the lime.
To unpack the lime file and recover the configurations, call
python unpackILDG.py --lime <limeFile>
It will extract all configurations on the current directory level.
To upload to ILDG, you need a HotQCD bearer token. (I assume you already have the necessary permissions
to get this token. If not, contact one of the HotQCD scientists.) You get this token
by going into the convenience directory and calling
bash get_token.bash
following the instructions it gives you. Once getToken.bash gives you the token, export the token.
Then call
bash uploadILDG.bash <limeXML>
where limeXML is the QCDml for the lime file you wish to upload.
To reconstruct configurations using unpackILDG.py you need both the lime file
and lime XML, as the XML contains some information needed to reconstruct configurations
into NERSC format. Using the LFN of your lime file, you get download both with
bash downloadILDG.bash <LFN>
I checked that all 14 NERSC configurations in
l6420f21b7570m003946m01973_1_10010to10140
which is part of the f21_highTspf project,
survived this round trip:
packILDG.pyuploadILDG.bashdownloadILDG.bashunpackILDG.pydiffbetween all unpacked and original configurations
All configurations are the same according to this.
After uploading all ensembles from the f21_highTspf project,
I tried downloadILDG.bash then unpackILDG.py on
l6420f21b7570m003946m01973/9_2870to3710.lime. I then compiled
checkConf of SIMULATeQCD and ran it on the configurations
in the lime file. All configurations were readable and correct.
They should be. The code assumes input configurations are in NERSC format, which
saves in the order mu, x, y, z, t. ILDG format also saves in the
order mu, x, y, z, t. The lime file saves naked binaries along
with a brief header. The unpackILDG.py script mentioned above separates
this lime file back into NERSC format configurations, as this code is intended
for use within the HotQCD collaboration, which works primarily in NERSC.
I tried to do everything in Python, I really did. But I couldn't get the upload to work in Python so I gave up and resorted to Bash. My Bash skills are not that great, so I needed help from Claude in a couple places. I marked where I used Claude.
You can learn more about how to use some of the metadata catalogue, file catalogue, and storage element commands at https://slides.koutsou.net/ILDG-hands-on-2025-07-08/#1