FileNotFoundError: and driver_scaling_report.html - openmdao

I am having trouble debugging my openmdao model with the ScipyOptimizeDriver.
The model inputs are a vector of design variables and the scalar output is calculated in a separate flow solver. This does involve a setting up directories to save the results from the flow solver but this is separate from where the openmdao python file is located, which I think could be part of the problem. The error is shown below:
FileNotFoundError: [Errno 2] No such file or directory: 'reports/problem1/driver_scaling_report.html'
The file is evidently missing from the current directory but I am not sure why, when I run the actuator disk example problem this file is automatically generated in the correct place.

Related

Set wd in RStudio

I am creating a series of r scripts that will be used by multiple people, meaning that the working directory of files used and stored will differ. There are two folders, one for the R code, called "rcode," and another to store the generated outputs, called "data". These two folders will always be shared in tandem. To accommodate for the changing working directory I created a "global" script that has the following lines of code and resides in the "rcode" folder:
source_path = rstudioapi::getActiveDocumentContext()$path
setwd(dirname(source_path))
swd_data <- paste0("..\\data\\")
The first line gets the source path of the global script. The second line makes this the working directory. The third line essentially tells the script to store an output in the "data" folder, which has the same path as the "rcode" folder. So to read in a csv file within the "data" folder I write:
old_total_demand <- read.csv(paste0(swd_data, "boerne_total_demand.csv"))
When I use this script on my Windows laptop it works beautifully, but when I use it on my Mac I get the following error:
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file '..\data\demand\boerne_total_demand.csv': No such file or directory
Would anyone have any idea why this would be? Thanks in advance for the help.
I'm not sure what systems your collaborators will be using, but you may run into issues due to differences between Window/Mac/Linux with regards to how paths are written. I suggest you create a R Project .Rprj using RStudio and save that in your directory that contains subdirectories for data and rcode, and share the entire project directory.
/Project_dir/MyProject.Rprj
/Project_dir/data/
/Project_dir/rcode/
Then from the R project opened through RStudio you should be able to directly refer to your data by:
data <- read.csv("data/boerne_total_demand.csv")
The working directory will always be where your .Rproj is stored, so you can avoid having to setwd as it causes lots of chaos when sharing and collaborating with others.
I have this code from my current script at hand.
I hope you like it !
path <- dirname(getActiveDocumentContext()$path)
setwd(path)
swd_path <- paste0(path,"/data/")
if(!dir.exists(swd_path)){
dir.create(swd_path)
}
old_total_demand <- read.csv(paste0(swd_data, "boerne_total_demand.csv"))

What is the filepath that a "Read CSV" operator needs to read a file from RapidMiner Server?

I have a RM Server running on a VM (Ubuntu) on top of my Win10 machine.
I have a process to read a .csv file and write its contents on a MySQL database on a MySQL Server which also runs on the same VM.
The problem is that the read file operator does not seem to be able to find the file.
Scenario1.
When I try as location-name in the read csv operator ../data/myFile.csv
and run the process on Server I am getting Failed to execute initialization process: Error executing process /apps/myApp/process/task_read_csv_to_db: The file 'java.io.FileNotFoundException: /root/../data/myFile.csv (No such file or directory)' does not exist.
Scenario2.
When I try as location-name in the read csv operator /apps/myApp/data/myFile.csv
and run the process on Server I am getting Failed to execute initialization process: Error executing process /apps/myApp/process/task_read_csv_to_db: The file 'java.io.FileNotFoundException: /apps/myApp/data/myFile.csv (No such file or directory)' does not exist.
What is the right filepath that I should give to the Read CSV operator?
Just to update with the answer. After David's suggestion, I resulted in storing the .csv file outside of the /rapidminer-server-home/data/repository since every remote repository seems to be depicted with an integer instead of its original name, making the use of the actual full path of the file not usable.
I would say, the issue is that depending on the location of the JobAgent that is executing your process, the relative path might be varying.
Is /apps/myApp/data/myFile.csv the correct path to the file? If not, I would suggest to use the absolute path to the file. Hope this helps.
Best,
David

mqtt_client project in CC3100 SDK gives linker errors

