Welcome, Guest
Username: Password: Remember me

TOPIC: Running modified subroutines in parallel

Running modified subroutines in parallel 12 years 4 months ago #5022

  • fay
  • fay's Avatar
Hi

I have modified limwac.f and I now wish to run this modified subroutine in parallel. I have used the global numbering in my modification and thus I know I need to add if loops into limwac including the the variables NCSIZE and KNOGL: can anyone tell me how I can access these variables from inside limwac.f please?

Thanks

Fay
The administrator has disabled public write access.

Re: Running modified subroutines in parallel 12 years 4 months ago #5027

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello,

You can try to declare
USE BIEF_DEF, ONLY : NCSIZE, KNOGL
at the beginning of LIMWAC subroutine.

Regards,

Chi-Tuan
The administrator has disabled public write access.

Re: Running modified subroutines in parallel 12 years 4 months ago #5032

  • fay
  • fay's Avatar
Thanks Chi-Tuan,

USE BIEF_DEF, ONLY: NCSIZE, KNOGL

works for NCSIZE but not KNOGL, I get the following error: 'Name in only-list does not exist'. Not sure if this makes a difference but I am running version 6.0 not 6.1.

Fay
The administrator has disabled public write access.

Re: Running modified subroutines in parallel 12 years 4 months ago #5035

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You have KNOLG as MESH%KNOLG%I, so put MESH in the ONLY list if it is not in the arguments.

Regards,

JMH
The administrator has disabled public write access.

Re: Running modified subroutines in parallel 12 years 4 months ago #5044

  • fay
  • fay's Avatar
Hello

I put the following line:

USE BIEF_DEF, ONLY:NCSIZE, MESH

after the subroutine declaration, but I get the same error:

'Name in only-list does not exist'

Does anyone know what is wrong?

Thanks

Fay
The administrator has disabled public write access.

Re: Running modified subroutines in parallel 12 years 4 months ago #5045

  • jmhervouet
  • jmhervouet's Avatar
Hello,

OK, I did not notice the BIEF_DEF, actually NCSIZE is seen with a simple USE BIEF
and MESH is seen by a :

USE DECLARATIONS_TELEMAC2D, ONLY : MESH

Regards,

JMH
The administrator has disabled public write access.

Re: Running modified subroutines in parallel 12 years 4 months ago #5047

  • fay
  • fay's Avatar
Hi

Attempting to use DECLARATIONS_TELEMAC2D gives the following error:

wacfort.f(62): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [DECLARATIONS_TELEMAC2D]

USE DECLARATIONS_TELEMAC2D, ONLY:MESH

JMH did you mean to write DECLARATIONS_TOMAWAC? When I use DECLARATIONS_TOMAWAC it runs, I'm just not sure if this is giving me what I require.

Regards

Fay
The administrator has disabled public write access.

Re: Running modified subroutines in parallel 12 years 4 months ago #5049

  • jmhervouet
  • jmhervouet's Avatar
Sorry, yes, it is DECLARATIONS_TOMAWAC, ONLY : MESH

Maybe it works now...

JMH
The administrator has disabled public write access.

Re: Running modified subroutines in parallel 12 years 4 months ago #5051

  • fay
  • fay's Avatar
Yes thanks. To summarise for others, to change your code so it runs in parallel you need to include the following declarations:

USE BIEF, ONLY:NCSIZE
USE DECLARATIONS_TOMAWAC, ONLY:MESH

and then if you wish for example to assign the value 0 to a variable D at the global node number k, you would include the following code:

!
IF (NCSIZE.GE.1) THEN !i.e. running in parallel
IF (MESH%KNOGL%I(k)) = 0 ! i.e. the node is in this subdomain
D(MESH%KNOGL%I(k)) = 0
ENDIF
ELSE ! i.e. not parallel
D(k) = 0
ENDIF
!

Fay
The administrator has disabled public write access.
Moderators: tfouquet

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.