[SimGrid-user] [installation] Fortran support in SMPI

yao hu huyao0107 at gmail.com
Wed Nov 14 11:59:16 CET 2018


Hi Augustin,

That is a miracle...!!
As you said, after running the following without hope

apt-get install gcc g++ gfortran automake cmake libboost-dev
openjdk-8-jdk openjdk-8-jre libxslt-dev libxml2-dev libevent-dev
libunwind-dev libdw-dev libboost-context-dev

and cmake in a new build folder, fortran is successfully detected!


        Compiler: Fortran ...........: /usr/bin/gfortran (id: GNU)
                version .............: 5.4.0
and

         Smpi fortran ..............: 1


Maybe the latter (cmake in a new folder) is the key to this problem, I
guess.

Thanks very much for your time and patience!


2018年11月14日(水) 19:30 Augustin DEGOMME <adegomme at gmail.com>:

> Hi,
>
> I can't reproduce it locally (xenial not on windows, but we have a test
> system with windows and ubuntu behaving correctly).
> I used a clean docker image, and just ran
>
> apt-get install gcc g++ gfortran automake cmake libboost-dev openjdk-8-jdk openjdk-8-jre libxslt-dev libxml2-dev libevent-dev libunwind-dev libdw-dev libboost-context-dev
>
> Which is the setup used on our testing infrastructure (and may install a
> few things not needed in your case).
>
> cmake -Denable_documentation=OFF -DCMAKE_INSTALL_PREFIX=/opt/simgrid3.21 .
>
> and I have Compiler: Fortran ...........: /usr/bin/gfortran (id: GNU)
>                 version .............: 5.4.0
>
> I notice that you are building inside the source folder. Thus cleanup may
> not be easy, and remains of previous attempts may be still present (for
> instance internal_config.h file which is generated by cmake). So my last
> idea would be to start over from a clean folder and build from a separate
> build folder ( once in the source folder, mkdir build; cd build ; cmake
> -Denable_documentation=OFF -DCMAKE_INSTALL_PREFIX=/opt/simgrid3.21 .. )
>
> Best regards,
> Augustin
>
> Le mer. 14 nov. 2018 à 11:00, yao hu <huyao0107 at gmail.com> a écrit :
>
>> I did it again and tried  "export FC=gfortran" before running cmake,
>> however the output does not change... desperate...
>> https://pastebin.com/HydzTFk9
>>
>> 2018年11月14日(水) 18:46 Augustin DEGOMME <adegomme at gmail.com>:
>>
>>> That's quite odd, indeed. Can you try  "export FC=gfortran" before
>>> running cmake again (remove cmakecache again) ?
>>>
>>> Le mer. 14 nov. 2018 à 10:42, yao hu <huyao0107 at gmail.com> a écrit :
>>>
>>>> Hi Augustin,
>>>>
>>>> I have tried the following really many time, but still fortran can not
>>>> be detected.
>>>>
>>>> make clean
>>>> rm CMakeCache.txt
>>>> cmake -DCMAKE_INSTALL_PREFIX=/opt/simgrid3.21 .
>>>>
>>>> I just forced -Denable_fortran to ON but nothing changed.
>>>> Here is the full output of my last cmake call.
>>>> https://pastebin.com/vg3jEuG8
>>>>
>>>> Thanks a lot for your help!
>>>>
>>>>
>>>> 2018年11月14日(水) 18:24 Augustin DEGOMME <adegomme at gmail.com>:
>>>>
>>>>> I would advise to start again by removing the CmakeCache.txt file in
>>>>> the build folder, as cmake may not really check again for existence of the
>>>>> compiler after the first time.
>>>>> We also provide a flag to enable fortran, but it should be activated
>>>>> by default (we use it to disable it). Check that you don't have
>>>>> -Denable_fortran=OFF somewhere. You can force it to ON, but it should be
>>>>> this way already.
>>>>> If it still doesn't work, please send the full output of your cmake
>>>>> calls.
>>>>>
>>>>> Best regards,
>>>>> Augustin
>>>>>
>>>>> Le mer. 14 nov. 2018 à 10:18, yao hu <huyao0107 at gmail.com> a écrit :
>>>>>
>>>>>> Hi Augustin,
>>>>>>
>>>>>> Thanks for your reply.
>>>>>> Yes, I am sure the system has gfortran in /usr/bin. It seems
>>>>>> cmake cannot find it (I have tried many times)?
>>>>>>
>>>>>> ......
>>>>>>         Compiler: C .................: /usr/bin/cc (id: GNU)
>>>>>>                 version .............: 5.4.0
>>>>>>                 is gnu ..............: 1
>>>>>>         Compiler: C++ ...............: /usr/bin/c++ (id: GNU)
>>>>>>                 version .............: 5.4.0
>>>>>>         Linker: .....................: /usr/bin/ld
>>>>>>                 version .............: 2.26
>>>>>>         Make program: ...............: /usr/bin/make
>>>>>> ......
>>>>>>
>>>>>>
>>>>>> ~/SimGrid-3.21$ gfortran -v
>>>>>> Using built-in specs.
>>>>>> COLLECT_GCC=gfortran
>>>>>> COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
>>>>>> Target: x86_64-linux-gnu
>>>>>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu
>>>>>> 5.4.0-6ubuntu1~16.04.10'
>>>>>> --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
>>>>>> --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
>>>>>> --program-suffix=-5 --enable-shared --enable-linker-build-id
>>>>>> --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
>>>>>> --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
>>>>>> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
>>>>>> --with-default-libstdcxx-abi=new --enable-gnu-unique-object
>>>>>> --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
>>>>>> --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
>>>>>> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home
>>>>>> --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64
>>>>>> --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64
>>>>>> --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
>>>>>> --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
>>>>>> --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
>>>>>> --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
>>>>>> --host=x86_64-linux-gnu --target=x86_64-linux-gnu
>>>>>> Thread model: posix
>>>>>> gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)
>>>>>>
>>>>>> 2018年11月14日(水) 18:01 Augustin DEGOMME <adegomme at gmail.com>:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Fortran should be activated by default if a compiler is found.
>>>>>>> Please check that your system has either gfortran, ifort or flang installed.
>>>>>>> It should be in the output of the cmake call, for example :
>>>>>>>
>>>>>>> *21:28:14*         Compiler: Fortran ...........: /opt/rh/devtoolset-7/root/usr/bin/gfortran (id: GNU)*21:28:14*                 version .............: 7.3.1
>>>>>>>
>>>>>>> and then
>>>>>>> *21:28:14*           Smpi fortran ..............: 1
>>>>>>>
>>>>>>>
>>>>>>> Le mer. 14 nov. 2018 à 09:48, yao hu <huyao0107 at gmail.com> a écrit :
>>>>>>>
>>>>>>>> Hi simgrid users,
>>>>>>>>
>>>>>>>> I encounter a new problem when installing simgrid3.21 from the
>>>>>>>> source (in win10+ubuntu subsystem).
>>>>>>>> I installed simgrid3.21 in /opt/simgrid/, but after installation*
>>>>>>>> smpiff and smpif90* do not exist in the folder /opt/simgird/bin/
>>>>>>>> (though there are smpicc, smpixx,....)
>>>>>>>>
>>>>>>>> I make clean and cmake again, and it seems Fortran is not supported
>>>>>>>> for SMPI. It still does not work after I modified the
>>>>>>>> *src/internal_config.h* as follows.
>>>>>>>>
>>>>>>>> .......
>>>>>>>> /* Fortran language is available for SMPI, and which one */
>>>>>>>>    #define SMPI_FORTRAN 0 --> 1
>>>>>>>>    #define SMPI_GFORTRAN 0 --> 1
>>>>>>>> ......
>>>>>>>>
>>>>>>>> bin/ has smpiff but it still has problems:
>>>>>>>> bin/smpiff: 204: bin/smpiff: -o.o: not found
>>>>>>>>
>>>>>>>> Then how do I enable Fortran for SMPI during the installation?
>>>>>>>> Any help is appreciated!
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Simgrid-user mailing list
>>>>>>>> Simgrid-user at lists.gforge.inria.fr
>>>>>>>> https://lists.gforge.inria.fr/mailman/listinfo/simgrid-user
>>>>>>>
>>>>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/simgrid-user/attachments/20181114/9cbf6859/attachment-0001.html>


More information about the Simgrid-user mailing list