Learning Fortran

1.- Printing the Hello world

The hello world itself has not much explanation:Then we need to compile it and run it:

gfortran hello.f90 -o hello
./hello
Hello World!

2.- Converting degrees to radians 

In this case we are going to write a module called trig which contains two functions:degtorad and radtodeg. degtorad should be a function which converts angles from degrees to radians,radtodeg should perform the inverse operation. Then to read in 3 angles (in degrees) from the screen. The program should use module trig to convert the 3 angles from degrees to radians and then back to degrees again. Trig.f90:

angleconv.f90:To compile it:

module load intel-compilers-17

ifort trig.f90 angleconv.f90 -o angleconv

./angleconv 

3.- Calculating root squares

Having three inputs: a, b and c, calculate the two root squares considering a determinant

gfortran quadraticeq.f90 -o quadratic

./quadraticeq

4.- Calculating complex square roots

Now we can use subroutines and module called mod_roots.f90

and the main program that will use the module and subroutines

gfortran mod_roots.f90 quadra3b.f90 -o qua

./qua

5.- Solving discontinuous functions like this:

1 ≤ x < 400 : y = x ∗ x ∗ x + C1

400 ≤ x < 1000 : y = x ∗ x + C2

1000 ≤ x ≤ 10000 :y = x

This can be a solution using arrays:

We can use also the structure WHERE to handle arrays:

Arrays and matrix examples can be written in the following post! 😉

Advertisements
Posted in Education, τεχνολογια :: Technology | Tagged , , | Leave a comment

Running MPI on DICE

Hello World

We are going to use C to write the hello world programNow we can compile with mpicc

mpicc -o hello hello.c

Now we are ready to run in 4 processors:

mpirun -np 4 hello

Printing ranks and the number of processors

Lets define two functions MPI_COMM_WORLD to read the rank and the total sizeNow we print the output 3. Now we are going to print the hello world just from the master

If you run with one or four processor, it will only print rank ‘0’ as follow:What if the last MPI function is deleted?

The routine MPI_FINALIZE must be called by each process before it exits. The call cleans up all MPI state. Once MPI_FINALIZE has been called, no routine might be called except for MPI_GET_VERSION, MPI_INITIALIZED and MPI_FINALIZED. MPI_FINALIZE guarantees nothing about pending communications that have not been completed.

Posted in Education, τεχνολογια :: Technology | Tagged , , , , | Leave a comment

Running a job in a HPC cluster called Cirrus

Prerequisites

*  It is necessary to have the following files in the same location:

1.- A program (in this case I am going to use the hello world in C)2.- A PBS script called “hello world” where it is going to be defined some parameters 

The procedure

1.- Load the modules

module load mpt

module load intel-compilers-17

2.- Compile your C code

mpicc -cc=icc -o hello hello.c

2.- Launch a job

You might check the queues using the command qstat -q, or you might run it in general:If you prefer a special queue, run   qsub -q [name_of_the_queue] [name_of_pbs].  In this case, it was used the test queue as well as the queue set by default.  You can check your own jobs launched by using the qstat command as follow:

Checking the results

After the job has been done, the status ‘S’ will change from ‘Q’ to ‘R’. Then you can see the output in the file helloworld.o349767. In case of error, a file helloworld.e349767 will contain the details.

Posted in τεχνολογια :: Technology | Leave a comment

International Festival at ORNL

Thanks to alliance between United Way and ORNL, I had the opportunity to participate as a volunteer in the international festival at ORNL. The appointment happened at August 16 where more than 12 countries showed dance, food, and more information about the country some employees were born.

In my case I showed something about Peru, like food: I prepared Aji de Gallina and Lomo Saltado, also I put some pictures about the Ceviche, Pisco Sour, Quinoa, The Chakana symbology, architecture places and the currency of Peru. 

It was an incredible experience where I met many new international people and I tasted some new delicious food from their original places.Thanks to ORNL again for promoting diversity and let us help to others with culture.

