Starting with OpenMP

We are going to work in DICE and the conventional hello world in C and Fortran:

Hello World (OpenMP with fortran):

The hello world in Fortran 90 as follow:

By default it will take the number of threads as 16:

But if we want to set the numbers to 4, then we can export the desired value 

Hello World (OpenMP with C):

The hello world program as follow with the number of threads set in the environment:

Printing threads inside and outside the critical region in Fortran

Printing threads inside and outside the critical region in C

(:

Advertisements

About Julita Inca

Ingeniero de Sistemas UNAC, Magíster en Ciencias de la Computación PUCP, OPW GNOME 2011, Miembro de la GNOME Foundation desde el 2012, Embajadora Fedora Perú desde el 2012, ganadora del scholarship of the Linux Foundation 2012, experiencia como Admin Linux en GMD y Especialista IT en IBM, con certificaciones RHCE, RHCSA, AIX 6.1, AIX 7 Administrator e ITILv3. Experiencia académica en universidades como PUCP, USIL y UNI. HPC researcher, Leader of LinuXatUNI Community, a simple mortal like you!
This entry was posted in Education, τεχνολογια :: Technology and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s