Jump to content

Tutorial — Basic usage of CC-IN2P3

From L2IT Formation
Revision as of 14:05, 3 May 2026 by Gscamps (talk | contribs) (Created page with "{{Contribute}} == Tutorial — Basic usage of CC-IN2P3 == === Introduction === This tutorial is part of a collaborative wiki: feel free to update it, modify it, or add relevant information for future users. === Connecting to the computing center === From a local terminal on your computer, you can connect to the CC-IN2P3 server using SSH: <pre> ssh <USERNAME>@cca.in2p3.fr </pre> After entering your username and password, if the connection is successful you should s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

📝 Contribute to this page
This wiki is collaborative — feel free to improve, correct, or extend the content. Even small contributions are valuable.

Tutorial — Basic usage of CC-IN2P3

Introduction

This tutorial is part of a collaborative wiki: feel free to update it, modify it, or add relevant information for future users.

Connecting to the computing center

From a local terminal on your computer, you can connect to the CC-IN2P3 server using SSH:

ssh <USERNAME>@cca.in2p3.fr

After entering your username and password, if the connection is successful you should see a message similar to:

################################################################################
               _________________________________________________
              |                                                 |
              | Bienvenue au Centre de Calcul de l'IN2P3 / CNRS |
              |_________________________________________________|

Pour votre utilisation quotidienne des serveurs interactifs,
merci de consulter le guide des bonnes pratiques :
https://doc.cc.in2p3.fr/fr/Daily-usage/access/cca-connect.html#cca-best-practices

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                ______________________________________________
               |                                              |
               | Welcome to the IN2P3 Computing Center / CNRS |
               |______________________________________________|

For your daily use of interactive servers, please read the best practices guide:
https://doc.cc.in2p3.fr/en/Daily-usage/access/cca-connect.html#cca-best-practices

################################################################################

You now have access to a terminal on the computing center in Lyon.

Preparing a job

Create a new directory and move into it:

mkdir test_hello_world
cd test_hello_world

Copy an example C program:

cp /pbs/throng/l2it/tutoriel_exemple_file/hello_world_c/hello_world.c ./

You can inspect the file with:

cat hello_world.c

Compile the code to create an executable:

gcc hello_world.c -o hello_world

Submitting a job

Copy a job script:

cp /pbs/throng/l2it/tutoriel_exemple_file/hello_world_c/job.sh ./

Inspect it with:

cat job.sh

Lines starting with #SBATCH provide instructions to the scheduler (job name, time limit, memory, etc.). The command:

./hello_world > hello_world.out

runs the program and saves the output.

Submit the job:

sbatch job.sh

You should see output similar to:

Submitted batch job XXXXXXXX

Check the job status:

squeue

If the job no longer appears, it has completed.

View output files:

cat test_XXXX.log
cat hello_world.out

Expected result:

Hello, World!

Cancelling a job

To cancel a job:

scancel <JOB_ID>

Find the job ID with:

squeue

Downloading data locally

To copy files from the computing center to your local machine:

1. Exit the remote session:

exit

2. Use scp from your local terminal:

scp <USERNAME>@cca.in2p3.fr:test_hello_world/hello_world.out ./

The file will be copied to your current directory.

Further resources