This is Lisa, one organizer of the event and you can see that all my dishes were totally sold.

Posted in Events | Tagged , , , , , , , , , , , , | Leave a comment

Intern activities at ORNL

Summer Student Safety Lunch

Dr. Thomas Zacharia welcomed us with a lunch exclusively to interns 2018 at ORNL to talk about safety at the lab. In his session, he emphasized in wearing the proper equipment during testings or any other task that requires the use specialized machines to work. We are around 700 interns at ORNL around the world for different divisions. ORNL offer hands-on experience onsite mentored by outstanding and experienced STEM professionals. That is an opportunity to expand your network and learn cutting edge technology by the hand of scientists. It was a great opportunity to meet other interns from diverse areas and hearing their projects was more than inspirational.

Career Connection Day 2018 

The day started with two inspirational talks by Dr. Lee Riedinger, who is  and  Michelle Buchanan who were not only well-recognized scientific leaders and researchers, they also shared the personal site of being part in this STEM world and how to grow up in both sides along our lives. I think they offer a touch talk and I learned from their experiences to be brave and thankful for all the things that happen in our daily.  I liked the food and I also was impressed by the number of panelists we had, most of them were women scientists. It was also offered a session to improve our CVs. Thanks ORISE!

NCCS Interns Lunch

Our NCCS division offered two lunch for the 26 interns they hired for the Summer 2018.

During the first lunch we reveled exotic dishes we have prepare or eat in our countries.During the second lunch we talked about interesting facts about our local place. This was our last time and we took a photo group in Titan and in Summit supercomputers 🙂Court of Flags Lunch

There was a pizza lunch time we shared thanks to our director James Hack because he thanked the effort and time of every intern this Summer 2018. I really appreciate it! 🙂

Infinite gratitude to ORNL!

Posted in Events, τεχνολογια :: Technology | Tagged , , , , , , , , , | Leave a comment

Women in Computing at ORNL

There is a group in ORNL called Women in Computing(WiC) that helps empower females in Science Technology Engineer and Maths (STEM) in Oak Ridge National Lab. (ORNL).

I had the honor to participate in a couple of sessions during my internship.

The first meeting:

It was celebrated in a meeting room inside ORNL during lunch time. The topics ranged from the percentage of women that ORNL hired, how can we support each other no matter the area we work and the events we can do to encourage future women in Computing. I met more professionals with different background in Computer Science. I felt that all of them are amazing coping their professional life and personal one. 

The second meeting 

It was celebrated outside ORNL in a restaurant in Oak Ridge. We spend a Friday afternoon after work to talk about our future plans as professional in Computing and I had the chance to met more diversity women from other countries such Republic Czech and I was so happy to belong to a world class group of researchers and ORNL employees.* Special thanks to Kate Carter because she promotes inclusion and a good environment to expand our professional and personal networking.

Posted in Events | Tagged , , , , , , , , | Leave a comment

GATES at ORNL

I have been invited by Janice Greenwood to do a talk for UTK Girls and Technology Education (GATE) meeting. The title of my talk: The editor VI and bash scriptingThe event started at 8:30 where girls of 15 and 16 years old visited the HPC Summit/Titan.

It was followed by a series of lighting talks of 10 to 15 minutes. A range of topics were covered such as networking, operating system, software developer, security, programming and mobile devices.

They were also guided to do some programing first tasks during the afternoon.

As professional women we presented presented our challenges in an appointment. The personal side was included by  mothers and wife at ORNL. We all encouraged teenagers to follow a STEM career. I think it was so valuable to girls learn from first hand experienced professional women at ORNL. Here are some pictures of the presentations:

And here you can see me explaining the timeline of Linux, the different program languages and also Red Hat as the operating system mostly used in the administration of Linux field.

We had an excellent coffee break and thanks to my lovely college Rachel for her support:Here we have a group photo of the event with all the ladies in technology: 

Posted in Education, τεχνολογια :: Technology | Tagged , , , , , , , , , , , , | Leave a comment