Install and run g95 with openmpi on Ubuntu
Install and run g95 with openmpi on Ubuntu
- go to g95.org/downloads and look for g95, 64 default integer (shown as D.I. on the site)
- install libc6 (sudo apt-get install libc6)
- make a link to where-you-installed/g95-install/bin/x86_64-unknown-linux-gnu-g95 named g95 that is located in /usr/bin/
- install cshell: sudo apt-get install csh (this is no direct requirement of g95 but will remove a problem with check-mkfile)
- for the auto-test, create you own config file in config/hosts, take host-jonas-Latitude-E7440-GNU_Linux-Ubuntu.conf as template and rename it to host-'your hostname'-'your OS'.conf
- write g95 as your fortran compiler in your config-file
- make sure -fno-second-underscore is added to your compiler flags
- make sure -fdefault-real-8 is replaced with -r8
- run pc_auto-test --clean --debug and wait for errors:
- libopen-rte.so.7 not found -> put the location of the file in LIBRARY_PATH in .bashrc
- crti.o, crt1.o not found -> export the path to the file into LIBRARY_PATH in .bashrc
- mpif.h not found -> include the path to the file in the FC path of your host config (FC= g95 ...some flags... -I/"path-to-file")
- multiple binding, fatal error in pmpi_comm_size, Invalid_communicator -> make sure you included the mpif.h file that belongs to the libraries in MPI_LDLIBS
- libmpi_f90 and libmpi_f77 not found -> libmpi_f90.so.0 and libmpi_f77.so.0 are not recognized by the compiler. create links to them named libmpi_f90.so and libmpi_f77.so, respectively
- mpi crashing without much explanation -> google "run mpi passwordless" and follow instructions
- if g95 continues to complain about missing files, locate/install them manually and add their paths to the respective $PATH in .bashrc or the config-file