Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

hostname

roddur
Beginner
788 Views
how can i get hostname and memory used in a code using either ifort or gfortran? is there any standared for that? if not, can you tell me the workaround?
0 Kudos
2 Replies
TimP
Honored Contributor III
788 Views
Quoting - roddur
how can i get hostname and memory used in a code using either ifort or gfortran? is there any standared for that? if not, can you tell me the workaround?
You'll have to show us your problem before we can discuss work-around. 'info gethostname' or a web search will give you immediately much more information than can be repeated here. gethostname would be called identically from ifort or gfortran, provided that you use a recent version of either which includes iso_c_binding.
If you would be more specific about your memory question, you might get some suggestions, but surely you have ideas yourself.
0 Kudos
rreis
New Contributor I
788 Views
Quoting - roddur
how can i get hostname and memory used in a code using either ifort or gfortran? is there any standared for that? if not, can you tell me the workaround?

call system() can be used to invoke system functions/execs... maybe this can help (like external parsing of ps output)?
0 Kudos
Reply