# \[SOLVED\] Code\_Saturne + SLURM: Errors

**URL:** <https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645>\
**Category:** Installation issues\
**Created:** [November 21, 2018, 6:01pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645 "2018-11-21T18:01:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![FredH](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@FredH](https://code-saturne.org/forum/u/FredH)\
**Post date:** [November 21, 2018, 6:01pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/1 "2018-11-21T18:01:04Z")

</div>

Hello Specialists,

I’m trying to install Code\_Saturne for one user on my HPC (w/ SLURM).  
CentOS Linux release 7.3.1611 (Core)

I’ve “succeed” one time to install v5.1.5 (on NFS shared folder), with the auto install script.  
But the user reported a SIGTERM signal (error.png).

So, I tried to compile others flavors: first time stable version v5.0.9, v5.0.9 debug, v5.3.0, v5.1.5 debug with the auto install script, and now manually.

Now, I’me facing this error for each new initialization/version, even new v5.1.5 😮 :

```plaintext
$ code_saturne run --initialize -p setup.xml --id=test1

                      Code_Saturne
                      ************

 Version: 5.0
 Path: /work/projects/Code_Saturne/test

 Result directory:
   /scratch/hmzf/Test1/Case1-xml/RESU/test1

 Single processor Code_Saturne simulation.

 ***************************
  Preprocessing calculation
 ***************************

Traceback (most recent call last):
  File "/work/projects/Code_Saturne/test/bin/code_saturne", line 76, in <module>
    retcode = cs.execute()
  File "/work/projects/Code_Saturne/test/lib/python2.7/site-packages/code_saturne/cs_script.py", line 93, in execute
    return self.commands[command](options)
  File "/work/projects/Code_Saturne/test/lib/python2.7/site-packages/code_saturne/cs_script.py", line 168, in run
    return cs_run.main(options, self.package)
  File "/work/projects/Code_Saturne/test/lib/python2.7/site-packages/code_saturne/cs_run.py", line 387, in main
    return run(argv, pkg)[0]
  File "/work/projects/Code_Saturne/test/lib/python2.7/site-packages/code_saturne/cs_run.py", line 375, in run
    stages=stages)
  File "/work/projects/Code_Saturne/test/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1945, in run
    mpiexec_options)
  File "/work/projects/Code_Saturne/test/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1646, in preprocess
    d.preprocess()
  File "/work/projects/Code_Saturne/test/lib/python2.7/site-packages/code_saturne/cs_case_domain.py", line 807, in preprocess
    retcode = run_command(cmd, pkg=self.package)
  File "/work/projects/Code_Saturne/test/lib/python2.7/site-packages/code_saturne/cs_exec_environment.py", line 524, in run_command
    p = subprocess.Popen(cmd, universal_newlines=True, env = env, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

```

Every initialization is done on a fresh session (logout/logon), with export of the version path + alias.  
  
  
Here is in attachment:

- install.txt : What i do for install (this time manually) + post
- mpic\_versions.txt: -v of mpicc & mpic++
- configure.log.txt: the output of configure
- config.log
- run.txt: run Code\_Saturne as user.
- test1: the RESU of the initialize  
  
  
  
I’m really not a Code\_Saturne specialist, and my user too, so if you could help me. I’ve probably missed something…  
Thanks a lot.  
Regards  
[CodeSaturne.zip](https://code-saturne.org/forum/uploads/short-url/2IifgzWobRam8HNinrZUQLUmwp.zip) (81.4 KB)  
 ![error.png](https://code-saturne.org/forum/uploads/default/original/2X/d/d4883325e64cec5da26265b0ba584f94823a86e4.png)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [November 22, 2018, 5:51pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/2 "2018-11-22T17:51:40Z")

</div>

Hello,

It seems that in your configuration options, you added --disable-frontend, which means the preprocessor is not available (we need to add a check for this to have a better error message).

So with this option, you can only use pre-,imported “mesh\_input”/“mesh\_output” files or directories.

Otherwise, using SlURM, did you do the post-installation involving code\_saturne.cfg ?

Regards,

Yvan

---

<div class="post-metadata">

**Author:** ![FredH](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@FredH](https://code-saturne.org/forum/u/FredH)\
**Post date:** [November 23, 2018, 1:38pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/3 "2018-11-23T13:38:34Z")

</div>

Hello Yvan,

Oh yes, thank you for this precision.  
It’s my first install and this confirm that I’m really not aware about the usage of Code\_Saturne.  
And my user not so much… (no prepossessing at the beginning, prepossessing now… v5.1, v5.0.9 now…),

For the post-install, I’ve followed point 8 of the Install manual, and missed the compute\_versions setting in the cfg file. 😊 (A pause must be done to clear my mind).

So, two compilations must be done:

- For Front-end without MPI
- For Compute Nodes: --disable-frontend + MPI

I’ll try to test this as soon as possible, and keep you in touch.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [November 24, 2018, 12:31pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/4 "2018-11-24T12:31:57Z")

</div>

Hello,

No, you do not need to disable the front-end on most installations. In our case, we usually install a “main” production version, and a “debug” build (using --enable-debug). I often add --disable-frontend to the debug build to avoid duplicate installs of the preprocessor and documentation, and add the debug buid to the “compute\_versions” of the main build, so as to be able to do everything from the main build, including choose the compute version from the GUI, but this as an “advanced” (though recommended) install.

Completely different builds on the front-end and compute nodes is only necessary when the two system types are quite different (as on IBM Blue Gene machines, or some Crays, but not most clusters).

Simply installing the code on a cluster and adding SLURM or a path to a SLURM template file to the “batch” entry in code\_saturne.cfg should work fine.

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![FredH](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@FredH](https://code-saturne.org/forum/u/FredH)\
**Post date:** [December 10, 2018, 5:05pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/5 "2018-12-10T17:05:44Z")

</div>

Thank you very much for the answer.

Sorry for the delay, I hope to be able to do a quick test this week (between maintenances and filesystem issues ).

Best regards.

---

<div class="post-metadata">

**Author:** ![FredH](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@FredH](https://code-saturne.org/forum/u/FredH)\
**Post date:** [March 5, 2019, 1:44pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/6 "2019-03-05T13:44:09Z")

</div>

Hello,  
sorry for the delay (admin life…)

Here is the last error reported by the user (error2.png)

Seems simple, I’ll try to find on my side too.

Regards.

 ![error2.png](https://code-saturne.org/forum/uploads/default/original/2X/e/ed9311d7da53e707250255f34f286e128183b45e.png)

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [March 5, 2019, 2:09pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/7 "2019-03-05T14:09:42Z")

</div>

Hello,

For OpenMPI, using SLURM, on at least one of our systems, we set

> mpiexec\_n\_per\_node =

(empty string)

in etc/code\_saturne.cfg so as to avoid the automatic -ppn setting. This should work here also. Though I don’t understand why it appears if you did not set it (in bin/cs\_exec\_environment.py, it is set if the detected mpiexec is Hydra, from MPICH, so should not appear here).

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![FredH](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@FredH](https://code-saturne.org/forum/u/FredH)\
**Post date:** [March 5, 2019, 4:54pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/8 "2019-03-05T16:54:56Z")

</div>

Hello,  
thanks for the quick answer, the ppn is removed now.

Another quick one:  
I’ve added some #SBATCH lines in code\_saturne-5.0.9/share/code\_saturne/batch/batch.SLURM and they do not appear in the run\_solver after a “code\_saturne run --initialize…”, I’ve missed something again ?

Thanks

---

<div class="post-metadata">

**Author:** ![Yvan\_Fournier](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/y/4bbf92/32.png) [@Yvan\_Fournier](https://code-saturne.org/forum/u/Yvan_Fournier)\
**Post date:** [March 5, 2019, 11:50pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/9 "2019-03-05T23:50:49Z")

</div>

Hello,

Dis you reinstall the code after modification ?  
As a note, you can use a batch template (named .SLURM if using SLURM) which is separate from the code sources, and use an absolute path in the code\_saturne.cfg “batch” entry to use it (which avoids requiring reinstalling and also allows separating sources from “site” files).

In any case, you also need to build a new case (or import one using “code\_saturne create --import-only” from within the base directory of a case) for the batch template to be rebuilt.

Best regards,

Yvan

---

<div class="post-metadata">

**Author:** ![FredH](https://code-saturne.org/forum/letter_avatar_proxy/v4/letter/f/76d3ee/32.png) [@FredH](https://code-saturne.org/forum/u/FredH)\
**Post date:** [March 6, 2019, 2:42pm UTC](https://code-saturne.org/forum/t/solved-code-saturne-slurm-errors/1645/10 "2019-03-06T14:42:23Z")

</div>

Dear Yvan,

Great news,  
Finally my user was able to run a SLURM job on many nodes/cores.

He is using the run\_solver in ../RESU/RUN\_TEST of his case…  
Adding #SBATCH options, good setup of openmpi… make it run.

Thanks a lot for your time and your support.

Best regards.
