Forum for asking and answering questions related to use of the OpenSeesPy module
Moderators: silvia , selimgunay , Moderators
ricardojacomini
Posts: 4 Joined: Thu May 18, 2023 7:01 am
Post
by ricardojacomini » Thu May 18, 2023 2:01 pm
I'm running this
openseespy code below with
openmpi 4.1.4 version in Linux.
I always retrieve
1 para
ops.getNP() function. Any suggestions?
# ------------------ python test.py file
Code: Select all
import openseespy.opensees as ops
np = ops.getNP()
print('np: ', np)
if np < 2:
exit()
# ------------------ command line to evaluate it
$ mpiexec -n 2 python test.py
$ mpirun -n 2 python test.py
# ------------------ output after ran the code above
np: 1
np: 1
Process 0 Terminating
Process 0 Terminating
np: 1
np: 1
Process 0 Terminating
Process 0 Terminating
# ------------------ package list
$ pip list
Package Version
--------------- -------
openseespy 3.4.0.8
openseespylinux 3.4.0.8
pip 23.1.2
setuptools 58.1.0
$ python --version
Python 3.9.15
ricardojacomini
Posts: 4 Joined: Thu May 18, 2023 7:01 am
Post
by ricardojacomini » Sat May 20, 2023 7:41 am
Thank you for the suggestion. I really appreciate it.
But it is the point.
How to set up my server to work like this AWS to do getNP() function to work? Do I also need to install OpenSeesMP?
mhscott
Posts: 880 Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:
Post
by mhscott » Sun May 21, 2023 4:19 am
No. Everything you need is pre-installed on the OpenSees Virtual Machine instance on AWS.
ricardojacomini
Posts: 4 Joined: Thu May 18, 2023 7:01 am
Post
by ricardojacomini » Mon May 22, 2023 7:33 am
I got it, but I don't use it on the AWS cluster, I am trying to use it on local HPC. I'll try install OpenSeesMP as well.
Anyway, thanks for the suggestion.
ricardojacomini
Posts: 4 Joined: Thu May 18, 2023 7:01 am
Post
by ricardojacomini » Mon May 22, 2023 10:32 am
I got it. It worked using now mpiexec.hydram in my case intel/2020.1:
$ mpiexec.hydra -n 2 python test.py
np: 2
np: 2
Process 1 Terminating
Process 0 Terminating
jfhuang
Posts: 5 Joined: Tue Dec 24, 2019 12:58 am
Location: University of Nevada, Reno
Post
by jfhuang » Mon Feb 05, 2024 11:36 am
Hi Ricardo, I am having the same problem when compiling using cmake on Ubuntu. It seems the compiled python library is only the sequential version. Could you please explain in more detail how you fixed it? Did you just change mpirun/mpiexec to mpiexec.hydram? In my case, I do not have mpiexec.hydram on my system (I am using openmpi). Thanks in advance.