<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks J-M. I will attempt to follow this.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
dan</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Jean-Michel Campin <jmc@mit.edu><br>
<b>Sent:</b> Thursday, July 27, 2023 15:17<br>
<b>To:</b> mitgcm-support@mitgcm.org <mitgcm-support@mitgcm.org><br>
<b>Subject:</b> Re: [MITgcm-support] configuring compilation dependencies in Makefile</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This email was sent to you by someone outside the University.<br>
You should only click on links or attachments if you are certain that the email is genuine and the content is safe.<br>
<br>
Hi Dan,<br>
<br>
The convention that is currently used is that F90 modules are declared inside src file<br>
with a name that finishes with "_mod.F" (if fixed format, like in pkg/ptracers) or<br>
with "_mod.F90" (if free format, like in pkg/atm_phys).<br>
With these type of sufix the f90makedepend is able to work and make sure things are<br>
compiled in the right order.<br>
<br>
May be your pkg/streamice src files that contains F90 modules could follow the same<br>
convention ?<br>
<br>
Cheers,<br>
Jean-Michel<br>
<br>
PS: Oliver might know more about these pieces.<br>
<br>
On Thu, Jul 27, 2023 at 08:50:42AM +0000, Daniel Goldberg wrote:<br>
> Hello there<br>
><br>
> I am working with a package (STREAMICE) which, depending on options, makes use of a subroutine<<a href="https://github.com/MITgcm/MITgcm/blob/master/pkg/streamice/streamice_cg_solve_petsc.F">https://github.com/MITgcm/MITgcm/blob/master/pkg/streamice/streamice_cg_solve_petsc.F</a>>
which "uses" a module<<a href="https://github.com/MITgcm/MITgcm/blob/master/pkg/streamice/streamice_arg_common_petsc.F">https://github.com/MITgcm/MITgcm/blob/master/pkg/streamice/streamice_arg_common_petsc.F</a>>, and therefore the source should be compiled
after the module source. (I'm required to use the module, rather than a common block, due to restrictions of an external library, PETSc.) I've only been able to do this by compiling without the -j option and ensuring the alphabetical order of compilation.<br>
><br>
> However, I have seen that some packages (e.g. ptracers) trigger what looks like dependencies in the Makefile, e.g.<br>
><br>
> PTRACERS_MOD.h: ptracers_dyn_state_mod.o ptracers_dyn_state_data_mod.o<br>
><br>
> Assuming this actually is a dependency of the type I seek, Im not able to figure out how it was generated. One difference is that "ptracers_dyn_state_data_mod" is used in a header file (PTRACERS_MOD.h). Is there any way to change genmake2, or a file read
by it, in order to ensure the compilation order I seek even when using parallel compilation?<br>
><br>
> Many thanks<br>
> Dan<br>
><br>
> --<br>
> Daniel Goldberg, PhD (he/him)<br>
> Reader in Glaciology<br>
> School of Geosciences, University of Edinburgh<br>
> Geography Building, Drummond Street, Edinburgh EH8 9XP<br>
><br>
> Please note I am not working Mondays during June/July/August 2023 due to childcare responsibility.<br>
><br>
> The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. Is e buidheann carthannais a th' ann an Oilthigh Dhùn Èideann, clàraichte an Alba, àireamh clàraidh SC005336.<br>
<br>
> _______________________________________________<br>
> MITgcm-support mailing list<br>
> MITgcm-support@mitgcm.org<br>
> <a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
<br>
_______________________________________________<br>
MITgcm-support mailing list<br>
MITgcm-support@mitgcm.org<br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</div>
</span></font></div>
</body>
</html>