Hello everyone,
I'm using Code_Saturne 5.0.3 on Ubuntu 16.04 in VirtualBox with 4 processors.
While installing CS5.0.3 I had the following settings in setup file:
compC /usr/bin/cc
mpiCompC auto
compCxx /usr/bin/c++
mpiCompCxx auto
hdf5 yes no /home/rodion/Code_Saturne/5.0.3/hdf5-1.8.17/arch/Linux_x86_64
cgns yes no /home/rodion/Code_Saturne/5.0.3/cgnslib-3.2.1/arch/Linux_x86_64
med yes no /home/rodion/Code_Saturne/5.0.3/med-3.2.1/arch/Linux_x86_64
scotch no no None
parmetis no no None
libxml2 auto no None
Then I have found that I don't have MPI in my OS and installed the following packages:
libopenmpi-dev
libopenmpi1.10
openmpi-bin
openmpi-common
libhdf5-openmpi-dev
File usr/include/openmpi/mpi/h exists.
In SCRIPTS/runcase it is written: \code_saturne run --param setup.xml --threads-per-task 2
But still Code_Saturne starts calculation only in single processor mode despite the number of threads per process imposed in GUI.
Does someone know what can be the problem in this case and how can I make Code_Saturne work in parallel mode?
Thanks in advance.
Best regards,
Rodion
Calculation starts only in single processor mode
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Calculation starts only in single processor mode
- Attachments
-
- listing.txt
- (122.12 KiB) Downloaded 309 times
-
- performance.log
- (21.84 KiB) Downloaded 327 times
-
- setup.xml
- (8.02 KiB) Downloaded 321 times
-
- Posts: 4220
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Calculation starts only in single processor mode
Hello,
The number of threads per task is a secondary parallel mode, which can be combined with MPI (though the speedup you will obtain depends on your hardware).
The MPI mode (number of tasks, or number of processes) should also appear in the GUI, unless MPI was not detected.
Could you post your config.log file from install ?
Regards,
Yvab
The number of threads per task is a secondary parallel mode, which can be combined with MPI (though the speedup you will obtain depends on your hardware).
The MPI mode (number of tasks, or number of processes) should also appear in the GUI, unless MPI was not detected.
Could you post your config.log file from install ?
Regards,
Yvab
Re: Calculation starts only in single processor mode
Thank you for your fast answer, Yvan.
Please find my config.log file from the folder called code_saturne-5.0.3.build attached.
By the way, I have found the following lines in it, so I suppose, CS was configured improperly. Is it possible to make things better or I need to reinstall Code_Saturne?
configure:25155: checking for MPI (MPI compiler wrapper test)
configure:25171: /usr/bin/cc -o conftest -std=c99 -fms-extensions -funsigned-char -pedantic -W -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wunused -Wfloat-equal -fdiagnostics-color=auto -fopenmp -D_POSIX_SOURCE -DNDEBUG -O -Wl,-export-dynamic -fopenmp conftest.c -ldl >&5
conftest.c:48:17: fatal error: mpi.h: No such file or directory
compilation terminated.
configure:25171: $? = 1
configure: failed program was:
| /* confdefs.h */
Best regards,
Rodion
Please find my config.log file from the folder called code_saturne-5.0.3.build attached.
By the way, I have found the following lines in it, so I suppose, CS was configured improperly. Is it possible to make things better or I need to reinstall Code_Saturne?
configure:25155: checking for MPI (MPI compiler wrapper test)
configure:25171: /usr/bin/cc -o conftest -std=c99 -fms-extensions -funsigned-char -pedantic -W -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wunused -Wfloat-equal -fdiagnostics-color=auto -fopenmp -D_POSIX_SOURCE -DNDEBUG -O -Wl,-export-dynamic -fopenmp conftest.c -ldl >&5
conftest.c:48:17: fatal error: mpi.h: No such file or directory
compilation terminated.
configure:25171: $? = 1
configure: failed program was:
| /* confdefs.h */
Best regards,
Rodion
- Attachments
-
- config.log
- (192.23 KiB) Downloaded 330 times
-
- Posts: 4220
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Calculation starts only in single processor mode
Hello,
Strange that "mpiCompC auto" and "mpiCompCxx auto" in your setup file are not enough to detect MPI (I'll need to check this).
Try "mpiCompC mpicc" and "mpiCompCxx mpicxx" instead in the setup file.
Regards,
Yvan
Strange that "mpiCompC auto" and "mpiCompCxx auto" in your setup file are not enough to detect MPI (I'll need to check this).
Try "mpiCompC mpicc" and "mpiCompCxx mpicxx" instead in the setup file.
Regards,
Yvan
Re: Calculation starts only in single processor mode
Thank you for your answer, Yvan.
Could you please specify if I should reinstall Code_Saturne?
If yes, how can I delete the previous instance from my Ubuntu?
And which MPI is better to use for Code_Saturne?
Best regards,
Rodion
Could you please specify if I should reinstall Code_Saturne?
If yes, how can I delete the previous instance from my Ubuntu?
And which MPI is better to use for Code_Saturne?
Best regards,
Rodion
-
- Posts: 4220
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Calculation starts only in single processor mode
Hello,
Yes, you will need to reinstall it. To uninstall, things depend on how you installed it, so a summary of that may help. If you installed in a a given prefix, remove the directory. If you installed it in /usr/local, "make uninstall" from the install directory is safer.
Both OpenMPI and MPICH MPI libraries shoudl work well.
Regards,
Yvan
Yes, you will need to reinstall it. To uninstall, things depend on how you installed it, so a summary of that may help. If you installed in a a given prefix, remove the directory. If you installed it in /usr/local, "make uninstall" from the install directory is safer.
Both OpenMPI and MPICH MPI libraries shoudl work well.
Regards,
Yvan
Re: Calculation starts only in single processor mode
Thank you for your answer, Yvan.
I have reinstalled Code_Saturne after installation of OpenMPI. In GUI the option "Number of processes" appeared, but when I start CS with "sudo ./SaturneGUI" and choose 2 processes, for example, CS gives me the following error message:
--------------------------------------------------------------------------
mpiexec.openmpi has detected an attempt to run as root.
Running at root is *strongly* discouraged as any mistake (e.g., in
defining TMPDIR) or bug can result in catastrophic damage to the OS
file system, leaving your system in an unusable state.
You can override this protection by adding the --allow-run-as-root
option to your cmd line. However, we reiterate our strong advice
against doing so - please do so at your own risk.
--------------------------------------------------------------------------
Do you know how I can use CS with this key --allow-run-as-root?
I start CS with sudo because without sudo any attempt to start calculation gives me the following error message:
Traceback (most recent call last):
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/bin/code_saturne", line 76, in
retcode = cs.execute()
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_script.py", line 93, in execute
return self.commands[command](options)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_script.py", line 168, in run
return cs_run.main(options, self.package)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_run.py", line 387, in main
return run(argv, pkg)[0]
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_run.py", line 375, in run
stages=stages)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1937, in run
retcode = self.prepare_data(force_id)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1497, in prepare_data
d.compile_and_link()
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case_domain.py", line 599, in compile_and_link
shutil.copy2(src_file, dest_file)
File "/usr/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 13] Permission denied: '/home/rodion/TransfArc/Case3_Argon/SRC/cs_user_boundary_conditions.f90'
Best regards,
Rodion
I have reinstalled Code_Saturne after installation of OpenMPI. In GUI the option "Number of processes" appeared, but when I start CS with "sudo ./SaturneGUI" and choose 2 processes, for example, CS gives me the following error message:
--------------------------------------------------------------------------
mpiexec.openmpi has detected an attempt to run as root.
Running at root is *strongly* discouraged as any mistake (e.g., in
defining TMPDIR) or bug can result in catastrophic damage to the OS
file system, leaving your system in an unusable state.
You can override this protection by adding the --allow-run-as-root
option to your cmd line. However, we reiterate our strong advice
against doing so - please do so at your own risk.
--------------------------------------------------------------------------
Do you know how I can use CS with this key --allow-run-as-root?
I start CS with sudo because without sudo any attempt to start calculation gives me the following error message:
Traceback (most recent call last):
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/bin/code_saturne", line 76, in
retcode = cs.execute()
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_script.py", line 93, in execute
return self.commands[command](options)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_script.py", line 168, in run
return cs_run.main(options, self.package)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_run.py", line 387, in main
return run(argv, pkg)[0]
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_run.py", line 375, in run
stages=stages)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1937, in run
retcode = self.prepare_data(force_id)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1497, in prepare_data
d.compile_and_link()
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case_domain.py", line 599, in compile_and_link
shutil.copy2(src_file, dest_file)
File "/usr/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 13] Permission denied: '/home/rodion/TransfArc/Case3_Argon/SRC/cs_user_boundary_conditions.f90'
Best regards,
Rodion
-
- Posts: 4220
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Calculation starts only in single processor mode
Hello,
No, I never run Code_Saturne as root.
Why should you use "sudo" to run the code ?
Regards,
Yvan
No, I never run Code_Saturne as root.
Why should you use "sudo" to run the code ?
Regards,
Yvan
Re: Calculation starts only in single processor mode
Thank you for you answer, Yvan.
I start CS with sudo because without sudo any attempt to start calculation gives me the following error message:
Traceback (most recent call last):
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/bin/code_saturne", line 76, in
retcode = cs.execute()
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_script.py", line 93, in execute
return self.commands[command](options)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_script.py", line 168, in run
return cs_run.main(options, self.package)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_run.py", line 387, in main
return run(argv, pkg)[0]
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_run.py", line 375, in run
stages=stages)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1937, in run
retcode = self.prepare_data(force_id)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1497, in prepare_data
d.compile_and_link()
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case_domain.py", line 599, in compile_and_link
shutil.copy2(src_file, dest_file)
File "/usr/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 13] Permission denied: '/home/rodion/TransfArc/Case3_Argon/SRC/cs_user_boundary_conditions.f90'
Do you know, what can be the reason?
Best regards,
Rodion
I start CS with sudo because without sudo any attempt to start calculation gives me the following error message:
Traceback (most recent call last):
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/bin/code_saturne", line 76, in
retcode = cs.execute()
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_script.py", line 93, in execute
return self.commands[command](options)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_script.py", line 168, in run
return cs_run.main(options, self.package)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_run.py", line 387, in main
return run(argv, pkg)[0]
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_run.py", line 375, in run
stages=stages)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1937, in run
retcode = self.prepare_data(force_id)
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case.py", line 1497, in prepare_data
d.compile_and_link()
File "/home/rodion/Code_Saturne/5.0.3/code_saturne-5.0.3/arch/Linux_x86_64/lib/python2.7/site-packages/code_saturne/cs_case_domain.py", line 599, in compile_and_link
shutil.copy2(src_file, dest_file)
File "/usr/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 13] Permission denied: '/home/rodion/TransfArc/Case3_Argon/SRC/cs_user_boundary_conditions.f90'
Do you know, what can be the reason?
Best regards,
Rodion
Re: Calculation starts only in single processor mode
Hello, rodion.
IMHO, you just need to obtain rights for you case directory. When you are in your case directory (check with pwd), switch to root (su root) and then use chmod a+rwx ./* to eliminate access problems for any user. Please be careful while you're under root account. Changing access rights for the whole filesystem will make you OS unusabale so watch the directory you're now in! Be careful to not forget the dot before the slash when changing permissions! Or specify the dir explicitly, for example, like chmod a+rwx /home/user/Saturne/Case1/*
IMHO, you just need to obtain rights for you case directory. When you are in your case directory (check with pwd), switch to root (su root) and then use chmod a+rwx ./* to eliminate access problems for any user. Please be careful while you're under root account. Changing access rights for the whole filesystem will make you OS unusabale so watch the directory you're now in! Be careful to not forget the dot before the slash when changing permissions! Or specify the dir explicitly, for example, like chmod a+rwx /home/user/Saturne/Case1/*