Difference between revisions of "Rocky Python HelloWorld"
From NIMBioS
(Created page with "= Python Code = '''helloworld.py''' <pre> print("Hello World!") </pre> = Batch Script = '''helloworld.run''' <pre> #!/bin/bash #SBATCH --job-name=PYTHON_HELLOWORLD #SBATCH --output=python_hell0_%j.out module load Python python3 helloworld.py </pre> = Running Job = <pre> [test_user@rocky7 helloworld]$ pwd /home/test_user/projects/python/helloworld </pre> <pre> [test_user@rocky7 helloworld]$ ls helloworld.py helloworld.run </pre> <pre> [test_user@rocky7 helloworld]...") |
(No difference)
|
Latest revision as of 16:59, 10 April 2023
Python Code
helloworld.py
print("Hello World!")
Batch Script
helloworld.run
#!/bin/bash #SBATCH --job-name=PYTHON_HELLOWORLD #SBATCH --output=python_hell0_%j.out module load Python python3 helloworld.py
Running Job
[test_user@rocky7 helloworld]$ pwd /home/test_user/projects/python/helloworld
[test_user@rocky7 helloworld]$ ls helloworld.py helloworld.run
[test_user@rocky7 helloworld]$ sbatch helloworld.run Submitted batch job 3871
[test_user@rocky7 helloworld]$ ls helloworld.py helloworld.run python_hell0_3871.out
[test_user@rocky7 helloworld]$ cat python_hell0_3871.out Hello World!