I am trying to build the mqtt_client project in the CC3100SDK_1.2.0, so that later I can integrate it into the getting_started_with_wlan_station project for further work.
As suggested in the mqtt_client.pdf document, I built the osi_lib.lib and mqtt.a from cc3100-sdk\platform\msp430f5529lp\library_project_ccs.
On building the mqtt_client project, I get multiple linker errors as shown below
<Linking>
error #16019-D: file
"C:/TI/CC3100SDK_1.2.0/cc3100-sdk/platform/msp430f5529lp/library_project_ccs
/osi_lib/Debug/osi_lib.lib<osi_freertos.obj>" specifies small data memory
model, which is not compatible with restricted large data memory model
specified in a previous file or on the command line
error #16019-D: file
"C:/TI/CC3100SDK_1.2.0/cc3100-sdk/platform/msp430f5529lp/library_project_ccs
/osi_lib/Debug/osi_lib.lib<queue.obj>" specifies small data memory model,
which is not compatible with restricted large data memory model specified in
a previous file or on the command line
error #16019-D: file
"C:/TI/CC3100SDK_1.2.0/cc3100-sdk/platform/msp430f5529lp/library_project_ccs
/osi_lib/Debug/osi_lib.lib<tasks.obj>" specifies small data memory model,
which is not compatible with restricted large data memory model specified in
a previous file or on the command line
error #16019-D: file
"C:/TI/CC3100SDK_1.2.0/cc3100-sdk/platform/msp430f5529lp/library_project_ccs
/osi_lib/Debug/osi_lib.lib<port.obj>" specifies small data memory model,
which is not compatible with restricted large data memory model specified in
a previous file or on the command line
error #16019-D: file
"C:/TI/CC3100SDK_1.2.0/cc3100-sdk/platform/msp430f5529lp/library_project_ccs
/osi_lib/Debug/osi_lib.lib<portext.obj>" specifies small data memory model,
which is not compatible with restricted large data memory model specified in
a previous file or on the command line
error #16019-D: file
"C:/TI/CC3100SDK_1.2.0/cc3100-sdk/platform/msp430f5529lp/library_project_ccs
/osi_lib/Debug/osi_lib.lib<heap_3.obj>" specifies small data memory model,
which is not compatible with restricted large data memory model specified in
a previous file or on the command line
error #16019-D: file
"C:/TI/CC3100SDK_1.2.0/cc3100-sdk/platform/msp430f5529lp/library_project_ccs
/osi_lib/Debug/osi_lib.lib<list.obj>" specifies small data memory model,
which is not compatible with restricted large data memory model specified in
a previous file or on the command line
error #10010: errors encountered during linking; "mqtt_client.out" not built
I did the build for all of them using the same compiler TIv16.12.0.STS with Output format as eabi(ELF).
I tried changing the linker's File Search Path for the two libraries in the project for something like "{PROJECT_LOC}/../osi_lib/Debug/osi_lib.lib". However it gave some other errors.
I would really appreciate answers to the following questions:
Please let me know if I am missing something or if this is a known issue.
I am using a free version of Code Composer Studio Version: 6.2.0.00050. Is it even possible to run the mqtt_client project, since the document mentions Code footprint: Uses 44.4 KB of Flash?
If its not possible, then is there some other "lighter" and/or open source mqtt client for code composer studio that I could use?

Error when trying to load .RData information

I have been trying to save my R environment to load in later sessions (my environment has about 12 data frames).
save.image(file = 'tests.RData')
if I look in my directory, my file looks like data has been saved since the .RData file is about 40MB in size.
Now when I try to load the file in the directory...
load('test.RData')
I get this error:
Error: bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file 'tests.RData' has magic number ''
Use of save versions prior to 2 is deprecated
I tried looking at previous issues with this, and the only advice was to try load() and source(). However, I believe load() is for .rda/.RData files.
Is there anyway to save my environment and load it properly? What is causing my issue exactly?

Getting Error in config.txt file of NetSim Simulator

When I open NetSim's Config.txt file after Simulation I get the following error:
Error in config file ---
1) Unknown xml tag "UPDATE_TIMER" in line number 166.
Tag path: TETCOS_NETSIM/NETWORK_CONFIGURATION/DEVICE_CONFIGURATION/DEVICE
[3] /LAYER [2]/ROUTING_PROTOCOL/PROTOCOL_PROPERTY
However, Simulation runs Successfully. What does this mean?
You need to specify the missing parameters in the Configuration file which are mentioned in the "ConfigLog.txt". Since, NetSim will crash if all the required parameters are not configured, NetSim addresses this issue by enabling default values where ever required. Error produced in the "ConfigLog.txt" because the value for the "UPDATE_TIMER" for "ROUTING_PROTOCOL" is not specified in the Configuration file. In order to obtain accurate metrics for the desired scenario you need to update your Configuration.xml file.

Resources