modern-fortran / neural-fortran

A parallel framework for deep learning
MIT License
398 stars 82 forks source link

Enable Travis CI #1

Closed milancurcic closed 5 years ago

milancurcic commented 6 years ago

Start with gfortran and -DSERIAL, build OpenCoarrays later if at all possible.

scivision commented 5 years ago

This and Cmake and Plotting fixes can be nearly carbon-copied from my Tsunami pull request

milancurcic commented 5 years ago

Do you know the gfortran version there? We're using co_sum and co_broadcast here. Even without OpenCoarrays (-fcoarray=single), it needs a relatively recent gfortran

milancurcic commented 5 years ago

I started looking more in the CircleCI direction, Travis has just been such a pain for me to learn because their lock-in to relatively old Ubuntus and opaque docs. What would you suggest using for potentially bleeding-edge Fortran features (F2018)? Can Travis be a reasonable choice here?

scivision commented 5 years ago

Yes it can. You can get up to gfortran-8 with Travis. Just change the reference to gfortran-6 to gfortran-8. However, if you want to use certain libraries that depend on the pre-gcc-8 ABI, then you might consider either a Bionic docker image, or using Appveyor, which comes with Ubuntu 18.04 as noted in my .appveyor.yml for tsunami.

You don't necessarily need Circle-CI, most things can be done with Travis. Just whatever one's preference is. I'm very familiar with Travis and AppVeyor.

scivision commented 5 years ago

If you want to do something that's easier in Ubuntu 18.04 than 16.04, consider AppVeyor as Ubuntu 18.04 is built in with

image:
- Ubuntu1804

You can use Docker through Travis or AppVeyor of course.

scivision commented 5 years ago

At the current time, I think that Travis is the only CI that has free Linux, Mac and Windows. AppVeyor has free Linux and Windows. Circle CI is free Linux.

scivision commented 5 years ago

A substantial percent of the Travis YML I see is needlessly overcomplicated, maybe because it was done for older Travis versions. let me know what you're trying to do and I can tell you if anything beyond plain Travis or AppVeyor YML is needed.

milancurcic commented 5 years ago

OK, thanks, super helpful info! I'm fine with sticking to Linux. Do you have a favorite Travis + docker YML example?

scivision commented 5 years ago

I am slimming a Docker image down for public release. I don't have a specific other Fortran Docker Travis example in mind, but basically one approach is:

  1. Create suitable Docker image on laptop with Dockerfile, prioritizing small image size
  2. Upload image to DockerHub
  3. Create .travis.yml that pulls that Docker image, starts a Docker container and sends commands to the container

I have not determined if that's the most canonical way to use Travis for arbitrary Docker images. The download time for large Docker images is one reason I didn't use this widely on Travis, instead using the Docker image on private persistent resources that don't need to re-download the Docker image each time.

scivision commented 5 years ago

https://github.com/scivision/docker-fortran Is an example of loading Ubuntu 18.04 on Travis for Fortran with CMake via Docker

scivision commented 5 years ago

https://github.com/scivision/docker-fortran This example is now working again, with a non-root Docker container building and running multi-image coarray Fortran example on Travis-CI

milancurcic commented 5 years ago

It works, thanks @scivision !