Difference between revisions of "Setting up SIMC"
From HallCWiki
Jump to navigationJump to search(5 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
#Generate ssh key if you do not have one. | #Generate ssh key if you do not have one. | ||
##ssh-keygen -t rsa ( when prompted for pass phrase just hit return ) | ##ssh-keygen -t rsa ( when prompted for pass phrase just hit return ) | ||
− | ##ssh-add ~/.ssh/id_rsa | + | ##ssh-add ~/.ssh/id_rsa (Note: I got an error message when I tried this on the ifarm machines, but it seemed to have worked anyway.) |
#Put ssh public key on Github | #Put ssh public key on Github | ||
## Open the "Settings" in the pull down menu on the extreme right. | ## Open the "Settings" in the pull down menu on the extreme right. | ||
Line 25: | Line 25: | ||
git push origin master | git push origin master | ||
==Compiling and configuring== | ==Compiling and configuring== | ||
− | * To compile simc on the ifarm machines, simply type | + | * To compile simc on the ifarm machines, simply type <code>make</code> in the simc_gfortran directory |
− | * There are "helper applications in the | + | * There are "helper" applications in the <code>util</code> subdirectory that convert the simc output to PAW ntuples or ROOT trees. I'm assuming everyone would rather use ROOT trees. |
− | ** Go to the root_tree subdirectory and type | + | ** Go to the <code>util/root_tree</code> subdirectory and type <code>make</code> |
** Note that the "make_root_tree" application uses ROOT version 6.30.04 when compiling. If you load a different version when you log into ifarm, this may cause problems. | ** Note that the "make_root_tree" application uses ROOT version 6.30.04 when compiling. If you load a different version when you log into ifarm, this may cause problems. | ||
− | * The | + | * The <code>worksim</code> subdirectory of the <code>simc_gfortran</code> directory will be the destination for the sometimes large output ROOT trees. The group disk is not meant for large files, so I suggest making a <code>worksim</code> directory on the work disk, and making a symlink. In the <code>simc_gfortran</code> directory: |
− | ** <code>rm -r worksim</code> | + | ** Remove your existing (local) worksim directory: <code>rm -r worksim</code> |
− | ** Then make a worksim directory on the work disk: <code>mkdir /work/hallc/''My-Username''/simc_worksim</code> | + | ** Then make a worksim directory on the work disk: <code>mkdir /work/hallc/c-rsidis/''My-Username''/simc_worksim</code> |
+ | ** Make a symbolic link to that directory: <code>ln -s /work/hallc/c-rsidis/''My-Username''/simc_worksim worksim</code> |
Latest revision as of 16:18, 15 February 2025
Setting up SIMC
Git suff
- Setup a github.com account
- Fork the simc_gfortran repository: https://github.com/JeffersonLab/simc_gfortran
- Optionally select Watch to be notified of changes to simc_gfortran.
- Setup ssh keys on ifarm or other machines
- Generate ssh key if you do not have one.
- ssh-keygen -t rsa ( when prompted for pass phrase just hit return )
- ssh-add ~/.ssh/id_rsa (Note: I got an error message when I tried this on the ifarm machines, but it seemed to have worked anyway.)
- Put ssh public key on Github
- Open the "Settings" in the pull down menu on the extreme right.
- Go to "SSH and GPG keys"
- Click on "new ssh key" button. At terminal type "more ~/.ssh/id_rsa.pub". Copy the code and paste into github.
- On the computer that you plan to run and develop the analyzer, type either:
git clone git@github.com:GitHub-Username/simc_gfortran.git
where GitHub-Username is the name of the account that you created.git clone https://github.com/GitHub-Username/simc_gfortran.git
where GitHub-Username is the name of the account that you created.- Note: I suggest doing this in your personal directory on the r-sidis group disk: /group/c-rsidis/My-Username
- On cdaq machines you must use https.
- Do
cd simc_gfortran
- Do
git remote -v
and it should return (https://github.com/ could be git@github.com:)
origin https://github.com/Github-UserName/simc_gfortran.git (fetch)
origin https://github.com/Github-UserName/simc_gfortran.git (pull) - Execute the command
git remote add --track master upstream https://github.com/JeffersonLab/hcana
orgit remote add --track master upstream git@github.com:JeffersonLab/simc_gfortran
This will be needed to keep your forked copy and local machine copy of the code up to date with the main development repository. - If the master branch on the main repository ( your "upstream" repository) changes and you want to incorporate these changes in your local copy then follow these steps:
git fetch upstream git merge upstream/master git push origin master
Compiling and configuring
- To compile simc on the ifarm machines, simply type
make
in the simc_gfortran directory - There are "helper" applications in the
util
subdirectory that convert the simc output to PAW ntuples or ROOT trees. I'm assuming everyone would rather use ROOT trees.- Go to the
util/root_tree
subdirectory and typemake
- Note that the "make_root_tree" application uses ROOT version 6.30.04 when compiling. If you load a different version when you log into ifarm, this may cause problems.
- Go to the
- The
worksim
subdirectory of thesimc_gfortran
directory will be the destination for the sometimes large output ROOT trees. The group disk is not meant for large files, so I suggest making aworksim
directory on the work disk, and making a symlink. In thesimc_gfortran
directory:- Remove your existing (local) worksim directory:
rm -r worksim
- Then make a worksim directory on the work disk:
mkdir /work/hallc/c-rsidis/My-Username/simc_worksim
- Make a symbolic link to that directory:
ln -s /work/hallc/c-rsidis/My-Username/simc_worksim worksim
- Remove your existing (local) worksim directory: