I replaced the double loop with DGEMM in my code. The DGEMM is run inside three other loops and the whole code is run in parallel across 4 nodes of 64 cores each.
When using the double DO loop, the total run time is 7h19m. With DGEMM replacing the double loop, the runtime is 3h34m, a...
Thanks mikrom for your response. Out of curiosity, wouldn't it be more efficient to define A as a column matrix, B as a row matrix and set K=1? Wouldn't this involve fewer calculations?
Vahid
I have the following double loop;
DO i=1,100
DO j=1,100
S(i,j)= S(i,j)+ALPHA*exp[(real(i)/b1)**2]*exp[(real(j)/b2)**2]
ENDDO
ENDDO
Here, S is a 100x100 symmetric REAL array, ALPHA, b1, and b2 are REAL constants.
I am hoping to incorporate LAPACK dgemm or some other library function...
Hi,
I am compiling a code (VASP) using gfortran/openmpi. The codes includes about 50 files. When I issue "make", the compilation crashes because somehow the following lines get added to .f files.
/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
This file is part of the GNU C...
This is likely a very simple question. I am running a fortran code compiled in hybrid openmp/openmpi. The code runs on 2 nodes (128 processors) with 32 MPI processes and 4 threads/MPI process. I am attempting to verify that a variable involved in the calculations on all the MPI processes and...
With trial and error, I managed to resolve the issue. By broadcast I meant broadcast across nodes so that all the nodes running the code can see the parameter. I had to make the parameter global by adding a SAVE statement.
Anyhow, the issue is resolved but thank you xwb for taking the time to...
Hi,
I am modifying a large code called Perturbo. Here I attempt to describe what the problem is with a simple example. I understand that this information may not be enough.
The code has a module file called polar_dispersion.f90. I would like to broadcast the value of a REAL called conc (not...
Hello,
I found a not-so-elegant way to do this:
For a 2-d grid, I use the following:
n=0
do n2=nstart(2),nmax(2)
if (MOD(n2,2)==0) then
do n3=nstart(3),nmax(3)
n=n+1
k(2,n)=n2-1...
Hello,
I have the following code which generates a 3-d grid between 0 and nmax (usually the three nmax's are around 100):
program Mesh
implicit none
integer, parameter :: npts=64
integer::ntot,n,n1,n2,n3,nmax(3), nstart(3),tmp(3),k(3,npts)
nmax(1)=4...
Hello,
I have a number of folders labeled K00001 to K00100 in my scratch folder. Each folder contains a file called a.dat.
From my scratch folder, I would like to go into each folder, read the content of a.dat, save the necessary information to an array and then move on to the next folder.
I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.