<div dir="ltr">Hi Philipp,<div><br><div><span style="line-height:1.5">You should be able to define subprograms in a separate F90 file and call them from the usr file.  Then, just compile your new file and add it to the link line using the "</span><span style="line-height:19.5px">USR_LFLAGS" option in makenek.</span><span style="line-height:1.5"> However, it could be a bit tricky to access global data stored Nek5000's common blocks, so I'd strongly suggest making those routines self-contained with all data passing via arguments.  This approach can be used to link in C or C++ code as well, as they are all object compatible.</span></div></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">The usr file itself needs to be F77, if for no other reason than the include files ('SIZE', for example) are in F77 format.</span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:19.5px">Depending on your problem, you may be able to use NekBox, which is written in F90 and uses F90 for the usr file.  NekBox is more of a prototyping code than a production code, so its functionality is limited.  See:</span></div><div><span style="line-height:19.5px"><a href="https://github.com/Nek5000/NekBox">https://github.com/Nek5000/NekBox</a></span><br></div><div><span style="line-height:19.5px"><br></span></div><div><span style="line-height:19.5px">Max</span></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Feb 11, 2016 at 8:35 AM <<a href="mailto:nek5000-users@lists.mcs.anl.gov" target="_blank">nek5000-users@lists.mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi Neks,
<div><br>
</div>
<div>Is it possible to link Fortran90 code via the Fortran Interface (b3d.usr).</div>
<div><br>
</div>
<div>Best regards, Philipp Weiss</div>
</div>
</div>

_______________________________________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov" target="_blank">Nek5000-users@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" rel="noreferrer" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
</blockquote></div></div>