Мы пытаемся использовать R-пакет с именем Pmetrics
Обычно он не поддерживает среду Linux, но мы хотели бы выполнить некоторые тесты в параллельной установке.Например, распределенный тест с 1000 прогонов, распределенный по 20 контейнерам.
Используя этот файл Docker, вы можете воспроизвести ошибку.
FROM centos:centos7.5.1804
RUN yum -y install gcc-gfortran epel-release
RUN mkdir /root/pksim
RUN mkdir /root/pksim/Rlibraries
WORKDIR /root/pksim
RUN yum -y install R
COPY test.r test.r
COPY install.r install.r
скрипт install.r содержит эти строки
.libPaths("/root/pksim/Rlibraries")
install.packages("http://www.lapk.org/software/Pmetrics/Repos/src/contrib/Pmetrics_1.5.2.tar.gz", repos=NULL)
Сценарий test.r содержит следующие строки
r = getOption("repos")
r["CRAN"] = "http://lib.ugent.be/CRAN/"
options(repos = r)
rm(r)
.libPaths("/root/pksim/Rlibraries")
library(Pmetrics)
PMbuild()
Вы можете выполнить эту работу с помощью следующих команд:
- построить образ:
docker build -t pksim .
- запустите образ:
docker run -ti pksim /bin//bash
.Должна появиться консоль. - запустить скрипт R install.r (на консоли):
Rscript install.r
- запустить скрипт R test.r (на консоли):
Rscript test.r
Itзастревает при вызове PMBuild()
При выполнении test.r процесс застревает в бесконечном цикле, запрашивая этот пользовательский ввод.
Pmetrics needs to know which Fortran compiler you are using.
You only have to specify this once.
However, you can reconfigure if your compiler changes
by using the command PMFortranConfig(reconfig=T).
In each of the following <exec> is a place holder for the executable file name
and <files> is a placeholder for the files to be compiled. Both are required.
When applicable serial and parallel compile statements in Pmetrics are listed in that order.
1. gfortran -m64 -w -O3 -o <exec> <files>
gfortran -O3 -w -fopenmp -fmax-stack-var-size=32768 -o <exec> <files>
2. g95: g95 -o -fstatic <exec> <files>
3. Intel Visual: ifort -o <exec> <files>
4. Lahey: lf90 <files> -fix -out <exec>
5. Other (define custom command)
6. Help, I don't have a Fortran compiler!
Enter the number of your compiler:
Enter the number of your compiler:
Enter the number of your compiler:
Enter the number of your compiler:
Enter the number of your compiler:
Enter the number of your compiler:
Есть ли способнастроить компилятор по умолчанию, установив какую-нибудь опцию перед запуском PMBuild ()?
Мы создали репозиторий GitHub , содержащий источники этой проблемы.
Может кто-нибудь подуматьобходного пути?