Results 1 to 7 of 7

Thread: Re: Installing intel fortran

  1. #1
    Join Date
    Jul 2015
    Beans
    6

    Re: Installing intel fortran

    Hello there, also a newbie here.

    So far, all pages I found about this subject recommend editing your .basrc file. Here are some other references:

    https://software.intel.com/en-us/art...x-with-ubuntu/
    https://software.intel.com/en-us/forums/topic/277289

    I have tried many things, like adding all of these at the end of my .bashrc file, all failures:

    Code:
    source /opt/intel/composer_xe_2015.3.187/bin/intel64/ifortvars.sh intel64
    Code:
    source ~/opt/intel/composer_xe_2015.3.187/bin/ifortvars.sh intel64
    Code:
    source /root/opt/intel/composer_xe_2015.3.187/bin/intel64/ifortvars.sh intel64
    The last one actually messed up my terminal, don't recommend it (when you start the terminal, you're not a superuser yet, so you don't have permission to access root, and it goes wrong, apparently).
    The change that made a difference was actually this one:

    Code:
    PATH="/opt/intel/composer_xe_2015.3.187/bin/intel64:$PATH"
    export PATH
    LD_LIBRARY_PATH="/opt/intel/composer_xe_2015.3.187/compiler/lib/intel64:$LD_LIBRARY_PATH"
    export LD_LIBRARY_PATH
    After that, this is the kind of response I get from the terminal:
    Code:
    leonardo@Leonardo-linux:~$ which ifort
    /opt/intel/composer_xe_2015.3.187/bin/intel64/ifort
    leonardo@Leonardo-linux:~$ ifort -v
    ifort version 15.0.3
    leonardo@Leonardo-linux:~$ ifort
    ifort: command line error: no files specified; for help type "ifort -help"
    So it seems that things are OK, but they're not.
    When I try this other command, this is what comes out of the terminal:

    Code:
    leonardo@Leonardo-linux:~/lib$ sudo make -f makefile
    ifort -c -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I/lib/src/grib_api-1.13.1/include erf.f90
    /bin/bash: ifort: command not found
    make: *** [erf.o] Error 127
    Can someone help me? I have attached the code for the makefile makefile.odt.
    Last edited by slickymaster; July 14th, 2015 at 04:07 PM. Reason: Replaced color tags for code tags

  2. #2
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Installing intel fortran

    Moved to a thread of its own.

    Please don't hijack other people's threads. Not only it dilutes community effort but it's also the wrong way to get the proper and adequate help to your problem.

  3. #3
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Installing intel fortran

    This doesn't seem to be a problem with installation, rather with usage. A couple of comments:

    Code:
    leonardo@Leonardo-linux:~$ ifort
    ifort: command line error: no files specified; for help type "ifort -help"
    This is normal (gcc would produce a similar error here): it's a compiler, so it needs to be given at least one source code file to compile e.g.

    Code:
    ifort somefile.f90
    Code:
    $ sudo make -f makefile
    ifort -c -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I/lib/src/grib_api-1.13.1/include erf.f90
    /bin/bash: ifort: command not found
    make: *** [erf.o] Error 127
    `sudo` does not inherit your user's environment (primarily for security reasons). Although you could add the equivalent PATH, LD_LIBRARY_PATH etc. definitions to the sudo environment it's really not good practice: it would be better to arrange your development directories so that you don't need to be root to compile things i.e. either build in your home directory or in a dedicated /usr/local/src directory with appropriately permissive write permissions. Many 3rd party makefiles have a separate `install` target that lets you `make` with plain user permissions and then `sudo make install` for exactly this reason.

    Hope this helps.

  4. #4
    Join Date
    Jul 2015
    Beans
    6

    Re: Installing intel fortran

    Thank you for your fast response, this is a really good community, I'm impressed.

    About installs:
    Quote Originally Posted by steeldriver View Post
    `sudo` does not inherit your user's environment (primarily for security reasons). Although you could add the equivalent PATH, LD_LIBRARY_PATH etc. definitions to the sudo environment it's really not good practice: it would be better to arrange your development directories so that you don't need to be root to compile things i.e. either build in your home directory or in a dedicated /usr/local/src directory with appropriately permissive write permissions. Many 3rd party makefiles have a separate `install` target that lets you `make` with plain user permissions and then `sudo make install` for exactly this reason.
    During the intel fortran compiler installation, I didn't pay that much attention if it asked me where to install it. All I know is that it ended up in /root/opt/intel/

    Regarding that makefile, I created a /lib folder under my home directory (/home/leonardo/lib) for the program. Apparently, I can't do much there without sudo either, even though it's supposed to be my directory. How do I figure out which directories are permissive?

    Since ifort appears to be installed, I think I'm not capable of flagging it correctly in the makefile. I'd be also really grateful for some help with that.

    Cheers and thanks again.

  5. #5
    Join Date
    Jul 2015
    Beans
    6

    Re: Installing intel fortran

    Hi there slickymaster, thank you for the heads up. I didn't mean to use the other thread only to ask more questions. I thought that maybe the extra information in the beginning of my post would add value, and that it was all related. I'll create my own threads if I'm in doubt if I'm asking questions more than giving solutions.

  6. #6
    Join Date
    Apr 2012
    Beans
    7,256

    Re: Installing intel fortran

    Well as far as permissions and ownership are concerned, `sudo` (like Homer's alcohol) is the cause of and solution to all of life's problems - to start, try

    Code:
    sudo chown leonardo:leonardo /home/leonardo/lib
    and then run your make command again without sudo

  7. #7
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Installing intel fortran

    Quote Originally Posted by leo_br_hidro View Post
    Hi there slickymaster, thank you for the heads up. I didn't mean to use the other thread only to ask more questions. I thought that maybe the extra information in the beginning of my post would add value, and that it was all related. I'll create my own threads if I'm in doubt if I'm asking questions more than giving solutions.
    Sure. No problem.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •