Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Vahid9
  • Content: Threads
  • Order by date
  1. Vahid9

    Increasing double loop efficiency

    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...
  2. Vahid9

    Preventing the addition of C-style comments in gfortran compilation

    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...
  3. Vahid9

    Printing in a fortran MPI/OpenMP environment

    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...
  4. Vahid9

    Broadcasting a REAL number to another file

    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...
  5. Vahid9

    Do loop in ascending and descending order

    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...
  6. Vahid9

    Reading files inside many numbered folders

    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...
  7. Vahid9

    NaN output outside but not inside DO loop

    Dear Fortran Users, In the following code, I can print all the values for conc_h inside the first DO loop over i before ENDDO and the total conc_h right after the ENDDO. When I try to print conc_e inside the second DO loop over i, I get REAL values but when I put the print statement right after...
  8. Vahid9

    Transfer of data from inside a subroutine to main program

    Hello, The following program does not compile but returns the following error: error #6236: A specification statement cannot appear in the executable section. All I would like to do is to be able to transfer the array r(i) from the subroutine to the main program without using the "contents"...
  9. Vahid9

    Segmentation fault with write statement

    Hello, I am using a fortran code called EPW and would like to extract a matrix A(ibnd,imode,ik) from the code. This is how I have tried to extract the matrix: Open file to write to Allocate(A(nbnd,nmodes,nkf)) Loop iq ! from 1 to nqf Loop ik ! from 1 to nkf Loop ibnd ! from 1 to nbnd...

Part and Inventory Search

Back
Top